linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Loading both the pata_atiixp and the ahci driver causes problems
@ 2007-03-15 22:08 Chuck Ebbert
  2007-03-16  1:42 ` Jon Masters
  0 siblings, 1 reply; 7+ messages in thread
From: Chuck Ebbert @ 2007-03-15 22:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jeff Garzik, linux-ide

If you try to load both the pata_atiixp and the ahci driver
(for the same ATI SB600 adapter), very strange things happen.
The AHCI driver churns for three minutes or so, spewing
messages like this, then nothing works:

<6>ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
<4>ata3.00: qc timeout (cmd 0xec)
<4>ata3.00: failed to IDENTIFY (I/O error, err_mask=0x104)

Shouldn't it be able to tell the device has already been
claimed by some other driver?

(This is kernel 2.6.21-rc, and it's almost certainly happening
in 2.6.20 as well.)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Loading both the pata_atiixp and the ahci driver causes problems
  2007-03-15 22:08 Loading both the pata_atiixp and the ahci driver causes problems Chuck Ebbert
@ 2007-03-16  1:42 ` Jon Masters
  2007-03-18  5:41   ` Tejun Heo
  0 siblings, 1 reply; 7+ messages in thread
From: Jon Masters @ 2007-03-16  1:42 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: linux-kernel, Jeff Garzik, linux-ide

Chuck Ebbert wrote:

> If you try to load both the pata_atiixp and the ahci driver
> (for the same ATI SB600 adapter), very strange things happen.
> The AHCI driver churns for three minutes or so, spewing
> messages like this, then nothing works:
> 
> <6>ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> <4>ata3.00: qc timeout (cmd 0xec)
> <4>ata3.00: failed to IDENTIFY (I/O error, err_mask=0x104)

> Shouldn't it be able to tell the device has already been
> claimed by some other driver?

One would assume it'd fail to grab the PCI IO ranges twice? I haven't 
looked at the code but I have seen this bug mentioned elsewhere so I 
might well end up having to do that yet :-)

Jon.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Loading both the pata_atiixp and the ahci driver causes problems
  2007-03-16  1:42 ` Jon Masters
@ 2007-03-18  5:41   ` Tejun Heo
  2007-03-18  6:28     ` Jon Masters
  2007-03-18 21:21     ` Chuck Ebbert
  0 siblings, 2 replies; 7+ messages in thread
From: Tejun Heo @ 2007-03-18  5:41 UTC (permalink / raw)
  To: Jon Masters; +Cc: Chuck Ebbert, linux-kernel, Jeff Garzik, linux-ide, Conke Hu

Jon Masters wrote:
> Chuck Ebbert wrote:
> 
>> If you try to load both the pata_atiixp and the ahci driver
>> (for the same ATI SB600 adapter), very strange things happen.
>> The AHCI driver churns for three minutes or so, spewing
>> messages like this, then nothing works:
>>
>> <6>ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> <4>ata3.00: qc timeout (cmd 0xec)
>> <4>ata3.00: failed to IDENTIFY (I/O error, err_mask=0x104)
> 
>> Shouldn't it be able to tell the device has already been
>> claimed by some other driver?
> 
> One would assume it'd fail to grab the PCI IO ranges twice? I haven't
> looked at the code but I have seen this bug mentioned elsewhere so I
> might well end up having to do that yet :-)

Dunno much about sb600 but ahci and pata_atiixp are probably using
separate IO regions && separate PCI functions.

Conke, care to educate us a bit here?

-- 
tejun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Loading both the pata_atiixp and the ahci driver causes problems
  2007-03-18  5:41   ` Tejun Heo
@ 2007-03-18  6:28     ` Jon Masters
  2007-03-18  6:38       ` Tejun Heo
  2007-03-18 21:21     ` Chuck Ebbert
  1 sibling, 1 reply; 7+ messages in thread
From: Jon Masters @ 2007-03-18  6:28 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Chuck Ebbert, linux-kernel, Jeff Garzik, linux-ide, Conke Hu

Tejun Heo wrote:
> Jon Masters wrote:
>> Chuck Ebbert wrote:
>>
>>> If you try to load both the pata_atiixp and the ahci driver
>>> (for the same ATI SB600 adapter), very strange things happen.
>>> The AHCI driver churns for three minutes or so, spewing
>>> messages like this, then nothing works:
>>>
>>> <6>ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>>> <4>ata3.00: qc timeout (cmd 0xec)
>>> <4>ata3.00: failed to IDENTIFY (I/O error, err_mask=0x104)
>>> Shouldn't it be able to tell the device has already been
>>> claimed by some other driver?
>> One would assume it'd fail to grab the PCI IO ranges twice? I haven't
>> looked at the code but I have seen this bug mentioned elsewhere so I
>> might well end up having to do that yet :-)
> 
> Dunno much about sb600 but ahci and pata_atiixp are probably using
> separate IO regions && separate PCI functions.

Yeah. I actually thought about this whole issue a bit more recently - 
things like SATA/PATA interference when you've got a part that emulates 
legacy functionality so can appear as two different kinds of device - 
since I don't think my brain was really bothering to listen before. 
Words were going in, but it chose to ignore what was being said.

Only thing that comes to mind is in-driver logic/driver loading ordering 
hack combinations. At least if you've got loadable modules, you've got a 
fighting chance of fixing this kind of situation - built-in and you need 
to fight with whatever ordering exists in the array of init functions.

Jon.

P.S. Guess this means I need to admit I was wrong and apologize to 
Zaitcev sometime too in relation to another discussion...bah :P


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Loading both the pata_atiixp and the ahci driver causes problems
  2007-03-18  6:28     ` Jon Masters
@ 2007-03-18  6:38       ` Tejun Heo
  2007-03-18  6:56         ` Jon Masters
  0 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2007-03-18  6:38 UTC (permalink / raw)
  To: Jon Masters; +Cc: Chuck Ebbert, linux-kernel, Jeff Garzik, linux-ide, Conke Hu

Hello, Jon.

Jon Masters wrote:
>> Dunno much about sb600 but ahci and pata_atiixp are probably using
>> separate IO regions && separate PCI functions.
> 
> Yeah. I actually thought about this whole issue a bit more recently -
> things like SATA/PATA interference when you've got a part that emulates
> legacy functionality so can appear as two different kinds of device -
> since I don't think my brain was really bothering to listen before.
> Words were going in, but it chose to ignore what was being said.

Dunno about the history.  Oh well, as long as the problem gets fixed.

> Only thing that comes to mind is in-driver logic/driver loading ordering
> hack combinations. At least if you've got loadable modules, you've got a
> fighting chance of fixing this kind of situation - built-in and you need
> to fight with whatever ordering exists in the array of init functions.

Not sure whether it applies to sb600 directly but libata policy for this
type of situation is..

* always prefer the native / more capable (read ahci) interface over
emulated SFF interface.

* program the device and update PCI header using a PCI quirk such that
module loading order or BIOS setting doesn't affect which driver gets
attached.  Note that if the controller needs to programmed in specific
way, the quirk also needs to be called during resume.  In this case, the
function for SFF interface can simply be disabled.

Please take a look at the JMB quirk in drivers/pci/quirks.c in the
latest libata-dev#upstream tree for details.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Loading both the pata_atiixp and the ahci driver causes problems
  2007-03-18  6:38       ` Tejun Heo
@ 2007-03-18  6:56         ` Jon Masters
  0 siblings, 0 replies; 7+ messages in thread
From: Jon Masters @ 2007-03-18  6:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-ide

Tejun Heo wrote:

> Please take a look at the JMB quirk in drivers/pci/quirks.c in the
> latest libata-dev#upstream tree for details.

For interest, I will, thanks for the info.

Jon.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Loading both the pata_atiixp and the ahci driver causes problems
  2007-03-18  5:41   ` Tejun Heo
  2007-03-18  6:28     ` Jon Masters
@ 2007-03-18 21:21     ` Chuck Ebbert
  1 sibling, 0 replies; 7+ messages in thread
From: Chuck Ebbert @ 2007-03-18 21:21 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Jon Masters, linux-kernel, Jeff Garzik, linux-ide, Conke Hu

Tejun Heo wrote:
> Jon Masters wrote:
>> Chuck Ebbert wrote:
>>
>>> If you try to load both the pata_atiixp and the ahci driver
>>> (for the same ATI SB600 adapter), very strange things happen.
>>> The AHCI driver churns for three minutes or so, spewing
>>> messages like this, then nothing works:
>>>
>>> <6>ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>>> <4>ata3.00: qc timeout (cmd 0xec)
>>> <4>ata3.00: failed to IDENTIFY (I/O error, err_mask=0x104)
>>> Shouldn't it be able to tell the device has already been
>>> claimed by some other driver?
>> One would assume it'd fail to grab the PCI IO ranges twice? I haven't
>> looked at the code but I have seen this bug mentioned elsewhere so I
>> might well end up having to do that yet :-)
> 
> Dunno much about sb600 but ahci and pata_atiixp are probably using
> separate IO regions && separate PCI functions.
> 
> Conke, care to educate us a bit here?
> 

The really funny part is that it works for some if they use:

  pci=noacpi,irqpoll



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-03-18 21:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-15 22:08 Loading both the pata_atiixp and the ahci driver causes problems Chuck Ebbert
2007-03-16  1:42 ` Jon Masters
2007-03-18  5:41   ` Tejun Heo
2007-03-18  6:28     ` Jon Masters
2007-03-18  6:38       ` Tejun Heo
2007-03-18  6:56         ` Jon Masters
2007-03-18 21:21     ` Chuck Ebbert

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