aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-04-01 12:34:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-04 15:22:12 -0400
commit2fc713b20469b2779fa89f582d2a9696b10031e7 (patch)
treed82d1d8ae688255efc96bc9f60295cccbdba0987 /drivers
parentfcf8bd3ba5362682f945a3f838070ac5e10ff871 (diff)
zd1211rw: remove URB_SHORT_NOT_OK flag in zd_usb_iowrite16v_async()
Patch removes the bogus flag introduced by upstream commit eefdbec1ea8b7093d2c09d1825f68438701723cf. Old code had buffer length check that new code tried to handle with URB_SHORT_NOT_OK flag. With USB debugging enabled bogus flag caused usb_submit_urb fail. Remove URB_SHORT_NOT_OK flag and add buffer length check to urb completion handler. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=32092 Reported-by: Jonathan Callen <abcd@gentoo.org> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 58236e6d0921..9b1a26a4435b 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1671,6 +1671,10 @@ static void iowrite16v_urb_complete(struct urb *urb)
1671 1671
1672 if (urb->status && !usb->cmd_error) 1672 if (urb->status && !usb->cmd_error)
1673 usb->cmd_error = urb->status; 1673 usb->cmd_error = urb->status;
1674
1675 if (!usb->cmd_error &&
1676 urb->actual_length != urb->transfer_buffer_length)
1677 usb->cmd_error = -EIO;
1674} 1678}
1675 1679
1676static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) 1680static int zd_submit_waiting_urb(struct zd_usb *usb, bool last)
@@ -1805,7 +1809,7 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
1805 usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), 1809 usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT),
1806 req, req_len, iowrite16v_urb_complete, usb, 1810 req, req_len, iowrite16v_urb_complete, usb,
1807 ep->desc.bInterval); 1811 ep->desc.bInterval);
1808 urb->transfer_flags |= URB_FREE_BUFFER | URB_SHORT_NOT_OK; 1812 urb->transfer_flags |= URB_FREE_BUFFER;
1809 1813
1810 /* Submit previous URB */ 1814 /* Submit previous URB */
1811 r = zd_submit_waiting_urb(usb, false); 1815 r = zd_submit_waiting_urb(usb, false);