linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: torvalds@osdl.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ahci: Fix long standing Marvell regressions
Date: Tue, 02 Sep 2008 19:40:57 -0400	[thread overview]
Message-ID: <48BDCF09.7000603@garzik.org> (raw)
In-Reply-To: <20080903000538.7500eaf8@lxorguk.ukuu.org.uk>

[-- Attachment #1: Type: text/plain, Size: 3740 bytes --]

Alan Cox wrote:
> pata_marvell: Undo the regressions Jeff caused
> 
> From: Alan Cox <alan@redhat.com>
> 
> I've been chasing Jeff about this for months so am now giving up and sending
> it directly. Jeff added the Marvell device identifiers to the ahci driver
> without making the AHCI driver handle the PATA port. This means a lot of users
> can't use current kernels and in most distro cases can't even install. This has
> been going on since March 2008 for the 6121 Marvell, and late 2007 for the 6145.
> 
> This was all pointed out at the time and repeatedly ignored. Bugs assigned
> to Jeff about this are ignored also.
> 
> To quote Jeff in email
> 
> "Just switch the order of 'ahci' and 'pata_marvell' in
> /etc/modprobe.conf, then use Fedora's tools regenerate the initrd.
> 
> See?  It's not rocket science, and the current configuration can be
> easily made to work for Fedora users."
> 
> (Which isn't trivial, isn't end user, shouldn't be needed, and as it usually
> breaks at install time is in fact impossible)
> 
> To quote Jeff in August 2007
> 
> "   mv-ahci-pata
> Marvell 6121/6141 PATA support.  Needs fixing in the 'PATA controller
> command' area before it is usable, and can go upstream."
> 
> Only he applied it all anyway later and broke everything.

Completely and utterly false.  libata-dev.git#mv-ahci-pata has not yet 
gone upstream, as is blatantly clear if you had bothered to LOOK.

It helps to look at source code before posting, Alan:

         /*
          * Temporary Marvell 6145 hack: PATA port presence
          * is asserted through the standard AHCI port
          * presence register, as bit 4 (counting from 0)
          */
         if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
                 if (pdev->device == 0x6121)
                         mv = 0x3;
                 else
                         mv = 0xf;

Clearly PATA support is not applied, because the code masks out the PATA 
ports.


> The actual fix for the moment is very simple. If the user has included
> the pata_marvell driver let it drive the ports. If they've only selected
> for SATA support give them the AHCI driver which will run the port a fraction
> faster.

You omit details that hurt your case, namely that a ton of users were 
asking for AHCI support EVEN IF IT IS SATA ONLY, because the SATA 
support via pata_marvell legacy mode was so poor and problematic.

Among the pata_marvell complaints I received that were solved were:

* bloody awful error handling, with no hotplug support
* problems with suspend/resume (apparently some BIOS assumed you were in 
AHCI/enhanced mode)
* problems with speed negotiation of 3.0 Gbps SATA devices

So any claim that SATA always worked wonderfully under pata_marvell is 
specious.



Finally,

> +#if  !defined(CONFIG_PATA_MARVELL) && !defined(CONFIG_PATA_MARVELL_MODULE)
>  	/* Marvell */

this prevents users from choosing the driver that works best for them, 
including bringing back all the SATA problems just as you bring back PATA.

The attached patch is more reasonable, but neither your nor my patch 
actually address the relevant problem:  distros choosing the module.

So at this point, applying your patch would create regressions just as 
it purports to solve regressions, since Marvell AHCI is out there in 
active use as well.


How to move forward?  I recommend,

1) Applying my attached patch

2) Communicating with distros

3) See if we can get Marvell docs to someone willing to code in support. 
  Marvell has been very responsive in the past year with regards to 
'mvsas', so maybe they can help here too.

I kept hoping Marvell would pick up my unfinished #mv-ahci-pata work and 
polish it up.  They indicated interest, but kept putting it off.

	Jeff




[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 729 bytes --]

diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 674965f..56462ee 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -1,6 +1,8 @@
 
 obj-$(CONFIG_ATA)		+= libata.o
 
+obj-$(CONFIG_PATA_MARVELL)	+= pata_marvell.o
+
 obj-$(CONFIG_SATA_AHCI)		+= ahci.o
 obj-$(CONFIG_SATA_SVW)		+= sata_svw.o
 obj-$(CONFIG_ATA_PIIX)		+= ata_piix.o
@@ -47,7 +49,6 @@ obj-$(CONFIG_PATA_NS87415)	+= pata_ns87415.o
 obj-$(CONFIG_PATA_OPTI)		+= pata_opti.o
 obj-$(CONFIG_PATA_OPTIDMA)	+= pata_optidma.o
 obj-$(CONFIG_PATA_MPC52xx)	+= pata_mpc52xx.o
-obj-$(CONFIG_PATA_MARVELL)	+= pata_marvell.o
 obj-$(CONFIG_PATA_MPIIX)	+= pata_mpiix.o
 obj-$(CONFIG_PATA_OLDPIIX)	+= pata_oldpiix.o
 obj-$(CONFIG_PATA_PCMCIA)	+= pata_pcmcia.o

  reply	other threads:[~2008-09-02 23:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 23:05 [PATCH] ahci: Fix long standing Marvell regressions Alan Cox
2008-09-02 23:40 ` Jeff Garzik [this message]
2008-09-03  0:27   ` Alan Cox
2008-09-03 13:29   ` Alan Cox
2008-09-03 13:42     ` Jeff Garzik
2008-09-03 13:48     ` Alan Cox
2008-09-03 14:01       ` Jeff Garzik
2008-09-03 18:54       ` Richard A Nelson
2008-09-03 19:06         ` Alan Cox
2008-09-08 16:12       ` Jeff Garzik
2008-09-09 22:18         ` Chuck Ebbert

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=48BDCF09.7000603@garzik.org \
    --to=jeff@garzik.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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).