Re: [PATCH] libata: Use SMART LBAM password defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Redirecting the below patch to Jens as well.

Yours,
Linus Walleij

On Sat, Aug 25, 2018 at 12:37 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:

> Instead of hardcoding magic values for the SMART password,
> use the defines in <linux/ata.h>
>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
>  drivers/ata/libata-scsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> index 6a91d04351d9..55b890d19780 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -640,8 +640,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];
>         }
> --
> 2.17.1



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux