diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:36:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:36:53 -0500 |
commit | 10955d2251387df3997d8b9b6c572dfad9f23dd0 (patch) | |
tree | f7962c9d20c41ca9139f06164c3c484cd245d514 /drivers/usb/storage/protocol.c | |
parent | b2a5cd6938879b5bcfef0a73c28fea84c49519c2 (diff) | |
parent | 4ae897df80019db433cd46cdd50d3b48463757d9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: ftdi_sio - really enable EM1010PC
USB: remove incorrect struct class_device from the printer gadget
USB: pxa2xx_udc: fix misuse of clock enable/disable calls
USB: ftdi_sio: Workaround for broken Matrix Orbital serial port
USB: Add support for AXESSTEL MV110H CDMA modem
usb-storage: update earlier scatter-gather bug fix
USB: isp116x: fix enumeration on boot
USB: ehci: handle large bulk URBs correctly (again)
USB: spruce up the device blacklist
USB: fix comment of struct usb_interface
USB: update Kconfig entry for USB_SUSPEND
usb: Add support for the mos7820/7840-based B&B USB/RS485 converter to mos7840.c
Diffstat (limited to 'drivers/usb/storage/protocol.c')
-rw-r--r-- | drivers/usb/storage/protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c index 958f5b17847c..b9b8ede61fb3 100644 --- a/drivers/usb/storage/protocol.c +++ b/drivers/usb/storage/protocol.c | |||
@@ -170,7 +170,6 @@ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, | |||
170 | 170 | ||
171 | if (!sg) | 171 | if (!sg) |
172 | sg = scsi_sglist(srb); | 172 | sg = scsi_sglist(srb); |
173 | buflen = min(buflen, scsi_bufflen(srb)); | ||
174 | 173 | ||
175 | /* This loop handles a single s-g list entry, which may | 174 | /* This loop handles a single s-g list entry, which may |
176 | * include multiple pages. Find the initial page structure | 175 | * include multiple pages. Find the initial page structure |
@@ -232,6 +231,7 @@ void usb_stor_set_xfer_buf(unsigned char *buffer, | |||
232 | unsigned int offset = 0; | 231 | unsigned int offset = 0; |
233 | struct scatterlist *sg = NULL; | 232 | struct scatterlist *sg = NULL; |
234 | 233 | ||
234 | buflen = min(buflen, scsi_bufflen(srb)); | ||
235 | buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, | 235 | buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, |
236 | TO_XFER_BUF); | 236 | TO_XFER_BUF); |
237 | if (buflen < scsi_bufflen(srb)) | 237 | if (buflen < scsi_bufflen(srb)) |