linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SiI3811 PATA->SATA bridge not working on OpenRD-Base
@ 2009-11-13 21:23 Sascha Silbe
  2009-12-01  6:08 ` Tejun Heo
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Silbe @ 2009-11-13 21:23 UTC (permalink / raw)
  To: linux-ide

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

Hi!

I can't get a SiI3811-based PATA (device) -> SATA (host) converter to 
work on my OpenRD-Base (ARMv5TE) running 2.6.32-rc7 (and -rc4 before 
that), even though
a) the converter is working fine (with the same hard disk(s) attached) 
on my PC (amd64, 2.6.26-2-amd64 from Debian),
b) a native SATA HD is working on the OpenRD-Base and
c) U-Boot (bootloader) is showing the PATA HD quite fine.

Both hard disk and converter are powered via an external power supply, 
so power draw isn't an issue.

The error messages are:

Nov 13 21:05:02 flatty kernel: ata2: hard resetting link
Nov 13 21:05:03 flatty kernel: ata2: SATA link up 1.5 Gbps (SStatus 113 
SControl F300)
Nov 13 21:05:03 flatty kernel: ata2.00: failed to IDENTIFY (I/O error, 
err_mask=0x2)
Nov 13 21:05:08 flatty kernel: ata2: hard resetting link
Nov 13 21:05:08 flatty kernel: ata2: SATA link up 1.5 Gbps (SStatus 113 
SControl F300)
Nov 13 21:05:08 flatty kernel: ata2.00: failed to IDENTIFY (I/O error, 
err_mask=0x2)
Nov 13 21:05:08 flatty kernel: ata2: limiting SATA link speed to 1.5 
Gbps
Nov 13 21:05:13 flatty kernel: ata2: hard resetting link
Nov 13 21:05:14 flatty kernel: ata2: SATA link up 1.5 Gbps (SStatus 113 
SControl F310)
Nov 13 21:05:14 flatty kernel: ata2.00: failed to IDENTIFY (I/O error, 
err_mask=0x2)
Nov 13 21:05:19 flatty kernel: ata2: hard resetting link
Nov 13 21:05:19 flatty kernel: ata2: SATA link up 1.5 Gbps (SStatus 113 
SControl F310)
Nov 13 21:05:19 flatty kernel: ata2: EH complete


Is there a way to figure out what component is to blame? I.e. whether 
its the SATA host adapter driver (sata_mv) or something more generic?

CU Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: SiI3811 PATA->SATA bridge not working on OpenRD-Base
  2009-11-13 21:23 SiI3811 PATA->SATA bridge not working on OpenRD-Base Sascha Silbe
@ 2009-12-01  6:08 ` Tejun Heo
  2009-12-14 19:59   ` Sascha Silbe
  0 siblings, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2009-12-01  6:08 UTC (permalink / raw)
  To: linux-ide

Hello,

On 11/14/2009 06:23 AM, Sascha Silbe wrote:
> Nov 13 21:05:02 flatty kernel: ata2: hard resetting link
> Nov 13 21:05:03 flatty kernel: ata2: SATA link up 1.5 Gbps (SStatus 113
> SControl F300)

Hmmm... that's HSM violation.

> Is there a way to figure out what component is to blame? I.e. whether
> its the SATA host adapter driver (sata_mv) or something more generic?

In libata-sff.c there are several places which set AC_ERR_HSM.  They
store the reason why they're setting it using ata_eh_push_desc() but
for EH commands those messages aren't printed out (we probably need to
fix that).  Anyways, can you please conver those to printk's and see
which one is setting HSM error?

Thanks.

-- 
tejun

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

* Re: SiI3811 PATA->SATA bridge not working on OpenRD-Base
  2009-12-01  6:08 ` Tejun Heo
@ 2009-12-14 19:59   ` Sascha Silbe
  2009-12-14 23:07     ` Tejun Heo
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Silbe @ 2009-12-14 19:59 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

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

On Tue, Dec 01, 2009 at 03:08:08PM +0900, Tejun Heo wrote:
> In libata-sff.c there are several places which set AC_ERR_HSM.  They
> store the reason why they're setting it using ata_eh_push_desc() but
> for EH commands those messages aren't printed out (we probably need to
> fix that).  Anyways, can you please conver those to printk's and see
> which one is setting HSM error?
OK, this got me going, thanks! I couldn't find where AC_ERR_HSM is set, 
but sata_mv now told me about the IORDY timeout. It seems the IDE<->SATA 
converter is slower than the internal native SATA HD, but probably (see 
below) still within spec.

mv_soc_reset_hc_port() sets EDMA_IORDY_TMOUT to the default value of 
0xBC which assumes a 150MHz clock. After setting it to 0xFA (which 
assumes a 200MHz clock) the device works fine (at least with hdparm 
-tT).

Clock description for the 88F6281 (the SoC on the OpenRD-Base) is 
incomplete and/or messy in the published documents (Functional 
Specifications and Hardware Specifications), so I'm not quite sure what 
the right value is:
- Hardware Specifications defines TCLK/Core clock as 200MHz and SATA 
clock as 150MHz
- stock UBoot (i.e. Marvell version) prints 400MHz for "SysClock" and 
200MHz for "TClock"
- Functional Specifications says eIORdyTimeout is the "number of system 
cycles", giving 0xBC for "SysClock == 150MHz"

So depending on what exactly the clock source for the IORDY timeout is, 
the correct value should be one of:
- 0x00BC (150MHz, SATA clock from Hardware Specifications; implying the 
device is too slow so unlikely as it works fine with other hosts)
- 0x00FA (200MHz, TCLK from Hardware Specifications)
- 0x01F4 (400MHz, SysClock from UBoot)

CU Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: SiI3811 PATA->SATA bridge not working on OpenRD-Base
  2009-12-14 19:59   ` Sascha Silbe
@ 2009-12-14 23:07     ` Tejun Heo
  2009-12-15  0:51       ` Mark Lord
  0 siblings, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2009-12-14 23:07 UTC (permalink / raw)
  To: linux-ide, Sascha Silbe, Mark Lord

Hello,

cc'ing Mark and quoting whole body.  Mark, sata_mv timing problem.
Can you please handle this one?

Thanks.

On 12/15/2009 04:59 AM, Sascha Silbe wrote:
> On Tue, Dec 01, 2009 at 03:08:08PM +0900, Tejun Heo wrote:
>> In libata-sff.c there are several places which set AC_ERR_HSM.  They
>> store the reason why they're setting it using ata_eh_push_desc() but
>> for EH commands those messages aren't printed out (we probably need to
>> fix that).  Anyways, can you please conver those to printk's and see
>> which one is setting HSM error?
> OK, this got me going, thanks! I couldn't find where AC_ERR_HSM is set,
> but sata_mv now told me about the IORDY timeout. It seems the IDE<->SATA
> converter is slower than the internal native SATA HD, but probably (see
> below) still within spec.
> 
> mv_soc_reset_hc_port() sets EDMA_IORDY_TMOUT to the default value of
> 0xBC which assumes a 150MHz clock. After setting it to 0xFA (which
> assumes a 200MHz clock) the device works fine (at least with hdparm -tT).
> 
> Clock description for the 88F6281 (the SoC on the OpenRD-Base) is
> incomplete and/or messy in the published documents (Functional
> Specifications and Hardware Specifications), so I'm not quite sure what
> the right value is:
> - Hardware Specifications defines TCLK/Core clock as 200MHz and SATA
> clock as 150MHz
> - stock UBoot (i.e. Marvell version) prints 400MHz for "SysClock" and
> 200MHz for "TClock"
> - Functional Specifications says eIORdyTimeout is the "number of system
> cycles", giving 0xBC for "SysClock == 150MHz"
> 
> So depending on what exactly the clock source for the IORDY timeout is,
> the correct value should be one of:
> - 0x00BC (150MHz, SATA clock from Hardware Specifications; implying the
> device is too slow so unlikely as it works fine with other hosts)
> - 0x00FA (200MHz, TCLK from Hardware Specifications)
> - 0x01F4 (400MHz, SysClock from UBoot)

-- 
tejun

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

* Re: SiI3811 PATA->SATA bridge not working on OpenRD-Base
  2009-12-14 23:07     ` Tejun Heo
@ 2009-12-15  0:51       ` Mark Lord
  2009-12-15  1:02         ` Mark Lord
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Lord @ 2009-12-15  0:51 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide, Sascha Silbe

There's a patch from Saeed Bishara to address this.
He's been (re)posting it for a few months now,
most recently about a week ago.

Cheers
-- 
Mark Lord
Real-Time Remedies Inc.
mlord@pobox.com


Tejun Heo wrote:
> Hello,
> 
> cc'ing Mark and quoting whole body.  Mark, sata_mv timing problem.
> Can you please handle this one?
> 
> Thanks.
> 
> On 12/15/2009 04:59 AM, Sascha Silbe wrote:
>> On Tue, Dec 01, 2009 at 03:08:08PM +0900, Tejun Heo wrote:
>>> In libata-sff.c there are several places which set AC_ERR_HSM.  They
>>> store the reason why they're setting it using ata_eh_push_desc() but
>>> for EH commands those messages aren't printed out (we probably need to
>>> fix that).  Anyways, can you please conver those to printk's and see
>>> which one is setting HSM error?
>> OK, this got me going, thanks! I couldn't find where AC_ERR_HSM is set,
>> but sata_mv now told me about the IORDY timeout. It seems the IDE<->SATA
>> converter is slower than the internal native SATA HD, but probably (see
>> below) still within spec.
>>
>> mv_soc_reset_hc_port() sets EDMA_IORDY_TMOUT to the default value of
>> 0xBC which assumes a 150MHz clock. After setting it to 0xFA (which
>> assumes a 200MHz clock) the device works fine (at least with hdparm -tT).
>>
>> Clock description for the 88F6281 (the SoC on the OpenRD-Base) is
>> incomplete and/or messy in the published documents (Functional
>> Specifications and Hardware Specifications), so I'm not quite sure what
>> the right value is:
>> - Hardware Specifications defines TCLK/Core clock as 200MHz and SATA
>> clock as 150MHz
>> - stock UBoot (i.e. Marvell version) prints 400MHz for "SysClock" and
>> 200MHz for "TClock"
>> - Functional Specifications says eIORdyTimeout is the "number of system
>> cycles", giving 0xBC for "SysClock == 150MHz"
>>
>> So depending on what exactly the clock source for the IORDY timeout is,
>> the correct value should be one of:
>> - 0x00BC (150MHz, SATA clock from Hardware Specifications; implying the
>> device is too slow so unlikely as it works fine with other hosts)
>> - 0x00FA (200MHz, TCLK from Hardware Specifications)
>> - 0x01F4 (400MHz, SysClock from UBoot)
> 


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

* Re: SiI3811 PATA->SATA bridge not working on OpenRD-Base
  2009-12-15  0:51       ` Mark Lord
@ 2009-12-15  1:02         ` Mark Lord
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Lord @ 2009-12-15  1:02 UTC (permalink / raw)
  To: Sascha Silbe; +Cc: Tejun Heo, linux-ide

Ahh.. here it is:

http://patchwork.ozlabs.org/patch/40428/

Does that help/fix the issue?

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

end of thread, other threads:[~2009-12-15  1:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 21:23 SiI3811 PATA->SATA bridge not working on OpenRD-Base Sascha Silbe
2009-12-01  6:08 ` Tejun Heo
2009-12-14 19:59   ` Sascha Silbe
2009-12-14 23:07     ` Tejun Heo
2009-12-15  0:51       ` Mark Lord
2009-12-15  1:02         ` Mark Lord

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