NetBSD Problem Report #23808
Received: (qmail 2433 invoked by uid 605); 21 Dec 2003 01:15:02 -0000
Message-Id: <20031221011451.2FEBB8BC7@pinky.buzzbee.plus.com>
Date: Sun, 21 Dec 2003 01:14:51 +0000 (GMT)
From: chris@netbsd.org
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: chris@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: satalink 3114 SATA doesn't work.
X-Send-Pr-Version: 3.95
>Number: 23808
>Category: kern
>Synopsis: SATAlink 3114 drive doesn't work
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bouyer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 21 01:16:00 +0000 2003
>Closed-Date: Sun May 30 00:39:46 +0000 2004
>Last-Modified: Sun May 30 00:39:46 +0000 2004
>Originator: Chris Gilbert
>Release: NetBSD 1.6ZG
>Organization:
>Environment:
-current of today (2003-12-21) Running on a:
Abit IC7-Max3
Hyper threading is enabled, and a SMP kernel is being used.
>Description:
When booting using the 3114 driver for the SATAlink, the kernel fails to recognise
WD Raptor disks (disks work fine with the ICH5R interface):
satalink0 at pci 3 dev 3 function 0
satalink0: Silicon Image SATALink 3114 (rev. 0x02)
satalink0: 33Mhz PCI bus
satalink0: bus-master DMA support present
satalink0: using ioapic0 pin 19 (irq 10) for native-PCI interrupt
atabus0 at satalink0 channel 0
atabus1 at satalink0 channel 1
atabus2 at satalink0 channel 2
atabus3 at satalink0 channel 3
snip
satalink0: port 2: device present, speed: 1.5Gb/s
satalink0: port 3: device present, speed: 1.5Gb/s
wd0 at atabus2 drive 0: <WDC WD360GD-75GHA0>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 34332MB, 69754 cyl, 16 head, 63 sec, 512 bytes/sec x 70312500
sectors
wd0: 32-bit data port
wd0: drive supports PIO mode4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(satalink0:2:0): using PIO mode4, Ultra-DMA mode 6 (Ultra/133) (using
DMA data transfers)
wd1 at atabus3 drive 0: <WDC WD360GD-75GHA0>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 34332MB, 69754 cyl, 16 head, 63 sec, 512 bytes/sec x 70312500
sectors
wd1: 32-bit data port
wd1: drive supports PIO mode4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd1(satalink0:3:0): using PIO mode4, Ultra-DMA mode 6 (Ultra/133) (using
DMA data transfers)
snip
satalink0:2:0: recal error (4)
wd0d: error reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (aborted command)
snip retrys:
satalink0:2:0: recal error (4)
wd0d: error reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0)wd0: (aborted
command)
wd0: dos partion I/O error
Using a patch supplied by thorpej@
Index: ata_wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ata/ata_wdc.c,v
retrieving revision 1.47
diff -c -r1.47 ata_wdc.c
*** ata_wdc.c 14 Dec 2003 05:35:34 -0000 1.47
--- ata_wdc.c 20 Dec 2003 23:03:26 -0000
***************
*** 235,248 ****
errstring = "wait";
if (wdcwait(chp, WDCS_DRDY, WDCS_DRDY, ATA_DELAY, wait_flags))
goto ctrltimeout;
! wdccommandshort(chp, xfer->drive, WDCC_RECAL);
! /* Wait for at last 400ns for status bit to be valid */
! DELAY(1);
! errstring = "recal";
! if (wdcwait(chp, WDCS_DRDY, WDCS_DRDY, ATA_DELAY, wait_flags))
! goto ctrltimeout;
! if (chp->ch_status & (WDCS_ERR | WDCS_DWF))
! goto ctrlerror;
/* Don't try to set modes if controller can't be adjusted */
if ((chp->wdc->cap & WDC_CAPABILITY_MODE) == 0)
goto geometry;
--- 235,251 ----
errstring = "wait";
if (wdcwait(chp, WDCS_DRDY, WDCS_DRDY, ATA_DELAY, wait_flags))
goto ctrltimeout;
! if (drvp->drive_flags & DRIVE_OLD) {
! wdccommandshort(chp, xfer->drive, WDCC_RECAL);
! /* Wait for at last 400ns for status bit to be valid */
! DELAY(1);
! errstring = "recal";
! if (wdcwait(chp, WDCS_DRDY, WDCS_DRDY, ATA_DELAY,
! wait_flags))
! goto ctrltimeout;
! if (chp->ch_status & (WDCS_ERR | WDCS_DWF))
! goto ctrlerror;
! }
/* Don't try to set modes if controller can't be adjusted */
if ((chp->wdc->cap & WDC_CAPABILITY_MODE) == 0)
goto geometry;
This changes the log messages to:
wd1: transfer error, downgrading to Ultra-DMA mode 2
wd1(satalink0:3:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1: transfer error, downgrading to Ultra-DMA mode 1
wd1(satalink0:3:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data transfers)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1: transfer error, downgrading to DMA mode 2
wd1(satalink0:3:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1: transfer error, downgrading to PIO mode 4
wd1(satalink0:3:0): using PIO mode 4
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0)wd1: (id not found)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: (id not found)
wd1d: error reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0)wd1: (id not found)
wd1: dos partition I/O error
>How-To-Repeat:
Install WD Raptor disks on a SATAlink 3114 chip.
>Fix:
I think the disks work when wdc debugging/tracing is enabled, however that kind of tracing is rather verbose, and painful, and hard to see if it gives an indication of what's going wrong.
>Release-Note:
>Audit-Trail:
From: Chris Gilbert <chris@dokein.co.uk>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: Re: kern/23808: satalink 3114 SATA doesn't work.
Date: Sun, 21 Dec 2003 01:56:46 +0000
On Sun, 21 Dec 2003 01:14:51 +0000 (GMT)
chris@netbsd.org wrote:
> >Fix:
> I think the disks work when wdc debugging/tracing is enabled,
> however that kind of tracing is rather verbose, and painful, and
> hard to see if it gives an indication of what's going wrong.
Just to confirm enabling all tracing in ata/wd.c was enough that the
disks were detected, and usable. I'll see if I can narrow down which
flag specifically, however this feels like some kind of timing issue.
Something I should have said is the board also has ICH5R on it as well,
so at probe time it's got 6 atabus's going...
Thanks,
Chris
From: Chris Gilbert <chris@dokein.co.uk>
To: gnats-bugs@gnats.netbsd.org
Cc: Jason Thorpe <thorpej@wasabisystems.com>
Subject: Re: kern/23808: satalink 3114 SATA doesn't work.
Date: Sun, 21 Dec 2003 11:51:52 +0000
Found fix for the issue, it seems that at the end of the Reset in
wdc_ata_bio_start needs a delay at the end, my guess is that something
needs to settle down, but I know nothing about ATA, changing the end to
include a DELAY IE:
ready:
drvp->state = READY;
/*
* The drive is usable now
*/
bus_space_write_1(chp->ctl_iot, chp->ctl_ioh,
wd_aux_ctlr,
WDCTL_4BIT);
DELAY(10);
}
As it seems that virtually every time wdopen is called the drive isn't
ready. This feels very much like a timing issue.
Chris
From: Bernd Ernesti <veego@NetBSD.org>
To: chris@NetBSD.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/23808: satalink 3114 SATA doesn't work.
Date: Thu, 25 Dec 2003 01:03:26 +0100
Hi,
I have the same problem with an SATAlink 3112 pci card and a WD2500JD.
Full dmesg for the card, because it is a multifunction one and looks like
the SIIG one (http://www.siig.com/product.asp?partnum=SC-UNSP12):
ppb2 at pci0 dev 12 function 0: HiNT HB1 PCI-PCI Bridge (rev. 0x15)
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
ohci0 at pci3 dev 8 function 0: NEC USB Host Controller (rev. 0x41)
ohci0: interrupting at irq 10
ohci0: OHCI version 1.0
usb1 at ohci0: USB revision 1.0
uhub1 at usb1
uhub1: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ohci1 at pci3 dev 8 function 1: NEC USB Host Controller (rev. 0x41)
ohci1: interrupting at irq 12
ohci1: OHCI version 1.0
usb2 at ohci1: USB revision 1.0
uhub2 at usb2
uhub2: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci3 dev 8 function 2: NEC USB Host Controller (rev. 0x02)
ehci0: interrupting at irq 5
ehci0: EHCI version 0.95
ehci0: companion controllers, 2 ports each: ohci0 ohci1
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: NEC EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 4 ports with 4 removable, self powered
VIA Technologies VT3606 OHCI IEEE 1394 Controller (Firewire serial bus, interface 0x10, revision 0x46) at pci3 dev 9 function 0 not configured
satalink0 at pci3 dev 10 function 0
satalink0: Silicon Image SATALink 3112 (rev. 0x02)
satalink0: SATALink BA5 register space disabled
satalink0: bus-master DMA support present
satalink0: primary channel wired to native-PCI mode
satalink0: using irq 5 for native-PCI interrupt
atabus2 at satalink0 channel 0
satalink0: secondary channel wired to native-PCI mode
satalink0: secondary channel wired to native-PCI mode
atabus3 at satalink0 channel 1
The drive itself isn't showing up, but will be find during the BIOS probe of the card.
Bernd
From: Frank van der Linden <fvdl@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/23808 CVS commit: src/sys/dev/ata
Date: Tue, 2 Mar 2004 13:13:57 +0000 (UTC)
Module Name: src
Committed By: fvdl
Date: Tue Mar 2 13:13:57 UTC 2004
Modified Files:
src/sys/dev/ata: ata_wdc.c
Log Message:
During a control operation (like a reset), wait 10us after selecting
the drive. This fixes (or rather, works around) a timing problem
with WD Raptor drives attached to a Sil3114 SATA controller.
Should fix PR 23808, it fixes the same problem for me.
To generate a diff of this commit:
cvs rdiff -r1.52 -r1.53 src/sys/dev/ata/ata_wdc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: bouyer
State-Changed-When: Sat May 8 15:04:01 UTC 2004
State-Changed-Why:
Hi,
can you confirm that
ata_wdc.c 1.54
wdc.c 1.173
atapi_wdc.c 1.70
fixe your problem ?
Responsible-Changed-From-To: kern-bug-people->bouyer
Responsible-Changed-By: bouyer
Responsible-Changed-When: Sat May 8 15:05:27 UTC 2004
Responsible-Changed-Why:
I commited chris's proposed fix (on tech-kern, not the patch from this
PR).
State-Changed-From-To: feedback->closed
State-Changed-By: chris
State-Changed-When: Sun May 30 00:38:48 UTC 2004
State-Changed-Why:
The changes fixed my bug. Currently connected from a NetBSD 2.0_BETA kernel as built today, after the pullup was done.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.