2005-12-30 14:50:19

by Prakash Punnoor

[permalink] [raw]
Subject: libata support for JMicron JMB360 ?

Hi,

I read in an old thread that this question was asked once and you replied you
never heard of this chip. Maybe now the situation has changed? If not, please
take a look here:

http://www.jmicron.com/product/jmb360.htm

It claims the chip is ahci compatible, but the libata ahci driver can't detect
it (tried 2.6.14.2 and 2.6.15-rc7).

Maybe just adding some ids or such is enough for supporting it?
Following lspci -vvv -xxx regrading the Jmicron stuff:

in IDE compatibility mode (can be set in bios):
0000:03:00.0 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363
AHCI Controller (prog-if 85 [Master SecO PriO])
Subsystem: ASRock Incorporation: Unknown device 0360
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping-
SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
Latency: 0, cache line size 10
Interrupt: pin A routed to IRQ 5
Region 0: I/O ports at cc00 [size=8]
Region 1: I/O ports at c880 [size=4]
Region 2: I/O ports at c800 [size=8]
Region 3: I/O ports at c480 [size=4]
Region 4: I/O ports at c400 [size=16]
Region 5: Memory at fe8fe000 (32-bit, non-prefetchable) [size=8K]
Capabilities: [68] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] #10 [0211]
00: 7b 19 60 23 07 01 10 00 00 85 01 01 10 00 00 00
10: 01 cc 00 00 81 c8 00 00 01 c8 00 00 81 c4 00 00
20: 01 c4 00 00 00 e0 8f fe 00 00 00 00 49 18 60 03
30: 00 00 00 00 68 00 00 00 00 00 00 00 05 01 00 00
40: 11 f1 00 00 00 00 7f f0 30 00 00 0f 00 00 00 00
50: 10 00 11 02 00 00 00 00 00 20 09 00 11 f4 03 01
60: 00 00 11 10 00 00 00 00 01 50 02 40 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: c3 8b 48 00 03 45 02 00 9c 34 3f 00 00 03 09 00
d0: 18 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

diff in sata mode:
-0000:03:00.0 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363
AHCI Controller (prog-if 85 [Master SecO PriO])
+0000:03:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363
AHCI Controller (prog-if 01 [AHCI 1.0])
Subsystem: ASRock Incorporation: Unknown device 0360
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
@@ -535,11 +535,11 @@
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] #10 [0211]
-00: 7b 19 60 23 07 01 10 00 00 85 01 01 10 00 00 00
+00: 7b 19 60 23 07 01 10 00 00 01 06 01 10 00 00 00
10: 01 cc 00 00 81 c8 00 00 01 c8 00 00 81 c4 00 00
20: 01 c4 00 00 00 e0 8f fe 00 00 00 00 49 18 60 03
30: 00 00 00 00 68 00 00 00 00 00 00 00 05 01 00 00
-40: 11 f1 00 00 00 00 7f f0 30 00 00 0f 00 00 00 00
+40: 11 f1 02 00 00 00 7f f0 30 00 00 0f 00 00 00 00
50: 10 00 11 02 00 00 00 00 00 20 09 00 11 f4 03 01
60: 00 00 11 10 00 00 00 00 01 50 02 40 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


It would be nice if we could support in Linux. Maybe you want to contact
JMicron?

Cheers,
--
(?= =?)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (3.59 kB)
(No filename) (189.00 B)
Download all attachments

2005-12-31 09:54:08

by Prakash Punnoor

[permalink] [raw]
Subject: Re: libata support for JMicron JMB360 ?

Am Freitag Dezember 30 2005 15:41 schrieb Prakash Punnoor:
> Hi,
>
> I read in an old thread that this question was asked once and you replied
> you never heard of this chip. Maybe now the situation has changed? If not,
> please take a look here:
>
> http://www.jmicron.com/product/jmb360.htm
>
> It claims the chip is ahci compatible, but the libata ahci driver can't
> detect it (tried 2.6.14.2 and 2.6.15-rc7).
>
> Maybe just adding some ids or such is enough for supporting it?
> Following lspci -vvv -xxx regrading the Jmicron stuff:

[...]

Well, I tried adding the ids into ahci.c, but this wasn't enough:

--- linux-2.6.15-rc7/drivers/scsi/ahci.c.old 2005-12-31 10:36:35.000000000
+0100
+++ linux-2.6.15-rc7/drivers/scsi/ahci.c 2005-12-31 10:36:45.000000000 +0100
@@ -277,6 +277,8 @@
board_ahci }, /* ESB2 */
{ PCI_VENDOR_ID_INTEL, 0x27c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_ahci }, /* ICH7-M DH */
+ { 0x197b, 0x2360, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci }, /* JMicron JMB360 */
{ } /* terminate list */
};

dmesg gives:
libata version 1.20 loaded.
ahci 0000:03:00.0: version 1.2
ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 35 (level, low) -> IRQ 50
PCI: Setting latency timer of device 0000:03:00.0 to 64
ahci 0000:03:00.0: AHCI 0001.0000 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
ahci 0000:03:00.0: flags: 64bit ncq pm led clo pmp pio slum part
ata1: SATA max UDMA/133 cmd 0xF8804100 ctl 0x0 bmdma 0x0 irq 50
ata1 is slow to respond, please be patient
ata1 failed to respond (30 secs)
scsi0 : ahci

Any ideas?
--
(°= =°)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (1.59 kB)
(No filename) (189.00 B)
Download all attachments

2006-01-27 09:05:49

by Prakash Punnoor

[permalink] [raw]
Subject: Re: libata support for JMicron JMB360 ?

Am Samstag Dezember 31 2005 10:47 schrieb Prakash Punnoor:
> Am Freitag Dezember 30 2005 15:41 schrieb Prakash Punnoor:
> > Hi,
> >
> > I read in an old thread that this question was asked once and you replied
> > you never heard of this chip. Maybe now the situation has changed? If
> > not, please take a look here:
> >
> > http://www.jmicron.com/product/jmb360.htm
> >
> > It claims the chip is ahci compatible, but the libata ahci driver can't
> > detect it (tried 2.6.14.2 and 2.6.15-rc7).
> >
> > Maybe just adding some ids or such is enough for supporting it?
> > Following lspci -vvv -xxx regrading the Jmicron stuff:
>
> [...]
>
> Well, I tried adding the ids into ahci.c, but this wasn't enough:
>
> --- linux-2.6.15-rc7/drivers/scsi/ahci.c.old 2005-12-31 10:36:35.000000000
> +0100
> +++ linux-2.6.15-rc7/drivers/scsi/ahci.c 2005-12-31 10:36:45.000000000
> +0100 @@ -277,6 +277,8 @@
> board_ahci }, /* ESB2 */
> { PCI_VENDOR_ID_INTEL, 0x27c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
> board_ahci }, /* ICH7-M DH */
> + { 0x197b, 0x2360, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
> + board_ahci }, /* JMicron JMB360 */
> { } /* terminate list */
> };
>
> dmesg gives:
> libata version 1.20 loaded.
> ahci 0000:03:00.0: version 1.2
> ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 35 (level, low) -> IRQ 50
> PCI: Setting latency timer of device 0000:03:00.0 to 64
> ahci 0000:03:00.0: AHCI 0001.0000 32 slots 1 ports 3 Gbps 0x1 impl SATA
> mode ahci 0000:03:00.0: flags: 64bit ncq pm led clo pmp pio slum part
> ata1: SATA max UDMA/133 cmd 0xF8804100 ctl 0x0 bmdma 0x0 irq 50
> ata1 is slow to respond, please be patient
> ata1 failed to respond (30 secs)
> scsi0 : ahci


Hi Jeff,

I still haven't got a reply from lkml, but an JMicron employee contacted me
and told me how to get this working:

> //=======================================
> Root Cause:
> Although AsRock reserves AHCI/IDE mode for JMB360, AsRock sets JMB360 in
> IDE mode actually when boot.
> JMB360 needs a Reset mechanism to switch to AHCI mode on AsRock MB for
> your Linux driver porting.
>
> Reset Mechanism:
> 1. At PCI Configuration Address h'41, write value h'a1 (default is h'f1)
> 2. At AHCI Base address+offset h'04, write 1'b1 at bit 0 location. It is
> "HBA Reset" bit.
> 3. And then JMB360 come back to AHCI mode
> //=======================================

Unfortunately my kernel knowledge is next to none, so I cannot implement this.
But I guess it should be easy for you or anyone else having done similar. The
employee actually told me that he mailed above to you, so was it just lack of
time, you didn't made a quirk or any other reason?

Cheers,
--
(°= =°)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (2.67 kB)
(No filename) (189.00 B)
Download all attachments