Commit 0e536ed2 authored by Asai Thambi SP's avatar Asai Thambi SP Committed by Sasha Levin

mtip32xx: fix incorrectly setting MTIP_DDF_SEC_LOCK_BIT

[ Upstream commit ee04bed6 ]

Fix incorrectly setting MTIP_DDF_SEC_LOCK_BIT
Signed-off-by: default avatarSelvan Mani <smani@micron.com>
Signed-off-by: default avatarAsai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent afc16b3a
...@@ -995,15 +995,11 @@ static bool mtip_pause_ncq(struct mtip_port *port, ...@@ -995,15 +995,11 @@ static bool mtip_pause_ncq(struct mtip_port *port,
reply = port->rxfis + RX_FIS_D2H_REG; reply = port->rxfis + RX_FIS_D2H_REG;
task_file_data = readl(port->mmio+PORT_TFDATA); task_file_data = readl(port->mmio+PORT_TFDATA);
if (fis->command == ATA_CMD_SEC_ERASE_UNIT)
clear_bit(MTIP_DDF_SEC_LOCK_BIT, &port->dd->dd_flag);
if ((task_file_data & 1)) if ((task_file_data & 1))
return false; return false;
if (fis->command == ATA_CMD_SEC_ERASE_PREP) { if (fis->command == ATA_CMD_SEC_ERASE_PREP) {
set_bit(MTIP_PF_SE_ACTIVE_BIT, &port->flags); set_bit(MTIP_PF_SE_ACTIVE_BIT, &port->flags);
set_bit(MTIP_DDF_SEC_LOCK_BIT, &port->dd->dd_flag);
port->ic_pause_timer = jiffies; port->ic_pause_timer = jiffies;
return true; return true;
} else if ((fis->command == ATA_CMD_DOWNLOAD_MICRO) && } else if ((fis->command == ATA_CMD_DOWNLOAD_MICRO) &&
...@@ -1015,6 +1011,7 @@ static bool mtip_pause_ncq(struct mtip_port *port, ...@@ -1015,6 +1011,7 @@ static bool mtip_pause_ncq(struct mtip_port *port,
((fis->command == 0xFC) && ((fis->command == 0xFC) &&
(fis->features == 0x27 || fis->features == 0x72 || (fis->features == 0x27 || fis->features == 0x72 ||
fis->features == 0x62 || fis->features == 0x26))) { fis->features == 0x62 || fis->features == 0x26))) {
clear_bit(MTIP_DDF_SEC_LOCK_BIT, &port->dd->dd_flag);
/* Com reset after secure erase or lowlevel format */ /* Com reset after secure erase or lowlevel format */
mtip_restart_port(port); mtip_restart_port(port);
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment