diff options
Diffstat (limited to 'drivers/block/mtip32xx/mtip32xx.c')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index a935f4f7a53a..2553c7353115 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
@@ -1148,11 +1148,15 @@ static bool mtip_pause_ncq(struct mtip_port *port, | |||
1148 | reply = port->rxfis + RX_FIS_D2H_REG; | 1148 | reply = port->rxfis + RX_FIS_D2H_REG; |
1149 | task_file_data = readl(port->mmio+PORT_TFDATA); | 1149 | task_file_data = readl(port->mmio+PORT_TFDATA); |
1150 | 1150 | ||
1151 | if ((task_file_data & 1) || (fis->command == ATA_CMD_SEC_ERASE_UNIT)) | 1151 | if (fis->command == ATA_CMD_SEC_ERASE_UNIT) |
1152 | clear_bit(MTIP_DDF_SEC_LOCK_BIT, &port->dd->dd_flag); | ||
1153 | |||
1154 | if ((task_file_data & 1)) | ||
1152 | return false; | 1155 | return false; |
1153 | 1156 | ||
1154 | if (fis->command == ATA_CMD_SEC_ERASE_PREP) { | 1157 | if (fis->command == ATA_CMD_SEC_ERASE_PREP) { |
1155 | set_bit(MTIP_PF_SE_ACTIVE_BIT, &port->flags); | 1158 | set_bit(MTIP_PF_SE_ACTIVE_BIT, &port->flags); |
1159 | set_bit(MTIP_DDF_SEC_LOCK_BIT, &port->dd->dd_flag); | ||
1156 | port->ic_pause_timer = jiffies; | 1160 | port->ic_pause_timer = jiffies; |
1157 | return true; | 1161 | return true; |
1158 | } else if ((fis->command == ATA_CMD_DOWNLOAD_MICRO) && | 1162 | } else if ((fis->command == ATA_CMD_DOWNLOAD_MICRO) && |
@@ -3619,6 +3623,10 @@ static void mtip_make_request(struct request_queue *queue, struct bio *bio) | |||
3619 | bio_endio(bio, -ENODATA); | 3623 | bio_endio(bio, -ENODATA); |
3620 | return; | 3624 | return; |
3621 | } | 3625 | } |
3626 | if (unlikely(test_bit(MTIP_DDF_SEC_LOCK_BIT, &dd->dd_flag))) { | ||
3627 | bio_endio(bio, -ENODATA); | ||
3628 | return; | ||
3629 | } | ||
3622 | } | 3630 | } |
3623 | 3631 | ||
3624 | if (unlikely(!bio_has_data(bio))) { | 3632 | if (unlikely(!bio_has_data(bio))) { |