NetBSD Problem Report #53524

From martin@duskware.de  Tue Aug 14 11:19:47 2018
Return-Path: <martin@duskware.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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E012C7A111
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 14 Aug 2018 11:19:47 +0000 (UTC)
Message-Id: <20180814111931.B5AC75CC84F@emmas.aprisoft.de>
Date: Tue, 14 Aug 2018 13:19:31 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ahcisata0 channel 0: clearing WDCTL_RST failed for drive 15
X-Send-Pr-Version: 3.95

>Number:         53524
>Category:       kern
>Synopsis:       ahcisata0 channel 0: clearing WDCTL_RST failed for drive 15
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    jdolecek
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 14 11:20:00 +0000 2018
>Closed-Date:    Tue Nov 20 18:52:00 +0000 2018
>Last-Modified:  Thu Nov 22 01:15:00 +0000 2018
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.24
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD night-owl.duskware.de 8.99.24 NetBSD 8.99.24 (NIGHT-OWL) #613: Sat Aug 11 18:04:30 CEST 2018 martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:

I have a new Ryzen machine with ASUS Prime A320M-K mainboard.
Both -current and 8.0 fail to recognize any sata drives.

Here is full dmesg with ahcisata debugging enabled:

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

[   1.0000000] NetBSD 8.99.24 (GENERIC) #2: Tue Aug 14 12:49:22 CEST 2018
[   1.0000000] 	martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/GENERIC
[   1.0000000] total memory = 8127 MB
[   1.0000000] avail memory = 7868 MB
[   1.0000000] cpu_rng: RDSEED
[   1.0000000] running cgd selftest aes-xts-256 aes-xts-512 done
[   1.0000030] mainbus0 (root)
[   1.0000030] ACPI: RSDP 0x00000000000F05B0 000024 (v02 ALASKA)
[   1.0000030] ACPI: XSDT 0x00000000D699E098 0000A4 (v01 ALASKA A M I    01072009 AMI  00010013)
[   1.0000030] ACPI: FACP 0x00000000D69A8930 000114 (v06 ALASKA A M I    01072009 AMI  00010013)
[   1.0000030] Firmware Warning (ACPI): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20180427/tbfadt-693)
[   1.0000030] ACPI: DSDT 0x00000000D699E1D0 00A760 (v02 ALASKA A M I    01072009 INTL 20120913)
[   1.0000030] ACPI: FACS 0x00000000DAE53E00 000040
[   1.0000030] ACPI: APIC 0x00000000D69A8A48 0000DE (v03 ALASKA A M I    01072009 AMI  00010013)
[   1.0000030] ACPI: FPDT 0x00000000D69A8B28 000044 (v01 ALASKA A M I    01072009 AMI  00010013)
[   1.0000030] ACPI: FIDT 0x00000000D69A8B70 00009C (v01 ALASKA A M I    01072009 AMI  00010013)
[   1.0000030] ACPI: SSDT 0x00000000D69B6378 001A41 (v01 AMD    AmdTable 00000001 INTL 20120913)
[   1.0000030] ACPI: SSDT 0x00000000D69A8C68 008C98 (v02 AMD    AMD ALIB 00000002 MSFT 04000000)
[   1.0000030] ACPI: SSDT 0x00000000D69B1900 00119C (v01 AMD    AMD CPU  00000001 AMD  00000001)
[   1.0000030] ACPI: CRAT 0x00000000D69B2AA0 000850 (v01 AMD    AMD CRAT 00000001 AMD  00000001)
[   1.0000030] ACPI: CDIT 0x00000000D69B32F0 000029 (v01 AMD    AMD CDIT 00000001 AMD  00000001)
[   1.0000030] ACPI: SSDT 0x00000000D69B3320 002DA8 (v01 AMD    AMD AOD  00000001 INTL 20120913)
[   1.0000030] ACPI: MCFG 0x00000000D69B60C8 00003C (v01 ALASKA A M I    01072009 MSFT 00010013)
[   1.0000030] ACPI: HPET 0x00000000D69B6108 000038 (v01 ALASKA A M I    01072009 AMI  00000005)
[   1.0000030] ACPI: SSDT 0x00000000D69B6140 000024 (v01 AMDFCH FCHZP    00001000 INTL 20120913)
[   1.0000030] ACPI: UEFI 0x00000000D69B6168 000042 (v01                 00000000      00000000)
[   1.0000030] ACPI: IVRS 0x00000000D69B61B0 0000D0 (v02 AMD    AMD IVRS 00000001 AMD  00000000)
[   1.0000030] ACPI: SSDT 0x00000000D69B6280 0000F8 (v01 AMD    AMD PT   00001000 INTL 20120913)
[   1.0000030] ACPI: 7 ACPI AML tables successfully acquired and loaded
[   1.0000030] ioapic0 at mainbus0 apid 9
[   1.0000030] ioapic1 at mainbus0 apid 10
[   1.0000030] cpu0 at mainbus0 apid 0
[   1.0000030] cpu0: AMD Ryzen 5 1400 Quad-Core Processor           , id 0x800f11
[   1.0000030] cpu0: package 0, core 0, smt 0
[   1.0000030] cpu0: SVM disabled by the BIOS
[   1.0000030] cpu1 at mainbus0 apid 1
[   1.0000030] cpu1: AMD Ryzen 5 1400 Quad-Core Processor           , id 0x800f11
[   1.0000030] cpu1: package 0, core 0, smt 1
[   1.0000030] cpu2 at mainbus0 apid 2
[   1.0000030] cpu2: AMD Ryzen 5 1400 Quad-Core Processor           , id 0x800f11
[   1.0000030] cpu2: package 0, core 1, smt 0
[   1.0000030] cpu3 at mainbus0 apid 3
[   1.0000030] cpu3: AMD Ryzen 5 1400 Quad-Core Processor           , id 0x800f11
[   1.0000030] cpu3: package 0, core 1, smt 1
[   1.0000030] cpu4 at mainbus0 apid 8
[   1.0000030] cpu4: AMD Ryzen 5 1400 Quad-Core Processor           , id 0x800f11
[   1.0000030] cpu4: package 0, core 4, smt 0
[   1.0000030] cpu5 at mainbus0 apid 9
[   1.0000030] cpu5: AMD Ryzen 5 1400 Quad-Core Processor           , id 0x800f11
[   1.0000030] cpu5: package 0, core 4, smt 1
[   1.0000030] cpu6 at mainbus0 apid 10
[   1.0000030] cpu6: AMD Ryzen 5 1400 Quad-Core Processor           , id 0x800f11
[   1.0000030] cpu6: package 0, core 5, smt 0
[   1.0000030] cpu7 at mainbus0 apid 11
[   1.0000030] cpu7: AMD Ryzen 5 1400 Quad-Core Processor           , id 0x800f11
[   1.0000030] cpu7: package 0, core 5, smt 1
[   1.0000030] acpi0 at mainbus0: Intel ACPICA 20180427
[   1.0000030] acpi0: fixed power button present
[   1.0299607] hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
[   1.1195062] AMDN (PNP0C01) at acpi0 not configured
[   1.1195062] UMEM (PNP0C02) at acpi0 not configured
[   1.1195062] APSP (PNP0C02) at acpi0 not configured
[   1.1195062] attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43 irq 0
[   1.1195062] pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
[   1.1195062] spkr0 at pcppi1: PC Speaker
[   1.1195062] wsbell at spkr0 not configured
[   1.1195062] midi0 at pcppi1: PC speaker
[   1.1195062] sysbeep0 at pcppi1
[   1.1195062] SIO1 (PNP0C02) at acpi0 not configured
[   1.1195062] UAR1 (PNP0501) at acpi0 not configured
[   1.1195062] S900 (PNP0C02) at acpi0 not configured
[   1.1195062] acpibut0 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
[   1.1195062] GPIO (AMDI0030) at acpi0 not configured
[   1.1195062] AWR0 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR0 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR1 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR2 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR3 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR4 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR5 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR6 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR7 (PNP0C02) at acpi0 not configured
[   1.1195062] AWR1 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR8 (PNP0C02) at acpi0 not configured
[   1.1195062] ABR9 (PNP0C02) at acpi0 not configured
[   1.1195062] ABRA (PNP0C02) at acpi0 not configured
[   1.1195062] ABRB (PNP0C02) at acpi0 not configured
[   1.1195062] ABRC (PNP0C02) at acpi0 not configured
[   1.1195062] ABRD (PNP0C02) at acpi0 not configured
[   1.1195062] ABRE (PNP0C02) at acpi0 not configured
[   1.1195062] ABRF (PNP0C02) at acpi0 not configured
[   1.1195062] PTIO (AMDIF030) at acpi0 not configured
[   1.1195062] acpiwmi0 at acpi0 (AMW0, PNP0C14-ASUSWMI): ACPI WMI Interface
[   1.1195062] wmieeepc0 at acpiwmi0: Asus Eee PC WMI mappings
[   1.1195062] acpiwmi1 at acpi0 (AOD, PNP0C14-AOD): ACPI WMI Interface
[   1.1195062] acpiwmibus at acpiwmi1 not configured
[   1.1195062] attimer1: attached to pcppi1
[   1.1195062] pci0 at mainbus0 bus 0: configuration mode 1
[   1.1195062] amdsmn0 at pci0 dev 0 function 0: AMD Family 17h System Management Network
[   1.1195062] amdzentemp0 at amdsmn0: AMD CPU Temperature Sensors (Family17h)
[   1.1195062] vendor 1022 product 1451 (IOMMU system) at pci0 dev 0 function 2 not configured
[   1.1195062] pchb0 at pci0 dev 1 function 0: vendor 1022 product 1452 (rev. 0x00)
[   1.1195062] ppb0 at pci0 dev 1 function 3: vendor 1022 product 1453 (rev. 0x00)
[   1.1195062] ppb0: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x4 @ 8.0GT/s
[   1.1195062] pci1 at ppb0 bus 1
[   1.1195062] xhci0 at pci1 dev 0 function 0: vendor 1022 product 43bc (rev. 0x02)
[   1.1195062] xhci0: interrupting at msi0 vec 0
[   1.1195062] xhci0: xHCI version 1.10 not known to be supported
[   1.1195062] usb0 at xhci0: USB revision 3.1
[   1.1195062] usb1 at xhci0: USB revision 2.0
[   1.1195062] ahcisata0 at pci1 dev 0 function 1: vendor 1022 product 43b8 (rev. 0x02)
[   1.1195062] ahcisata0: interrupting at ioapic1 pin 9
[   1.1195062] ahcisata0: SATA mode
[   1.1195062] ahcisata0: AHCI revision 1.31, 8 ports, 32 slots, CAP 0xef36ff27<SXS,PSC,SSC,PMD,SPM,SAM,ISS=0x3=Gen3,SCLO,SAL,SALP,SSS,SSNTF,SNCQ,S64A>
[   1.1195062] active ports 0x33
[   1.1195062] port 0 cmdh 0xffff8080ada19000 (0x10eabc000) rfis 0xffff8080ada1b000 (0x10eabe000)
[   1.1195062] port 0/0 tbl 0xffff8080ada1c000 (0x10eabf000)
[   1.1195062] port 0/1 tbl 0xffff8080ada1c200 (0x10eabf200)
[   1.1195062] port 0/2 tbl 0xffff8080ada1c400 (0x10eabf400)
[   1.1195062] port 0/3 tbl 0xffff8080ada1c600 (0x10eabf600)
[   1.1195062] port 0/4 tbl 0xffff8080ada1c800 (0x10eabf800)
[   1.1195062] port 0/5 tbl 0xffff8080ada1ca00 (0x10eabfa00)
[   1.1195062] port 0/6 tbl 0xffff8080ada1cc00 (0x10eabfc00)
[   1.1195062] port 0/7 tbl 0xffff8080ada1ce00 (0x10eabfe00)
[   1.1195062] port 0/8 tbl 0xffff8080ada1d000 (0x10eac0000)
[   1.1195062] port 0/9 tbl 0xffff8080ada1d200 (0x10eac0200)
[   1.1195062] port 0/10 tbl 0xffff8080ada1d400 (0x10eac0400)
[   1.1195062] port 0/11 tbl 0xffff8080ada1d600 (0x10eac0600)
[   1.1195062] port 0/12 tbl 0xffff8080ada1d800 (0x10eac0800)
[   1.1195062] port 0/13 tbl 0xffff8080ada1da00 (0x10eac0a00)
[   1.1195062] port 0/14 tbl 0xffff8080ada1dc00 (0x10eac0c00)
[   1.1195062] port 0/15 tbl 0xffff8080ada1de00 (0x10eac0e00)
[   1.1195062] port 0/16 tbl 0xffff8080ada1e000 (0x10eac1000)
[   1.1195062] port 0/17 tbl 0xffff8080ada1e200 (0x10eac1200)
[   1.1195062] port 0/18 tbl 0xffff8080ada1e400 (0x10eac1400)
[   1.1195062] port 0/19 tbl 0xffff8080ada1e600 (0x10eac1600)
[   1.1195062] port 0/20 tbl 0xffff8080ada1e800 (0x10eac1800)
[   1.1195062] port 0/21 tbl 0xffff8080ada1ea00 (0x10eac1a00)
[   1.1195062] port 0/22 tbl 0xffff8080ada1ec00 (0x10eac1c00)
[   1.1195062] port 0/23 tbl 0xffff8080ada1ee00 (0x10eac1e00)
[   1.1195062] port 0/24 tbl 0xffff8080ada1f000 (0x10eac2000)
[   1.1195062] port 0/25 tbl 0xffff8080ada1f200 (0x10eac2200)
[   1.1195062] port 0/26 tbl 0xffff8080ada1f400 (0x10eac2400)
[   1.1195062] port 0/27 tbl 0xffff8080ada1f600 (0x10eac2600)
[   1.1195062] port 0/28 tbl 0xffff8080ada1f800 (0x10eac2800)
[   1.1195062] port 0/29 tbl 0xffff8080ada1fa00 (0x10eac2a00)
[   1.1195062] port 0/30 tbl 0xffff8080ada1fc00 (0x10eac2c00)
[   1.1195062] port 0/31 tbl 0xffff8080ada1fe00 (0x10eac2e00)
[   1.1195062] atabus0 at ahcisata0 channel 0
[   1.1195062] port 1 cmdh 0xffff8080ada19400 (0x10eabc400) rfis 0xffff8080ada1b100 (0x10eabe100)
[   1.1195062] port 1/0 tbl 0xffff8080ada25000 (0x10ead3000)
[   1.1195062] port 1/1 tbl 0xffff8080ada25200 (0x10ead3200)
[   1.1195062] port 1/2 tbl 0xffff8080ada25400 (0x10ead3400)
[   1.1195062] port 1/3 tbl 0xffff8080ada25600 (0x10ead3600)
[   1.1195062] port 1/4 tbl 0xffff8080ada25800 (0x10ead3800)
[   1.1195062] port 1/5 tbl 0xffff8080ada25a00 (0x10ead3a00)
[   1.1195062] port 1/6 tbl 0xffff8080ada25c00 (0x10ead3c00)
[   1.1195062] port 1/7 tbl 0xffff8080ada25e00 (0x10ead3e00)
[   1.1195062] port 1/8 tbl 0xffff8080ada26000 (0x10ead4000)
[   1.1195062] port 1/9 tbl 0xffff8080ada26200 (0x10ead4200)
[   1.1195062] port 1/10 tbl 0xffff8080ada26400 (0x10ead4400)
[   1.1195062] port 1/11 tbl 0xffff8080ada26600 (0x10ead4600)
[   1.1195062] port 1/12 tbl 0xffff8080ada26800 (0x10ead4800)
[   1.1195062] port 1/13 tbl 0xffff8080ada26a00 (0x10ead4a00)
[   1.1195062] port 1/14 tbl 0xffff8080ada26c00 (0x10ead4c00)
[   1.1195062] port 1/15 tbl 0xffff8080ada26e00 (0x10ead4e00)
[   1.1195062] port 1/16 tbl 0xffff8080ada27000 (0x10ead5000)
[   1.1195062] port 1/17 tbl 0xffff8080ada27200 (0x10ead5200)
[   1.1195062] port 1/18 tbl 0xffff8080ada27400 (0x10ead5400)
[   1.1195062] port 1/19 tbl 0xffff8080ada27600 (0x10ead5600)
[   1.1195062] port 1/20 tbl 0xffff8080ada27800 (0x10ead5800)
[   1.1195062] port 1/21 tbl 0xffff8080ada27a00 (0x10ead5a00)
[   1.1195062] port 1/22 tbl 0xffff8080ada27c00 (0x10ead5c00)
[   1.1195062] port 1/23 tbl 0xffff8080ada27e00 (0x10ead5e00)
[   1.1195062] port 1/24 tbl 0xffff8080ada28000 (0x10ead6000)
[   1.1195062] port 1/25 tbl 0xffff8080ada28200 (0x10ead6200)
[   1.1195062] port 1/26 tbl 0xffff8080ada28400 (0x10ead6400)
[   1.1195062] port 1/27 tbl 0xffff8080ada28600 (0x10ead6600)
[   1.1195062] port 1/28 tbl 0xffff8080ada28800 (0x10ead6800)
[   1.1195062] port 1/29 tbl 0xffff8080ada28a00 (0x10ead6a00)
[   1.1195062] port 1/30 tbl 0xffff8080ada28c00 (0x10ead6c00)
[   1.1195062] port 1/31 tbl 0xffff8080ada28e00 (0x10ead6e00)
[   1.1195062] atabus1 at ahcisata0 channel 1
[   1.1195062] port 4 cmdh 0xffff8080ada19800 (0x10eabc800) rfis 0xffff8080ada1b200 (0x10eabe200)
[   1.1195062] port 4/0 tbl 0xffff8080ada2e000 (0x10eae5000)
[   1.1195062] port 4/1 tbl 0xffff8080ada2e200 (0x10eae5200)
[   1.1195062] port 4/2 tbl 0xffff8080ada2e400 (0x10eae5400)
[   1.1195062] port 4/3 tbl 0xffff8080ada2e600 (0x10eae5600)
[   1.1195062] port 4/4 tbl 0xffff8080ada2e800 (0x10eae5800)
[   1.1195062] port 4/5 tbl 0xffff8080ada2ea00 (0x10eae5a00)
[   1.1195062] port 4/6 tbl 0xffff8080ada2ec00 (0x10eae5c00)
[   1.1195062] port 4/7 tbl 0xffff8080ada2ee00 (0x10eae5e00)
[   1.1195062] port 4/8 tbl 0xffff8080ada2f000 (0x10eae6000)
[   1.1195062] port 4/9 tbl 0xffff8080ada2f200 (0x10eae6200)
[   1.1195062] port 4/10 tbl 0xffff8080ada2f400 (0x10eae6400)
[   1.1195062] port 4/11 tbl 0xffff8080ada2f600 (0x10eae6600)
[   1.1195062] port 4/12 tbl 0xffff8080ada2f800 (0x10eae6800)
[   1.1195062] port 4/13 tbl 0xffff8080ada2fa00 (0x10eae6a00)
[   1.1195062] port 4/14 tbl 0xffff8080ada2fc00 (0x10eae6c00)
[   1.1195062] port 4/15 tbl 0xffff8080ada2fe00 (0x10eae6e00)
[   1.1195062] port 4/16 tbl 0xffff8080ada30000 (0x10eae7000)
[   1.1195062] port 4/17 tbl 0xffff8080ada30200 (0x10eae7200)
[   1.1195062] port 4/18 tbl 0xffff8080ada30400 (0x10eae7400)
[   1.1195062] port 4/19 tbl 0xffff8080ada30600 (0x10eae7600)
[   1.1195062] port 4/20 tbl 0xffff8080ada30800 (0x10eae7800)
[   1.1195062] port 4/21 tbl 0xffff8080ada30a00 (0x10eae7a00)
[   1.1195062] port 4/22 tbl 0xffff8080ada30c00 (0x10eae7c00)
[   1.1195062] port 4/23 tbl 0xffff8080ada30e00 (0x10eae7e00)
[   1.1195062] port 4/24 tbl 0xffff8080ada31000 (0x10eae8000)
[   1.1195062] port 4/25 tbl 0xffff8080ada31200 (0x10eae8200)
[   1.1195062] port 4/26 tbl 0xffff8080ada31400 (0x10eae8400)
[   1.1195062] port 4/27 tbl 0xffff8080ada31600 (0x10eae8600)
[   1.1195062] port 4/28 tbl 0xffff8080ada31800 (0x10eae8800)
[   1.1195062] port 4/29 tbl 0xffff8080ada31a00 (0x10eae8a00)
[   1.1195062] port 4/30 tbl 0xffff8080ada31c00 (0x10eae8c00)
[   1.1195062] port 4/31 tbl 0xffff8080ada31e00 (0x10eae8e00)
[   1.1195062] atabus2 at ahcisata0 channel 4
[   1.1195062] port 5 cmdh 0xffff8080ada19c00 (0x10eabcc00) rfis 0xffff8080ada1b300 (0x10eabe300)
[   1.1195062] port 5/0 tbl 0xffff8080ada37000 (0x10eaf9000)
[   1.1195062] port 5/1 tbl 0xffff8080ada37200 (0x10eaf9200)
[   1.1195062] port 5/2 tbl 0xffff8080ada37400 (0x10eaf9400)
[   1.1195062] port 5/3 tbl 0xffff8080ada37600 (0x10eaf9600)
[   1.1195062] port 5/4 tbl 0xffff8080ada37800 (0x10eaf9800)
[   1.1195062] port 5/5 tbl 0xffff8080ada37a00 (0x10eaf9a00)
[   1.1195062] port 5/6 tbl 0xffff8080ada37c00 (0x10eaf9c00)
[   1.1195062] port 5/7 tbl 0xffff8080ada37e00 (0x10eaf9e00)
[   1.1195062] port 5/8 tbl 0xffff8080ada38000 (0x10eafa000)
[   1.1195062] port 5/9 tbl 0xffff8080ada38200 (0x10eafa200)
[   1.1195062] port 5/10 tbl 0xffff8080ada38400 (0x10eafa400)
[   1.1195062] port 5/11 tbl 0xffff8080ada38600 (0x10eafa600)
[   1.1195062] port 5/12 tbl 0xffff8080ada38800 (0x10eafa800)
[   1.1195062] port 5/13 tbl 0xffff8080ada38a00 (0x10eafaa00)
[   1.1195062] port 5/14 tbl 0xffff8080ada38c00 (0x10eafac00)
[   1.1195062] port 5/15 tbl 0xffff8080ada38e00 (0x10eafae00)
[   1.1195062] port 5/16 tbl 0xffff8080ada39000 (0x10eafb000)
[   1.1195062] port 5/17 tbl 0xffff8080ada39200 (0x10eafb200)
[   1.1195062] port 5/18 tbl 0xffff8080ada39400 (0x10eafb400)
[   1.1195062] port 5/19 tbl 0xffff8080ada39600 (0x10eafb600)
[   1.1195062] port 5/20 tbl 0xffff8080ada39800 (0x10eafb800)
[   1.1195062] port 5/21 tbl 0xffff8080ada39a00 (0x10eafba00)
[   1.1195062] port 5/22 tbl 0xffff8080ada39c00 (0x10eafbc00)
[   1.1195062] port 5/23 tbl 0xffff8080ada39e00 (0x10eafbe00)
[   1.1195062] port 5/24 tbl 0xffff8080ada3a000 (0x10eafc000)
[   1.1195062] port 5/25 tbl 0xffff8080ada3a200 (0x10eafc200)
[   1.1195062] port 5/26 tbl 0xffff8080ada3a400 (0x10eafc400)
[   1.1195062] port 5/27 tbl 0xffff8080ada3a600 (0x10eafc600)
[   1.1195062] port 5/28 tbl 0xffff8080ada3a800 (0x10eafc800)
[   1.1195062] port 5/29 tbl 0xffff8080ada3aa00 (0x10eafca00)
[   1.1195062] port 5/30 tbl 0xffff8080ada3ac00 (0x10eafcc00)
[   1.1195062] port 5/31 tbl 0xffff8080ada3ae00 (0x10eafce00)
[   1.1195062] atabus3 at ahcisata0 channel 5
[   1.1195062] ppb1 at pci1 dev 0 function 2: vendor 1022 product 43b3 (rev. 0x02)
[   1.1195062] ppb1: PCI Express capability version 2 <Upstream Port of PCI-E Switch>
[   1.1195062] pci2 at ppb1 bus 2
[   1.1195062] ppb2 at pci2 dev 4 function 0: vendor 1022 product 43b4 (rev. 0x02)
[   1.1195062] ppb2: PCI Express capability version 2 <Downstream Port of PCI-E Switch> x1 @ 5.0GT/s
[   1.1195062] pci3 at ppb2 bus 3
[   1.1195062] ppb3 at pci2 dev 5 function 0: vendor 1022 product 43b4 (rev. 0x02)
[   1.1195062] ppb3: PCI Express capability version 2 <Downstream Port of PCI-E Switch> x1 @ 5.0GT/s
[   1.1195062] pci4 at ppb3 bus 4
[   1.1195062] ppb4 at pci2 dev 6 function 0: vendor 1022 product 43b4 (rev. 0x02)
[   1.1195062] ppb4: PCI Express capability version 2 <Downstream Port of PCI-E Switch> x1 @ 5.0GT/s
[   1.1195062] ppb4: link is x1 @ 2.5GT/s
[   1.1195062] pci5 at ppb4 bus 5
[   1.1195062] re0 at pci5 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x15)
[   1.1195062] re0: interrupting at msi1 vec 0
[   1.1195062] re0: Ethernet address 18:31:bf:6b:a7:ed
[   1.1195062] rgephy0 at re0 phy 7: RTL8251 1000BASE-T media interface, rev. 0
[   1.1195062] rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
[   1.1195062] ppb5 at pci2 dev 7 function 0: vendor 1022 product 43b4 (rev. 0x02)
[   1.1195062] ppb5: PCI Express capability version 2 <Downstream Port of PCI-E Switch> x1 @ 5.0GT/s
[   1.1195062] pci6 at ppb5 bus 6
[   1.1195062] ppb6 at pci6 dev 0 function 0: vendor 1b21 product 1182 (rev. 0x00)
[   1.1195062] ppb6: PCI Express capability version 2 <Upstream Port of PCI-E Switch>
[   1.1195062] pci7 at ppb6 bus 7
[   1.1195062] ppb7 at pci7 dev 3 function 0: vendor 1b21 product 1182 (rev. 0x00)
[   1.1195062] ppb7: PCI Express capability version 2 <Downstream Port of PCI-E Switch> x1 @ 5.0GT/s
[   1.1195062] ppb7: link is x1 @ 2.5GT/s
[   1.1195062] pci8 at ppb7 bus 8
[   1.1195062] re1 at pci8 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x07)
[   1.1195062] re1: interrupting at msi2 vec 0
[   1.1195062] re1: Ethernet address 00:13:3b:2f:6d:da
[   1.1195062] rgephy1 at re1 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 5
[   1.1195062] rgephy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
[   1.1195062] ppb8 at pci7 dev 7 function 0: vendor 1b21 product 1182 (rev. 0x00)
[   1.1195062] ppb8: PCI Express capability version 2 <Downstream Port of PCI-E Switch> x1 @ 5.0GT/s
[   1.1195062] ppb8: link is x1 @ 2.5GT/s
[   1.1195062] pci9 at ppb8 bus 9
[   1.1195062] re2 at pci9 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x07)
[   1.1195062] re2: interrupting at msi3 vec 0
[   1.1195062] re2: Ethernet address 00:13:3b:2f:6d:db
[   1.1195062] rgephy2 at re2 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 5
[   1.1195062] rgephy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
[   1.1195062] pchb1 at pci0 dev 2 function 0: vendor 1022 product 1452 (rev. 0x00)
[   1.1195062] pchb2 at pci0 dev 3 function 0: vendor 1022 product 1452 (rev. 0x00)
[   1.1195062] ppb9 at pci0 dev 3 function 1: vendor 1022 product 1453 (rev. 0x00)
[   1.1195062] ppb9: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x16 @ 8.0GT/s
[   1.1195062] ppb9: link is x8 @ 5.0GT/s
[   1.1195062] pci10 at ppb9 bus 10
[   1.1195062] nouveau0 at pci10 dev 0 function 0: vendor 10de product 128b (rev. 0xa1)
[   1.1195062] drm kern info: nouveau  [  DEVICE][nouveau0] BOOT0  : 0xb060b0b1
[   1.1195062] drm kern info: nouveau  [  DEVICE][nouveau0] Chipset: GK208B (NV106)
[   1.1195062] drm kern info: nouveau  [  DEVICE][nouveau0] Family : NVE0
[   1.1195062] drm kern info: nouveau  [   VBIOS][nouveau0] checking PRAMIN for image...
[   1.1195062] drm kern info: nouveau  [   VBIOS][nouveau0] ... signature not found
[   1.1195062] drm kern info: nouveau  [   VBIOS][nouveau0] checking PROM for image...
[   1.1195062] drm kern info: nouveau  [   VBIOS][nouveau0] ... appears to be valid
[   1.1195062] drm kern info: nouveau  [   VBIOS][nouveau0] using image from PROM
[   1.1195062] drm kern info: nouveau  [   VBIOS][nouveau0] BIT signature found
[   1.1195062] drm kern info: nouveau  [   VBIOS][nouveau0] version 80.28.a6.00.5f
[   1.1195062] nouveau0: interrupting at ioapic1 pin 30 (nouveau)
[   1.1195062] drm kern info: nouveau  [     PFB][nouveau0] RAM type: DDR3
[   1.1195062] drm kern info: nouveau  [     PFB][nouveau0] RAM size: 2048 MiB
[   1.1195062] drm kern info: nouveau  [     PFB][nouveau0]    ZCOMP: 0 tags
[   1.1195062] drm kern info: nouveau  [    VOLT][nouveau0] GPU voltage: 912500uv
[   1.1195062] drm kern info: nouveau  [  PTHERM][nouveau0] FAN control: toggle
[   1.1195062] drm kern info: nouveau  [  PTHERM][nouveau0] fan management: automatic
[   1.1195062] drm kern info: nouveau  [  PTHERM][nouveau0] internal sensor: yes
[   1.1195062] drm kern info: nouveau  [     CLK][nouveau0] 07: core 405 MHz memory 810 MHz 
[   1.1195062] drm kern info: nouveau  [     CLK][nouveau0] 0f: core 653-954 MHz memory 1600 MHz 
[   1.1195062] drm kern info: nouveau  [     CLK][nouveau0] --: core 405 MHz memory 810 MHz 
[   1.1195062] Zone  kernel: Available graphics memory: 2583688 kiB
[   1.1195062] Zone   dma32: Available graphics memory: 2097152 kiB
[   1.1195062] drm kern info: nouveau  [     DRM] VRAM: 2048 MiB
[   1.1195062] drm kern info: nouveau  [     DRM] GART: 1048576 MiB
[   1.1195062] drm kern info: nouveau  [     DRM] TMDS table version 2.0
[   1.1195062] drm kern info: nouveau  [     DRM] DCB version 4.0
[   1.1195062] drm kern info: nouveau  [     DRM] DCB outp 00: 01000f02 00020030
[   1.1195062] drm kern info: nouveau  [     DRM] DCB outp 01: 02011f62 00020010
[   1.1195062] drm kern info: nouveau  [     DRM] DCB outp 02: 02022f10 00000000
[   1.1195062] drm kern info: nouveau  [     DRM] DCB conn 00: 00001031
[   1.1195062] drm kern info: nouveau  [     DRM] DCB conn 01: 00002161
[   1.1195062] drm kern info: nouveau  [     DRM] DCB conn 02: 00000200
[   1.1195062] drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
[   1.1195062] drm: Driver supports precise vblank timestamp query.
[   1.1195062] drm kern info: nouveau  [     DRM] MM: using COPY for buffer copies
[   1.1195062] nouveau0: info: No connectors reported connected with modes
[   1.1195062] drm: Cannot find any crtc or sizes - going 1024x768
[   1.1195062] nouveaufb0 at nouveau0
[   1.1195062] nouveau0: info: registered panic notifier
[   1.1195062] wsdisplay0 at nouveaufb0 kbdmux 1
[   1.1195062] hdaudio0 at pci10 dev 0 function 1: HD Audio Controller
[   1.1195062] hdaudio0: interrupting at msi4 vec 0
[   1.1195062] hdafg0 at hdaudio0: vendor 10de product 0051
[   1.1195062] hdafg0: DP00 8ch: Digital Out [Jack]
[   1.1195062] hdafg0: DP01 8ch: Digital Out [Jack]
[   1.1195062] hdafg0: 8ch/0ch 48000Hz PCM16*
[   1.1195062] pchb3 at pci0 dev 4 function 0: vendor 1022 product 1452 (rev. 0x00)
[   1.1195062] pchb4 at pci0 dev 7 function 0: vendor 1022 product 1452 (rev. 0x00)
[   1.1195062] ppb10 at pci0 dev 7 function 1: vendor 1022 product 1454 (rev. 0x00)
[   1.1195062] ppb10: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x16 @ 8.0GT/s
[   1.1195062] pci11 at ppb10 bus 11
[   1.1195062] vendor 1022 product 145a (non-essential instrumentation, subclass 0x00) at pci11 dev 0 function 0 not configured
[   1.1195062] vendor 1022 product 1456 (miscellaneous crypto) at pci11 dev 0 function 2 not configured
[   1.1195062] xhci1 at pci11 dev 0 function 3: vendor 1022 product 145c (rev. 0x00)
[   1.1195062] xhci1: interrupting at msi5 vec 0
[   1.1195062] usb2 at xhci1: USB revision 3.0
[   1.1195062] usb3 at xhci1: USB revision 2.0
[   1.1195062] pchb5 at pci0 dev 8 function 0: vendor 1022 product 1452 (rev. 0x00)
[   1.1195062] ppb11 at pci0 dev 8 function 1: vendor 1022 product 1454 (rev. 0x00)
[   1.1195062] ppb11: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x16 @ 8.0GT/s
[   1.1195062] pci12 at ppb11 bus 12
[   1.1195062] vendor 1022 product 1455 (non-essential instrumentation, subclass 0x00) at pci12 dev 0 function 0 not configured
[   1.1195062] ahcisata1 at pci12 dev 0 function 2: vendor 1022 product 7901 (rev. 0x51)
[   1.1195062] ahcisata1: interrupting at ioapic1 pin 18
[   1.1195062] ahcisata1: SATA mode
[   1.1195062] ahcisata1: AHCI revision 1.31, 1 port, 32 slots, CAP 0xf737ff00<PSC,SSC,PMD,FBSS,SPM,SAM,ISS=0x3=Gen3,SCLO,SAL,SALP,SMPS,SSNTF,SNCQ,S64A>
[   1.1195062] active ports 0x1
[   1.1195062] port 0 cmdh 0xffff8080b0fc6000 (0x10f05c000) rfis 0xffff8080b0fc6400 (0x10f05c400)
[   1.1195062] port 0/0 tbl 0xffff8080b0fc7000 (0x10f07a000)
[   1.1195062] port 0/1 tbl 0xffff8080b0fc7200 (0x10f07a200)
[   1.1195062] port 0/2 tbl 0xffff8080b0fc7400 (0x10f07a400)
[   1.1195062] port 0/3 tbl 0xffff8080b0fc7600 (0x10f07a600)
[   1.1195062] port 0/4 tbl 0xffff8080b0fc7800 (0x10f07a800)
[   1.1195062] port 0/5 tbl 0xffff8080b0fc7a00 (0x10f07aa00)
[   1.1195062] port 0/6 tbl 0xffff8080b0fc7c00 (0x10f07ac00)
[   1.1195062] port 0/7 tbl 0xffff8080b0fc7e00 (0x10f07ae00)
[   1.1195062] port 0/8 tbl 0xffff8080b0fc8000 (0x10f07b000)
[   1.1195062] port 0/9 tbl 0xffff8080b0fc8200 (0x10f07b200)
[   1.1195062] port 0/10 tbl 0xffff8080b0fc8400 (0x10f07b400)
[   1.1195062] port 0/11 tbl 0xffff8080b0fc8600 (0x10f07b600)
[   1.1195062] port 0/12 tbl 0xffff8080b0fc8800 (0x10f07b800)
[   1.1195062] port 0/13 tbl 0xffff8080b0fc8a00 (0x10f07ba00)
[   1.1195062] port 0/14 tbl 0xffff8080b0fc8c00 (0x10f07bc00)
[   1.1195062] port 0/15 tbl 0xffff8080b0fc8e00 (0x10f07be00)
[   1.1195062] port 0/16 tbl 0xffff8080b0fc9000 (0x10f07c000)
[   1.1195062] port 0/17 tbl 0xffff8080b0fc9200 (0x10f07c200)
[   1.1195062] port 0/18 tbl 0xffff8080b0fc9400 (0x10f07c400)
[   1.1195062] port 0/19 tbl 0xffff8080b0fc9600 (0x10f07c600)
[   1.1195062] port 0/20 tbl 0xffff8080b0fc9800 (0x10f07c800)
[   1.1195062] port 0/21 tbl 0xffff8080b0fc9a00 (0x10f07ca00)
[   1.1195062] port 0/22 tbl 0xffff8080b0fc9c00 (0x10f07cc00)
[   1.1195062] port 0/23 tbl 0xffff8080b0fc9e00 (0x10f07ce00)
[   1.1195062] port 0/24 tbl 0xffff8080b0fca000 (0x10f07d000)
[   1.1195062] port 0/25 tbl 0xffff8080b0fca200 (0x10f07d200)
[   1.1195062] port 0/26 tbl 0xffff8080b0fca400 (0x10f07d400)
[   1.1195062] port 0/27 tbl 0xffff8080b0fca600 (0x10f07d600)
[   1.1195062] port 0/28 tbl 0xffff8080b0fca800 (0x10f07d800)
[   1.1195062] port 0/29 tbl 0xffff8080b0fcaa00 (0x10f07da00)
[   1.1195062] port 0/30 tbl 0xffff8080b0fcac00 (0x10f07dc00)
[   1.1195062] port 0/31 tbl 0xffff8080b0fcae00 (0x10f07de00)
[   1.1195062] atabus4 at ahcisata1 channel 0
[   1.1195062] hdaudio1 at pci12 dev 0 function 3: HD Audio Controller
[   1.1195062] hdaudio1: interrupting at msi6 vec 0
[   1.1195062] hdafg1 at hdaudio1: vendor 10ec product 0887
[   1.1195062] hdafg1: DAC00 2ch: Speaker [Jack]
[   1.1195062] hdafg1: DAC01 2ch: HP Out [Jack]
[   1.1195062] hdafg1: DIG02 2ch: SPDIF Out [Built-In]
[   1.1195062] hdafg1: ADC03 2ch: Line In [Jack], Mic In [Jack]
[   1.1195062] hdafg1: ADC04 2ch: Mic In [Jack]
[   1.1195062] hdafg1: 2ch/2ch 32000Hz 44100Hz 48000Hz 88200Hz 96000Hz 192000Hz PCM16 PCM20 PCM24 AC3
[   1.1195062] audio0 at hdafg1: full duplex, playback, capture, mmap, independent
[   1.1195062] hdafg1: Virtual format configured - Format SLINEAR, precision 16, channels 2, frequency 48000
[   1.1195062] hdafg1: Latency: 128 milliseconds
[   1.1195062] spkr1 at audio0: PC Speaker (synthesized)
[   1.1195062] wsbell at spkr1 not configured
[   1.1195062] vendor 1022 product 790b (SMBus serial bus, revision 0x59) at pci0 dev 20 function 0 not configured
[   1.1195062] pcib0 at pci0 dev 20 function 3: vendor 1022 product 790e (rev. 0x51)
[   1.1195062] pchb6 at pci0 dev 24 function 0: vendor 1022 product 1460 (rev. 0x00)
[   1.1195062] pchb7 at pci0 dev 24 function 1: vendor 1022 product 1461 (rev. 0x00)
[   1.1195062] pchb8 at pci0 dev 24 function 2: vendor 1022 product 1462 (rev. 0x00)
[   1.1195062] pchb9 at pci0 dev 24 function 3: vendor 1022 product 1463 (rev. 0x00)
[   1.1195062] pchb10 at pci0 dev 24 function 4: vendor 1022 product 1464 (rev. 0x00)
[   1.1195062] pchb11 at pci0 dev 24 function 5: vendor 1022 product 1465 (rev. 0x00)
[   1.1195062] pchb12 at pci0 dev 24 function 6: vendor 1022 product 1466 (rev. 0x00)
[   1.1195062] pchb13 at pci0 dev 24 function 7: vendor 1022 product 1467 (rev. 0x00)
[   1.1195062] isa0 at pcib0
[   1.1195062] com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
[   1.1195062] com0: console
[   1.1195062] pckbc0 at isa0 port 0x60-0x64
[   1.1195062] acpicpu0 at cpu0: ACPI CPU
[   1.1195062] acpicpu1 at cpu1: ACPI CPU
[   1.1195062] acpicpu2 at cpu2: ACPI CPU
[   1.1195062] acpicpu3 at cpu3: ACPI CPU
[   1.1195062] acpicpu4 at cpu4: ACPI CPU
[   1.1195062] acpicpu5 at cpu5: ACPI CPU
[   1.1195062] acpicpu6 at cpu6: ACPI CPU
[   1.1195062] acpicpu7 at cpu7: ACPI CPU
[   1.9265981] uhub0 at usb0: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 3.00/1.00, addr 0
[   2.0289228] uhub1 at usb1: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 0
[   2.1323318] uhub2 at usb2: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 3.00/1.00, addr 0
[   2.2323821] uhub3 at usb3: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 0
[   2.3324325] ahcisata0 port 0: device present, speed: 6.0Gb/s
[   2.4024677] ahcisata0 port 1: device present, speed: 6.0Gb/s
[   2.5125232] ahcisata0 port 4: device present, speed: 6.0Gb/s
ahcisata0 channel 0: clearing WDCTL_RST failed for drive 15
ahcisata0 channel 1: clearing WDCTL_RST failed for drive 15
ahcisata0 channel 4: clearing WDCTL_RST failed for drive 15
[   4.0132780] uark0 at uhub3 port 3
[   4.0439207] uark0: ArkMicroChips (0x6547) USB-UART Controller (0x232), rev 1.10/0.01, addr 1
[   4.1543024] umass0 at uhub1 port 9 configuration 1 interface 0
[   4.2233835] umass0: JetFlash (0xc76) TS256MJF2A (0x05), rev 2.00/1.00, addr 1
[   4.3034236] ucom0 at uark0 portno 0
[   4.3534489] scsibus0 at umass0: 2 targets, 1 lun per target
[   4.4134789] sd0 at scsibus0 target 0 lun 0: <JetFlash, TS256MJF2A, 1.00> disk fixed
[   4.5235347] sd0: fabricating a geometry
[   4.5722305] sd0: 250 MB, 250 cyl, 64 head, 32 sec, 512 bytes/sect x 512000 sectors
[   4.6736100] sd0: fabricating a geometry
[   5.4840176] uplcom0 at uhub3 port 4
[   5.5241069] uplcom0: Prolific Technology Inc. (0x67b) USB-Serial Controller (0x2303), rev 1.10/3.00, addr 2
[   5.6541030] ucom1 at uplcom0
[   5.6941231] WARNING: 3 errors while detecting hardware; check system log.

>How-To-Repeat:
n/a
>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53524: ahcisata0 channel 0: clearing WDCTL_RST failed
Date: Thu, 16 Aug 2018 10:19:03 +0200

 A simple work around is:

 Index: ahcisata_pci.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/ahcisata_pci.c,v
 retrieving revision 1.38
 diff -u -p -r1.38 ahcisata_pci.c
 --- ahcisata_pci.c	13 Oct 2016 17:11:09 -0000	1.38
 +++ ahcisata_pci.c	15 Aug 2018 13:21:10 -0000
 @@ -49,6 +49,7 @@ struct ahci_pci_quirk { 
  };

  static const struct ahci_pci_quirk ahci_pci_quirks[] = {
 +	{ 0x1022, 0x43b8, AHCI_QUIRK_SKIP_RESET },
  	{ PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP65_SATA,
  	    AHCI_PCI_QUIRK_FORCE | AHCI_QUIRK_BADPMP },
  	{ PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP65_SATA2,


 (of course needs doing the pcidevs dance first before it could go in).

 I also tried AHCI_QUIRK_BADPMP, but that still gave me a reset failure,
 only this time on drive 0.

 Should I clean this up and commit, or is there some better way?

 Martin

From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53524: ahcisata0 channel 0: clearing WDCTL_RST failed
Date: Mon, 17 Sep 2018 09:23:26 +0100

 I experienced something similar on another Ryzen based system
 (Asus Prime X370-PRO) in:

 http://mail-index.netbsd.org/port-amd64/2018/08/24/msg002744.html

 A working system with 6 SATA disks developed 

 ahcisata0 channel 3: timeout sending FIS        
 autoconfiguration error: ahcisata0 channel 3: clearing WDCTL_RST failed for drive 15                                       

 on all drives after a BIOS update from version 3803 to 4012.

 Martin's suggestion in this PR allows me to boot as before.

 Index: ahcisata_pci.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/ahcisata_pci.c,v
 retrieving revision 1.38
 diff -u -r1.38 ahcisata_pci.c
 --- ahcisata_pci.c      13 Oct 2016 17:11:09 -0000      1.38
 +++ ahcisata_pci.c      17 Sep 2018 08:17:56 -0000
 @@ -49,6 +49,7 @@
  };

  static const struct ahci_pci_quirk ahci_pci_quirks[] = {
 +       { PCI_VENDOR_AMD, 0x43b5, AHCI_QUIRK_SKIP_RESET },
         { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP65_SATA,
             AHCI_PCI_QUIRK_FORCE | AHCI_QUIRK_BADPMP },
         { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP65_SATA2,


 Changing the timeout in

   https://nxr.netbsd.org/xref/src/sys/dev/ic/ahcisata_core.c#820

 from 310 to 620 didn't help. Oddly, after a cold boot, I see no disks
 on ahcisata0. (I always see the M.2 disk on ahcisata1 - AMD product 7901.)
 On (warm) reboot, some of the disks manage to reset.

Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-By: jdolecek@NetBSD.org
Responsible-Changed-When: Wed, 17 Oct 2018 07:35:25 +0000
Responsible-Changed-Why:
I'm collecting WDCTL_RST related PRs with intent to fix this.


State-Changed-From-To: open->feedback
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Sun, 04 Nov 2018 09:01:43 +0000
State-Changed-Why:
Can try a patch and report the result?
http://www.netbsd.org/~jdolecek/ahci_probe_retry0.diff


State-Changed-From-To: feedback->open
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Sun, 04 Nov 2018 14:04:50 +0000
State-Changed-Why:
Don't worry, the patch doesn't fix htis.


From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53524 CVS commit: src/sys/dev/ic
Date: Mon, 19 Nov 2018 21:52:24 +0000

 Module Name:	src
 Committed By:	jdolecek
 Date:		Mon Nov 19 21:52:24 UTC 2018

 Modified Files:
 	src/sys/dev/ic: ahcisata_core.c

 Log Message:
 if softreset during PMP detection fails, disable PMP, reset port and continue
 with sig detected after the initial COMRESET

 this does not yet fix the infamous 'clearing WDCTL_RST failed', but at least
 now the disk is detected and usable when it happens

 tested on AMD system with ASUS Prime A320M-K, similar to one from PR kern/53524


 To generate a diff of this commit:
 cvs rdiff -u -r1.67 -r1.68 src/sys/dev/ic/ahcisata_core.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: jdolecek@NetBSD.org
State-Changed-When: Mon, 19 Nov 2018 22:06:13 +0000
State-Changed-Why:
Can you please try if rev. 1.69 of dev/ic/ahcisata_core.c fixes this?


From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53524 CVS commit: src/sys/dev/ic
Date: Mon, 19 Nov 2018 22:05:23 +0000

 Module Name:	src
 Committed By:	jdolecek
 Date:		Mon Nov 19 22:05:23 UTC 2018

 Modified Files:
 	src/sys/dev/ic: ahcisata_core.c

 Log Message:
 during SRST (softreset), make a short delay between the RST set and
 clear; SATA specifies minimum 5 usec for the toggle period, and
 some controllers (seems usually on AMD motherboards) actually require it

 this fixes the 'clearing WDCTL_RST failed' error in PR kern/53307
 and PR kern/53524

 confirmed working on a ASUS Prime A320M-K mainboard by me, and by Patrick
 Welche on another Ryzen system

 XXX pullup-8


 To generate a diff of this commit:
 cvs rdiff -u -r1.68 -r1.69 src/sys/dev/ic/ahcisata_core.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53524 CVS commit: src/sys/dev/ic
Date: Tue, 20 Nov 2018 08:47:55 +0000

 Module Name:	src
 Committed By:	jdolecek
 Date:		Tue Nov 20 08:47:55 UTC 2018

 Modified Files:
 	src/sys/dev/ic: ahcisata_core.c

 Log Message:
 also set WDCTL_4BIT for the softreset, seems this one is actually also
 required to fully resolve the problem

 PR kern/48214 PR kern/53307 PR kern/53524


 To generate a diff of this commit:
 cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/ahcisata_core.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: jdolecek@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
	martin@NetBSD.org
Subject: Re: kern/53524 (ahcisata0 channel 0: clearing WDCTL_RST failed for
 drive 15)
Date: Tue, 20 Nov 2018 17:54:15 +0100

 On Mon, Nov 19, 2018 at 10:06:14PM +0000, jdolecek@NetBSD.org wrote:
 > Can you please try if rev. 1.69 of dev/ic/ahcisata_core.c fixes this?

 A -current kernel seems to work fine on my board, thanks!

 Martin

From: Markus Kilbinger <mk@kilbi.de>
To: gnats-bugs@gnats.netbsd.org
Cc: 
Subject: Re: PR/53524 CVS commit: src/sys/dev/ic
Date: Tue, 20 Nov 2018 17:20:09 +0100

 Anyway / FWIW:

   > [...]
   > To generate a diff of this commit:
   >  cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/ahcisata_core.c

 This change breaks booting on my 'bananapro' (evbarm/)earmv7hf; stuck
 before normal 'Copyright ...' message) which has a sata connector, but
 no device is connected in my case.

 Anything I sh/could test?

 Regards, Markus.

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: jdolecek@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
	martin@NetBSD.org
Subject: Re: PR/53524 CVS commit: src/sys/dev/ic
Date: Tue, 20 Nov 2018 19:46:34 +0100

 On Tue, Nov 20, 2018 at 05:30:01PM +0000, Markus Kilbinger wrote:
 >  Anyway / FWIW:
 >  
 >    > [...]
 >    > To generate a diff of this commit:
 >    >  cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/ahcisata_core.c
 >  
 >  This change breaks booting on my 'bananapro' (evbarm/)earmv7hf; stuck
 >  before normal 'Copyright ...' message) which has a sata connector, but
 >  no device is connected in my case.

 Are you *sure* it is this change? The code in question only runs much later...

 Also: which kernel are you booting? I have seen random hangs as you describe
 with the GENERIC kernel, but never with SUNXI.

 Are you by chance runnning a big endian GENERIC kernel?

 Martin

State-Changed-From-To: feedback->closed
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Tue, 20 Nov 2018 18:52:00 +0000
State-Changed-Why:
Reported fixed. I'll request pullup once I get word for the other PRs.
Thanks for report and testing.


From: Markus Kilbinger <mk@kilbi.de>
To: gnats-bugs@netbsd.org
Cc: martin@netbsd.org
Subject: Re: PR/53524 CVS commit: src/sys/dev/ic
Date: Tue, 20 Nov 2018 20:23:21 +0100

 >    > To generate a diff of this commit:
  >    >  cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/ahcisata_core.c
  >
  >  This change breaks booting on my 'bananapro' (evbarm/)earmv7hf; stuck
  >  before normal 'Copyright ...' message) which has a sata connector, but
  >  no device is connected in my case.

  > Are you *sure* it is this change? The code in question only runs
 much later...

 Yes, I just re-checked: Just reverting to -r1.69 makes my bananapro
 boot again and re-reverting to -r1.70 makes it stuck again.

  > Also: which kernel are you booting? I have seen random hangs as you describe
  > with the GENERIC kernel, but never with SUNXI.

 It's the normal GENERIC kernel (le) which boots fine on my cubietruck
 with a sata drive attached.

 (BTW: I switched from SUNXI to GENERIC kernel some time ago, because
 the SUNXI kernel no longer worked properly).

  Are you by chance runnning a big endian GENERIC kernel?

 No.

 Markus.

From: Nick Hudson <nick.hudson@gmx.co.uk>
To: gnats-bugs@NetBSD.org, jdolecek@NetBSD.org, gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org, martin@NetBSD.org
Cc: 
Subject: Re: PR/53524 CVS commit: src/sys/dev/ic
Date: Tue, 20 Nov 2018 21:33:14 +0000

 On 20/11/2018 20:40, Markus Kilbinger wrote:
 > The following reply was made to PR kern/53524; it has been noted by GNATS.
 > 
 > From: Markus Kilbinger <mk@kilbi.de>
 > To: gnats-bugs@netbsd.org
 > Cc: martin@netbsd.org
 > Subject: Re: PR/53524 CVS commit: src/sys/dev/ic
 > Date: Tue, 20 Nov 2018 20:23:21 +0100
 > 
 >   >    > To generate a diff of this commit:
 >    >    >  cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/ahcisata_core.c
 >    >
 >    >  This change breaks booting on my 'bananapro' (evbarm/)earmv7hf; stuck
 >    >  before normal 'Copyright ...' message) which has a sata connector, but
 >    >  no device is connected in my case.
 >   
 >    > Are you *sure* it is this change? The code in question only runs
 >   much later...
 >   
 >   Yes, I just re-checked: Just reverting to -r1.69 makes my bananapro
 >   boot again and re-reverting to -r1.70 makes it stuck again.

 Can you compare kernel sizes with and without the change? I agree with 
 Martin that this code runs much later.

 Also, does the problem occur with VERBOSE_INIT_ARM/EARLYCONS defined?	

 >   
 >    > Also: which kernel are you booting? I have seen random hangs as you describe
 >    > with the GENERIC kernel, but never with SUNXI.
 >   
 >   It's the normal GENERIC kernel (le) which boots fine on my cubietruck
 >   with a sata drive attached.
 >   
 >   (BTW: I switched from SUNXI to GENERIC kernel some time ago, because
 >   the SUNXI kernel no longer worked properly).

 How did it stop working?

 >   
 >    Are you by chance runnning a big endian GENERIC kernel?
 >   
 >   No.
 >   
 >   Markus.
 >   
 > 

 Thanks,
 Nck

From: Markus Kilbinger <mk@kilbi.de>
To: gnats-bugs@netbsd.org, Nick Hudson <nick.hudson@gmx.co.uk>, martin@netbsd.org
Cc: 
Subject: Re: PR/53524 CVS commit: src/sys/dev/ic
Date: Thu, 22 Nov 2018 01:08:16 +0100

 It took some time to rebuild HEADs tool and GENERIC kernel from
 scratch on my cubietruck (!).

 Compared to
   http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/201811211020Z/evbarm-earmv7hf/binary/sets/kern-GENERIC.tgz

 my GENERIC kernel is about 400 kb larger:

   tar tvzf kern-GENERIC.tgz.1 | grep netbsd.ub
   -rw-r--r--  1 root     wheel    8473324 Nov 21 10:49 ./netbsd.ub

 vs.

   rw-r--r--  1 root  wheel  8939436 Nov 21 20:33
 /usr/NetBSD/HEAD/src/sys/arch/evbarm/compile/GENERIC/netbsd.ub

 Does that mean anything, yet?

  >   >    > To generate a diff of this commit:
  >    >    >  cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/ahcisata_core.c
  >    >
  >    >  This change breaks booting on my 'bananapro' (evbarm/)earmv7hf; stuck
  >    >  before normal 'Copyright ...' message) which has a sata connector, but
  >    >  no device is connected in my case.
  >
  >    > Are you *sure* it is this change? The code in question only runs
  >   much later...

 I don't know, but I can trigger maybe another (real) problem with that change.

 > Can you compare kernel sizes with and without the change? I agree with
 > Martin that this code runs much later.

 'netbsd.ub's size does not change with and w/o this change.

  Also, does the problem occur with VERBOSE_INIT_ARM/EARLYCONS defined?

 I can test that later (tomorrow?) ...

  >   (BTW: I switched from SUNXI to GENERIC kernel some time ago, because
  >   the SUNXI kernel no longer worked properly).

  > How did it stop working?

 SUNXI kernels panic / stuck suddenly, so I switch over to GENERIC kernel.
 If it helps I can build an actual SUNXI kernel and try again.

 Regards,

 Markus.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.