diff options
author | FUJITA Tomonori <tomof@acm.org> | 2008-01-13 01:46:12 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-23 12:29:26 -0500 |
commit | 94aa5e5f6251ca0e1d77e083f8c2f9f40ee548c5 (patch) | |
tree | c925a5a49f17331f069be6815b72983b03514702 /drivers | |
parent | 382db811a8cc1427efabdc959cd1aeef8685ffa6 (diff) |
[SCSI] aic7xxx_old, eata_pio, ips, libsas: don't zero out sense_buffer in queuecommand
LLDs don't need to zero out scsi_cmnd::sense_buffer in queuecommand
since scsi-ml does. This is a preparation of the future changes to
allocate the sense_buffer only when necessary.
Many LLDs zero out the sense_buffer before touching it on the error
case. This patch lets them alone for now because new APIs for them
would be added later on.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: "Salyzyn, Mark" <Mark_Salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/aic7xxx_old.c | 1 | ||||
-rw-r--r-- | drivers/scsi/eata_pio.c | 1 | ||||
-rw-r--r-- | drivers/scsi/ips.c | 3 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 1 |
4 files changed, 0 insertions, 6 deletions
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index 8f8db5f0aef7..2b402fafd009 100644 --- a/drivers/scsi/aic7xxx_old.c +++ b/drivers/scsi/aic7xxx_old.c | |||
@@ -10293,7 +10293,6 @@ static int aic7xxx_queue(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *)) | |||
10293 | aic7xxx_position(cmd) = scb->hscb->tag; | 10293 | aic7xxx_position(cmd) = scb->hscb->tag; |
10294 | cmd->scsi_done = fn; | 10294 | cmd->scsi_done = fn; |
10295 | cmd->result = DID_OK; | 10295 | cmd->result = DID_OK; |
10296 | memset(cmd->sense_buffer, 0, sizeof(cmd->sense_buffer)); | ||
10297 | aic7xxx_error(cmd) = DID_OK; | 10296 | aic7xxx_error(cmd) = DID_OK; |
10298 | aic7xxx_status(cmd) = 0; | 10297 | aic7xxx_status(cmd) = 0; |
10299 | cmd->host_scribble = NULL; | 10298 | cmd->host_scribble = NULL; |
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index 9579507f555b..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 | ||
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index e54d30c6a342..b1b229506113 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c | |||
@@ -2736,8 +2736,6 @@ ips_next(ips_ha_t * ha, int intr) | |||
2736 | SC->result = DID_OK; | 2736 | SC->result = DID_OK; |
2737 | SC->host_scribble = NULL; | 2737 | SC->host_scribble = NULL; |
2738 | 2738 | ||
2739 | memset(SC->sense_buffer, 0, sizeof (SC->sense_buffer)); | ||
2740 | |||
2741 | scb->target_id = SC->device->id; | 2739 | scb->target_id = SC->device->id; |
2742 | scb->lun = SC->device->lun; | 2740 | scb->lun = SC->device->lun; |
2743 | scb->bus = SC->device->channel; | 2741 | scb->bus = SC->device->channel; |
@@ -3821,7 +3819,6 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) | |||
3821 | /* attempted, a Check Condition occurred, and Sense */ | 3819 | /* attempted, a Check Condition occurred, and Sense */ |
3822 | /* Data indicating an Invalid CDB OpCode is returned. */ | 3820 | /* Data indicating an Invalid CDB OpCode is returned. */ |
3823 | sp = (char *) scb->scsi_cmd->sense_buffer; | 3821 | sp = (char *) scb->scsi_cmd->sense_buffer; |
3824 | memset(sp, 0, sizeof (scb->scsi_cmd->sense_buffer)); | ||
3825 | 3822 | ||
3826 | sp[0] = 0x70; /* Error Code */ | 3823 | sp[0] = 0x70; /* Error Code */ |
3827 | sp[2] = ILLEGAL_REQUEST; /* Sense Key 5 Illegal Req. */ | 3824 | sp[2] = ILLEGAL_REQUEST; /* Sense Key 5 Illegal Req. */ |
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 828fed1114ee..9c0422546331 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -148,7 +148,6 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, | |||
148 | if (!task) | 148 | if (!task) |
149 | return NULL; | 149 | return NULL; |
150 | 150 | ||
151 | *(u32 *)cmd->sense_buffer = 0; | ||
152 | task->uldd_task = cmd; | 151 | task->uldd_task = cmd; |
153 | ASSIGN_SAS_TASK(cmd, task); | 152 | ASSIGN_SAS_TASK(cmd, task); |
154 | 153 | ||