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.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Grek KH:
"Here are some small USB fixes for 5.0-rc6.

Nothing huge, the normal amount of USB gadget fixes as well as some
USB phy fixes. There's also a typec fix as well. Full details are in
the shortlog.

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

* tag 'usb-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: typec: tcpm: Correct the PPS out_volt calculation
usb: gadget: musb: fix short isoc packets with inventra dma
usb: phy: am335x: fix race condition in _probe
usb: dwc3: exynos: Fix error handling of clk_prepare_enable
usb: phy: fix link errors
usb: gadget: udc: net2272: Fix bitwise and boolean operations
usb: dwc3: gadget: Handle 0 xfer length for OUT EP

+20 -32
+2 -2
drivers/usb/dwc3/dwc3-exynos.c
··· 78 78 for (i = 0; i < exynos->num_clks; i++) { 79 79 ret = clk_prepare_enable(exynos->clks[i]); 80 80 if (ret) { 81 - while (--i > 0) 81 + while (i-- > 0) 82 82 clk_disable_unprepare(exynos->clks[i]); 83 83 return ret; 84 84 } ··· 223 223 for (i = 0; i < exynos->num_clks; i++) { 224 224 ret = clk_prepare_enable(exynos->clks[i]); 225 225 if (ret) { 226 - while (--i > 0) 226 + while (i-- > 0) 227 227 clk_disable_unprepare(exynos->clks[i]); 228 228 return ret; 229 229 }
+1 -1
drivers/usb/dwc3/gadget.c
··· 1119 1119 unsigned int maxp = usb_endpoint_maxp(dep->endpoint.desc); 1120 1120 unsigned int rem = length % maxp; 1121 1121 1122 - if (rem && usb_endpoint_dir_out(dep->endpoint.desc)) { 1122 + if ((!length || rem) && usb_endpoint_dir_out(dep->endpoint.desc)) { 1123 1123 struct dwc3 *dwc = dep->dwc; 1124 1124 struct dwc3_trb *trb; 1125 1125
+1 -1
drivers/usb/gadget/udc/net2272.c
··· 2083 2083 #if defined(PLX_PCI_RDK2) 2084 2084 /* see if PCI int for us by checking irqstat */ 2085 2085 intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT); 2086 - if (!intcsr & (1 << NET2272_PCI_IRQ)) { 2086 + if (!(intcsr & (1 << NET2272_PCI_IRQ))) { 2087 2087 spin_unlock(&dev->lock); 2088 2088 return IRQ_NONE; 2089 2089 }
+1 -12
drivers/usb/musb/musb_gadget.c
··· 452 452 } 453 453 454 454 if (request) { 455 - u8 is_dma = 0; 456 - bool short_packet = false; 457 455 458 456 trace_musb_req_tx(req); 459 457 460 458 if (dma && (csr & MUSB_TXCSR_DMAENAB)) { 461 - is_dma = 1; 462 459 csr |= MUSB_TXCSR_P_WZC_BITS; 463 460 csr &= ~(MUSB_TXCSR_DMAENAB | MUSB_TXCSR_P_UNDERRUN | 464 461 MUSB_TXCSR_TXPKTRDY | MUSB_TXCSR_AUTOSET); ··· 473 476 */ 474 477 if ((request->zero && request->length) 475 478 && (request->length % musb_ep->packet_sz == 0) 476 - && (request->actual == request->length)) 477 - short_packet = true; 479 + && (request->actual == request->length)) { 478 480 479 - if ((musb_dma_inventra(musb) || musb_dma_ux500(musb)) && 480 - (is_dma && (!dma->desired_mode || 481 - (request->actual & 482 - (musb_ep->packet_sz - 1))))) 483 - short_packet = true; 484 - 485 - if (short_packet) { 486 481 /* 487 482 * On DMA completion, FIFO may not be 488 483 * available yet...
+11 -10
drivers/usb/musb/musbhsdma.c
··· 346 346 channel->status = MUSB_DMA_STATUS_FREE; 347 347 348 348 /* completed */ 349 - if ((devctl & MUSB_DEVCTL_HM) 350 - && (musb_channel->transmit) 351 - && ((channel->desired_mode == 0) 352 - || (channel->actual_len & 353 - (musb_channel->max_packet_sz - 1))) 354 - ) { 349 + if (musb_channel->transmit && 350 + (!channel->desired_mode || 351 + (channel->actual_len % 352 + musb_channel->max_packet_sz))) { 355 353 u8 epnum = musb_channel->epnum; 356 354 int offset = musb->io.ep_offset(epnum, 357 355 MUSB_TXCSR); ··· 361 363 */ 362 364 musb_ep_select(mbase, epnum); 363 365 txcsr = musb_readw(mbase, offset); 364 - txcsr &= ~(MUSB_TXCSR_DMAENAB 366 + if (channel->desired_mode == 1) { 367 + txcsr &= ~(MUSB_TXCSR_DMAENAB 365 368 | MUSB_TXCSR_AUTOSET); 366 - musb_writew(mbase, offset, txcsr); 367 - /* Send out the packet */ 368 - txcsr &= ~MUSB_TXCSR_DMAMODE; 369 + musb_writew(mbase, offset, txcsr); 370 + /* Send out the packet */ 371 + txcsr &= ~MUSB_TXCSR_DMAMODE; 372 + txcsr |= MUSB_TXCSR_DMAENAB; 373 + } 369 374 txcsr |= MUSB_TXCSR_TXPKTRDY; 370 375 musb_writew(mbase, offset, txcsr); 371 376 }
+1 -1
drivers/usb/phy/Kconfig
··· 21 21 22 22 config FSL_USB2_OTG 23 23 bool "Freescale USB OTG Transceiver Driver" 24 - depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM 24 + depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM=y && PM 25 25 depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y' 26 26 select USB_PHY 27 27 help
+1 -4
drivers/usb/phy/phy-am335x.c
··· 61 61 if (ret) 62 62 return ret; 63 63 64 - ret = usb_add_phy_dev(&am_phy->usb_phy_gen.phy); 65 - if (ret) 66 - return ret; 67 64 am_phy->usb_phy_gen.phy.init = am335x_init; 68 65 am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown; 69 66 ··· 79 82 device_set_wakeup_enable(dev, false); 80 83 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false); 81 84 82 - return 0; 85 + return usb_add_phy_dev(&am_phy->usb_phy_gen.phy); 83 86 } 84 87 85 88 static int am335x_phy_remove(struct platform_device *pdev)
+2 -1
drivers/usb/typec/tcpm/tcpm.c
··· 2297 2297 pdo_pps_apdo_max_voltage(snk)); 2298 2298 port->pps_data.max_curr = min_pps_apdo_current(src, snk); 2299 2299 port->pps_data.out_volt = min(port->pps_data.max_volt, 2300 - port->pps_data.out_volt); 2300 + max(port->pps_data.min_volt, 2301 + port->pps_data.out_volt)); 2301 2302 port->pps_data.op_curr = min(port->pps_data.max_curr, 2302 2303 port->pps_data.op_curr); 2303 2304 }