diff options
author | Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> | 2008-04-21 00:48:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-02 13:25:54 -0400 |
commit | e2722528ce688eecf574c237f7656d3934d4f23c (patch) | |
tree | ecd97fd3ba9c35ec705b46c9002d7f679ecec267 | |
parent | 7a6ad1dd86a45da8f235300349d4abd9ae7d1a21 (diff) |
USB: fix cannot work usb storage when using ohci-sm501
When I used ohci-sm501, hcd_alloc_coherent() in map_urb_for_dma() is not
called, because usb_sg_init() always sets URB_NO_TRANSFER_DMA_MAP.
dmesg (CONFIG_USB_STORAGE_DEBUG enabled):
usb-storage: Bulk Command S 0x43425355 T 0x1 L 36 F 128 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 36 bytes, 1 entries
usb-storage: Status code -75; transferred 0/36
usb-storage: -- babble
usb-storage: Bulk data transfer result 0x3
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x2
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/core/message.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index e819e5359d57..3e69266e1f4d 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -394,7 +394,9 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev, | |||
394 | if (!io->urbs) | 394 | if (!io->urbs) |
395 | goto nomem; | 395 | goto nomem; |
396 | 396 | ||
397 | urb_flags = URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT; | 397 | urb_flags = URB_NO_INTERRUPT; |
398 | if (dma) | ||
399 | urb_flags |= URB_NO_TRANSFER_DMA_MAP; | ||
398 | if (usb_pipein(pipe)) | 400 | if (usb_pipein(pipe)) |
399 | urb_flags |= URB_SHORT_NOT_OK; | 401 | urb_flags |= URB_SHORT_NOT_OK; |
400 | 402 | ||