Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2008 18:56:49 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        koitsu@freebsd.org
Cc:        freebsd-hackers@freebsd.org, bu7cher@yandex.ru, samflanker@gmail.com
Subject:   Re: kern/98388: [ata] FreeBSD 6.1 - WDC WD1200JS SATA II disks are seen as older SATA
Message-ID:  <527191218725809@webmail5.yandex.ru>
In-Reply-To: <20080814124754.GA20195@eos.sc1.parodius.com>
References:  <48A3D034.9090809@gmail.com> <48A3D43E.2070101@yandex.ru> <48A3D771.5010601@gmail.com> <48A3DA54.9070803@FreeBSD.org> <48A3DC83.1080806@gmail.com> <48A3E0E4.3090909@yandex.ru> <48A3E25E.6050105@gmail.com> <48A3FBEE.5060302@yandex.ru> <48A40F85.3050509@gmail.com> <48A41D70.3000507@yandex.ru> <20080814124754.GA20195@eos.sc1.parodius.com>

next in thread | previous in thread | raw e-mail | index | archive | help
14.08.08, 16:47, "Jeremy Chadwick" <koitsu@FreeBSD.org>:

> On Thu, Aug 14, 2008 at 03:56:32PM +0400, Andrey V. Elsukov wrote:
> > sam wrote:
> >>> Can you apply attached patch, rebuild your kernel, reboot in verbose
> >>> mode and show /var/run/dmesg.boot ?
> >>>
> >> http://cs.udmvt.ru/files/temp/dmesg.boot_0814
> >
> > It seems that driver couldn't allocate IO resource at BAR5 and
> > without this resource it can't read SATA Status register and
> > determine negotiated speed. I think the problem is in your BIOS.
> > If your BIOS doesn't have any AHCI or RAID specific options
> > I don't know how correctly fix this problem.
> Andrey, please correct me if I'm wrong here.  I'm not familiar these
> kernel functions, but assuming pci_read_config() handles proper byte
> order, and device_printf() prints it in correct order, then I believe
> you may be missing something important.

My decision is not from output of my changes.
Here is in log:
found->	vendor=0x8086, dev=0x27c0, revid=0x01
	domain=0, bus=0, slot=31, func=2
	class=01-01-8f, hdrtype=0x00, mfdev=0
	cmdreg=0x0005, statreg=0x02b0, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	intpin=b, irq=11
	powerspec 2  supports D0 D3  current D0
	map[10]: type I/O Port, range 32, base 0xc880, size  3, enabled
	map[14]: type I/O Port, range 32, base 0xc800, size  2, enabled
	map[18]: type I/O Port, range 32, base 0xc480, size  3, enabled
	map[1c]: type I/O Port, range 32, base 0xc400, size  2, enabled
	map[20]: type I/O Port, range 32, base 0xc080, size  4, enabled

BAR5 is not present here. Also

atapci1: <Intel ICH7 SATA300 controller> port 0xc880-0xc887,0xc800-0xc803,0xc480-0xc487,0xc400-0xc403,0xc080-0xc08f irq 19 at device 31.2 on pci0
atapci1: Reserved 0x10 bytes for rid 0x20 type 4 at 0xc080
atapci1: [MPSAFE]
atapci1: [ITHREAD]
atapci1: SCRD = 0x40000180, SATACR1 = 0x00000000

There should be resource allocation:
"rid 0x24 type 3" for AHCI or "rid 0x24 type 4" for non-AHCI.
But here are nothing of these.

ata2: <ATA channel 0> on atapci1
atapci1: Reserved 0x8 bytes for rid 0x10 type 4 at 0xc880
atapci1: Reserved 0x4 bytes for rid 0x14 type 4 at 0xc800

> Someone should make a patch for the user that zeros out bit 30 of SIR,
> then check the xBAR and LBAR values; zeroing bit 30 might get him
> SATA300 support (I haven't looked at the rest of the FreeBSD ATA code
> yet).

I think you can try to do it. But i don't have this hardware and trying 
to change some bits, making patches, waiting for results, again and again
- it's not very interesting for me (i already have similar experience)..
In any case ICHx which is working in non-AHCI mode is not the best choice.
Many SATA features don't work in this mode and difference between 
SATA150 and SATA300 is small. 

-- 
WBR, Andrey V. Elsukov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?527191218725809>