mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
USB fixes for 5.5-rc3
Here are some small USB fixes for some reported issues. Included in here are: - xhci build warning fix - ehci disconnect warning fix - usbip lockup fix and error cleanup fix - typec build fix All of these have been in linux-next with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXfxxlA8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+yld+gCfQtFYPnahIiQL7DQiNVa2jzud3wcAn22NgyFJ rDvFZ5RL/UFoHxygankX =RZup -----END PGP SIGNATURE----- Merge tag 'usb-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for some reported issues. Included in here are: - xhci build warning fix - ehci disconnect warning fix - usbip lockup fix and error cleanup fix - typec build fix All of these have been in linux-next with no reported issues" * tag 'usb-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: xhci: Fix build warning seen with CONFIG_PM=n usbip: Fix error path of vhci_recv_ret_submit() usbip: Fix receive error in vhci-hcd when using scatter-gather USB: EHCI: Do not return -EPIPE when hub is disconnected usb: typec: fusb302: Fix an undefined reference to 'extcon_get_state'
This commit is contained in:
commit
7181aba146
@ -27,6 +27,10 @@
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/* PID Codes that are used here, from EHCI specification, Table 3-16. */
|
||||
#define PID_CODE_IN 1
|
||||
#define PID_CODE_SETUP 2
|
||||
|
||||
/* fill a qtd, returning how much of the buffer we were able to queue up */
|
||||
|
||||
static int
|
||||
@ -190,7 +194,7 @@ static int qtd_copy_status (
|
||||
int status = -EINPROGRESS;
|
||||
|
||||
/* count IN/OUT bytes, not SETUP (even short packets) */
|
||||
if (likely (QTD_PID (token) != 2))
|
||||
if (likely(QTD_PID(token) != PID_CODE_SETUP))
|
||||
urb->actual_length += length - QTD_LENGTH (token);
|
||||
|
||||
/* don't modify error codes */
|
||||
@ -206,6 +210,13 @@ static int qtd_copy_status (
|
||||
if (token & QTD_STS_BABBLE) {
|
||||
/* FIXME "must" disable babbling device's port too */
|
||||
status = -EOVERFLOW;
|
||||
/*
|
||||
* When MMF is active and PID Code is IN, queue is halted.
|
||||
* EHCI Specification, Table 4-13.
|
||||
*/
|
||||
} else if ((token & QTD_STS_MMF) &&
|
||||
(QTD_PID(token) == PID_CODE_IN)) {
|
||||
status = -EPROTO;
|
||||
/* CERR nonzero + halt --> stall */
|
||||
} else if (QTD_CERR(token)) {
|
||||
status = -EPIPE;
|
||||
|
@ -519,7 +519,6 @@ static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
|
||||
retval = xhci_resume(xhci, hibernated);
|
||||
return retval;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static void xhci_pci_shutdown(struct usb_hcd *hcd)
|
||||
{
|
||||
@ -532,6 +531,7 @@ static void xhci_pci_shutdown(struct usb_hcd *hcd)
|
||||
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
|
||||
pci_set_power_state(pdev, PCI_D3hot);
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -32,6 +32,7 @@ endif # TYPEC_TCPCI
|
||||
config TYPEC_FUSB302
|
||||
tristate "Fairchild FUSB302 Type-C chip driver"
|
||||
depends on I2C
|
||||
depends on EXTCON || !EXTCON
|
||||
help
|
||||
The Fairchild FUSB302 Type-C chip driver that works with
|
||||
Type-C Port Controller Manager to provide USB PD and USB
|
||||
|
@ -727,6 +727,9 @@ int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
|
||||
|
||||
copy -= recv;
|
||||
ret += recv;
|
||||
|
||||
if (!copy)
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret != size)
|
||||
|
@ -77,16 +77,21 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
|
||||
usbip_pack_pdu(pdu, urb, USBIP_RET_SUBMIT, 0);
|
||||
|
||||
/* recv transfer buffer */
|
||||
if (usbip_recv_xbuff(ud, urb) < 0)
|
||||
return;
|
||||
if (usbip_recv_xbuff(ud, urb) < 0) {
|
||||
urb->status = -EPROTO;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* recv iso_packet_descriptor */
|
||||
if (usbip_recv_iso(ud, urb) < 0)
|
||||
return;
|
||||
if (usbip_recv_iso(ud, urb) < 0) {
|
||||
urb->status = -EPROTO;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* restore the padding in iso packets */
|
||||
usbip_pad_iso(ud, urb);
|
||||
|
||||
error:
|
||||
if (usbip_dbg_flag_vhci_rx)
|
||||
usbip_dump_urb(urb);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user