From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org
Subject: [PATCH 04/05] ahci: separate out ahci_dev_classify
Date: Mon, 19 Dec 2005 22:37:17 +0900 [thread overview]
Message-ID: <20051219133717.GD26769@htj.dyndns.org> (raw)
In-Reply-To: <20051219133502.GA26769@htj.dyndns.org>
Separate out ahci_dev_classify().
Signed-off-by: Tejun Heo <htejun@gmail.com>
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 085d749..463456a 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -474,10 +474,24 @@ static void ahci_start_engine(struct ata
readl(port_mmio + PORT_CMD); /* flush */
}
-static void ahci_phy_reset(struct ata_port *ap)
+static unsigned int ahci_dev_classify(struct ata_port *ap)
{
void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr;
struct ata_taskfile tf;
+ u32 tmp;
+
+ tmp = readl(port_mmio + PORT_SIG);
+ tf.lbah = (tmp >> 24) & 0xff;
+ tf.lbam = (tmp >> 16) & 0xff;
+ tf.lbal = (tmp >> 8) & 0xff;
+ tf.nsect = (tmp) & 0xff;
+
+ return ata_dev_classify(&tf);
+}
+
+static void ahci_phy_reset(struct ata_port *ap)
+{
+ void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr;
struct ata_device *dev = &ap->device[0];
u32 new_tmp, tmp;
@@ -486,13 +500,7 @@ static void ahci_phy_reset(struct ata_po
if (ap->flags & ATA_FLAG_PORT_DISABLED)
return;
- tmp = readl(port_mmio + PORT_SIG);
- tf.lbah = (tmp >> 24) & 0xff;
- tf.lbam = (tmp >> 16) & 0xff;
- tf.lbal = (tmp >> 8) & 0xff;
- tf.nsect = (tmp) & 0xff;
-
- dev->class = ata_dev_classify(&tf);
+ dev->class = ahci_dev_classify(ap);
if (!ata_dev_present(dev)) {
ata_port_disable(ap);
return;
next prev parent reply other threads:[~2005-12-19 13:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-19 13:35 [PATCH 01/05] libata: separate out ata_sata_print_link_status Tejun Heo
2005-12-19 13:35 ` [PATCH 02/05] libata: export ata_busy_sleep Tejun Heo
2005-12-19 13:36 ` [PATCH 03/05] ahci: separate out ahci_stop/start_engine Tejun Heo
2005-12-19 13:37 ` Tejun Heo [this message]
2005-12-19 13:38 ` [PATCH 05/05] ahci: rewrite ahci_phy_reset Tejun Heo
2006-01-18 0:49 ` [PATCH 01/05] libata: separate out ata_sata_print_link_status 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=20051219133717.GD26769@htj.dyndns.org \
--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).