NetBSD Problem Report #51300

From martin@aprisoft.de  Thu Jun 30 10:00:17 2016
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7D8177A497
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 30 Jun 2016 10:00:17 +0000 (UTC)
Message-Id: <20160630100004.4BBE41FABAB6@emmas.aprisoft.de>
Date: Thu, 30 Jun 2016 12:00:04 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: wd* sometimes not detected
X-Send-Pr-Version: 3.95

>Number:         51300
>Category:       kern
>Synopsis:       wd* sometimes not detected
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 30 10:05:00 +0000 2016
>Last-Modified:  Thu Jan 05 13:50:01 +0000 2017
>Originator:     Martin Husemann
>Release:        NetBSD 7.0_STABLE
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD emmas.aprisoft.de 7.0_STABLE NetBSD 7.0_STABLE (EMMAS) #1: Fri Jun 17 17:14:59 CEST 2016 martin@emmas.aprisoft.de:/usr/src-7/sys/arch/i386/compile/EMMAS i386
Architecture: i386
Machine: i386
>Description:

I have a machine where sometimes on reboot wd0 or wd1 is not detected. This
messes up raid (but otherwise goes unnoticed). This all started with the
update from netbsd-6 to netbsd-7, but it does not happen all the time
and since I rarely boot this machine (it is used as NAS server, running 24/7)
it was not detected immediately.

I initially thought the disks would be dying and replaced both, but it
happened again with the new disks.

Maybe some timeout needs to be longer?

Here is full dmesg:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.0_STABLE (EMMAS) #1: Fri Jun 17 17:14:59 CEST 2016
	martin@emmas.aprisoft.de:/usr/src-7/sys/arch/i386/compile/EMMAS
total memory = 3068 MB
avail memory = 3001 MB
kern.module.path=/stand/i386/7.0/modules
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Gigabyte Technology Co., Ltd. D525TUD ( )
mainbus0 (root)
ACPI: RSDP 0xf6350 000014 (v00 GBT   )
ACPI: RSDT 0xbfce3040 000038 (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
ACPI: FACP 0xbfce30c0 000074 (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
ACPI: DSDT 0xbfce3180 005020 (v01 GBT    GBTUACPI 00001000 MSFT 0100000C)
ACPI: FACS 0xbfce0000 000040
ACPI: HPET 0xbfce8300 000038 (v01 GBT    GBTUACPI 42302E31 GBTU 00000098)
ACPI: MCFG 0xbfce8380 00003C (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
ACPI: TAMG 0xbfce83c0 0062E2 (v01 GBT    GBT   B0 5455312E BG?? 00020101)
ACPI: APIC 0xbfce8200 000084 (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
ACPI: All ACPI Tables successfully acquired
ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 24 pins
cpu0 at mainbus0 apid 0: Intel(R) Atom(TM) CPU D525   @ 1.80GHz, id 0x106ca
cpu1 at mainbus0 apid 2: Intel(R) Atom(TM) CPU D525   @ 1.80GHz, id 0x106ca
cpu2 at mainbus0 apid 3: Intel(R) Atom(TM) CPU D525   @ 1.80GHz, id 0x106ca
cpu3 at mainbus0 apid 1: Intel(R) Atom(TM) CPU D525   @ 1.80GHz, id 0x106ca
acpi0 at mainbus0: Intel ACPICA 20131218
acpi0: X/RSDT: OemId <GBT   ,GBTUACPI,42302e31>, AslId <GBTU,01010101>
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
acpibut0 at acpi0 (PWRB, PNP0C0C): ACPI Power Button
SYSR (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
COPR (PNP0C04) at acpi0 not configured
UAR1 (PNP0501) at acpi0 not configured
UAR2 (PNP0501) at acpi0 not configured
ECP1 (PNP0401) at acpi0 not configured
pckbc1 at acpi0 (PS2K, PNP0303) (kbd port): io 0x60,0x64 irq 1
PMIO (PNP0C02) at acpi0 not configured
EXPL (PNP0C02) at acpi0 not configured
MEM (PNP0C01) at acpi0 not configured
FWH (INT0800) at acpi0 not configured
apm0 at acpi0: Power Management spec V1.2
ACPI: Enabled 1 GPEs in block 00 to 1F
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20131218/hwxface-646)
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20131218/hwxface-646)
attimer1: attached to pcppi1
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0 mux 1
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: vendor 0x8086 product 0xa000 (rev. 0x02)
agp0 at pchb0: i915-family chipset
agp0: detected 764k stolen memory
agp0: BAR size 100000 mismatches detected GTT size 40000; trusting BAR
agp0: aperture at 0xd0000000, size 0x10000000
i915drmkms0 at pci0 dev 2 function 0: vendor 0x8086 product 0xa001 (rev. 0x02)
drm: Memory usable by graphics device = 1024M
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at ioapic0 pin 16 (i915)
drm: Skipping LVDS initialization for Gigabyte GA-D525TUD
drm: initialized overlay support
i915drmkms0: info: No connectors reported connected with modes
drm: Cannot find any crtc or sizes - going 1024x768
intelfb0 at i915drmkms0
i915drmkms0: info: registered panic notifier
intelfb0: framebuffer at 0xdc21c000, size 1024x768, depth 32, stride 4096
wsdisplay0 at intelfb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wskbd0: connecting to wsdisplay0
hdaudio0 at pci0 dev 27 function 0: HD Audio Controller
hdaudio0: interrupting at ioapic0 pin 16
hdafg0 at hdaudio0: Realtek ALC889
hdafg0: DAC00 2ch: Speaker [Jack]
hdafg0: DAC01 2ch: HP Out [Jack]
hdafg0: ADC02 2ch: Line In [Jack], Mic In [Jack]
hdafg0: ADC03 2ch: Mic In [Jack]
hdafg0: 2ch/2ch 32000Hz 44100Hz 48000Hz 88200Hz 96000Hz 192000Hz PCM16 PCM20 PCM24 AC3
audio0 at hdafg0: full duplex, playback, capture, mmap, independent
ppb0 at pci0 dev 28 function 0: vendor 0x8086 product 0x27d0 (rev. 0x02)
ppb0: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
re0 at pci1 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x06)
re0: interrupting at ioapic0 pin 16
re0: Ethernet address 50:e5:49:dc:35:45
re0: using 256 tx descriptors
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 4
rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ppb1 at pci0 dev 28 function 1: vendor 0x8086 product 0x27d2 (rev. 0x02)
ppb1: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
jmide0 at pci2 dev 0 function 0: vendor 0x197b product 0x2363 (rev. 0x10)
jmide0: 1 PATA port, 2 SATA ports
jmide0: interrupting at ioapic0 pin 17
ahcisata0 at jmide0
ahcisata0: AHCI revision 1.10, 2 ports, 32 slots, CAP 0xc722ff01<PSC,SSC,PMD,SPM,ISS=0x2=Gen2,SCLO,SAL,SALP,SNCQ,S64A>
atabus0 at ahcisata0 channel 0
atabus1 at ahcisata0 channel 1
pciide0 at pci2 dev 0 function 1: vendor 0x197b product 0x0368 (rev. 0x10)
pciide0: bus-master DMA support present, but unused (no driver support)
pciide0: primary channel wired to native-PCI mode
pciide0: using ioapic0 pin 18 for native-PCI interrupt
atabus2 at pciide0 channel 0
pciide0: secondary channel wired to native-PCI mode
atabus3 at pciide0 channel 1
uhci0 at pci0 dev 29 function 0: vendor 0x8086 product 0x27c8 (rev. 0x02)
uhci0: interrupting at ioapic0 pin 23
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 1: vendor 0x8086 product 0x27c9 (rev. 0x02)
uhci1: interrupting at ioapic0 pin 19
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 2: vendor 0x8086 product 0x27ca (rev. 0x02)
uhci2: interrupting at ioapic0 pin 18
usb2 at uhci2: USB revision 1.0
uhci3 at pci0 dev 29 function 3: vendor 0x8086 product 0x27cb (rev. 0x02)
uhci3: interrupting at ioapic0 pin 16
usb3 at uhci3: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 0x8086 product 0x27cc (rev. 0x02)
ehci0: interrupting at ioapic0 pin 23
ehci0: BIOS has given up ownership
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
usb4 at ehci0: USB revision 2.0
ppb2 at pci0 dev 30 function 0: vendor 0x8086 product 0x2448 (rev. 0xe2)
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled
re1 at pci3 dev 0 function 0: RealTek 8169/8110 Gigabit Ethernet (rev. 0x10)
re1: interrupting at ioapic0 pin 20
re1: Ethernet address f8:d1:11:11:a3:df
re1: using 256 tx descriptors
rgephy1 at re1 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 3
rgephy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ichlpcib0 at pci0 dev 31 function 0: vendor 0x8086 product 0x27bc (rev. 0x02)
timecounter: Timecounter "ichlpcib0" frequency 3579545 Hz quality 1000
ichlpcib0: 24-bit timer
ichlpcib0: TCO (watchdog) timer configured.
gpio0 at ichlpcib0: 64 pins
ahcisata1 at pci0 dev 31 function 2: vendor 0x8086 product 0x27c1 (rev. 0x02)
ahcisata1: interrupting at ioapic0 pin 19
ahcisata1: AHCI revision 1.10, 4 ports, 32 slots, CAP 0xc320ff03<PSC,SSC,PMD,ISS=0x2=Gen2,SCLO,SAL,SNCQ,S64A>
atabus4 at ahcisata1 channel 0
atabus5 at ahcisata1 channel 1
atabus6 at ahcisata1 channel 2
atabus7 at ahcisata1 channel 3
ichsmb0 at pci0 dev 31 function 3: vendor 0x8086 product 0x27da (rev. 0x02)
ichsmb0: interrupting at ioapic0 pin 19
iic0 at ichsmb0: I2C bus
isa0 at ichlpcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: HLT, lat   0 us, pow     0 mW
acpicpu0: T0: I/O, lat   1 us, pow     0 mW, 100 %
acpicpu0: T1: I/O, lat   1 us, pow     0 mW,  88 %
acpicpu0: T2: I/O, lat   1 us, pow     0 mW,  76 %
acpicpu0: T3: I/O, lat   1 us, pow     0 mW,  64 %
acpicpu0: T4: I/O, lat   1 us, pow     0 mW,  52 %
acpicpu0: T5: I/O, lat   1 us, pow     0 mW,  40 %
acpicpu0: T6: I/O, lat   1 us, pow     0 mW,  28 %
acpicpu0: T7: I/O, lat   1 us, pow     0 mW,  16 %
coretemp0 at cpu0: thermal sensor, 1 C resolution, Tjmax=100
acpicpu1 at cpu1: ACPI CPU
coretemp1 at cpu1: thermal sensor, 1 C resolution, Tjmax=100
acpicpu2 at cpu2: ACPI CPU
acpicpu3 at cpu3: ACPI CPU
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
IPsec: Initialized Security Association Processing.
uhub0 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhub3 at usb3: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
uhub4 at usb4: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
ahcisata0 port 1: device present, speed: 3.0Gb/s
ahcisata0 port 0: device present, speed: 3.0Gb/s
wd0 at atabus0 drive 0
wd0: <WDC WD4002FFWX-68TZ4N0>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 3726 GB, 7752021 cyl, 16 head, 63 sec, 512 bytes/sect x 7814037168 sectors
wd0: GPT GUID: 4441cb9f-48d6-42e9-996d-3c88575d70a8
dk0 at wd0: 92b850fb-1f39-46c3-99c7-6b85d2a732af
dk0: 7814037072 blocks at 48, type: raidframe
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
wd1 at atabus1 drive 0
wd1: <WDC WD4002FFWX-68TZ4N0>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 3726 GB, 7752021 cyl, 16 head, 63 sec, 512 bytes/sect x 7814037168 sectors
wd1: GPT GUID: f3d31414-89b6-4696-9021-1a681a7c4926
dk1 at wd1: 0b6a527f-7960-4670-8e6c-4e3c38fd006d
dk1: 7814037072 blocks at 48, type: raidframe
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd1(ahcisata0:1:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
umass0 at uhub4 port 5 configuration 1 interface 0
umass0: JetFlash TS256MJF2A, rev 2.00/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <JetFlash, TS256MJF2A, 1.00> disk fixed
sd0: fabricating a geometry
sd0: 250 MB, 250 cyl, 64 head, 32 sec, 512 bytes/sect x 512000 sectors
sd0: fabricating a geometry
Kernelized RAIDframe activated
raid0: RAID Level 1
raid0: Components: /dev/dk1[**FAILED**] /dev/dk0
raid0: Total Sectors: 7814036992 (3815447 MB)
raid0: GPT GUID: 05c845f8-6a19-466a-8740-c1e223a15aad
dk2 at raid0: 556f5d6e-bd1d-42ce-b3cb-262bd2880c49
dk2: 7805646848 blocks at 64, type: ffs
dk3 at raid0: fd7a7e31-3710-450d-8129-27c7d9386a7a
dk3: 8390016 blocks at 7805646912, type: swap
uark0 at uhub2 port 2
uark0: ArkMicroChips USB-UART Controller, rev 1.10/0.01, addr 2
ucom0 at uark0 portno 0
root on dk2 dumps on dk3
root file system type: ffs
wsdisplay0: screen 1 added (default, vt100 emulation)
wsdisplay0: screen 2 added (default, vt100 emulation)
wsdisplay0: screen 3 added (default, vt100 emulation)
wsdisplay0: screen 4 added (default, vt100 emulation)
wd1d: device timeout reading fsbn 0 (wd1 bn 0; cn 0 tn 0 sn 0), retrying
wd1: soft error (corrected)
raid0: initiating in-place reconstruction on column 0


>How-To-Repeat:
s/a

>Fix:
n/a

>Audit-Trail:
From: Martin Husemann <martin@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51300: wd* sometimes not detected
Date: Fri, 1 Jul 2016 13:43:56 +0000

 I captured console on a failing boot:

 wd0 at atabus0 drive 0
 ahcisata0 port 0: SERR 0x0
 wd0: IDENTIFY failed
 ahcisata0 port 0: SERR 0x0
 wd1 at atabus1 drive 0
 ahcisata0 port 1: SERR 0x0
 wd1: IDENTIFY failed
 ahcisata0 port 1: SERR 0x0

 So the drive is detected, but fails to talk.

 Martin

From: Onno van der Linden <o.vd.linden@quicknet.nl>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/51300
Date: Fri, 1 Jul 2016 17:44:14 +0200

 I've been using this diff for a couple of years.
 Fixes some non-detection for me most of the times.
 It seems to me it's a bug anyway: according to
 the docs I've seen there should be a delay/wait
 after setting the drive and that delay is missing
 (it's used after all the other cases of "drive setting"
  in the code).

 --- /usr/src/sys/dev/ic/wdc.c.orig	2013-09-16 17:30:49.000000000 +0200
 +++ /usr/src/sys/dev/ic/wdc.c	2014-01-25 20:33:19.000000000 +0100
 @@ -1453,6 +1453,7 @@
  		wdc->select(chp,drive);
  	bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_sdh], 0,
  	    WDSD_IBM | (drive << 4));
 +	delay(10);
  	switch(wdcwait(chp, ata_c->r_st_bmask | WDCS_DRQ,
  	    ata_c->r_st_bmask, ata_c->timeout, wait_flags)) {
  	case WDCWAIT_OK:

From: "Jonathan A. Kollasch" <jakllsch@kollasch.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51300: wd* sometimes not detected
Date: Wed, 4 Jan 2017 11:48:56 -0600

 I believe this issue may be due to jmide(4)'s reconfiguration of the
 chip, and the chip presenting two interfaces to the same hardware.

 Could you try the attached patch?

 Index: sys/dev/pci/jmide.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/jmide.c,v
 retrieving revision 1.21
 diff -d -u -a -p -r1.21 jmide.c
 --- sys/dev/pci/jmide.c	14 Jul 2016 10:19:06 -0000	1.21
 +++ sys/dev/pci/jmide.c	4 Jan 2017 17:42:09 -0000
 @@ -127,7 +127,7 @@ jmide_lookup(pcireg_t id) {
  	const struct jmide_product *jp;

  	for (jp = jm_products; jp->jm_product != 0; jp++) {
 -		if (jp->jm_product == PCI_PRODUCT(id))
 +		if ((jp->jm_product | 0x2000) == PCI_PRODUCT(id))
  			return jp;
  	}
  	return NULL;

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51300: wd* sometimes not detected
Date: Thu, 5 Jan 2017 08:38:50 +0100

 I get:

 pci2: i/o space, memory space enabled, rd/line, wr/inv ok
 jmide0 at pci2 dev 0 function 0: vendor 0x197b product 0x2363 (rev. 0x10)
 jmide0: 1 PATA port, 2 SATA ports
 jmide0: interrupting at ioapic0 pin 17
 ahcisata0 at jmide0
 ahcisata0: AHCI revision 1.10, 2 ports, 32 slots, CAP 0xc722ff01<PSC,SSC,PMD,SPM,ISS=0x2=Gen2,SCLO,SAL,SALP,SNCQ,S64A>
 atabus0 at ahcisata0 channel 0
 atabus1 at ahcisata0 channel 1
 pciide0 at pci2 dev 0 function 1: vendor 0x197b product 0x0368 (rev. 0x10)
 pciide0: bus-master DMA support present, but unused (no driver support)
 pciide0: primary channel wired to native-PCI mode
 pciide0: using ioapic0 pin 18 for native-PCI interrupt
 atabus2 at pciide0 channel 0
 pciide0: secondary channel wired to native-PCI mode
 atabus3 at pciide0 channel 1
 ahcisata1 at pci0 dev 31 function 2: vendor 0x8086 product 0x27c1 (rev. 0x02)
 ahcisata1: interrupting at ioapic0 pin 19
 ahcisata1: AHCI revision 1.10, 4 ports, 32 slots, CAP 0xc320ff03<PSC,SSC,PMD,ISS=0x2=Gen2,SCLO,SAL,SNCQ,S64A>
 atabus4 at ahcisata1 channel 0
 atabus5 at ahcisata1 channel 1
 atabus6 at ahcisata1 channel 2
 atabus7 at ahcisata1 channel 3
 wd0 at atabus0 drive 0
 wd0: <WDC WD4002FFWX-68TZ4N0>
 wd0: drive supports 16-sector PIO transfers, LBA48 addressing
 wd0: 3726 GB, 7752021 cyl, 16 head, 63 sec, 512 bytes/sect x 7814037168 sectors
 wd0: GPT GUID: 4441cb9f-48d6-42e9-996d-3c88575d70a8
 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
 wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
 wd1 at atabus1 drive 0
 wd1: <WDC WD4002FFWX-68TZ4N0>
 wd1: drive supports 16-sector PIO transfers, LBA48 addressing
 wd1: 3726 GB, 7752021 cyl, 16 head, 63 sec, 512 bytes/sect x 7814037168 sectors
 wd1: GPT GUID: f3d31414-89b6-4696-9021-1a681a7c4926

 and it is these two drives that go missing...

 However, the IDENTIFY FAILED still happens.

 I'll see if I can rewire the drives to go to ahcisata1 instead, that should
 make the faster too.

 Martin

From: "Jonathan A. Kollasch" <jakllsch@kollasch.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51300: wd* sometimes not detected
Date: Thu, 5 Jan 2017 06:35:00 -0600

 Oh, sorry... my patch was wrong...

 Could you try the following line instead?

 +	if (jp->jm_product == (PCI_PRODUCT(id) | 0x2000))

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51300: wd* sometimes not detected
Date: Thu, 5 Jan 2017 14:49:34 +0100

 OK, this looks better:

 pci2: i/o space, memory space enabled, rd/line, wr/inv ok
 jmide0 at pci2 dev 0 function 0: vendor 0x197b product 0x2363 (rev. 0x10)
 jmide0: 1 PATA port, 2 SATA ports
 jmide0: interrupting at ioapic0 pin 17
 ahcisata0 at jmide0
 ahcisata0: AHCI revision 1.10, 2 ports, 32 slots, CAP 0xc722ff01<PSC,SSC,PMD,SPM,ISS=0x2=Gen2,SCLO,SAL,SALP,SNCQ,S64A>
 atabus0 at ahcisata0 channel 0
 atabus1 at ahcisata0 channel 1
 jmide1 at pci2 dev 0 function 1: vendor 0x197b product 0x0368 (rev. 0x10)
 jmide1: 1 PATA port
 jmide1: interrupting at ioapic0 pin 18
 jmide1: PCI IDE interface used
 jmide1: bus-master DMA support present
 jmide1: primary channel wired to native-PCI mode
 jmide1: primary channel is PATA
 atabus2 at jmide1 channel 0
 jmide1: secondary channel wired to native-PCI mode
 jmide1: secondary channel is unused

 ... but unfortunately the IDENTIFY issue remains.

 Martin

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.