Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'usb-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
"Here are some small USB driver fixes for 5.16 to resolve some reported
problems:

- mtu3 driver fixes

- typec ucsi driver fix

- xhci driver quirk added

- usb gadget f_fs fix for reported crash

All of these have been in linux-next for a while with no reported
problems"

* tag 'usb-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: typec: ucsi: Only check the contract if there is a connection
xhci: Fresco FL1100 controller should not have BROKEN_MSI quirk set.
usb: mtu3: set interval of FS intr and isoc endpoint
usb: mtu3: fix list_head check warning
usb: mtu3: add memory barrier before set GPD's HWO
usb: mtu3: fix interval value for intr and isoc
usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear.

+29 -8
+6 -3
drivers/usb/gadget/function/f_fs.c
··· 1773 1773 1774 1774 BUG_ON(ffs->gadget); 1775 1775 1776 - if (ffs->epfiles) 1776 + if (ffs->epfiles) { 1777 1777 ffs_epfiles_destroy(ffs->epfiles, ffs->eps_count); 1778 + ffs->epfiles = NULL; 1779 + } 1778 1780 1779 - if (ffs->ffs_eventfd) 1781 + if (ffs->ffs_eventfd) { 1780 1782 eventfd_ctx_put(ffs->ffs_eventfd); 1783 + ffs->ffs_eventfd = NULL; 1784 + } 1781 1785 1782 1786 kfree(ffs->raw_descs_data); 1783 1787 kfree(ffs->raw_strings); ··· 1794 1790 1795 1791 ffs_data_clear(ffs); 1796 1792 1797 - ffs->epfiles = NULL; 1798 1793 ffs->raw_descs_data = NULL; 1799 1794 ffs->raw_descs = NULL; 1800 1795 ffs->raw_strings = NULL;
+4 -1
drivers/usb/host/xhci-pci.c
··· 123 123 /* Look for vendor-specific quirks */ 124 124 if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC && 125 125 (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK || 126 - pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1100 || 127 126 pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1400)) { 128 127 if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK && 129 128 pdev->revision == 0x0) { ··· 156 157 if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC && 157 158 pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1009) 158 159 xhci->quirks |= XHCI_BROKEN_STREAMS; 160 + 161 + if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC && 162 + pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1100) 163 + xhci->quirks |= XHCI_TRUST_TX_LENGTH; 159 164 160 165 if (pdev->vendor == PCI_VENDOR_ID_NEC) 161 166 xhci->quirks |= XHCI_NEC_HOST;
+10 -2
drivers/usb/mtu3/mtu3_gadget.c
··· 77 77 if (usb_endpoint_xfer_int(desc) || 78 78 usb_endpoint_xfer_isoc(desc)) { 79 79 interval = desc->bInterval; 80 - interval = clamp_val(interval, 1, 16) - 1; 80 + interval = clamp_val(interval, 1, 16); 81 81 if (usb_endpoint_xfer_isoc(desc) && comp_desc) 82 82 mult = comp_desc->bmAttributes; 83 83 } ··· 89 89 if (usb_endpoint_xfer_isoc(desc) || 90 90 usb_endpoint_xfer_int(desc)) { 91 91 interval = desc->bInterval; 92 - interval = clamp_val(interval, 1, 16) - 1; 92 + interval = clamp_val(interval, 1, 16); 93 93 mult = usb_endpoint_maxp_mult(desc) - 1; 94 94 } 95 + break; 96 + case USB_SPEED_FULL: 97 + if (usb_endpoint_xfer_isoc(desc)) 98 + interval = clamp_val(desc->bInterval, 1, 16); 99 + else if (usb_endpoint_xfer_int(desc)) 100 + interval = clamp_val(desc->bInterval, 1, 255); 101 + 95 102 break; 96 103 default: 97 104 break; /*others are ignored */ ··· 242 235 mreq->request.dma = DMA_ADDR_INVALID; 243 236 mreq->epnum = mep->epnum; 244 237 mreq->mep = mep; 238 + INIT_LIST_HEAD(&mreq->list); 245 239 trace_mtu3_alloc_request(mreq); 246 240 247 241 return &mreq->request;
+6 -1
drivers/usb/mtu3/mtu3_qmu.c
··· 273 273 gpd->dw3_info |= cpu_to_le32(GPD_EXT_FLAG_ZLP); 274 274 } 275 275 276 + /* prevent reorder, make sure GPD's HWO is set last */ 277 + mb(); 276 278 gpd->dw0_info |= cpu_to_le32(GPD_FLAGS_IOC | GPD_FLAGS_HWO); 277 279 278 280 mreq->gpd = gpd; ··· 308 306 gpd->next_gpd = cpu_to_le32(lower_32_bits(enq_dma)); 309 307 ext_addr |= GPD_EXT_NGP(mtu, upper_32_bits(enq_dma)); 310 308 gpd->dw3_info = cpu_to_le32(ext_addr); 309 + /* prevent reorder, make sure GPD's HWO is set last */ 310 + mb(); 311 311 gpd->dw0_info |= cpu_to_le32(GPD_FLAGS_IOC | GPD_FLAGS_HWO); 312 312 313 313 mreq->gpd = gpd; ··· 449 445 return; 450 446 } 451 447 mtu3_setbits(mbase, MU3D_EP_TXCR0(mep->epnum), TX_TXPKTRDY); 452 - 448 + /* prevent reorder, make sure GPD's HWO is set last */ 449 + mb(); 453 450 /* by pass the current GDP */ 454 451 gpd_current->dw0_info |= cpu_to_le32(GPD_FLAGS_BPS | GPD_FLAGS_HWO); 455 452
+3 -1
drivers/usb/typec/ucsi/ucsi.c
··· 1150 1150 ret = 0; 1151 1151 } 1152 1152 1153 - if (UCSI_CONSTAT_PWR_OPMODE(con->status.flags) == UCSI_CONSTAT_PWR_OPMODE_PD) { 1153 + if (con->partner && 1154 + UCSI_CONSTAT_PWR_OPMODE(con->status.flags) == 1155 + UCSI_CONSTAT_PWR_OPMODE_PD) { 1154 1156 ucsi_get_src_pdos(con); 1155 1157 ucsi_check_altmodes(con); 1156 1158 }