linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 8/9] libata: replace ap->hard_port_no with ap->port_no
Date: Thu, 10 Aug 2006 17:16:30 +0900	[thread overview]
Message-ID: <11551977902032-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11551977882917-git-send-email-htejun@gmail.com>

Replace ap->hard_port_no with ap->port_no.

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

---

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

2a88d1ac8dca898a7fb602ddd581bf4d2977509d
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 40ecab5..501755a 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -487,7 +487,7 @@ static void piix_pata_cbl_detect(struct 
 		goto cbl40;
 
 	/* check BIOS cable detect results */
-	mask = ap->hard_port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC;
+	mask = ap->port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC;
 	pci_read_config_byte(pdev, PIIX_IOCFG, &tmp);
 	if ((tmp & mask) == 0)
 		goto cbl40;
@@ -513,7 +513,7 @@ static int piix_pata_prereset(struct ata
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
 
-	if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->hard_port_no])) {
+	if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no])) {
 		ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n");
 		ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
 		return 0;
@@ -550,7 +550,7 @@ static int piix_sata_prereset(struct ata
 	struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
 	struct piix_host_priv *hpriv = ap->host_set->private_data;
 	const unsigned int *map = hpriv->map;
-	int base = 2 * ap->hard_port_no;
+	int base = 2 * ap->port_no;
 	unsigned int present = 0;
 	int port, i;
 	u16 pcs;
@@ -601,7 +601,7 @@ static void piix_set_piomode (struct ata
 	unsigned int pio	= adev->pio_mode - XFER_PIO_0;
 	struct pci_dev *dev	= to_pci_dev(ap->host_set->dev);
 	unsigned int is_slave	= (adev->devno != 0);
-	unsigned int master_port= ap->hard_port_no ? 0x42 : 0x40;
+	unsigned int master_port= ap->port_no ? 0x42 : 0x40;
 	unsigned int slave_port	= 0x44;
 	u16 master_data;
 	u8 slave_data;
@@ -619,10 +619,10 @@ static void piix_set_piomode (struct ata
 		/* enable PPE, IE and TIME */
 		master_data |= 0x0070;
 		pci_read_config_byte(dev, slave_port, &slave_data);
-		slave_data &= (ap->hard_port_no ? 0x0f : 0xf0);
+		slave_data &= (ap->port_no ? 0x0f : 0xf0);
 		slave_data |=
 			(timings[pio][0] << 2) |
-			(timings[pio][1] << (ap->hard_port_no ? 4 : 0));
+			(timings[pio][1] << (ap->port_no ? 4 : 0));
 	} else {
 		master_data &= 0xccf8;
 		/* enable PPE, IE and TIME */
@@ -652,9 +652,9 @@ static void piix_set_dmamode (struct ata
 {
 	unsigned int udma	= adev->dma_mode; /* FIXME: MWDMA too */
 	struct pci_dev *dev	= to_pci_dev(ap->host_set->dev);
-	u8 maslave		= ap->hard_port_no ? 0x42 : 0x40;
+	u8 maslave		= ap->port_no ? 0x42 : 0x40;
 	u8 speed		= udma;
-	unsigned int drive_dn	= (ap->hard_port_no ? 2 : 0) + adev->devno;
+	unsigned int drive_dn	= (ap->port_no ? 2 : 0) + adev->devno;
 	int a_speed		= 3 << (drive_dn * 4);
 	int u_flag		= 1 << drive_dn;
 	int v_flag		= 0x01 << drive_dn;
-- 
1.3.2



  parent reply	other threads:[~2006-08-10  8:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10  8:16 [PATCHSET] libata: improve initialization and legacy handling, take#3 Tejun Heo
2006-08-10  8:16 ` [PATCH 5/9] libata: rework legacy handling to remove much of the cruft Tejun Heo
2006-08-10  8:16 ` [PATCH 4/9] libata: implement per-dev xfermask Tejun Heo
2006-08-10  8:16 ` [PATCH 6/9] libata: implement dummy port Tejun Heo
2006-08-10  8:16 ` [PATCH 1/9] libata: update ata_host_init() and rename it to ata_port_init_shost() Tejun Heo
2006-08-10  8:16 ` [PATCH 3/9] [libata] Kill 'count' var in ata_device_add() Tejun Heo
2006-08-10  8:16 ` [PATCH 2/9] [libata] some function renaming Tejun Heo
2006-08-10  8:16 ` [PATCH 9/9] libata: kill unused hard_port_no and legacy_mode Tejun Heo
2006-08-10  8:16 ` [PATCH 7/9] libata: use dummy port for stolen legacy ports Tejun Heo
2006-08-10  8:16 ` Tejun Heo [this message]
2006-08-10 10:53 ` [PATCHSET] libata: improve initialization and legacy handling, take#3 Jeff Garzik
2006-08-10 11:32   ` Tejun Heo
2006-08-10 11:59     ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2006-08-04 21:01 [PATCHSET] libata: improve initialization and legacy handling, take#2 Tejun Heo
2006-08-04 21:01 ` [PATCH 8/9] libata: replace ap->hard_port_no with ap->port_no 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=11551977902032-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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).