aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/eata_pio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 20:19:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 20:19:08 -0500
commit9b73e76f3cf63379dcf45fcd4f112f5812418d0a (patch)
tree4e6bef87cd0cd6d848fc39a5ae25b981dbbe035b /drivers/scsi/eata_pio.c
parent50d9a126240f9961cfdd063336bbeb91f77a7dce (diff)
parent23c3e290fb9ce38cabc2822b47583fc8702411bf (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/eata_pio.c')
-rw-r--r--drivers/scsi/eata_pio.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c
index 982c5092be11..b5a60926e556 100644
--- a/drivers/scsi/eata_pio.c
+++ b/drivers/scsi/eata_pio.c
@@ -369,7 +369,6 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
369 cp = &hd->ccb[y]; 369 cp = &hd->ccb[y];
370 370
371 memset(cp, 0, sizeof(struct eata_ccb)); 371 memset(cp, 0, sizeof(struct eata_ccb));
372 memset(cmd->sense_buffer, 0, sizeof(cmd->sense_buffer));
373 372
374 cp->status = USED; /* claim free slot */ 373 cp->status = USED; /* claim free slot */
375 374
@@ -385,7 +384,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
385 cp->DataIn = 0; /* Input mode */ 384 cp->DataIn = 0; /* Input mode */
386 385
387 cp->Interpret = (cmd->device->id == hd->hostid); 386 cp->Interpret = (cmd->device->id == hd->hostid);
388 cp->cp_datalen = cpu_to_be32(cmd->request_bufflen); 387 cp->cp_datalen = cpu_to_be32(scsi_bufflen(cmd));
389 cp->Auto_Req_Sen = 0; 388 cp->Auto_Req_Sen = 0;
390 cp->cp_reqDMA = 0; 389 cp->cp_reqDMA = 0;
391 cp->reqlen = 0; 390 cp->reqlen = 0;
@@ -402,14 +401,14 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
402 cp->cmd = cmd; 401 cp->cmd = cmd;
403 cmd->host_scribble = (char *) &hd->ccb[y]; 402 cmd->host_scribble = (char *) &hd->ccb[y];
404 403
405 if (cmd->use_sg == 0) { 404 if (!scsi_bufflen(cmd)) {
406 cmd->SCp.buffers_residual = 1; 405 cmd->SCp.buffers_residual = 1;
407 cmd->SCp.ptr = cmd->request_buffer; 406 cmd->SCp.ptr = NULL;
408 cmd->SCp.this_residual = cmd->request_bufflen; 407 cmd->SCp.this_residual = 0;
409 cmd->SCp.buffer = NULL; 408 cmd->SCp.buffer = NULL;
410 } else { 409 } else {
411 cmd->SCp.buffer = cmd->request_buffer; 410 cmd->SCp.buffer = scsi_sglist(cmd);
412 cmd->SCp.buffers_residual = cmd->use_sg; 411 cmd->SCp.buffers_residual = scsi_sg_count(cmd);
413 cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); 412 cmd->SCp.ptr = sg_virt(cmd->SCp.buffer);
414 cmd->SCp.this_residual = cmd->SCp.buffer->length; 413 cmd->SCp.this_residual = cmd->SCp.buffer->length;
415 } 414 }