diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2005-10-23 19:40:22 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 16:47:50 -0700 |
commit | bbafa4668f37f5093a3ae2a8b0cbe327e24e12da (patch) | |
tree | e679db87309810e8da8092ffcb3df5a9dd7323e0 /drivers/usb/storage/usb.h | |
parent | b876aef7f890d8c59a45b78858a36cf60fddf522 (diff) | |
download | talos-op-linux-bbafa4668f37f5093a3ae2a8b0cbe327e24e12da.tar.gz talos-op-linux-bbafa4668f37f5093a3ae2a8b0cbe327e24e12da.zip |
[PATCH] PATCH: usb-storage: allocate separate sense buffer
This patch is from Alan Stern (as560). It has been rediffed against a
current tree.
This patch allocates a separate buffer for usb-storage to use when
auto-sensing. Up to now we have been using the sense buffer embedded in a
scsi_cmnd struct, which is dangerous on hosts that (a) don't do
cache-coherent DMA or (b) have DMA alignment restrictions.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage/usb.h')
-rw-r--r-- | drivers/usb/storage/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index a195adae57b6..dfa4dc71dd3e 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h @@ -117,6 +117,7 @@ enum { US_DO_ALL_FLAGS }; */ #define US_IOBUF_SIZE 64 /* Size of the DMA-mapped I/O buffer */ +#define US_SENSE_SIZE 18 /* Size of the autosense data buffer */ typedef int (*trans_cmnd)(struct scsi_cmnd *, struct us_data*); typedef int (*trans_reset)(struct us_data*); @@ -168,6 +169,7 @@ struct us_data { struct usb_ctrlrequest *cr; /* control requests */ struct usb_sg_request current_sg; /* scatter-gather req. */ unsigned char *iobuf; /* I/O buffer */ + unsigned char *sensebuf; /* sense data buffer */ dma_addr_t cr_dma; /* buffer DMA addresses */ dma_addr_t iobuf_dma; |