Date: Mon, 7 Apr 2008 05:30:03 GMT From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/122368: [ata]: Failure to support SATA/PATA drives on 6.3 and 7.0 -- Nvidia nForce4 chipset Message-ID: <200804070530.m375U3kl020546@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/122368; it has been noted by GNATS.
From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: bug-followup@FreeBSD.org, n1nja@earthlink.net,
comperr.extra@gmail.com, cam@eleventhhourfx.com,
=?KOI8-R?Q?Morten_Str?= =?KOI8-R?Q?=E5rup?=
<morten@lightworkings.dk>
Cc:
Subject: Re: kern/122368: [ata]: Failure to support SATA/PATA drives on 6.3
and 7.0 -- Nvidia nForce4 chipset
Date: Mon, 07 Apr 2008 09:23:00 +0400
This is a multi-part message in MIME format.
--------------010106000209050009010904
Content-Type: text/plain; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
I have a patch related to nvidia, which fixes incorrect
reading/clearing interrupt status.
Can you try boot patched 7.0 kernel with this patch?
--
WBR, Andrey V. Elsukov
--------------010106000209050009010904
Content-Type: text/plain;
name="nv.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nv.diff"
Index: src/sys/dev/ata/ata-chipset.c
===================================================================
RCS file: /ncvs/src/sys/dev/ata/ata-chipset.c,v
retrieving revision 1.212
diff -u -p -r1.212 ata-chipset.c
--- src/sys/dev/ata/ata-chipset.c 7 Mar 2008 09:29:19 -0000 1.212
+++ src/sys/dev/ata/ata-chipset.c 25 Mar 2008 06:34:30 -0000
@@ -3147,15 +3147,23 @@ ata_nvidia_status(device_t dev)
struct ata_channel *ch = device_get_softc(dev);
int offset = ctlr->chip->cfg2 & NV4 ? 0x0440 : 0x0010;
int shift = ch->unit << (ctlr->chip->cfg2 & NVQ ? 4 : 2);
- u_int32_t istatus = ATA_INL(ctlr->r_res2, offset);
+ u_int32_t istatus;
+
+ /* get interrupt status */
+ if (ctlr->chip->cfg2 & NVQ)
+ istatus = ATA_INL(ctlr->r_res2, offset);
+ else
+ istatus = ATA_INB(ctlr->r_res2, offset);
/* do we have any PHY events ? */
if (istatus & (0x0c << shift))
ata_sata_phy_check_events(dev);
/* clear interrupt(s) */
- ATA_OUTB(ctlr->r_res2, offset,
- (0x0f << shift) | (ctlr->chip->cfg2 & NVQ ? 0x00f000f0 : 0));
+ if (ctlr->chip->cfg2 & NVQ)
+ ATA_OUTL(ctlr->r_res2, offset, (0x0f << shift) | 0x00f000f0);
+ else
+ ATA_OUTB(ctlr->r_res2, offset, (0x0f << shift));
/* do we have any device action ? */
return (istatus & (0x01 << shift));
--------------010106000209050009010904--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804070530.m375U3kl020546>
