Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Debugging ahcisata?

On Sun, 16 Aug 2009, Manuel Bouyer wrote:

On Sat, Aug 15, 2009 at 05:26:33PM -0700, Paul Goyette wrote:
I've got a rather old (2+ years) motherboard with a Marvell 88SE614X
SATA II PCI-E Controller which is seen by autoconfig as

        vendor 0x11ab product 0x6141 (SATA mass storage, interface 0x81,
        revision 0x01) not configured

I thought maybe it might be recognizable just like several other PCI
devices, so I added an entry for this device in the "quirk list" in

The device is now recognizable, but it doesn't seem to work quite right!
In particular, when I attached a disk drive to one of the SATA ports,
the disk appears as

        wd2 at atabus9 drive 0: <ST506>
        wd2: drive supports 1-sector PIO transfers, chs addressing
        wd2: 69632KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x
        139264 sectors
        wd2(ahciata0:2:0): using PIO mode 0

It looks pretty clear that this Controller failed to properly handle the
drive-identify function!  (Just to make sure that the drive was good, I
connected it to another machine, and it was properly detected as a
<WDC WD3200AAKS-75L9A0> with 298GB and all the correct geometry data.

It's possible that the recently-added sys/dev/ic/mvsata driver might
work better, but I'm not at all sure of the value to which some of the
fields in the struct mvsata_product should be initialized.  (What is the
'hc' member?  Is 'ports' the number of ports?  Is it more likely to be a
gen1 or gen2e?)

Any suggestions?  I don't really want to spend a lot of time on this,
but if it's not too painful it would be nice to make it work.  :)

The first thing to check is if the drive returned an error, of
if the controller failed. You can #define AHCI_DEBUG and set
ahcidebug_mask to 0xff, and see what happens when the drive is probed.

Well, I tried adding this controller to the lists of valid devices for mvsata, but at boot time it failed with "can't map any registers" so I guess mvsata is probably not going to work!

(BTW, is it really a good idea to maintain TWO separate lists of valid-devices for mvsata? There is one list - in the form of a select statement - in sys/dev/pci/mvsata_pci.c, and a separate list - in a table - in sys/dev/ic/mvsata.c. It seems to me that these should be combined into a singel list/table and shared.)

Anyway, since it looks like mvsata is out of the running, I'll go back to ahcisata and turn on some debugging.

|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:      |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul at   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at |
| Kernel Developer |                          | pgoyette at  |

Home | Main Index | Thread Index | Old Index