NetBSD Problem Report #24904
Received: (qmail 28126 invoked by uid 605); 24 Mar 2004 22:32:49 -0000
Message-Id: <200403242232.i2OMWaG00887@pepew.1st.de>
Date: Wed, 24 Mar 2004 23:32:36 +0100 (MET)
From: mlelstv@serpens.de
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: mlelstv@serpens.de
To: gnats-bugs@gnats.netbsd.org
Subject: Samsung drive is not seen by -current kernel
X-Send-Pr-Version: 3.95
>Number: 24904
>Category: kern
>Synopsis: Samsung drive is not seen by -current kernel
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 24 22:33:00 +0000 2004
>Closed-Date: Thu Mar 25 20:37:50 +0000 2004
>Last-Modified: Sun Mar 28 22:25:00 +0000 2004
>Originator: Michael van Elst
>Release: NetBSD-1.6ZK
>Organization:
--
Michael van Elst
Internet: mlelstv@serpens.de
"A potential Snark may lurk in every tree."
>Environment:
NetBSD 1.6ZK (PUSSYFOOT) #62: Sun Mar 21 23:53:24 MET 2004
src@pussyfoot:/home/src/sys/arch/i386/compile/PUSSYFOOT
>Description:
NetBSD-current doesn't see a SP1614N drive on viaide.
NetBSD-1.6.2 has no problems with it after adding a larger delay to wdc.c
as reported before:
--- sys/dev/ic/wdc.c 2003/09/24 11:16:43 1.114.4.3
+++ sys/dev/ic/wdc.c 2004/03/24 22:22:50
@@ -237,7 +237,7 @@
DELAY(1000);
bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr,
WDCTL_IDS);
- delay(1000);
+ delay(2000);
(void) bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_error);
bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, WDCTL_4BIT);
delay(10);
NetBSD-1.6ZK says:
pcib0: VIA Technologies VT8235 (Apollo KT400) PCI-ISA Bridge (rev. 0x00)
viaide0 at pci0 dev 17 function 1
viaide0: VIA Technologies VT8235 ATA133 controller
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at irq 14
atabus0 at viaide0 channel 0
viaide0: secondary channel configured to compatibility mode
viaide0: secondary channel interrupting at irq 15
atabus1 at viaide0 channel 1
[...]
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <TOSHIBA ODD-DVD SD-M1802, , 1030> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(viaide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
boot device: <unknown>
root device:
NetBSD-1.6.2 says:
pcib0 at pci0 dev 17 function 0
pcib0: VIA Technologies VT8235 (Apollo KT400) PCI-ISA Bridge (rev. 0x00)
pciide0 at pci0 dev 17 function 1: VIA Technologies VT8235 ATA133 controller
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
wd0 at pciide0 channel 0 drive 0: <SAMSUNG SP1614N>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 149 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
pciide0: secondary channel configured to compatibility mode
atapibus0 at pciide0 channel 1: 2 targets
cd0 at atapibus0 drive 0: <TOSHIBA ODD-DVD SD-M1802, , 1030> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
pciide0: secondary channel interrupting at irq 15
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
>How-To-Repeat:
Boot NetBSD 1.6ZK on an EPIA-M motherboard with a Samsung SP1614N drive
attached.
>Fix:
--- wdc.c 2004/01/07 22:03:56 1.171
+++ wdc.c 2004/03/24 22:32:12
@@ -590,6 +590,9 @@
delay(10); /* 400ns delay */
bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr,
WDCTL_RST | WDCTL_IDS | WDCTL_4BIT);
+ DELAY(1000);
+ bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr,
+ WDCTL_IDS | WDCTL_4BIT);
DELAY(2000);
(void) bus_space_read_1(chp->cmd_iot, chp->cmd_iohs[wd_error], 0);
bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, WDCTL_4BIT);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: bouyer
State-Changed-When: Thu Mar 25 20:37:12 UTC 2004
State-Changed-Why:
Patch commited to current, and an ticket is open for 1.6.
Thanks !
From: James Chacon <jmc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/24904 CVS commit: [netbsd-1-6] src/sys/dev/ic
Date: Sun, 28 Mar 2004 22:24:11 +0000 (UTC)
Module Name: src
Committed By: jmc
Date: Sun Mar 28 22:24:11 UTC 2004
Modified Files:
src/sys/dev/ic [netbsd-1-6]: wdc.c
Log Message:
Pullup patch (requested by bouyer in ticket #1637)
Wait a bit more after reset before re-enabling interrupts. PR#24904
To generate a diff of this commit:
cvs rdiff -r1.114.4.3 -r1.114.4.4 src/sys/dev/ic/wdc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>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.