History

usb: remove third argument of usb_maxpacket()

The third argument of usb_maxpacket(): in_out has been deprecated because it could be derived from the second argument (e.g. using usb_pipeout(pipe)). N.B. function usb_maxpacket() was made variadic to accommodate the transition from the old prototype with three arguments to the new one with only two arguments (so that no renaming is needed). The variadic argument is to be removed once all users of usb_maxpacket() get migrated.

Vincent Mailhol committed 4 years ago

Commit dcd2e491 parent e13adbf18 files · +33 −44Browse files

Unified · Split

18 files
  1. drivers/usb/atm/usbatm.c +1 −1
  2. drivers/usb/c67x00/c67x00-sched.c +2 −2
  3. drivers/usb/core/hub.c +1 −1
  4. drivers/usb/host/ehci-q.c +2 −2
  5. drivers/usb/host/fhci-hcd.c +1 −2
  6. drivers/usb/host/fotg210-hcd.c +1 −1
  7. drivers/usb/host/isp116x-hcd.c +2 −3
  8. drivers/usb/host/isp1362-hcd.c +3 −3
  9. drivers/usb/host/max3421-hcd.c +3 −3
  10. drivers/usb/host/ohci-hcd.c +1 −2
  11. drivers/usb/host/oxu210hp-hcd.c +2 −2
  12. drivers/usb/host/r8a66597-hcd.c +1 −2
  13. drivers/usb/host/sl811-hcd.c +3 −3
  14. drivers/usb/isp1760/isp1760-hcd.c +2 −4
  15. drivers/usb/misc/ftdi-elan.c +5 −10
  16. drivers/usb/misc/lvstest.c +1 −1
  17. drivers/usb/storage/onetouch.c +1 −1
  18. drivers/usb/storage/transport.c +1 −1
drivers/usb/atm/usbatm.c+1−1
@@ -1091,7 +1091,7 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id, · 1090 unmodified lines
1091 snd_buf_bytes - (snd_buf_bytes % instance->tx_channel.stride));1091 snd_buf_bytes - (snd_buf_bytes % instance->tx_channel.stride));
1092 1092
1093 /* rx buffer size must be a positive multiple of the endpoint maxpacket */1093 /* rx buffer size must be a positive multiple of the endpoint maxpacket */
1094 maxpacket = usb_maxpacket(usb_dev, instance->rx_channel.endpoint, 0);1094 maxpacket = usb_maxpacket(usb_dev, instance->rx_channel.endpoint);
1095 1095
1096 if ((maxpacket < 1) || (maxpacket > UDSL_MAX_BUF_SIZE)) {1096 if ((maxpacket < 1) || (maxpacket > UDSL_MAX_BUF_SIZE)) {
1097 dev_err(dev, "%s: invalid endpoint %02x!\n", __func__,1097 dev_err(dev, "%s: invalid endpoint %02x!\n", __func__,
drivers/usb/c67x00/c67x00-sched.c+2−2
@@ -655,7 +655,7 @@ static int c67x00_add_data_urb(struct c67x00_hcd *c67x00, struct urb *urb) · 654 unmodified lines
655 usb_pipeout(urb->pipe));655 usb_pipeout(urb->pipe));
656 remaining = urb->transfer_buffer_length - urb->actual_length;656 remaining = urb->transfer_buffer_length - urb->actual_length;
657 657
658 maxps = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));658 maxps = usb_maxpacket(urb->dev, urb->pipe);
659 659
660 need_empty = (urb->transfer_flags & URB_ZERO_PACKET) &&660 need_empty = (urb->transfer_flags & URB_ZERO_PACKET) &&
661 usb_pipeout(urb->pipe) && !(remaining % maxps);661 usb_pipeout(urb->pipe) && !(remaining % maxps);
@@ -866,7 +866,7 @@ static inline int c67x00_end_of_data(struct c67x00_td *td) · 204 unmodified lines
866 if (unlikely(!act_bytes))866 if (unlikely(!act_bytes))
867 return 1; /* This was an empty packet */867 return 1; /* This was an empty packet */
868 868
869 maxps = usb_maxpacket(td_udev(td), td->pipe, usb_pipeout(td->pipe));869 maxps = usb_maxpacket(td_udev(td), td->pipe);
870 870
871 if (unlikely(act_bytes < maxps))871 if (unlikely(act_bytes < maxps))
872 return 1; /* Smaller then full packet */872 return 1; /* Smaller then full packet */
drivers/usb/core/hub.c+1−1
@@ -1635,7 +1635,7 @@ static int hub_configure(struct usb_hub *hub, · 1634 unmodified lines
1635 * maxpktsize is defined in hcd.c's fake endpoint descriptors1635 * maxpktsize is defined in hcd.c's fake endpoint descriptors
1636 * to be big enough for at least USB_MAXCHILDREN ports. */1636 * to be big enough for at least USB_MAXCHILDREN ports. */
1637 pipe = usb_rcvintpipe(hdev, endpoint->bEndpointAddress);1637 pipe = usb_rcvintpipe(hdev, endpoint->bEndpointAddress);
1638 maxp = usb_maxpacket(hdev, pipe, usb_pipeout(pipe));1638 maxp = usb_maxpacket(hdev, pipe);
1639 1639
1640 if (maxp > sizeof(*hub->buffer))1640 if (maxp > sizeof(*hub->buffer))
1641 maxp = sizeof(*hub->buffer);1641 maxp = sizeof(*hub->buffer);
drivers/usb/host/ehci-q.c+2−2
@@ -645,7 +645,7 @@ qh_urb_transaction ( · 644 unmodified lines
645 token |= (1 /* "in" */ << 8);645 token |= (1 /* "in" */ << 8);
646 /* else it's already initted to "out" pid (0 << 8) */646 /* else it's already initted to "out" pid (0 << 8) */
647 647
648 maxpacket = usb_maxpacket(urb->dev, urb->pipe, !is_input);648 maxpacket = usb_maxpacket(urb->dev, urb->pipe);
649 649
650 /*650 /*
651 * buffer gets wrapped in one or more qtds;651 * buffer gets wrapped in one or more qtds;
@@ -1218,7 +1218,7 @@ static int ehci_submit_single_step_set_feature( · 566 unmodified lines
1218 1218
1219 token |= (1 /* "in" */ << 8); /*This is IN stage*/1219 token |= (1 /* "in" */ << 8); /*This is IN stage*/
1220 1220
1221 maxpacket = usb_maxpacket(urb->dev, urb->pipe, 0);1221 maxpacket = usb_maxpacket(urb->dev, urb->pipe);
1222 1222
1223 qtd_fill(ehci, qtd, buf, len, token, maxpacket);1223 qtd_fill(ehci, qtd, buf, len, token, maxpacket);
1224 1224
drivers/usb/host/fhci-hcd.c+1−2
@@ -408,8 +408,7 @@ static int fhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, · 407 unmodified lines
408 size++;408 size++;
409 else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0409 else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0
410 && (urb->transfer_buffer_length410 && (urb->transfer_buffer_length
411 % usb_maxpacket(urb->dev, pipe,411 % usb_maxpacket(urb->dev, pipe)) != 0)
412 usb_pipeout(pipe))) != 0)
413 size++;412 size++;
414 break;413 break;
415 case PIPE_ISOCHRONOUS:414 case PIPE_ISOCHRONOUS:
drivers/usb/host/fotg210-hcd.c+1−1
@@ -2596,7 +2596,7 @@ static struct list_head *qh_urb_transaction(struct fotg210_hcd *fotg210, · 2595 unmodified lines
2596 token |= (1 /* "in" */ << 8);2596 token |= (1 /* "in" */ << 8);
2597 /* else it's already initted to "out" pid (0 << 8) */2597 /* else it's already initted to "out" pid (0 << 8) */
2598 2598
2599 maxpacket = usb_maxpacket(urb->dev, urb->pipe, !is_input);2599 maxpacket = usb_maxpacket(urb->dev, urb->pipe);
2600 2600
2601 /*2601 /*
2602 * buffer gets wrapped in one or more qtds;2602 * buffer gets wrapped in one or more qtds;
drivers/usb/host/isp116x-hcd.c+2−3
@@ -726,7 +726,7 @@ static int isp116x_urb_enqueue(struct usb_hcd *hcd, · 725 unmodified lines
726 INIT_LIST_HEAD(&ep->schedule);726 INIT_LIST_HEAD(&ep->schedule);
727 ep->udev = udev;727 ep->udev = udev;
728 ep->epnum = epnum;728 ep->epnum = epnum;
729 ep->maxpacket = usb_maxpacket(udev, urb->pipe, is_out);729 ep->maxpacket = usb_maxpacket(udev, urb->pipe);
730 usb_settoggle(udev, epnum, is_out, 0);730 usb_settoggle(udev, epnum, is_out, 0);
731 731
732 if (type == PIPE_CONTROL) {732 if (type == PIPE_CONTROL) {
@@ -757,8 +757,7 @@ static int isp116x_urb_enqueue(struct usb_hcd *hcd, · 24 unmodified lines
757 ep->load = usb_calc_bus_time(udev->speed,757 ep->load = usb_calc_bus_time(udev->speed,
758 !is_out,758 !is_out,
759 (type == PIPE_ISOCHRONOUS),759 (type == PIPE_ISOCHRONOUS),
760 usb_maxpacket(udev, pipe,760 usb_maxpacket(udev, pipe)) /
761 is_out)) /
762 1000;761 1000;
763 }762 }
764 hep->hcpriv = ep;763 hep->hcpriv = ep;
drivers/usb/host/isp1362-hcd.c+3−3
@@ -1279,7 +1279,7 @@ static int isp1362_urb_enqueue(struct usb_hcd *hcd, · 1278 unmodified lines
1279 ep->udev = usb_get_dev(udev);1279 ep->udev = usb_get_dev(udev);
1280 ep->hep = hep;1280 ep->hep = hep;
1281 ep->epnum = epnum;1281 ep->epnum = epnum;
1282 ep->maxpacket = usb_maxpacket(udev, urb->pipe, is_out);1282 ep->maxpacket = usb_maxpacket(udev, urb->pipe);
1283 ep->ptd_offset = -EINVAL;1283 ep->ptd_offset = -EINVAL;
1284 ep->ptd_index = -EINVAL;1284 ep->ptd_index = -EINVAL;
1285 usb_settoggle(udev, epnum, is_out, 0);1285 usb_settoggle(udev, epnum, is_out, 0);
@@ -1299,8 +1299,8 @@ static int isp1362_urb_enqueue(struct usb_hcd *hcd, · 13 unmodified lines
1299 ep->interval = urb->interval;1299 ep->interval = urb->interval;
1300 ep->branch = PERIODIC_SIZE;1300 ep->branch = PERIODIC_SIZE;
1301 ep->load = usb_calc_bus_time(udev->speed, !is_out,1301 ep->load = usb_calc_bus_time(udev->speed, !is_out,
1302 (type == PIPE_ISOCHRONOUS),1302 type == PIPE_ISOCHRONOUS,
1303 usb_maxpacket(udev, pipe, is_out)) / 1000;1303 usb_maxpacket(udev, pipe)) / 1000;
1304 break;1304 break;
1305 }1305 }
1306 hep->hcpriv = ep;1306 hep->hcpriv = ep;
drivers/usb/host/max3421-hcd.c+3−3
@@ -546,7 +546,7 @@ max3421_transfer_out(struct usb_hcd *hcd, struct urb *urb, int fast_retransmit) · 545 unmodified lines
546 return MAX3421_HXFR_BULK_OUT(epnum);546 return MAX3421_HXFR_BULK_OUT(epnum);
547 }547 }
548 548
549 max_packet = usb_maxpacket(urb->dev, urb->pipe, 1);549 max_packet = usb_maxpacket(urb->dev, urb->pipe);
550 550
551 if (max_packet > MAX3421_FIFO_SIZE) {551 if (max_packet > MAX3421_FIFO_SIZE) {
552 /*552 /*
@@ -952,7 +952,7 @@ max3421_transfer_in_done(struct usb_hcd *hcd, struct urb *urb) · 399 unmodified lines
952 * USB 2.0 Section 5.3.2 Pipes: packets must be full size952 * USB 2.0 Section 5.3.2 Pipes: packets must be full size
953 * except for last one.953 * except for last one.
954 */954 */
955 max_packet = usb_maxpacket(urb->dev, urb->pipe, 0);955 max_packet = usb_maxpacket(urb->dev, urb->pipe);
956 if (max_packet > MAX3421_FIFO_SIZE) {956 if (max_packet > MAX3421_FIFO_SIZE) {
957 /*957 /*
958 * We do not support isochronous transfers at this958 * We do not support isochronous transfers at this
@@ -998,7 +998,7 @@ max3421_transfer_out_done(struct usb_hcd *hcd, struct urb *urb) · 39 unmodified lines
998 * max_packet as an indicator that the end of the998 * max_packet as an indicator that the end of the
999 * packet has been reached).999 * packet has been reached).
1000 */1000 */
1001 u32 max_packet = usb_maxpacket(urb->dev, urb->pipe, 1);1001 u32 max_packet = usb_maxpacket(urb->dev, urb->pipe);
1002 1002
1003 if (max3421_hcd->curr_len == max_packet)1003 if (max3421_hcd->curr_len == max_packet)
1004 return 0;1004 return 0;
drivers/usb/host/ohci-hcd.c+1−2
@@ -181,8 +181,7 @@ static int ohci_urb_enqueue ( · 180 unmodified lines
181 size++;181 size++;
182 else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0182 else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0
183 && (urb->transfer_buffer_length183 && (urb->transfer_buffer_length
184 % usb_maxpacket (urb->dev, pipe,184 % usb_maxpacket(urb->dev, pipe)) == 0)
185 usb_pipeout (pipe))) == 0)
186 size++;185 size++;
187 break;186 break;
188 case PIPE_ISOCHRONOUS: /* number of packets from URB */187 case PIPE_ISOCHRONOUS: /* number of packets from URB */
drivers/usb/host/oxu210hp-hcd.c+2−2
@@ -1685,7 +1685,7 @@ static struct list_head *qh_urb_transaction(struct oxu_hcd *oxu, · 1684 unmodified lines
1685 token |= (1 /* "in" */ << 8);1685 token |= (1 /* "in" */ << 8);
1686 /* else it's already initted to "out" pid (0 << 8) */1686 /* else it's already initted to "out" pid (0 << 8) */
1687 1687
1688 maxpacket = usb_maxpacket(urb->dev, urb->pipe, !is_input);1688 maxpacket = usb_maxpacket(urb->dev, urb->pipe);
1689 1689
1690 /*1690 /*
1691 * buffer gets wrapped in one or more qtds;1691 * buffer gets wrapped in one or more qtds;
@@ -1796,7 +1796,7 @@ static struct ehci_qh *qh_make(struct oxu_hcd *oxu, · 104 unmodified lines
1796 1796
1797 is_input = usb_pipein(urb->pipe);1797 is_input = usb_pipein(urb->pipe);
1798 type = usb_pipetype(urb->pipe);1798 type = usb_pipetype(urb->pipe);
1799 maxp = usb_maxpacket(urb->dev, urb->pipe, !is_input);1799 maxp = usb_maxpacket(urb->dev, urb->pipe);
1800 1800
1801 /* Compute interrupt scheduling parameters just once, and save.1801 /* Compute interrupt scheduling parameters just once, and save.
1802 * - allowing for high bandwidth, how many nsec/uframe are used?1802 * - allowing for high bandwidth, how many nsec/uframe are used?
drivers/usb/host/r8a66597-hcd.c+1−2
@@ -1867,8 +1867,7 @@ static struct r8a66597_td *r8a66597_make_td(struct r8a66597 *r8a66597, · 1866 unmodified lines
1867 td->pipe = hep->hcpriv;1867 td->pipe = hep->hcpriv;
1868 td->urb = urb;1868 td->urb = urb;
1869 td->address = get_urb_to_r8a66597_addr(r8a66597, urb);1869 td->address = get_urb_to_r8a66597_addr(r8a66597, urb);
1870 td->maxpacket = usb_maxpacket(urb->dev, urb->pipe,1870 td->maxpacket = usb_maxpacket(urb->dev, urb->pipe);
1871 !usb_pipein(urb->pipe));
1872 if (usb_pipecontrol(urb->pipe))1871 if (usb_pipecontrol(urb->pipe))
1873 td->type = USB_PID_SETUP;1872 td->type = USB_PID_SETUP;
1874 else if (usb_pipein(urb->pipe))1873 else if (usb_pipein(urb->pipe))
drivers/usb/host/sl811-hcd.c+3−3
@@ -842,7 +842,7 @@ static int sl811h_urb_enqueue( · 841 unmodified lines
842 INIT_LIST_HEAD(&ep->schedule);842 INIT_LIST_HEAD(&ep->schedule);
843 ep->udev = udev;843 ep->udev = udev;
844 ep->epnum = epnum;844 ep->epnum = epnum;
845 ep->maxpacket = usb_maxpacket(udev, urb->pipe, is_out);845 ep->maxpacket = usb_maxpacket(udev, urb->pipe);
846 ep->defctrl = SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENABLE;846 ep->defctrl = SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENABLE;
847 usb_settoggle(udev, epnum, is_out, 0);847 usb_settoggle(udev, epnum, is_out, 0);
848 848
@@ -878,8 +878,8 @@ static int sl811h_urb_enqueue( · 29 unmodified lines
878 if (type == PIPE_ISOCHRONOUS)878 if (type == PIPE_ISOCHRONOUS)
879 ep->defctrl |= SL11H_HCTLMASK_ISOCH;879 ep->defctrl |= SL11H_HCTLMASK_ISOCH;
880 ep->load = usb_calc_bus_time(udev->speed, !is_out,880 ep->load = usb_calc_bus_time(udev->speed, !is_out,
881 (type == PIPE_ISOCHRONOUS),881 type == PIPE_ISOCHRONOUS,
882 usb_maxpacket(udev, pipe, is_out))882 usb_maxpacket(udev, pipe))
883 / 1000;883 / 1000;
884 break;884 break;
885 }885 }
drivers/usb/isp1760/isp1760-hcd.c+2−4
@@ -825,8 +825,7 @@ static void create_ptd_atl(struct isp1760_qh *qh, · 824 unmodified lines
825 memset(ptd, 0, sizeof(*ptd));825 memset(ptd, 0, sizeof(*ptd));
826 826
827 /* according to 3.6.2, max packet len can not be > 0x400 */827 /* according to 3.6.2, max packet len can not be > 0x400 */
828 maxpacket = usb_maxpacket(qtd->urb->dev, qtd->urb->pipe,828 maxpacket = usb_maxpacket(qtd->urb->dev, qtd->urb->pipe);
829 usb_pipeout(qtd->urb->pipe));
830 multi = 1 + ((maxpacket >> 11) & 0x3);829 multi = 1 + ((maxpacket >> 11) & 0x3);
831 maxpacket &= 0x7ff;830 maxpacket &= 0x7ff;
832 831
@@ -1808,8 +1807,7 @@ static void packetize_urb(struct usb_hcd *hcd, · 975 unmodified lines
1808 packet_type = IN_PID;1807 packet_type = IN_PID;
1809 }1808 }
1810 1809
1811 maxpacketsize = usb_maxpacket(urb->dev, urb->pipe,1810 maxpacketsize = usb_maxpacket(urb->dev, urb->pipe);
1812 usb_pipeout(urb->pipe));
1813 1811
1814 /*1812 /*
1815 * buffer gets wrapped in one or more qtds;1813 * buffer gets wrapped in one or more qtds;
drivers/usb/misc/ftdi-elan.c+5−10
@@ -1449,8 +1449,7 @@ wait:if (ftdi->disconnected > 0) { · 1448 unmodified lines
1449 command->length = 0x8007;1449 command->length = 0x8007;
1450 command->address = (toggle_bits << 6) | (ep_number << 2)1450 command->address = (toggle_bits << 6) | (ep_number << 2)
1451 | (address << 0);1451 | (address << 0);
1452 command->width = usb_maxpacket(urb->dev, urb->pipe,1452 command->width = usb_maxpacket(urb->dev, urb->pipe);
1453 usb_pipeout(urb->pipe));
1454 command->follows = 8;1453 command->follows = 8;
1455 command->value = 0;1454 command->value = 0;
1456 command->buffer = urb->setup_packet;1455 command->buffer = urb->setup_packet;
@@ -1514,8 +1513,7 @@ wait:if (ftdi->disconnected > 0) { · 57 unmodified lines
1514 1);1513 1);
1515 command->address = (toggle_bits << 6) | (ep_number << 2)1514 command->address = (toggle_bits << 6) | (ep_number << 2)
1516 | (address << 0);1515 | (address << 0);
1517 command->width = usb_maxpacket(urb->dev, urb->pipe,1516 command->width = usb_maxpacket(urb->dev, urb->pipe);
1518 usb_pipeout(urb->pipe));
1519 command->follows = 0;1517 command->follows = 0;
1520 command->value = 0;1518 command->value = 0;
1521 command->buffer = NULL;1519 command->buffer = NULL;
@@ -1571,8 +1569,7 @@ wait:if (ftdi->disconnected > 0) { · 49 unmodified lines
1571 command->length = 0x0000;1569 command->length = 0x0000;
1572 command->address = (toggle_bits << 6) | (ep_number << 2)1570 command->address = (toggle_bits << 6) | (ep_number << 2)
1573 | (address << 0);1571 | (address << 0);
1574 command->width = usb_maxpacket(urb->dev, urb->pipe,1572 command->width = usb_maxpacket(urb->dev, urb->pipe);
1575 usb_pipeout(urb->pipe));
1576 command->follows = 0;1573 command->follows = 0;
1577 command->value = 0;1574 command->value = 0;
1578 command->buffer = NULL;1575 command->buffer = NULL;
@@ -1634,8 +1631,7 @@ wait:if (ftdi->disconnected > 0) { · 55 unmodified lines
1634 command->header = 0x81 | (ed << 5);1631 command->header = 0x81 | (ed << 5);
1635 command->address = (toggle_bits << 6) | (ep_number << 2)1632 command->address = (toggle_bits << 6) | (ep_number << 2)
1636 | (address << 0);1633 | (address << 0);
1637 command->width = usb_maxpacket(urb->dev, urb->pipe,1634 command->width = usb_maxpacket(urb->dev, urb->pipe);
1638 usb_pipeout(urb->pipe));
1639 command->follows = min_t(u32, 1024,1635 command->follows = min_t(u32, 1024,
1640 urb->transfer_buffer_length -1636 urb->transfer_buffer_length -
1641 urb->actual_length);1637 urb->actual_length);
@@ -1715,8 +1711,7 @@ wait:if (ftdi->disconnected > 0) { · 73 unmodified lines
1715 1);1711 1);
1716 command->address = (toggle_bits << 6) | (ep_number << 2)1712 command->address = (toggle_bits << 6) | (ep_number << 2)
1717 | (address << 0);1713 | (address << 0);
1718 command->width = usb_maxpacket(urb->dev, urb->pipe,1714 command->width = usb_maxpacket(urb->dev, urb->pipe);
1719 usb_pipeout(urb->pipe));
1720 command->follows = 0;1715 command->follows = 0;
1721 command->value = 0;1716 command->value = 0;
1722 command->buffer = NULL;1717 command->buffer = NULL;
drivers/usb/misc/lvstest.c+1−1
@@ -437,7 +437,7 @@ static int lvs_rh_probe(struct usb_interface *intf, · 436 unmodified lines
437 INIT_WORK(&lvs->rh_work, lvs_rh_work);437 INIT_WORK(&lvs->rh_work, lvs_rh_work);
438 438
439 pipe = usb_rcvintpipe(hdev, endpoint->bEndpointAddress);439 pipe = usb_rcvintpipe(hdev, endpoint->bEndpointAddress);
440 maxp = usb_maxpacket(hdev, pipe, usb_pipeout(pipe));440 maxp = usb_maxpacket(hdev, pipe);
441 usb_fill_int_urb(lvs->urb, hdev, pipe, &lvs->buffer[0], maxp,441 usb_fill_int_urb(lvs->urb, hdev, pipe, &lvs->buffer[0], maxp,
442 lvs_rh_irq, lvs, endpoint->bInterval);442 lvs_rh_irq, lvs, endpoint->bInterval);
443 443
drivers/usb/storage/onetouch.c+1−1
@@ -180,7 +180,7 @@ static int onetouch_connect_input(struct us_data *ss) · 179 unmodified lines
180 return -ENODEV;180 return -ENODEV;
181 181
182 pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);182 pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
183 maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));183 maxp = usb_maxpacket(udev, pipe);
184 maxp = min(maxp, ONETOUCH_PKT_LEN);184 maxp = min(maxp, ONETOUCH_PKT_LEN);
185 185
186 onetouch = kzalloc(sizeof(struct usb_onetouch), GFP_KERNEL);186 onetouch = kzalloc(sizeof(struct usb_onetouch), GFP_KERNEL);
drivers/usb/storage/transport.c+1−1
@@ -363,7 +363,7 @@ static int usb_stor_intr_transfer(struct us_data *us, void *buf, · 362 unmodified lines
363 usb_stor_dbg(us, "xfer %u bytes\n", length);363 usb_stor_dbg(us, "xfer %u bytes\n", length);
364 364
365 /* calculate the max packet size */365 /* calculate the max packet size */
366 maxp = usb_maxpacket(us->pusb_dev, pipe, usb_pipeout(pipe));366 maxp = usb_maxpacket(us->pusb_dev, pipe);
367 if (maxp > length)367 if (maxp > length)
368 maxp = length;368 maxp = length;
369 369

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t