diff options
-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 | ||