From: Jeff Garzik <jeff@garzik.org>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 2.6.21-mm1 2/2] sata_promise: SATAII-150/300 TX4 port numbering fix
Date: Wed, 09 May 2007 20:16:58 -0400 [thread overview]
Message-ID: <4642647A.5010901@garzik.org> (raw)
In-Reply-To: <200705062014.l46KE1U3026752@harpo.it.uu.se>
Mikael Pettersson wrote:
> There is a known problem with sata_promise on SATAII-150/300 TX4
> controller cards: it enumerates drives in an order that differs
> from the port numbers printed on the controller cards. However,
> Promise's BIOS and Linux driver both get the order right.
>
> I investigated Promise's Linux driver (v1.01.0.23), and found
> that it explicitly changes the mapping from logical port number
> to ATA engine MMIO address on the SATAII TX4 cards. It does this
> on all SATAII TX4 cards, without inspecting revision etc. The
> SATAII TX2plus cards continue to use the same mapping that was
> used for the first-generation chips.
>
> This patch updates sata_promise to use the new port number to
> ATA engine mapping on SATAII TX4 cards, which fixes the drive
> enumeration order problem on those cards. Tested on several
> 1st and 2nd generation TX2plus and TX4 chips.
>
> Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
> ---
> Changes since previous submission: ported to libata#ALL and the
> new init model, updated to apply after the fix for the 2nd error
> decode regression.
>
> drivers/ata/sata_promise.c | 22 ++++++++++++++++++----
> 1 files changed, 18 insertions(+), 4 deletions(-)
>
> --- linux-2.6.21-mm1/drivers/ata/sata_promise.c.~1~ 2007-05-06 20:29:28.000000000 +0200
> +++ linux-2.6.21-mm1/drivers/ata/sata_promise.c 2007-05-06 20:30:39.000000000 +0200
> @@ -45,7 +45,7 @@
> #include "sata_promise.h"
>
> #define DRV_NAME "sata_promise"
> -#define DRV_VERSION "2.06"
> +#define DRV_VERSION "2.07"
>
>
> enum {
> @@ -926,6 +926,7 @@ static int pdc_ata_init_one (struct pci_
> struct ata_host *host;
> void __iomem *base;
> int n_ports, i, rc;
> + int is_sataii_tx4;
>
> if (!printed_version++)
> dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
> @@ -964,10 +965,23 @@ static int pdc_ata_init_one (struct pci_
> }
> host->iomap = pcim_iomap_table(pdev);
>
> - for (i = 0; i < host->n_ports; i++)
> + is_sataii_tx4 = 0;
> + if ((pi->flags & (PDC_FLAG_GEN_II|PDC_FLAG_4_PORTS)) == (PDC_FLAG_GEN_II|PDC_FLAG_4_PORTS)) {
> + is_sataii_tx4 = 1;
> + dev_printk(KERN_INFO, &pdev->dev, "applying SATAII TX4 port numbering workaround\n");
...though I'm not sure the printk is really wanted. nonetheless, I
applied it.
next prev parent reply other threads:[~2007-05-10 0:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-06 20:14 [PATCH 2.6.21-mm1 2/2] sata_promise: SATAII-150/300 TX4 port numbering fix Mikael Pettersson
2007-05-10 0:16 ` Jeff Garzik [this message]
2007-05-10 8:58 ` Mikael Pettersson
2007-06-01 20:28 ` 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=4642647A.5010901@garzik.org \
--to=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=mikpe@it.uu.se \
/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).