aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/sata_nv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
index 2a1bd85404e0..19deaa42fbf0 100644
--- a/drivers/scsi/sata_nv.c
+++ b/drivers/scsi/sata_nv.c
@@ -69,7 +69,8 @@ enum {
69 NV_INT_PORT_SHIFT = 4, /* each port occupies 4 bits */ 69 NV_INT_PORT_SHIFT = 4, /* each port occupies 4 bits */
70 70
71 NV_INT_ALL = 0x0f, 71 NV_INT_ALL = 0x0f,
72 NV_INT_MASK = NV_INT_DEV, 72 NV_INT_MASK = NV_INT_DEV |
73 NV_INT_ADDED | NV_INT_REMOVED,
73 74
74 /* INT_CONFIG */ 75 /* INT_CONFIG */
75 NV_INT_CONFIG = 0x12, 76 NV_INT_CONFIG = 0x12,
@@ -324,6 +325,12 @@ static int nv_host_intr(struct ata_port *ap, u8 irq_stat)
324 struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); 325 struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
325 int handled; 326 int handled;
326 327
328 /* freeze if hotplugged */
329 if (unlikely(irq_stat & (NV_INT_ADDED | NV_INT_REMOVED))) {
330 ata_port_freeze(ap);
331 return 1;
332 }
333
327 /* bail out if not our interrupt */ 334 /* bail out if not our interrupt */
328 if (!(irq_stat & NV_INT_DEV)) 335 if (!(irq_stat & NV_INT_DEV))
329 return 0; 336 return 0;