kern/75540: Incorrect probing/configuration of nVidia nForce3/4
SATA controller
Sergiy Vyshnevetskiy
serg at vostok.net
Mon Dec 27 06:30:24 PST 2004
>Number: 75540
>Category: kern
>Synopsis: Incorrect probing/configuration of nVidia nForce3/4 SATA controller
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 27 14:30:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Sergiy Vyshnevetskiy
>Release: 5-stable
>Organization:
>Environment:
FreeBSD serg.vostok.net 5.3-STABLE FreeBSD 5.3-STABLE #0: Mon Dec 6 11:01:12 EET 2004 root at serg.vostok.net:/usr/5/src/sys/i386/compile/SERG i386
>Description:
Kernel detects nVidia nForce3/nForce4 SATA controller as generic ATA controller - fixed by the first part of the patch.
Then it would say, that you managed to connect an ATA-133(!) disk to SATA controller with 40-pin cable(!), so DMA would be limited to UDMA33. That nonsence is corrected by the second part of the patch.
>How-To-Repeat:
Install FreeBSD on a box with nForce3/nForce4 chipset and attach a SATA HDD to it.
>Fix:
--- sys/dev/ata/ata-chipset.c.orig Sun Oct 10 18:01:47 2004
+++ sys/dev/ata/ata-chipset.c Sun Dec 5 23:24:15 2004
@@ -1114,8 +1114,14 @@
{ ATA_NFORCE2_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2 MCP" },
{ ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3" },
{ ATA_NFORCE3_PRO, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 Pro" },
+ { ATA_NFORCE3_PRO_S1, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce3 Pro" },
+ { ATA_NFORCE3_PRO_S2, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce3 Pro" },
{ ATA_NFORCE3_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 MCP" },
+ { ATA_NFORCE3_MCP_S1, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce3 MCP" },
+ { ATA_NFORCE3_MCP_S2, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce3 MCP" },
{ ATA_NFORCE4, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce4" },
+ { ATA_NFORCE4_S1, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce4" },
+ { ATA_NFORCE4_S2, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce4" },
{ 0, 0, 0, 0, 0, 0}};
char buffer[64];
@@ -2861,9 +2867,17 @@
static int
ata_check_80pin(struct ata_device *atadev, int mode)
{
+ device_t parent = device_get_parent(atadev->channel->dev);
+ struct ata_pci_controller *ctlr = device_get_softc(parent);
+
+ if (mode >= ATA_UDMA2 && mode < ATA_SA150 && ctlr->chip->max_dma >= ATA_SA150) {
+ ata_prtdev(atadev,"DMA set to SA150 for any device attached to SATA controller\n");
+ return ATA_SA150;
+ }
+
if (mode > ATA_UDMA2 && !(atadev->param->hwres & ATA_CABLE_ID)) {
ata_prtdev(atadev,"DMA limited to UDMA33, non-ATA66 cable or device\n");
- mode = ATA_UDMA2;
+ return ATA_UDMA2;
}
return mode;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list