linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, albertcc@tw.ibm.com, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 1/4] libata: implement ata_dev_disable()
Date: Mon, 13 Mar 2006 17:12:33 +0900	[thread overview]
Message-ID: <11422375532417-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11422373402858-git-send-email-htejun@gmail.com>

This patch implements ata_dev_disable() which prints a warning message
and takes @dev offline.  Currently, this is done by explicitly
incrementing dev->class with case-by-case warning messages.  Giving
user clear indication when libata gives up will be more important as
libata will be doing more retries.

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

---

 drivers/scsi/libata-core.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

b0e8e3c30b12f3adf35a7047031c9a6e8258e289
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 7b1150d..92c7c53 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -394,6 +394,15 @@ static const char *ata_mode_string(unsig
 	return "<n/a>";
 }
 
+static void ata_dev_disable(struct ata_port *ap, struct ata_device *dev)
+{
+	if (ata_dev_present(dev)) {
+		printk(KERN_WARNING "ata%u: dev %u disabled\n",
+		       ap->id, dev->devno);
+		dev->class++;
+	}
+}
+
 /**
  *	ata_pio_devchk - PATA device presence detection
  *	@ap: ATA channel to examine
-- 
1.2.4



  parent reply	other threads:[~2006-03-13  8:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13  8:09 [PATCHSET] libata: add @disable_on_err to ata_set_mode() Tejun Heo
2006-03-13  8:12 ` [PATCH 4/4] libata: add @disable_on_err argument " Tejun Heo
2006-03-13  8:12 ` [PATCH 2/4] libata: use ata_dev_disable() in ata_bus_probe() Tejun Heo
2006-03-13  8:12 ` Tejun Heo [this message]
2006-03-13  8:12 ` [PATCH 3/4] libata: make ata_set_mode() responsible for failure handling Tejun Heo
2006-03-13  8:37   ` Jeff Garzik
2006-03-13  9:44     ` Tejun Heo
2006-03-13  9:56       ` Jeff Garzik
2006-03-13 10:14         ` Tejun Heo
2006-03-21  1:54           ` Jeff Garzik

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=11422375532417-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=albertcc@tw.ibm.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).