linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 6/6] sata_nv: add hotplug support
Date: Sat, 17 Jun 2006 15:49:56 +0900	[thread overview]
Message-ID: <11505269964089-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11505269953650-git-send-email-htejun@gmail.com>

Add hotplug support.

Signed-off-by: Tejun Heo <htejun@gmail.com>

---

 drivers/scsi/sata_nv.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

9e6fcaab7c4457835c1417c45b702945c754bd4f
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
index 2a1bd85..19deaa4 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 
 	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;
-- 
1.3.2



  parent reply	other threads:[~2006-06-17  6:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-17  6:49 [PATCHSET] sata_nv: convert to new EH and add hotplug support, take 2 Tejun Heo
2006-06-17  6:49 ` [PATCH 1/6] sata_nv: kill not-working hotplug code Tejun Heo
2006-06-20  9:09   ` Jeff Garzik
2006-06-20  9:14     ` Tejun Heo
2006-06-17  6:49 ` [PATCH 3/6] sata_nv: simplify constants Tejun Heo
2006-06-17  6:49 ` [PATCH 2/6] sata_nv: kill struct nv_host_desc and nv_host Tejun Heo
2006-06-17  6:49 ` Tejun Heo [this message]
2006-06-17  6:49 ` [PATCH 5/6] sata_nv: convert to new EH Tejun Heo
2006-06-17  6:49 ` [PATCH 4/6] sata_nv: better irq handlers Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11505269964089-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).