aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-01-15 23:32:17 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-23 12:37:37 -0500
commitde25deb18016f66dcdede165d07654559bb332bc (patch)
treeb566c2a369d3dce85507ab28ea20ffee020e0c06 /include
parentb30c2fc1113edfb2371427c10503ff942b0a0370 (diff)
[SCSI] use dynamically allocated sense buffer
This removes static array sense_buffer in scsi_cmnd and uses dynamically allocated sense_buffer (with GFP_DMA). The reason for doing this is that some architectures need cacheline aligned buffer for DMA: http://lkml.org/lkml/2007/11/19/2 The problems are that scsi_eh_prep_cmnd puts scsi_cmnd::sense_buffer to sglist and some LLDs directly DMA to scsi_cmnd::sense_buffer. It's necessary to DMA to scsi_cmnd::sense_buffer safely. This patch solves these issues. __scsi_get_command allocates sense_buffer via kmem_cache_alloc and attaches it to a scsi_cmnd so everything just work as before. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi_cmnd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 3f47e522a1ec..abd7479ff452 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -88,7 +88,7 @@ struct scsi_cmnd {
88 working on */ 88 working on */
89 89
90#define SCSI_SENSE_BUFFERSIZE 96 90#define SCSI_SENSE_BUFFERSIZE 96
91 unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; 91 unsigned char *sense_buffer;
92 /* obtained by REQUEST SENSE when 92 /* obtained by REQUEST SENSE when
93 * CHECK CONDITION is received on original 93 * CHECK CONDITION is received on original
94 * command (auto-sense) */ 94 * command (auto-sense) */