diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2005-10-23 22:40:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 19:47:50 -0400 |
commit | bbafa4668f37f5093a3ae2a8b0cbe327e24e12da (patch) | |
tree | e679db87309810e8da8092ffcb3df5a9dd7323e0 /drivers/usb/storage/usb.h | |
parent | b876aef7f890d8c59a45b78858a36cf60fddf522 (diff) |
[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 }; | |||
117 | */ | 117 | */ |
118 | 118 | ||
119 | #define US_IOBUF_SIZE 64 /* Size of the DMA-mapped I/O buffer */ | 119 | #define US_IOBUF_SIZE 64 /* Size of the DMA-mapped I/O buffer */ |
120 | #define US_SENSE_SIZE 18 /* Size of the autosense data buffer */ | ||
120 | 121 | ||
121 | typedef int (*trans_cmnd)(struct scsi_cmnd *, struct us_data*); | 122 | typedef int (*trans_cmnd)(struct scsi_cmnd *, struct us_data*); |
122 | typedef int (*trans_reset)(struct us_data*); | 123 | typedef int (*trans_reset)(struct us_data*); |
@@ -168,6 +169,7 @@ struct us_data { | |||
168 | struct usb_ctrlrequest *cr; /* control requests */ | 169 | struct usb_ctrlrequest *cr; /* control requests */ |
169 | struct usb_sg_request current_sg; /* scatter-gather req. */ | 170 | struct usb_sg_request current_sg; /* scatter-gather req. */ |
170 | unsigned char *iobuf; /* I/O buffer */ | 171 | unsigned char *iobuf; /* I/O buffer */ |
172 | unsigned char *sensebuf; /* sense data buffer */ | ||
171 | dma_addr_t cr_dma; /* buffer DMA addresses */ | 173 | dma_addr_t cr_dma; /* buffer DMA addresses */ |
172 | dma_addr_t iobuf_dma; | 174 | dma_addr_t iobuf_dma; |
173 | 175 | ||