diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 20:19:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 20:19:08 -0500 |
commit | 9b73e76f3cf63379dcf45fcd4f112f5812418d0a (patch) | |
tree | 4e6bef87cd0cd6d848fc39a5ae25b981dbbe035b /drivers/scsi/a2091.c | |
parent | 50d9a126240f9961cfdd063336bbeb91f77a7dce (diff) | |
parent | 23c3e290fb9ce38cabc2822b47583fc8702411bf (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits)
[SCSI] usbstorage: use last_sector_bug flag universally
[SCSI] libsas: abstract STP task status into a function
[SCSI] ultrastor: clean up inline asm warnings
[SCSI] aic7xxx: fix firmware build
[SCSI] aacraid: fib context lock for management ioctls
[SCSI] ch: remove forward declarations
[SCSI] ch: fix device minor number management bug
[SCSI] ch: handle class_device_create failure properly
[SCSI] NCR5380: fix section mismatch
[SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices
[SCSI] IB/iSER: add logical unit reset support
[SCSI] don't use __GFP_DMA for sense buffers if not required
[SCSI] use dynamically allocated sense buffer
[SCSI] scsi.h: add macro for enclosure bit of inquiry data
[SCSI] sd: add fix for devices with last sector access problems
[SCSI] fix pcmcia compile problem
[SCSI] aacraid: add Voodoo Lite class of cards.
[SCSI] aacraid: add new driver features flags
[SCSI] qla2xxx: Update version number to 8.02.00-k7.
[SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
...
Diffstat (limited to 'drivers/scsi/a2091.c')
-rw-r--r-- | drivers/scsi/a2091.c | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c index b7c5385e2efe..23f27c9c9895 100644 --- a/drivers/scsi/a2091.c +++ b/drivers/scsi/a2091.c | |||
@@ -73,18 +73,9 @@ static int dma_setup(struct scsi_cmnd *cmd, int dir_in) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | if (!dir_in) { | 75 | if (!dir_in) { |
76 | /* copy to bounce buffer for a write */ | 76 | /* copy to bounce buffer for a write */ |
77 | if (cmd->use_sg) | ||
78 | #if 0 | ||
79 | panic ("scsi%ddma: incomplete s/g support", | ||
80 | instance->host_no); | ||
81 | #else | ||
82 | memcpy (HDATA(instance)->dma_bounce_buffer, | 77 | memcpy (HDATA(instance)->dma_bounce_buffer, |
83 | cmd->SCp.ptr, cmd->SCp.this_residual); | 78 | cmd->SCp.ptr, cmd->SCp.this_residual); |
84 | #endif | ||
85 | else | ||
86 | memcpy (HDATA(instance)->dma_bounce_buffer, | ||
87 | cmd->request_buffer, cmd->request_bufflen); | ||
88 | } | 79 | } |
89 | } | 80 | } |
90 | 81 | ||
@@ -144,30 +135,13 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, | |||
144 | 135 | ||
145 | /* copy from a bounce buffer, if necessary */ | 136 | /* copy from a bounce buffer, if necessary */ |
146 | if (status && HDATA(instance)->dma_bounce_buffer) { | 137 | if (status && HDATA(instance)->dma_bounce_buffer) { |
147 | if (SCpnt && SCpnt->use_sg) { | 138 | if( HDATA(instance)->dma_dir ) |
148 | #if 0 | ||
149 | panic ("scsi%d: incomplete s/g support", | ||
150 | instance->host_no); | ||
151 | #else | ||
152 | if( HDATA(instance)->dma_dir ) | ||
153 | memcpy (SCpnt->SCp.ptr, | 139 | memcpy (SCpnt->SCp.ptr, |
154 | HDATA(instance)->dma_bounce_buffer, | 140 | HDATA(instance)->dma_bounce_buffer, |
155 | SCpnt->SCp.this_residual); | 141 | SCpnt->SCp.this_residual); |
156 | kfree (HDATA(instance)->dma_bounce_buffer); | 142 | kfree (HDATA(instance)->dma_bounce_buffer); |
157 | HDATA(instance)->dma_bounce_buffer = NULL; | 143 | HDATA(instance)->dma_bounce_buffer = NULL; |
158 | HDATA(instance)->dma_bounce_len = 0; | 144 | HDATA(instance)->dma_bounce_len = 0; |
159 | |||
160 | #endif | ||
161 | } else { | ||
162 | if (HDATA(instance)->dma_dir && SCpnt) | ||
163 | memcpy (SCpnt->request_buffer, | ||
164 | HDATA(instance)->dma_bounce_buffer, | ||
165 | SCpnt->request_bufflen); | ||
166 | |||
167 | kfree (HDATA(instance)->dma_bounce_buffer); | ||
168 | HDATA(instance)->dma_bounce_buffer = NULL; | ||
169 | HDATA(instance)->dma_bounce_len = 0; | ||
170 | } | ||
171 | } | 145 | } |
172 | } | 146 | } |
173 | 147 | ||