Patch RFC: Promise SATA300 TX4 hardware bug workaround.

Alexander Sabourenkov screwdriver at lxnt.info
Sat Nov 3 14:12:44 PDT 2007


Arno J. Klaassen wrote:
>
> Rather than the marginal HW part, it seems, for me, closely related to
> MB/BIOS (as well (Alexander apperently has about the same setup as I
> have for this test)):
> 

[...]

> 
> I vaguely remember from another PR that the Promise card does
> something with PCI-bursting which fbsd does not detect and/or
> handle correctly (and beyond my simple skills as dumb tester, but
> maybe the linux-sources contain a clue about that as well).
> 

Analysis of chip initialization in vendor-supplied, Linux and FreeBSD
drivers shows that FreeBSD's one:
- does not enable something called 'BMR_BURST',
- performs hotplug init in one write (instead of two read-modify-writes ),
- does an extra write (offset 0x54) which is not done in other drivers.

Analysis text: http://lxnt.info/tx4/chipinit.text

Patch with ported chipinit (dangerous to use with anything from Promise
other than sata300 tx4 !!):
http://lxnt.info/tx4/freebsd/chipinit.patch (cumulative)
http://lxnt.info/tx4/freebsd/ata-chipset.c+chipinit (patched source)

Note two things:
1. I have not compiled or tested this patch. Please do.
2. I may have missed this bug because I'm frequently rebooting between
Linux and FreeBSD, and what Linux driver initialized may have lasted the
reboots.


-- 

./lxnt


More information about the freebsd-hackers mailing list