libata: Use SMART LBAM/LBAH password defines
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 30 Aug 2018 09:06:36 +0000 (11:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 30 Aug 2018 14:32:12 +0000 (08:32 -0600)
Instead of hardcoding magic values for the SMART password,
use the defines in <linux/ata.h>

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/libata-scsi.c

index 1984fc78c750b42505a5178761366dce33fa4089..3d4887d0e84a6a78b8ec5d97fd19b87bc48bc07b 100644 (file)
@@ -639,8 +639,8 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
        if (args[0] == ATA_CMD_SMART) { /* hack -- ide driver does this too */
                scsi_cmd[6]  = args[3];
                scsi_cmd[8]  = args[1];
-               scsi_cmd[10] = 0x4f;
-               scsi_cmd[12] = 0xc2;
+               scsi_cmd[10] = ATA_SMART_LBAM_PASS;
+               scsi_cmd[12] = ATA_SMART_LBAH_PASS;
        } else {
                scsi_cmd[6]  = args[1];
        }