[SCSI] libata: use scsi_build_sense_buffer
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tue, 25 Mar 2008 00:26:51 +0000 (09:26 +0900)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:19:02 +0000 (12:19 -0500)
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/ata/libata-scsi.c

index 15795394b0a88b82a5b54470206ba7fce99e2eae..6ca8e5dd6eecd9ea2d72ab53b28a2323717c6cc2 100644 (file)
@@ -2332,11 +2332,7 @@ void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
 {
        cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
 
-       cmd->sense_buffer[0] = 0x70;    /* fixed format, current */
-       cmd->sense_buffer[2] = sk;
-       cmd->sense_buffer[7] = 18 - 8;  /* additional sense length */
-       cmd->sense_buffer[12] = asc;
-       cmd->sense_buffer[13] = ascq;
+       scsi_build_sense_buffer(0, cmd->sense_buffer, sk, asc, ascq);
 }
 
 /**