diff options
author | Tejun Heo <htejun@gmail.com> | 2006-06-17 08:49:56 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-20 10:59:22 +0200 |
commit | 5a44efff4f8fe8139c0c4166ad5aae5f2fa5bced (patch) | |
tree | fe424beaa46ad3d59b28ef79b1da4a1f748e2ac8 | |
parent | [PATCH] sata_nv: convert to new EH (diff) | |
download | linux-5a44efff4f8fe8139c0c4166ad5aae5f2fa5bced.tar.xz linux-5a44efff4f8fe8139c0c4166ad5aae5f2fa5bced.zip |
[PATCH] sata_nv: add hotplug support
Add hotplug support.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/scsi/sata_nv.c | 9 |
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 { NV_INT_PORT_SHIFT = 4, /* each port occupies 4 bits */ NV_INT_ALL = 0x0f, - NV_INT_MASK = NV_INT_DEV, + NV_INT_MASK = NV_INT_DEV | + NV_INT_ADDED | NV_INT_REMOVED, /* INT_CONFIG */ NV_INT_CONFIG = 0x12, @@ -324,6 +325,12 @@ static int nv_host_intr(struct ata_port *ap, u8 irq_stat) struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); int handled; + /* freeze if hotplugged */ + if (unlikely(irq_stat & (NV_INT_ADDED | NV_INT_REMOVED))) { + ata_port_freeze(ap); + return 1; + } + /* bail out if not our interrupt */ if (!(irq_stat & NV_INT_DEV)) return 0; |