Subject: 120GB hard disk (SAMSUNG SP1203N) problem?
To: None <port-i386@NetBSD.org>
From: Takahiro Kambe <taca@back-street.net>
List: port-i386
Date: 08/09/2003 23:52:41
Hi.

I have a problem that 120GB IDE hard disk isn't recognized.  Here is
dmesg(8)'s output with first two line masked.

(It is intentional that Some USB devices aren't recognized and the
correct mii device isn't attached to wm(4).)


NetBSD 1.6.1_STABLE (XXXXX) #4: Fri Aug  8 14:07:12 JST 2003
...
cpu0: Intel Pentium 4 (686-class), 2391.23 MHz
cpu0: D-cache 8 KB 64b/line 4-way
cpu0: L2 cache 512 KB 64b/line 8-way
cpu0: features ffffffffbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features ffffffffbfebfbff<PGE,MCA,CMOV,FGPAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features ffffffffbfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,B31>
total memory = 126 MB
avail memory = 115 MB
using 1645 buffers containing 6580 KB of memory
BIOS32 rev. 0 found at 0xfb9d0
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82845G/GL DRAM Controller / Host-Hub I/F Bridge (rev. 0x03)
vga0 at pci0 dev 2 function 0: Intel 82845G/GL Integrated Graphics Device (rev. 0x03)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
Intel 82801DB/DBM USB UHCI Controller #1 (USB serial bus, revision 0x02) at pci0 dev 29 function 0 not configured
Intel 82801DB/DBM USB UHCI Controller #2 (USB serial bus, revision 0x02) at pci0 dev 29 function 1 not configured
Intel 82801DB/DBM USB EHCI Controller (USB serial bus, interface 0x20, revision 0x02) at pci0 dev 29 function 7 not configured
ppb0 at pci0 dev 30 function 0: Intel 82801BA Hub-to-PCI Bridge (rev. 0x82)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
wm0 at pci1 dev 1 function 0: Intel i82540EM 1000BASE-T Ethernet, rev. 2
wm0: interrupting at irq 11
wm0: Ethernet address 00:07:e9:09:f0:bc
ukphy0 at wm0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000ac2, model 0x0002, rev. 3
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
fxp0 at pci1 dev 8 function 0fxp0: interrupting at irq 10
fxp0: Ethernet address 00:0a:e6:08:04:2d
inphy0 at fxp0 phy 1: i82562ET 10/100 media interface, rev. 0
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 31 function 0
pcib0: Intel 82801DB LPC Interface Bridge (rev. 0x02)
pciide0 at pci0 dev 31 function 1: Intel 82801DB IDE Controller (ICH4) (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
pciide0: disabling primary channel (no drives)
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1: 2 targets
cd0 at atapibus0 drive 0: <GCR-8401B, , 1.02> 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)
Intel 82801DB/DBM SMBus Controller (SMBus serial bus, revision 0x02) at pci0 dev 31 function 3 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
lpt0 at isa0 port 0x378-0x37b irq 7
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
biomask e36d netmask ef6d ttymask ffef


My colleague reported me that (old) FreeBSD 2.2.8 detect above hard
disk recognized normally and smaller size (40GB) hard disk had no
problem.

I tested with NetBSD current (1.6W) and got the same result with 1.6.1.

After testing some debug flags, I found that settting wdcdebug_mask to
DEBUG_FUNCS(0x08) change this situation, the drive is recognized.
It seems that there is some timing problem?

NetBSD 1.6.1_STABLE (XXXXX) #4: Fri Aug  8 14:07:12 JST 2003
...
cpu0: Intel Pentium 4 (686-class), 2391.22 MHz
cpu0: D-cache 8 KB 64b/line 4-way
cpu0: L2 cache 512 KB 64b/line 8-way
cpu0: features ffffffffbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features ffffffffbfebfbff<PGE,MCA,CMOV,FGPAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features ffffffffbfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,B31>
total memory = 126 MB
avail memory = 115 MB
using 1645 buffers containing 6580 KB of memory
BIOS32 rev. 0 found at 0xfb9d0
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82845G/GL DRAM Controller / Host-Hub I/F Bridge (rev. 0x03)
vga0 at pci0 dev 2 function 0: Intel 82845G/GL Integrated Graphics Device (rev. 0x03)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
Intel 82801DB/DBM USB UHCI Controller #1 (USB serial bus, revision 0x02) at pci0 dev 29 function 0 not configured
Intel 82801DB/DBM USB UHCI Controller #2 (USB serial bus, revision 0x02) at pci0 dev 29 function 1 not configured
Intel 82801DB/DBM USB EHCI Controller (USB serial bus, interface 0x20, revision 0x02) at pci0 dev 29 function 7 not configured
ppb0 at pci0 dev 30 function 0: Intel 82801BA Hub-to-PCI Bridge (rev. 0x82)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
wm0 at pci1 dev 1 function 0: Intel i82540EM 1000BASE-T Ethernet, rev. 2
wm0: interrupting at irq 11
wm0: Ethernet address 00:07:e9:09:f0:bc
ukphy0 at wm0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000ac2, model 0x0002, rev. 3
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
fxp0 at pci1 dev 8 function 0fxp0: interrupting at irq 10
fxp0: Ethernet address 00:0a:e6:08:04:2d
inphy0 at fxp0 phy 1: i82562ET 10/100 media interface, rev. 0
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 31 function 0
pcib0: Intel 82801DB LPC Interface Bridge (rev. 0x02)
pciide0 at pci0 dev 31 function 1: Intel 82801DB IDE Controller (ICH4) (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wdc_ata_get_parms
wdc_exec_command pciide0:0:0
__wdccommand_start pciide0:0:0
wdccommand pciide0:0:0: command=0xec cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:0:0
wdc_ata_get_parms
wdc_exec_command pciide0:0:1
__wdccommand_start pciide0:0:1
__wdccommand_done pciide0:0:1
wdc_ata_get_parms: wdc_c.flags=0x131
wdc_ata_get_parms
wdc_exec_command pciide0:0:1
__wdccommand_start pciide0:0:1
__wdccommand_done pciide0:0:1
wdc_ata_get_parms: wdc_c.flags=0x131
wd0 at pciide0 channel 0 drive 0wdc_ata_get_parms
wdc_exec_command pciide0:0:0
__wdccommand_start pciide0:0:0
wdccommand pciide0:0:0: command=0xec cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:0:0
: <SAMSUNG SP1203N>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 111 GB, 232632 cyl, 16 head, 63 sec, 512 bytes/sect x 234493056 sectors
wdc_ata_get_parms
wdc_exec_command pciide0:0:0
__wdccommand_start pciide0:0:0
wdccommand pciide0:0:0: command=0xec cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:0:0
wdc_ata_get_parms
wdc_exec_command pciide0:0:0
__wdccommand_start pciide0:0:0
wdccommand pciide0:0:0: command=0xec cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:0:0
wd0: 32-bit data port
wdc_ata_set_mode=0xc
wdc_exec_command pciide0:0:0
__wdccommand_start pciide0:0:0
wdccommand pciide0:0:0: command=0xef cylin=0 head=0 sector=0 count=12 precomp=3
__wdccommand_done pciide0:0:0
wd0: drive supports PIO mode 4wdc_ata_set_mode=0x22
wdc_exec_command pciide0:0:0
__wdccommand_start pciide0:0:0
wdccommand pciide0:0:0: command=0xef cylin=0 head=0 sector=0 count=34 precomp=3
__wdccommand_done pciide0:0:0
, DMA mode 2wdc_ata_set_mode=0x46
wdc_exec_command pciide0:0:0
__wdccommand_start pciide0:0:0
wdccommand pciide0:0:0: command=0xef cylin=0 head=0 sector=0 count=70 precomp=3
__wdccommand_done pciide0:0:0
, Ultra-DMA mode 6 (Ultra/133)wdc_ata_set_mode=0x45
wdc_exec_command pciide0:0:0
__wdccommand_start pciide0:0:0
wdccommand pciide0:0:0: command=0xef cylin=0 head=0 sector=0 count=69 precomp=3
__wdccommand_done pciide0:0:0

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 wired to compatibility mode
wdc_ata_get_parms
wdc_exec_command pciide0:1:0
__wdccommand_start pciide0:1:0
wdccommand pciide0:1:0: command=0xa1 cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:1:0
wdc_ata_get_parms
wdc_exec_command pciide0:1:1
__wdccommand_start pciide0:1:1
__wdccommand_done pciide0:1:1
wdc_ata_get_parms: wdc_c.flags=0x131
wdc_ata_get_parms
wdc_exec_command pciide0:1:1
__wdccommand_start pciide0:1:1
__wdccommand_done pciide0:1:1
wdc_ata_get_parms: wdc_c.flags=0x131
atapibus0 at pciide0 channel 1: 2 targets
wdc_exec_command pciide0:1:0
__wdccommand_start pciide0:1:0
wdccommand pciide0:1:0: command=0x8 cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:1:0
wdc_ata_get_parms
wdc_exec_command pciide0:1:0
__wdccommand_start pciide0:1:0
wdccommand pciide0:1:0: command=0xa1 cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:1:0
cd0 at atapibus0 drive 0: <GCR-8401B, , 1.02> type 5 cdrom removable
wdc_ata_get_parms
wdc_exec_command pciide0:1:0
__wdccommand_start pciide0:1:0
wdccommand pciide0:1:0: command=0xa1 cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:1:0
wdc_ata_get_parms
wdc_exec_command pciide0:1:0
__wdccommand_start pciide0:1:0
wdccommand pciide0:1:0: command=0xa1 cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_done pciide0:1:0
cd0: 32-bit data port
wdc_ata_set_mode=0xc
wdc_exec_command pciide0:1:0
__wdccommand_start pciide0:1:0
wdccommand pciide0:1:0: command=0xef cylin=0 head=0 sector=0 count=12 precomp=3
__wdccommand_done pciide0:1:0
cd0: drive supports PIO mode 4wdc_ata_set_mode=0x22
wdc_exec_command pciide0:1:0
__wdccommand_start pciide0:1:0
wdccommand pciide0:1:0: command=0xef cylin=0 head=0 sector=0 count=34 precomp=3
__wdccommand_done pciide0:1:0
, DMA mode 2wdc_ata_set_mode=0x42
wdc_exec_command pciide0:1:0
__wdccommand_start pciide0:1:0
wdccommand pciide0:1:0: command=0xef cylin=0 head=0 sector=0 count=66 precomp=3
__wdccommand_done pciide0:1:0
, 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)
Intel 82801DB/DBM SMBus Controller (SMBus serial bus, revision 0x02) at pci0 dev 31 function 3 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
lpt0 at isa0 port 0x378-0x37b irq 7
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
biomask e36d netmask ef6d ttymask ffef
...

Any advise is welcome but I'm away from the machine until 12th Aug.

Best regards.

-- 
Takahiro Kambe <taca@back-street.net>