diff options
Diffstat (limited to 'drivers/scsi/dc395x.c')
-rw-r--r-- | drivers/scsi/dc395x.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index a9def6e1d30e..f93c73c0ba53 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -1629,8 +1629,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb, | |||
1629 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, (dcb->target_lun << 5)); | 1629 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, (dcb->target_lun << 5)); |
1630 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); | 1630 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); |
1631 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); | 1631 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); |
1632 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, | 1632 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, SCSI_SENSE_BUFFERSIZE); |
1633 | sizeof(srb->cmd->sense_buffer)); | ||
1634 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); | 1633 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); |
1635 | } else { | 1634 | } else { |
1636 | ptr = (u8 *)srb->cmd->cmnd; | 1635 | ptr = (u8 *)srb->cmd->cmnd; |
@@ -1915,8 +1914,7 @@ static void command_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, | |||
1915 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, (dcb->target_lun << 5)); | 1914 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, (dcb->target_lun << 5)); |
1916 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); | 1915 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); |
1917 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); | 1916 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); |
1918 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, | 1917 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, SCSI_SENSE_BUFFERSIZE); |
1919 | sizeof(srb->cmd->sense_buffer)); | ||
1920 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); | 1918 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0); |
1921 | } | 1919 | } |
1922 | srb->state |= SRB_COMMAND; | 1920 | srb->state |= SRB_COMMAND; |
@@ -3685,7 +3683,7 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, | |||
3685 | srb->target_status = 0; | 3683 | srb->target_status = 0; |
3686 | 3684 | ||
3687 | /* KG: Can this prevent crap sense data ? */ | 3685 | /* KG: Can this prevent crap sense data ? */ |
3688 | memset(cmd->sense_buffer, 0, sizeof(cmd->sense_buffer)); | 3686 | memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); |
3689 | 3687 | ||
3690 | /* Save some data */ | 3688 | /* Save some data */ |
3691 | srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].address = | 3689 | srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].address = |
@@ -3694,15 +3692,15 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, | |||
3694 | srb->segment_x[0].length; | 3692 | srb->segment_x[0].length; |
3695 | srb->xferred = srb->total_xfer_length; | 3693 | srb->xferred = srb->total_xfer_length; |
3696 | /* srb->segment_x : a one entry of S/G list table */ | 3694 | /* srb->segment_x : a one entry of S/G list table */ |
3697 | srb->total_xfer_length = sizeof(cmd->sense_buffer); | 3695 | srb->total_xfer_length = SCSI_SENSE_BUFFERSIZE; |
3698 | srb->segment_x[0].length = sizeof(cmd->sense_buffer); | 3696 | srb->segment_x[0].length = SCSI_SENSE_BUFFERSIZE; |
3699 | /* Map sense buffer */ | 3697 | /* Map sense buffer */ |
3700 | srb->segment_x[0].address = | 3698 | srb->segment_x[0].address = |
3701 | pci_map_single(acb->dev, cmd->sense_buffer, | 3699 | pci_map_single(acb->dev, cmd->sense_buffer, |
3702 | sizeof(cmd->sense_buffer), PCI_DMA_FROMDEVICE); | 3700 | SCSI_SENSE_BUFFERSIZE, PCI_DMA_FROMDEVICE); |
3703 | dprintkdbg(DBG_SG, "request_sense: map buffer %p->%08x(%05x)\n", | 3701 | dprintkdbg(DBG_SG, "request_sense: map buffer %p->%08x(%05x)\n", |
3704 | cmd->sense_buffer, srb->segment_x[0].address, | 3702 | cmd->sense_buffer, srb->segment_x[0].address, |
3705 | sizeof(cmd->sense_buffer)); | 3703 | SCSI_SENSE_BUFFERSIZE); |
3706 | srb->sg_count = 1; | 3704 | srb->sg_count = 1; |
3707 | srb->sg_index = 0; | 3705 | srb->sg_index = 0; |
3708 | 3706 | ||