linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide <linux-ide@vger.kernel.org>,
	Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH 0/2] fix libata-sff and pata_cmd64x to not crash on boot on parisc
Date: Mon, 18 Apr 2011 15:08:07 -0500	[thread overview]
Message-ID: <1303157287.7167.26.camel@mulgrave.site> (raw)
In-Reply-To: <20110418205203.56bbdb14@lxorguk.ukuu.org.uk>

On Mon, 2011-04-18 at 20:52 +0100, Alan Cox wrote:
> On Mon, 18 Apr 2011 13:42:27 -0500
> James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> 
> > currently libata-sff is completely ignoring the enabled/disabled status
> > of the interfaces. 
> 
> Yes - it makes some machines work rather better because the BIOSes
> sometimes mess up the registers. It wad a *deliberate* decision not to
> port it over and as a result stuff works that failed before. Windows
> drivers clearly ignore the bits in many cases.

Well your deliberate decision is crashing my box on boot.  That makes
this a regression from the IDE cmd64x driver. I hear indirectly there's
a similar problem on sparc.

> In addition
> - Your patch seems to be applying the enable bits apply in native mode
>   (they don't generally)
> - You seem to be assuming either first or both ports enabled, secondly
>   only is just as valid

Yes, I know ... but that config is broken today and a fix, given the
hardcoded assumptions in libata-sff, would be more invasive (and not
really of interest to the crash problem).

> This matters for CMD64x as several 64x devices are found on hotpluggable
> 'docking stations' using a PCI split bridge. Only doing the checks for
> chips in legacy mode should avoid that problem. In native mode the PCI
> bars are the only register bases used so the problem doesn't arise.

No, that analysis is wrong: Parisc (and actually presumably every
non-x86) doesn't use legacy mode.  The bars are all wired up (I posted
the original lspci output showing this).  The problem is that when you
try to prod the registers behind the secondary bar we get an instant
crash because the memory doesn't respond ... I'm assuming the secondary
bar isn't actually wired up to the chip.

> The patch seems to be broken for all these cases and also incredibly
> invasive given you can just pass a dummy port in as one of
> your struct ata_port_info * pointers to ata_pci_dma_init_one()

You mean in ata_pci_bmdma_init_one()?  yes, that might work ... I still
need to know how to detect this.

> You shouldn't need to touch a single line of the core libata code,
> although it might be the best way of doing it. Either way if you do the
> number of ports needs to be a bitmask instead and you need to leave
> native mode alone.

The core libata code looked broken in the assumption that it had to poke
a double register pair for sff mode (the hard coded loop over two
ports) ... this is what won't work on non-x86 boxes.  

James



  reply	other threads:[~2011-04-18 20:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 18:42 [PATCH 0/2] fix libata-sff and pata_cmd64x to not crash on boot on parisc James Bottomley
2011-04-18 18:44 ` [PATCH 1/2] libata-sff: remove hardcoded requirement for two ports James Bottomley
2011-04-18 18:45 ` [PATCH 2/2] pata_cmd64x: fix crash on boot with disabled secondary port James Bottomley
2011-04-19 20:48   ` Sergei Shtylyov
2011-04-18 19:52 ` [PATCH 0/2] fix libata-sff and pata_cmd64x to not crash on boot on parisc Alan Cox
2011-04-18 20:08   ` James Bottomley [this message]
2011-04-18 20:14     ` David Miller
2011-04-18 21:09     ` Alan Cox
2011-04-18 20:50   ` James Bottomley
2011-04-18 21:20     ` Alan Cox
2011-04-19 13:54       ` James Bottomley
2011-04-19 14:36         ` Alan Cox
2011-04-19 15:02           ` James Bottomley
2011-04-19 15:58             ` Alan Cox
2011-04-19 20:59       ` Sergei Shtylyov
2011-04-19 21:19         ` Alan Cox
2011-04-19 21:22           ` Sergei Shtylyov
2011-04-19 21:28             ` Alan Cox
2011-04-19 23:11               ` James Bottomley
2011-04-20  9:35                 ` Alan Cox
2011-04-20 10:04                 ` Sergei Shtylyov
2011-04-20 14:28                   ` James Bottomley
2011-04-20 14:52                     ` James Bottomley
2011-04-20 14:54                     ` Sergei Shtylyov
2011-04-20 14:56                   ` Matthew Wilcox
2011-04-21 14:24                     ` Jeff Garzik
2011-04-19 20:53     ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2011-04-24 19:28 James Bottomley
2011-05-13 17:01 ` James Bottomley
2011-05-14 19:01   ` Jeff Garzik
2011-07-15 15:45     ` Sergei Shtylyov

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=1303157287.7167.26.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-parisc@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).