Bug 623088 - FC13 x86_64 Marvell 88SE6145 - SATA drives not always found
Summary: FC13 x86_64 Marvell 88SE6145 - SATA drives not always found
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-11 09:53 UTC by jrickman
Modified: 2011-10-24 15:47 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-06-20 15:44:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Comment (210.09 KB, text/plain)
2010-12-03 06:57 UTC, jrickman
no flags Details
Comment (277.98 KB, text/plain)
2010-12-03 07:00 UTC, jrickman
no flags Details

Description jrickman 2010-08-11 09:53:49 UTC
Description of problem:

Fedora Core 13, 2.6.33.6-147.2.4.fc13.x86_64, fails to find all 4 SATA-II Seagate ST31000340AS drives. Drives are expected to be /dev/sda, /dev/sdb, /dev/sdc, and /dev/sdd. testing shows that any 2 of 4 drives  and sometimes any 3 of 4 drives are discovered during boot.

Version-Release number of selected component (if applicable):

Only tested on Fedora Core 13, 2.6.33.6-147.2.4.fc13.x86_64

Jetway NC92-330-LF motherboard (945GC + ICH7 chipset)
Jetway A06 BIOS...most recent public version available
ADPE4S (4-port SATA) daughterboard with 4x Seagate ST31000340AS drives

Boot drive is PATA HDD on motherboard IDE connector; no problems here.

How reproducible:

100% reproducible...every reboot...on any FC13 x86_64 kernel version

Steps to Reproduce:
1. Install FC13 on to PATA boot drive using "minimal' installation.
2. Power down.
3. Connect all SATA drives to ADPE4S daughterboard.
4. Remove 'rhgb' and 'quiet' from "grub.conf" to observe boot up.
5. Power up.
6. Watch system boot.
7. Watch hard drives get discovered or not get discovered.
  
Actual results:

Not all SATA drives are discovered. Sometimes 2 of 4 are found. Sometimes 3 of 4 are found. "found" implies that output of "blkid" command shows the drives.

Expected results:

Expect all 4 SATA drives to be discovered.

Additional info:

[root@fatman ~]# uname -a
Linux fatman.my.home 2.6.33.6-147.2.4.fc13.x86_64 #1 SMP Fri Jul 23 17:14:44 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux


[root@fatman ~]# lspci -s 03:00.0 -vvv
03:00.0 RAID bus controller: Marvell Technology Group Ltd. 88SE6145 SATA II PCI-E controller (rev a1) (prog-if 8f)
        Subsystem: Marvell Technology Group Ltd. 88SE6145 SATA II PCI-E controller
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0 (2000ns min), Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: I/O ports at df00 [size=8]
        Region 1: I/O ports at de00 [size=4]
        Region 2: I/O ports at dd00 [size=8]
        Region 3: I/O ports at dc00 [size=4]
        Region 4: I/O ports at db00 [size=16]
        Region 5: Memory at fdeff000 (32-bit, non-prefetchable) [size=1K]
        Expansion ROM at fde80000 [disabled] [size=256K]
        Capabilities: [48] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME-
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [e0] Express (v1) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr+ NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 <256ns, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Kernel driver in use: ahci
        Kernel modules: pata_marvell


[root@fatman ~]# lsmod
Module                  Size  Used by
coretemp                5294  0 
p4_clockmod             4363  2 
freq_table              3851  1 p4_clockmod
speedstep_lib           4706  1 p4_clockmod
raid456                61222  0 
async_raid6_recov       5570  1 raid456
async_pq                4429  2 raid456,async_raid6_recov
raid6_pq               78263  2 async_raid6_recov,async_pq
async_xor               3245  3 raid456,async_raid6_recov,async_pq
xor                     4416  1 async_xor
async_memcpy            1787  2 raid456,async_raid6_recov
async_tx                2562  5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
microcode              17930  0 
iTCO_wdt               10864  0 
iTCO_vendor_support     2451  1 iTCO_wdt
r8169                  33027  0 
shpchp                 28784  0 
i2c_i801               10086  0 
mii                     4142  1 r8169
serio_raw               4539  0 
i915                  272455  1 
drm_kms_helper         23936  1 i915
drm                   169089  2 i915,drm_kms_helper
i2c_algo_bit            4781  1 i915
i2c_core               24507  5 i2c_i801,i915,drm_kms_helper,drm,i2c_algo_bit
video                  20741  1 i915
output                  2117  1 video


Example "blkid" output but never consistent across reboots:
[root@fatman ~]# blkid
/dev/sdd1: UUID="c7cccc12-b80e-4a45-a569-fc7fe35be1d3" TYPE="ext3" 
/dev/sdd2: UUID="df609236-8a10-40db-a180-911f66c40795" TYPE="ext3" 
/dev/sdd3: UUID="2e71c8e6-0820-4d0d-be48-460d786aba7e" TYPE="ext3" 
/dev/sdd5: UUID="02b2a599-ac5d-4f00-a987-804cf1de1f7f" TYPE="ext3" 
/dev/sdd6: UUID="d4ec37be-1a3e-40d8-a88e-45941c734f2b" TYPE="ext3" 
/dev/sdd7: UUID="64a5896d-7904-4a5f-82e9-049830a08ea0" TYPE="swap" 
/dev/sdb1: UUID="05e4e9dd-db57-7e15-0b0a-293417a408be" UUID_SUB="32339fa9-961a-f474-89a2-338fbd221783" LABEL="fatman.my.home:0" TYPE="linux_raid_member" 
/dev/block/8:50: UUID="df609236-8a10-40db-a180-911f66c40795" TYPE="ext3" 
/dev/sdc1: UUID="05e4e9dd-db57-7e15-0b0a-293417a408be" UUID_SUB="9d855e22-26ae-0d26-e4f8-166da73f21ba" LABEL="fatman.my.home:0" TYPE="linux_raid_member"

Sometimes SATA /dev/sda1 and SATA /dev/sdb1 are found. Sometimes SATA /dev/sda1 and SATA /dev/sdc1 are found. The boot drive is PATA and in this case it was assigned /dev/sdd

I see random, never consistent, "failed to IDENTIFY" errors during boot for the SATA drives. the same drives have been successfully built into a Linux software RAID-5 array using the same hard drive cages, case, power supply, but with a Supermicro motherboard using a Marvell SATA controller 88SX7042-BDU1. Not exactly 'apple to apples", but proves the HDD, cables, cage, power supply are not faulty, and, limits scope to Jetway NC92-330-LF mobo, Jetway ADPE4S 4-port SATA board (uses 88SE6145 chipset).

I never allow DRACUT to assemble LVM DM or MD during boot (personal choice). For this testing My "mdadm.conf" file has been removed from "/etc" and any reference to "md" devices in "/etc/fstab" is commented out. This avoids any system crashes due to attempts to build the RAID array. Why try building the array when the controller cannot find all of the SATA HDD that comprise the array?


[root@fatman ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.33.6-147.2.4.fc13.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.33.6-147.2.4.fc13.x86_64 ro root=UUID=df609236-8a10-40db-a180-911f66c40795 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us selinux=0 noresume noswapaccount lp=0 parport=0 plip=0 maxcpus=4 vga=791 cgroup_disable=memory pci=use_crs ahci.marvell_enable=1
        initrd /initramfs-2.6.33.6-147.2.4.fc13.x86_64.img


I also followed the advice at this URL, but it did not help:
http://en.wikipedia.org/wiki/List_of_Marvell_Technology_Group_chipsets#88SE61xx_Chipsets_Linux_support


Also see the following URL:
https://bugzilla.kernel.org/show_bug.cgi?id=15771
http://osdir.com/ml/debian-bugs-dist/2010-04/msg03107.html

Comment 1 Kyle McMartin 2010-12-01 15:55:35 UTC
Can you try the 2.6.36 kernel from rawhide or the 2.6.37-rc4 kernel from
http://repos.fedorapeople.org/repos/kyle/kernel/fedora-kernel.repo

And let me know if you'll still see it?

We'll take it up with upstream if that is the case.

--Kyle

Comment 2 jrickman 2010-12-01 18:53:57 UTC
[copying email into notes]

Hello Kyle,

Please accept my apologies for emailing directly to you and for "top
posting" on your message. Right now I am having "password" issues with
Bugzilla that prevent me froma ccessing the bug notes.

As for this bug, yes I can reproduce every time (100% reproducible) with
Fedora Core 13 even with the latest updates. When time permits I will load
Fedora Core 14 on the test box that has this board, unless I have done
that already: "real life" issues getting in the way of my/this hobby.

I have tried CentOS 5.5: no luck and Marvell's code does not compile on it
even though Marvell claims it will compile on a 2.6.18 kernel. I have
tried FreeBSD and seen results somewhat similar to Fedora: not all drives
show up, but the drives that show up are not consistent. I tried Debian:
no luck.

I've researched the email threads for this chipset and Jetway's
implementation of it; those details should be covered in the bug report.
Everything I've read tells me that Marvell isn't active in supporting
their implementation, but I could be wrong. Another detail that caught my
eye was/is the fact this chip is a "hybrid"; it has a number of SATA
(1,2,4 ports)and a single PATA port on it. In the Jetway implementation
there is even a PCIe-to-PCI bridge chip to connect the Marvell chip to to
the motherboard via PCI. That bridge chip should be "transparent", but you
never know.

As for pushing this matter up, yes that would be a great idea. I think the
entire software implementation for this chip was/is a "kludge", or at
least that is what the archive email threads and Alan Cox' comments
suggest. Perhaps kernel support for this Marvell chip family
(88SE6101//1P, 88SE6111//1S1P, 88SE6121//2S1P, and 88SE6145//4S1P) should
be built as a separate kernel module rather than forcing/grafting it into
the existing code handled by Garzik? That would allow those that need it
to build it as a module or compile it into the kernel, or have it built as
part of the distro like Fedora Core. I'm not a programmer and definitely
not a "kernel level" programmer so "I am thinking out loud."

Now back to arguing with Bugzilla about my account....

Jeff Rickman

Comment 3 Kyle McMartin 2010-12-02 21:52:43 UTC
Hi Jeff,

Don't worry about the private mail thing.

One question, how much memory does your machine have installed? The fact that it occasionally works for X/4 drives (and different drives work each time?) make me think it might be an issue with 64-bit DMA on certain Marvell controllers. The pata_marvell bmdma driver seems to limit to 32-bit DMA, but it looks like AHCI may (or may not, depending on certain bits) may use 64-bit DMA.

Of course, you'd need more than 4GB of ram for that to be the case. :/

(Although it might still be worth trying to limit that controller to <1GB or something in case it's an error with less than 32-bits...)

regards,
--Kyle

Comment 4 Kyle McMartin 2010-12-02 22:03:18 UTC
Also, if you could please attach a dmesg from a bootup where one or two or three drives were found that would be excellent.

Thanks.
 Kyle

Comment 5 jrickman 2010-12-03 06:55:56 UTC
System hardware:
 Jetway NC92-330-LF motherboard with A06 BIOS (current per vendor web site)
 Jetway ADPE4S daughterboard

[root@fatman ~]# cat /proc/meminfo
MemTotal:        2059796 kB
MemFree:         1983204 kB
Buffers:            7352 kB
Cached:            32388 kB
SwapCached:            0 kB
Active:            17932 kB
Inactive:          28608 kB
Active(anon):       6808 kB
Inactive(anon):     3392 kB
Active(file):      11124 kB
Inactive(file):    25216 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:       1184328 kB
HighFree:        1139564 kB
LowTotal:         875468 kB
LowFree:          843640 kB
SwapTotal:       2097148 kB
SwapFree:        2097148 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          6820 kB
Mapped:             5516 kB
Shmem:              3404 kB
Slab:               9540 kB
SReclaimable:       4632 kB
SUnreclaim:         4908 kB
KernelStack:         800 kB
PageTables:          800 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     3127044 kB
Committed_AS:      44640 kB
VmallocTotal:     122880 kB
VmallocUsed:        7936 kB
VmallocChunk:     108532 kB
HardwareCorrupted:     0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      903160 kB
DirectMap2M:           0 kB

[root@fatman ~]# uname -a
Linux fatman.my.home 2.6.35.6-48.fc14.i686.PAE #1 SMP Fri Oct 22 15:27:53 UTC 2010 i686 i686 i386 GNU/Linux

[root@fatman ~]# lsmod
Module                  Size  Used by
p4_clockmod             3159  2 
i915                  241861  1 
drm_kms_helper         22088  1 i915
drm                   139766  2 i915,drm_kms_helper
i2c_algo_bit            4197  1 i915
i2c_i801                9016  0 
iTCO_wdt                8980  0 
video                  17730  1 i915
iTCO_vendor_support     2070  1 iTCO_wdt
i2c_core               21328  5 i915,drm_kms_helper,drm,i2c_algo_bit,i2c_i801
microcode              11139  0 
output                  1625  1 video
serio_raw               3589  0 
r8169                  31921  0 
mii                     3578  1 r8169

[root@fatman ~]# lspci
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01)
00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 01)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
02:07.0 PCI bridge: Marvell Technology Group Ltd. 88SB2211 PCI Express to PCI Bridge (rev 01)
03:00.0 RAID bus controller: Marvell Technology Group Ltd. 88SE6145 SATA II PCI-E controller (rev a1)

[root@fatman ~]# lspci -vvv -s00:1e.0
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) (prog-if 01 [Subtractive decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Bus: primary=00, secondary=02, subordinate=03, sec-latency=32
        I/O behind bridge: 0000d000-0000dfff
        Memory behind bridge: fde00000-fdefffff
        Prefetchable memory behind bridge: 00000000fdd00000-00000000fddfffff
        Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [50] Subsystem: Intel Corporation 82801 PCI Bridge

[root@fatman ~]# lspci -vvv -s02:07.0
02:07.0 PCI bridge: Marvell Technology Group Ltd. 88SB2211 PCI Express to PCI Bridge (rev 01) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 32, Cache Line Size: 64 bytes
        Bus: primary=02, secondary=03, subordinate=03, sec-latency=0
        I/O behind bridge: 0000d000-0000dfff
        Memory behind bridge: fde00000-fdefffff
        Prefetchable memory behind bridge: 00000000fdd00000-00000000fddfffff
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
                Bridge: PM- B3+
        Capabilities: [48] Express (v1) PCI/PCI-X to PCI-Express Bridge, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- BrConfRtry-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 <256ns, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

[root@fatman ~]# lspci -vvv -s03:00.0
03:00.0 RAID bus controller: Marvell Technology Group Ltd. 88SE6145 SATA II PCI-E controller (rev a1) (prog-if 8f)
        Subsystem: Marvell Technology Group Ltd. 88SE6145 SATA II PCI-E controller
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0 (2000ns min), Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: I/O ports at df00 [size=8]
        Region 1: I/O ports at de00 [size=4]
        Region 2: I/O ports at dd00 [size=8]
        Region 3: I/O ports at dc00 [size=4]
        Region 4: I/O ports at db00 [size=16]
        Region 5: Memory at fdeff000 (32-bit, non-prefetchable) [size=1K]
        Expansion ROM at fde80000 [disabled] [size=256K]
        Capabilities: [48] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME-
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [e0] Express (v1) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr+ NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 <256ns, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Kernel driver in use: ahci
        Kernel modules: pata_marvell

[root@fatman ~]# lspci -vvv -s00:1f.2
00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01) (prog-if 80 [Master])
        Subsystem: Intel Corporation N10/ICH7 Family SATA IDE Controller
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin B routed to IRQ 19
        Region 0: I/O ports at 01f0 [size=8]
        Region 1: I/O ports at 03f4 [size=1]
        Region 2: I/O ports at 0170 [size=8]
        Region 3: I/O ports at 0374 [size=1]
        Region 4: I/O ports at f800 [size=16]
        Capabilities: [70] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: ata_piix


Jetway "custom" motherboard PCI bus bridges to RAID bus via PCI-to-PCIe chip like this:

Jetway Motherboard_PCI <--> 88SB2211 <--> 88SE6145

88SB2211, 88SE6145,a nd 4 SATA conmnectors reside on a daughterboard that plug into the custom Jetway PCI header.

There is no physical PATA port on the Jetway daughterboard. Thus, "ahci.marvell_enable=0" in "grub.conf"

Marvell 88SE6145 BIOS version is 1.2.0.27

Comment 6 jrickman 2010-12-03 06:57:47 UTC
Created attachment 915170 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 7 jrickman 2010-12-03 06:59:32 UTC
In this output the Marvell 88SE6145 BIOS is not configured at all. The BIOS still shows all 4 hard drives but calls them "FREE"

=======================================================================================
With 88SE6145 not configured for RAID, it still displays all 4 drives connected.

Output of "blkid" shows system Boot & OS drive at /dev/sdd:
[root@fatman ~]# blkid
/dev/sdd1: UUID="49010b04-7169-45b2-932a-466e432e6176" TYPE="ext3" 
/dev/sdd2: UUID="e43bdfe1-b8d4-4010-9c60-5bcf04c3c905" TYPE="swap" 
/dev/sdd3: UUID="9f8c98ea-c419-4e58-8f0a-e4a90c691692" TYPE="ext4" 

Then the Console scrolls for (guessing) hundreds of lines with:

[root@fatman ~]# tail -20 /var/log/messages
Dec  3 00:28:58 fatman kernel: [  222.532611] sd 3:0:0:0: [sdc] Unhandled error code
Dec  3 00:28:58 fatman kernel: [  222.532616] sd 3:0:0:0: [sdc] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Dec  3 00:28:58 fatman kernel: [  222.532622] sd 3:0:0:0: [sdc] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
Dec  3 00:28:58 fatman kernel: [  222.532635] end_request: I/O error, dev sdc, sector 0
Dec  3 00:28:58 fatman kernel: [  222.532708] sd 3:0:0:0: [sdc] Unhandled error code
Dec  3 00:28:58 fatman kernel: [  222.532713] sd 3:0:0:0: [sdc] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Dec  3 00:28:58 fatman kernel: [  222.532719] sd 3:0:0:0: [sdc] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
Dec  3 00:28:58 fatman kernel: [  222.532731] end_request: I/O error, dev sdc, sector 0
Dec  3 00:28:58 fatman kernel: [  222.532806] sd 3:0:0:0: [sdc] Unhandled error code
Dec  3 00:28:58 fatman kernel: [  222.532810] sd 3:0:0:0: [sdc] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Dec  3 00:28:58 fatman kernel: [  222.532816] sd 3:0:0:0: [sdc] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
Dec  3 00:28:58 fatman kernel: [  222.532829] end_request: I/O error, dev sdc, sector 0
Dec  3 00:28:58 fatman kernel: [  222.532903] sd 3:0:0:0: [sdc] Unhandled error code
Dec  3 00:28:58 fatman kernel: [  222.532907] sd 3:0:0:0: [sdc] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Dec  3 00:28:58 fatman kernel: [  222.532913] sd 3:0:0:0: [sdc] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
Dec  3 00:28:58 fatman kernel: [  222.532926] end_request: I/O error, dev sdc, sector 0
Dec  3 00:28:58 fatman kernel: [  222.533000] sd 3:0:0:0: [sdc] Unhandled error code
Dec  3 00:28:58 fatman kernel: [  222.533007] sd 3:0:0:0: [sdc] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Dec  3 00:28:58 fatman kernel: [  222.533016] sd 3:0:0:0: [sdc] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
Dec  3 00:28:58 fatman kernel: [  222.533030] end_request: I/O error, dev sdc, sector 0

This output suggests to me that the 88SE6145 chip in the Jetway implementation should not or cannot be used for "JBOD"

Comment 8 jrickman 2010-12-03 07:00:07 UTC
Created attachment 915171 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 9 jrickman 2010-12-03 07:03:03 UTC
I changed the Version for this bug report to Fedora Core 14. I can load Fedora Core 13 and get similar results.

I have tried both i686-PAE and x86_64 versions of Fedora Core 14 and FC13.

Currently I am testing with Fedora Core 14 x686-PAE

[root@fatman ~]# uname -a 
Linux fatman.my.home 2.6.35.6-48.fc14.i686.PAE #1 SMP Fri Oct 22 15:27:53 UTC 2010 i686 i686 i386 GNU/Linux

Comment 10 jrickman 2010-12-03 07:48:36 UTC
Adding the BAR5 output...

[root@fatman ~]# cat /var/log/messages | grep -i "BAR5"
Dec  2 23:05:17 fatman kernel: [    2.187944] BAR5:00:04 01:7F 02:22 03:C8 04:02 05:00 06:00 07:80 08:00 09:00 0A:00 0B:00 0C:1F 0D:00 0E:00 0F:00 
Dec  2 23:05:17 fatman kernel: [    2.188864] BAR5:00:04 01:7F 02:22 03:C8 04:02 05:00 06:00 07:80 08:00 09:00 0A:00 0B:00 0C:1F 0D:00 0E:00 0F:00 
Dec  2 23:22:21 fatman kernel: [    2.623857] BAR5:00:04 01:7F 02:22 03:C8 04:02 05:00 06:00 07:80 08:00 09:00 0A:00 0B:00 0C:1F 0D:00 0E:00 0F:00 
Dec  2 23:22:21 fatman kernel: [    2.642250] BAR5:00:04 01:7F 02:22 03:C8 04:02 05:00 06:00 07:80 08:00 09:00 0A:00 0B:00 0C:1F 0D:00 0E:00 0F:00

Since this 6145 chip does not have a connector for a PATA drive, I did not expect this output to change.

In a very old email thread the BAR5 output was requested. See this URL:

http://lkml.org/lkml/2008/9/3/346

Comment 11 jrickman 2010-12-03 13:21:02 UTC
One more test update...for what it's worth.

I loaded Windows XP 32-bit on a different PATA drive in this machine so I could compare capabilities of the 88SE6145 between OS.

The Jetway-provided drivers come from Marvell. Marvell's Windows XP 32-bit driver does support JBOD provided the drives are not configured for RAID in the Marvell BIOS. In Windows XP I could see all 4 WD 80G HDD connected to the 88SE6145 chip, format each drive (I formatted all 4 simultaneously), assign each one a unique drive letter, and then access each one to read & write files.

Comment 12 jrickman 2010-12-27 19:13:22 UTC
** BUMP **

Any progress update on this matter?

Comment 13 Alan Anderson 2011-03-15 21:05:30 UTC
Interesting but I am seeing the same issue with a MB using nvidia MCP51 SATA/IDEchip set.  FC13 current kernel is 2.6.34.8-68.fc13.x86_64.

Boot disk is a PATA and there are four SATA 1TB drives in a raid 5 array.  Intermittently one of the four SATA drives will now show up and md0 is in placed a degraded state.  The device is missing from /dev and I was researching this as a UDEV issue when I ran across this thread.

Comment 14 Alan Anderson 2011-03-15 22:18:41 UTC
I see this in the dmesg file on a boot when one dire is missing.

ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-8: WDC WD10EADS-65P6B0, 01.00A01, max UDMA/133
ata2.00: 268435455 sectors, multi 16: LBA NCQ (depth 31/32)
ata2.00: model number mismatch 'WDC WD10EADS-65P6B0' != 'C WD10EADS-65P6B0                     <80>^P'
ata2.00: revalidation failed (errno=-19)
ata2: limiting SATA link speed to 1.5 Gbps
ata2.00: limiting speed to UDMA/133:PIO3
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: n_sectors mismatch 268435455 != 1953525168
ata2.00: revalidation failed (errno=-19)
ata2.00: disabled

Comment 15 Alan Anderson 2011-03-15 22:20:09 UTC
dire = drive

Comment 16 jrickman 2011-03-16 03:49:36 UTC
I have also tacked on comments to this matter in this case:

https://bugzilla.kernel.org/show_bug.cgi?id=15771

Here are my own test results:

- Compile Marvell driver on CentOS 5.x (kernel 2.6.18.x). SUCCESS
- Rebuild "initrd" to add "mv61xx" and blacklist "pata_marvell". SUCCESS
- Reboot and run "blkid" to see attached drives. SUCCESS
- Build RAID, read/write files to RAID, etc. SUCCESS

- Compile Marvell driver on RHEL6/Scientific Linux (2.6.32.x). FAIL
- Use "pata_marvell" with "workarounds" (ahci.marvell_enable=1). FAIL
- Use "blkid" to see attached drives. FAIL (for all 4 drives)

- Compile Marvell driver on FC14 (2.6.35.11-83.fc14.i686.PAE). FAIL
- Use "pata_marvell" with "workarounds" (ahci.marvell_enable=1). FAIL
- Use "blkid" to see attached drives. FAIL (for all 4 drives)

Not all drives are seen, or sometimes never seen on RHEL6 and FC14. Running "blkid" is a great way to generate a stream of errors on the Console. 

Also note: "G*" searches show this bug is not isolated to Fedora. It also impacts post-2.6.18 based versions of other "popular" distributions. The effectiveness of provided "workarounds", namely "ahci.marvell_enable=1", appear to be "hit & miss".

Comment 17 F5BJR@wanadoo.fr 2011-03-29 19:43:03 UTC
*
I have exactly the same problem a long time at BIOS startup 

All not my 4 * disks are not discovered ( many disks are tested  .. same problem )

with this

ASUS P5E WS PRO ( 88SE6145 ) with all firmware last is 1.2.0.34

also

With IOISATA eSata card with same chip

http://www.ioisata.com/products/Host-Adapter/sata2-pcie1x11.htm

*

I have reported bug to ASUS and IOISATA and no response at this date

bug is > one year !!

Finally i cannot use this port with security

Pierre

*

Disks run fine with all others chipset ( ICHxx , JMicron , SILICON Image , Marvell 88SE9128 , HighPoint cards , Adaptec ...

Comment 18 F5BJR@wanadoo.fr 2011-03-29 19:47:15 UTC
*
Sorry , the problem is exactly :

My 4 * disks are not discovered all the times , sometimes 2 or 3 or 4 !!

The IOISATA cards are tested with many computers and same problem !!

Pierre

Comment 19 jrickman 2011-06-20 15:44:11 UTC
Closing this bug. Does not seem to be assigned to anyone. No updates from Redhat/Fedora in months. Doubt there is any desire to fix this issue. I am no longer using this chipset.

Research in various email lists shows this issue dates back a number of years and has never been adequately resolved. The primary issue seems to be the kernel code on which the vendor's driver depends has been drastically changed, and neither the vendor nor the kernel sub-system maintainer are willing to fix things.

Comment 20 Andy Burns 2011-10-23 13:38:06 UTC
I realise this bug is CLOSED, but it still exists as a problem for the 88SE6145 on ASUS P5EWS-PRO under Fedora 16 branched.

Is it worth re-opening and bumping version to FC16, or is there no appetite upstream to fix the issue?

Comment 21 Andy Burns 2011-10-23 13:45:33 UTC
Found that booting with 

pata_marvell.blacklist=yes ahci.marvell_enable=1

Does allow SATA drives to be seen provided the Marvell controller is set to RAID mode in the motherboard BIOS with no RAID array defined in the Marvell option ROM


# dmesg | egrep '03:00.0|marvell'

[    0.000000] Command line: placeholder root=/dev/mapper/vgr1-fc16_root ro irqpoll pci=resource_alignment=02:00.0;02:00.1;02:00.2;02:00.3;02:00.4;02:00.5;02:00.6;02:00.7;09:00.0;09:01.0;09:03.0 pata_marvell.blacklist=yes ahci.marvell_enable=1
[    0.000000] Kernel command line: placeholder root=/dev/mapper/vgr1-fc16_root ro irqpoll pci=resource_alignment=02:00.0;02:00.1;02:00.2;02:00.3;02:00.4;02:00.5;02:00.6;02:00.7;09:00.0;09:01.0;09:03.0 pata_marvell.blacklist=yes ahci.marvell_enable=1
[    0.122271] pci 0000:03:00.0: [11ab:6145] type 0 class 0x000104
[    0.122296] pci 0000:03:00.0: reg 10: [io  0xbc00-0xbc07]
[    0.122315] pci 0000:03:00.0: reg 14: [io  0xb880-0xb883]
[    0.122334] pci 0000:03:00.0: reg 18: [io  0xb800-0xb807]
[    0.122353] pci 0000:03:00.0: reg 1c: [io  0xb480-0xb483]
[    0.122371] pci 0000:03:00.0: reg 20: [io  0xb400-0xb40f]
[    0.122390] pci 0000:03:00.0: reg 24: [mem 0xfdcffc00-0xfdcfffff]
[    0.122409] pci 0000:03:00.0: reg 30: [mem 0xfdc80000-0xfdcbffff pref]
[    0.122470] pci 0000:03:00.0: supports D1
[    0.122472] pci 0000:03:00.0: PME# supported from D0 D1 D3hot
[    0.122483] pci 0000:03:00.0: PME# disabled
[    0.122510] pci 0000:03:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    0.413442] ahci 0000:03:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    0.413566] ahci 0000:03:00.0: Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.
[    0.413750] ahci 0000:03:00.0: controller can't do NCQ, turning off CAP_NCQ
[    0.413853] ahci 0000:03:00.0: controller can't do PMP, turning off CAP_PMP
[    0.413956] ahci 0000:03:00.0: masking port_map 0x1f -> 0xf
[    0.414171] ahci 0000:03:00.0: AHCI 0001.0000 32 slots 5 ports 3 Gbps 0xf impl RAID mode
[    0.414171] ahci 0000:03:00.0: flags: 64bit stag slum part
[    0.414171] ahci 0000:03:00.0: setting latency timer to 64

Comment 22 Dave Jones 2011-10-24 14:49:46 UTC
I think the best way forward would be for you to contact the libata developers directly, and see if they can suggest some patches for you to try.
My understanding wrt Marvell hardware is that there are a number of non-standard extensions to AHCI, which is why it works in this oddball way.
If they come up with any improvements, we'll of course pull them into Fedora when we rebase.

Comment 23 Andy Burns 2011-10-24 15:47:51 UTC
Thanks Dave, 

If the hardware is oddball, I'm happy enough to live with with using the module parameter workaround, rather than pulling in even odder drivers, the only downside to the workaround is that it disables the IDE port in order to use the SATA ports.


Note You need to log in before you can comment on or make changes to this bug.