aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR5380.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2007-11-05 04:23:35 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:39 -0500
commit9e0fe44ddb9ed037188ac711af1e981ac32d3c32 (patch)
tree830f97b6e359696fd7a939d3b4a5689bbda01b54 /drivers/scsi/NCR5380.c
parent9a3dd65bafcfa3338cfb4b6b7e12ff59aca0ac28 (diff)
[SCSI] NCR5380 family: convert to accessors & !use_sg cleanup
- This patch depends on: NCR5380: Use scsi_eh API for REQUEST_SENSE invocation - convert to accessors and !use_sg cleanup - FIXME: Not sg-chain ready look for ++cmd->SCp.buffer Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/NCR5380.c')
-rw-r--r--drivers/scsi/NCR5380.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 2597209183d0..1e9f82884f70 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -295,16 +295,16 @@ static __inline__ void initialize_SCp(Scsi_Cmnd * cmd)
295 * various queues are valid. 295 * various queues are valid.
296 */ 296 */
297 297
298 if (cmd->use_sg) { 298 if (scsi_bufflen(cmd)) {
299 cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; 299 cmd->SCp.buffer = scsi_sglist(cmd);
300 cmd->SCp.buffers_residual = cmd->use_sg - 1; 300 cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1;
301 cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); 301 cmd->SCp.ptr = sg_virt(cmd->SCp.buffer);
302 cmd->SCp.this_residual = cmd->SCp.buffer->length; 302 cmd->SCp.this_residual = cmd->SCp.buffer->length;
303 } else { 303 } else {
304 cmd->SCp.buffer = NULL; 304 cmd->SCp.buffer = NULL;
305 cmd->SCp.buffers_residual = 0; 305 cmd->SCp.buffers_residual = 0;
306 cmd->SCp.ptr = (char *) cmd->request_buffer; 306 cmd->SCp.ptr = NULL;
307 cmd->SCp.this_residual = cmd->request_bufflen; 307 cmd->SCp.this_residual = 0;
308 } 308 }
309} 309}
310 310
@@ -975,14 +975,14 @@ static int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
975 case WRITE_6: 975 case WRITE_6:
976 case WRITE_10: 976 case WRITE_10:
977 hostdata->time_write[cmd->device->id] -= (jiffies - hostdata->timebase); 977 hostdata->time_write[cmd->device->id] -= (jiffies - hostdata->timebase);
978 hostdata->bytes_write[cmd->device->id] += cmd->request_bufflen; 978 hostdata->bytes_write[cmd->device->id] += scsi_bufflen(cmd);
979 hostdata->pendingw++; 979 hostdata->pendingw++;
980 break; 980 break;
981 case READ: 981 case READ:
982 case READ_6: 982 case READ_6:
983 case READ_10: 983 case READ_10:
984 hostdata->time_read[cmd->device->id] -= (jiffies - hostdata->timebase); 984 hostdata->time_read[cmd->device->id] -= (jiffies - hostdata->timebase);
985 hostdata->bytes_read[cmd->device->id] += cmd->request_bufflen; 985 hostdata->bytes_read[cmd->device->id] += scsi_bufflen(cmd);
986 hostdata->pendingr++; 986 hostdata->pendingr++;
987 break; 987 break;
988 } 988 }