]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] aic7xxx_old, eata_pio, ips, libsas: don't zero out sense_buffer in queuecommand
authorFUJITA Tomonori <tomof@acm.org>
Sun, 13 Jan 2008 06:46:12 +0000 (15:46 +0900)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 23 Jan 2008 17:29:26 +0000 (11:29 -0600)
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>
drivers/scsi/aic7xxx_old.c
drivers/scsi/eata_pio.c
drivers/scsi/ips.c
drivers/scsi/libsas/sas_scsi_host.c

index 8f8db5f0aef7306568ecf32f2324ff8378ef6bfd..2b402fafd009b1a6771c62b14aa50adaab66229e 100644 (file)
@@ -10293,7 +10293,6 @@ static int aic7xxx_queue(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *))
   aic7xxx_position(cmd) = scb->hscb->tag;
   cmd->scsi_done = fn;
   cmd->result = DID_OK;
-  memset(cmd->sense_buffer, 0, sizeof(cmd->sense_buffer));
   aic7xxx_error(cmd) = DID_OK;
   aic7xxx_status(cmd) = 0;
   cmd->host_scribble = NULL;
index 9579507f555bd46b582063ed63509682c1be41c2..b5a60926e556657f7c9e1ead702548ffc002a381 100644 (file)
@@ -369,7 +369,6 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
        cp = &hd->ccb[y];
 
        memset(cp, 0, sizeof(struct eata_ccb));
-       memset(cmd->sense_buffer, 0, sizeof(cmd->sense_buffer));
 
        cp->status = USED;      /* claim free slot */
 
index e54d30c6a342821ea80e0276043aa5a1b679a529..b1b2295061139795219e4ee0f5442e608da3a09c 100644 (file)
@@ -2736,8 +2736,6 @@ ips_next(ips_ha_t * ha, int intr)
                SC->result = DID_OK;
                SC->host_scribble = NULL;
 
-               memset(SC->sense_buffer, 0, sizeof (SC->sense_buffer));
-
                scb->target_id = SC->device->id;
                scb->lun = SC->device->lun;
                scb->bus = SC->device->channel;
@@ -3821,7 +3819,6 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb)
                        /* attempted, a Check Condition occurred, and Sense   */
                        /* Data indicating an Invalid CDB OpCode is returned. */
                        sp = (char *) scb->scsi_cmd->sense_buffer;
-                       memset(sp, 0, sizeof (scb->scsi_cmd->sense_buffer));
 
                        sp[0] = 0x70;   /* Error Code               */
                        sp[2] = ILLEGAL_REQUEST;        /* Sense Key 5 Illegal Req. */
index 828fed1114ee823b4d26987eee1a64f0ad4a82d3..9c0422546331a3a70005d9880e57705748dca5ea 100644 (file)
@@ -148,7 +148,6 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
        if (!task)
                return NULL;
 
-       *(u32 *)cmd->sense_buffer = 0;
        task->uldd_task = cmd;
        ASSIGN_SAS_TASK(cmd, task);