kern/122368: [ata]: Failure to support SATA/PATA drives on 6.3 and 7.0 -- Nvidia nForce4 chipset

Andrey V. Elsukov bu7cher at yandex.ru
Tue Apr 15 06:20:04 UTC 2008


The following reply was made to PR kern/122368; it has been noted by GNATS.

From: "Andrey V. Elsukov" <bu7cher at yandex.ru>
To: swallace at reply1.sdwmail.homeunix.org
Cc: bug-followup at FreeBSD.org,
        =?UTF-8?B?U8O4cmVuIFNjaG1pZHQ=?= <sos at FreeBSD.org>
Subject: Re: kern/122368: [ata]: Failure to support SATA/PATA drives on 6.3
 and 7.0 -- Nvidia nForce4 chipset
Date: Tue, 15 Apr 2008 10:11:09 +0400

 This is a multi-part message in MIME format.
 --------------040708080409080902070607
 Content-Type: text/plain; charset=UTF-8; format=flowed
 Content-Transfer-Encoding: 8bit
 
 Steven Wallace wrote:
 > I have the same problem on my system with an Nforce4 chipset.
 > I just applied the patch to a 6.3-STABLE system with no effect.
 
 Now this patch is in CURRENT.
 
 > Oh, one more clue is if you boot 6.3 with this failure and then go back 
 > to 6.2R, it will also fail.  One has to POWER CYCLE the system
 > and then 6.2R will work.
 
 It's strange. I had similar problem with nfe(4) some time ago.
 As i remember it was initialization problem.
 
 > Ata_nvidia_allocate is being called during controller initialization.
 
 ata_nvidia_chipinit did first part of initialization.
 
 > It appears it does not even call ata_nvidia_status. I inserted a printf 
 > statement to display some status, but I see no message.
 
 ata_nvidia_status only called when an interrupt arrives.
 
 > To get the system to boot, you must use the “disable ACPI” option 
 > (unfortunately this also disables my 2^nd CPU).  Then my printf message 
 > gets displayed.
 > With acpi disabled, I get alternating messages:
 > Ata_nvidia_status: istatus=1 shift=0 offset=440 return=>1
 > Ata_nvidia_status: istatus=0 shift=16 offset=440 return=>0
 > Why with ACPI enabled cause ata_nvidia_status not to be called?
 
 Did you try to boot last CURRENT snapshot? Maybe it is ACPI problem?
 Also, can you try attached patch?
 I slightly modified ata_phy_reset function, which is responsible
 for device detection and also I added some debug printfs.
 
 -- 
 WBR, Andrey V. Elsukov
 
 --------------040708080409080902070607
 Content-Type: text/plain;
  name="sata_phy_reset.diff"
 Content-Transfer-Encoding: base64
 Content-Disposition: inline;
  filename="sata_phy_reset.diff"
 
 SW5kZXg6IHNyYy9zeXMvZGV2L2F0YS9hdGEtY2hpcHNldC5jCj09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNT
 IGZpbGU6IC9uY3ZzL3NyYy9zeXMvZGV2L2F0YS9hdGEtY2hpcHNldC5jLHYKcmV0cmlldmlu
 ZyByZXZpc2lvbiAxLjIxNgpkaWZmIC11IC1wIC1yMS4yMTYgYXRhLWNoaXBzZXQuYwotLS0g
 c3JjL3N5cy9kZXYvYXRhL2F0YS1jaGlwc2V0LmMJMTQgQXByIDIwMDggMTg6MzQ6MjQgLTAw
 MDAJMS4yMTYKKysrIHNyYy9zeXMvZGV2L2F0YS9hdGEtY2hpcHNldC5jCTE1IEFwciAyMDA4
 IDA1OjU4OjQzIC0wMDAwCkBAIC0zMjksMTcgKzMyOSwyMiBAQCBhdGFfc2F0YV9waHlfcmVz
 ZXQoZGV2aWNlX3QgZGV2KQogewogICAgIHN0cnVjdCBhdGFfY2hhbm5lbCAqY2ggPSBkZXZp
 Y2VfZ2V0X3NvZnRjKGRldik7CiAgICAgaW50IGxvb3AsIHJldHJ5OwotCi0gICAgaWYgKChB
 VEFfSURYX0lOTChjaCwgQVRBX1NDT05UUk9MKSAmIEFUQV9TQ19ERVRfTUFTSykgPT0gQVRB
 X1NDX0RFVF9JRExFKQotCXJldHVybiBhdGFfc2F0YV9jb25uZWN0KGNoKTsKKyAgICB1X2lu
 dDMyX3Qgc2MsIHNzOwogCiAgICAgZm9yIChyZXRyeSA9IDA7IHJldHJ5IDwgMTA7IHJldHJ5
 KyspIHsKIAlmb3IgKGxvb3AgPSAwOyBsb29wIDwgMTA7IGxvb3ArKykgewotCSAgICBBVEFf
 SURYX09VVEwoY2gsIEFUQV9TQ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UTChjaCwgQVRB
 X1NDT05UUk9MLCAwKTsKKwogICAgIGlmIChhdGFfc2F0YV9waHlfcmVzZXQoZGV2KSkKIAlh
 dGFfZ2VuZXJpY19yZXNldChkZXYpOwogfQo=
 --------------040708080409080902070607--


More information about the freebsd-bugs mailing list