LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@it.uu.se>
To: andersen@codepoet.org, linux-kernel@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk, jgarzik@pobox.com
Subject: Re: [PATCH] make sata_promise PATA ports work
Date: Wed, 6 Dec 2006 19:12:00 +0100 (MET)	[thread overview]
Message-ID: <200612061812.kB6IC0Ve004856@harpo.it.uu.se> (raw)

On Mon, 4 Dec 2006 12:47:37 -0700, Erik Andersen wrote:
>This patch vs 2.6.19, based on the not-actually-working-for-me
>code lurking in libata-dev.git#promise-sata-pata, makes the PATA
>ports on my promise sata card actually work.  Since the plan as
>checked into git, is to drive the PATA ports as if they were
>SATA, we have to teach sata_scr_read() to lie for the PATA ports
>which don't to that, lest the various places that call
>ata_port_offline() and ata_port_online() should fail and leave
>the ports offline and inaccessible.
>
>This patch gets both SATA and PATA working for me with the
>sata_promise driver on a PDC20375.  Performace seems to be about
>what I would expect, so this (or something very much like it)
>should be applied upstream.

This description doesn't match my experience.

The patch in #promise-sata-pata should work for 2037x chips.
It doesn't work on 2057x chips because it doesn't remove
ATA_FLAG_SATA from board_2057x. That omission causes libata
to consider all ports on it as SATA, including the PATA port,
and that's why sata_scr_read() etc get invoked.

Applying the patch below on top of #promise-sata-pata fixes
this, and is all I had to do to get working PATA on my 20575.

/Mikael

--- linux-2.6.19/drivers/ata/sata_promise.c.~1~	2006-12-05 20:42:18.000000000 +0100
+++ linux-2.6.19/drivers/ata/sata_promise.c	2006-12-05 21:01:26.000000000 +0100
@@ -213,7 +213,7 @@ static const struct ata_port_info pdc_po
 	/* board_2057x */
 	{
 		.sht		= &pdc_ata_sht,
-		.flags		= PDC_COMMON_FLAGS | ATA_FLAG_SATA,
+		.flags		= PDC_COMMON_FLAGS /* | ATA_FLAG_SATA*/,
 		.pio_mask	= 0x1f, /* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */

             reply	other threads:[~2006-12-06 18:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 18:12 Mikael Pettersson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-12-04 19:47 Erik Andersen
2006-12-04 20:16 ` Alan
2006-12-04 23:22   ` 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=200612061812.kB6IC0Ve004856@harpo.it.uu.se \
    --to=mikpe@it.uu.se \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andersen@codepoet.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] make sata_promise PATA ports work' \
    /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

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).