NetBSD Problem Report #52419

From martin@duskware.de  Tue Jul 18 06:32:27 2017
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 "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0D7FA7A213
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 18 Jul 2017 06:32:27 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: mvsata fails to disable edma
X-Send-Pr-Version: 3.95

>Number:         52419
>Category:       kern
>Synopsis:       mvsata fails to disable edma
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 18 06:35:00 +0000 2017
>Closed-Date:    
>Last-Modified:  Wed May 05 19:17:46 +0000 2021
>Originator:     Martin Husemann
>Release:        NetBSD 8.0_BETA
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD plug.duskware.de 8.0_BETA NetBSD 8.0_BETA (PLUG) #1: Mon Jul 17 11:57:48 CEST 2017 martin@seven-days-to-the-wolves.aprisoft.de:/work/src-8/sys/arch/evbarm/compile/PLUG evbarm
Architecture: earm
Machine: evbarm
>Description:

I upgraded this machine from netbsd-7 to netbsd-8 yesterday and started 
rebuilding all pkgs (only few installed). During the first day and only
moderate disk activity (the pkg rebuild) it "crashed" four times
like this:

"something" went wrong in disk access, I get the "unable to stop EDMA"
error printed on the console and from that point all disk transfers
fail - I have to hard reset the machine.

The messages comes from mvsata_edma_disable():

                if (ms == timeout) {
                        aprint_error("%s:%d:%d: unable to stop EDMA\n",
                            device_xname(MVSATA_DEV2(mvport)), 
                            mvport->port_hc->hc, mvport->port);
                        return EBUSY;
                }

dmesg is:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
    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 8.0_BETA (PLUG) #1: Mon Jul 17 11:57:48 CEST 2017
	martin@seven-days-to-the-wolves.aprisoft.de:/work/src-8/sys/arch/evbarm/compile/PLUG
total memory = 512 MB
avail memory = 498 MB
sysctl_createv: sysctl_create(machine_arch) returned 17
timecounter: Timecounters tick every 10.000 msec
mainbus0 (root)
cpu0 at mainbus0 core 0: Sheeva 88SV131 rev 1 (ARM9E-S V5TE core)
cpu0: DC enabled IC enabled WB enabled EABT branch prediction enabled
cpu0: 16KB/32B 4-way L1 VIVT Instruction cache
cpu0: 16KB/32B 4-way write-back-locking-C L1 VIVT Data cache
mvsoc0 at mainbus0: Marvell 88F6281 Rev. A1  Kirkwood
mvsoc0: CPU Clock 1200.000 MHz  SysClock 400.000 MHz  TClock 200.000 MHz
mvsoctmr0 at mvsoc0 unit 0 offset 0x20300-0x203ff irq 65: Marvell SoC Timer
mvsocgpp0 at mvsoc0 unit 0 offset 0x10100-0x101ff irq 35: Marvell SoC General Purpose I/O Port Interface
mvsocgpp0: 50 gpio pins
mvsocgpp0: interrupts 96..103, intr 35
mvsocgpp0: interrupts 104..111, intr 36
mvsocgpp0: interrupts 112..119, intr 37
mvsocgpp0: interrupts 120..127, intr 38
mvsocgpp0: interrupts 128..135, intr 39
mvsocgpp0: interrupts 136..143, intr 40
mvsocgpp0: interrupts 144..151, intr 41
mvsocgpp0:   Data Out:                 	0x00000000
mvsocgpp0:   Data Out Enable Control:  	0xffffffff
mvsocgpp0:   Data Blink Enable:        	0x00000000
mvsocgpp0:   Data In Polarity:         	0x00000000
mvsocgpp0:   Data In:                  	0x00000080
mvsocgpp0:   Interrupt Cause:          	0x00000000
mvsocgpp0:   Interrupt Mask:           	0x00000000
mvsocgpp0:   Interrupt Level Mask:     	0x00000000
mvsocgpp0:   High Data Out:            	0x000f0000
mvsocgpp0:   High Data Out Enable Ctrl:	0xffffffff
mvsocgpp0:   High Blink Enable:        	0x00000000
mvsocgpp0:   High Data In Polarity:    	0x00000000
mvsocgpp0:   High Data In:             	0x0003f000
mvsocgpp0:   High Interrupt Cause:     	0x00000000
mvsocgpp0:   High Interrupt Mask:      	0x00000000
mvsocgpp0:   High Interrupt Level Mask:	0x00000000
gpio0 at mvsocgpp0: 50 pins
mvsocrtc0 at mvsoc0 unit 0 offset 0x10300-0x10317: Marvell SoC Real Time Clock
com0 at mvsoc0 unit 0 offset 0x12000-0x1201f irq 33: ns16550a, working fifo
com0: console
com1 at mvsoc0 unit 1 offset 0x12100-0x1211f irq 34: ns16550a, working fifo
ehci0 at mvsoc0 unit 0 offset 0x50000-0x50fff irq 19: Marvell USB 2.0 Interface
ehci0: EHCI version 1.0
usb0 at ehci0: USB revision 2.0
gtidmac0 at mvsoc0 unit 0 offset 0x60000-0x60fff: Marvell IDMA Controller/XOR Engine
gtidmac0: XOR Engine 4 channels, intr 5, 6, 7, 8
gttwsi0 at mvsoc0 unit 0 offset 0x11000-0x110ff irq 29: Marvell TWSI controller
iic0 at gttwsi0: I2C bus
mvcesa0 at mvsoc0 unit 0 offset 0x3d000-0x3dfff irq 22: Marvell Cryptographic Engines and Security Accelerator
mvgbec0 at mvsoc0 unit 0 offset 0x70000-0x73fff: Marvell Gigabit Ethernet Controller
mvgbe0 at mvgbec0 port 0 irq 11
mvgbe0: Ethernet address 00:50:43:01:83:dc
makphy0 at mvgbe0 phy 0: Marvell 88E1149 Gigabit PHY, rev. 3
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
mvgbec1 at mvsoc0 unit 1 offset 0x74000-0x77fff: Marvell Gigabit Ethernet Controller
mvgbe1 at mvgbec1 port 0 irq 15
mvgbe1: Ethernet address 00:50:43:01:83:dd
makphy1 at mvgbe1 phy 1: Marvell 88E1149 Gigabit PHY, rev. 3
makphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
mvpex0 at mvsoc0 unit 0 offset 0x40000-0x41fff irq 9: Marvell PCI Express Interface
pci0 at mvpex0
pci0: i/o space, memory space enabled
vendor 11ab product 6281 (miscellaneous memory, revision 0x03) at pci0 dev 0 function 0 not configured
mvsata0 at mvsoc0 unit 0 offset 0x80000-0x87fff irq 21: Marvell Serial-ATA Host Controller (SATAHC)
mvsata0: GenIIe, 1hc, 2port/hc
atabus0 at mvsata0 channel 0
atabus1 at mvsata0 channel 1
mvsdio0 at mvsoc0 unit 0 offset 0x90000-0x9ffff irq 28: Marvell Secure Digital Input/Output Interface
sdmmc0 at mvsdio0
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "mvsoctmr0" frequency 200000000 Hz quality 100
uhub0 at usb0: Marvell (0000) EHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 1
uhub0: 1 port with 1 removable, self powered
mvsata0 port 0: device present, speed: 3.0Gb/s
sdmmc0: bad CIS ptr 0
sdmmc0: couldn't read CIS
sdmmc0: i/o init failed
sdmmc0: bad CIS ptr 0
sdmmc0: couldn't read CIS
sdmmc0: i/o init failed
"Marvell, 802.11 SDIO ID: 10, " (manufacturer 0x2df, product 0x9103) at sdmmc0 function 1 not configured
"Marvell, 802.11 SDIO ID: 10, " (manufacturer 0x2df, product 0x9103) at sdmmc0 function 2 not configured
wd0 at atabus0 drive 0
wd0: <ST3000DM001-1ER166>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 2794 GB, 5814021 cyl, 16 head, 63 sec, 512 bytes/sect x 5860533168 sectors
wd0: GPT GUID: d96ce1d6-f47b-464b-b0c8-b8fea0d23f31
dk0 at wd0: "Guru-Root", 5856338797 blocks at 34, type: ffs
dk1 at wd0: "d5c3eff7-a35d-41b3-9c58-76679533f5cb", 4194304 blocks at 5856338831, type: swap
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(mvsata0:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
uhub1 at uhub0 port 1: vendor 05e3 (0x5e3) USB2.0 Hub (0x608), class 9/0, rev 2.00/77.60, addr 2
uhub1: single transaction translator
uhub1: 4 ports with 4 removable, self powered
umass0 at uhub1 port 1 configuration 1 interface 0
umass0: vendor 05e3 (0x5e3) USB Storage (0x726), rev 2.00/99.09, addr 3
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 2 luns per target
sd0 at scsibus0 target 0 lun 0: <Generic, STORAGE DEVICE, 9909> disk removable
sd0: drive offline
sd1 at scsibus0 target 0 lun 1: <Generic, STORAGE DEVICE, 9909> disk removable
sd1: fabricating a geometry
sd1: 1886 MB, 1886 cyl, 64 head, 32 sec, 512 bytes/sect x 3862528 sectors
sd1: fabricating a geometry
uhub2 at uhub1 port 2: vendor 0409 (0x409) product 005a (0x5a), class 9/0, rev 2.00/1.00, addr 4
uhub2: single transaction translator
uhub2: 2 ports with 0 removable, self powered
umcs0 at uhub2 port 1: vendor 9710 (0x9710) product 7840 (0x7840), rev 2.00/0.01, addr 5
umcs0: found 4 active ports
umcs0: On-die confguration: RST: active low, HRD: yes, PLL: avail, POR: avail, Ports: 4, EEPROM write disabled, IrDA is not available
ucom0 at umcs0 portno 0
ucom1 at umcs0 portno 1
ucom2 at umcs0 portno 2
ucom3 at umcs0 portno 3
umcs1 at uhub2 port 2: vendor 9710 (0x9710) product 7840 (0x7840), rev 2.00/0.01, addr 6
umcs1: found 4 active ports
umcs1: On-die confguration: RST: active low, HRD: yes, PLL: avail, POR: avail, Ports: 4, EEPROM write disabled, IrDA is not available
ucom4 at umcs1 portno 0
ucom5 at umcs1 portno 1
ucom6 at umcs1 portno 2
ucom7 at umcs1 portno 3
uplcom0 at uhub1 port 3
uplcom0: Prolific Technology Inc. (0x67b) USB-Serial Controller (0x2303), rev 1.10/3.00, addr 7
ucom8 at uplcom0
WARNING: 6 errors while detecting hardware; check system log.
boot device: <unknown>
root on dk0 dumps on dk1
kern.module.path=/stand/evbarm/8.0/modules


>How-To-Repeat:
run netbsd-8 on a guruplug with eSATA disk connected and exercise the
disk a bit.

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/52419: mvsata fails to disable edma
Date: Tue, 18 Jul 2017 07:46:12 +0100

 I found a temporary workaround in PR/52126 which seems to be the same issue:
 options MVSATA_WITHOUTDMA switches the issue off, but obviously at a cost...

From: Reinoud Zandijk <reinoud@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/52419: mvsata fails to disable edma
Date: Wed, 13 Sep 2017 10:44:37 +0200

 I've tried the options in 8.99.1, it failed detection:
 -----
 iscsibus0 at umass0: 2 targets, 1 lun per target
 sd0 at scsibus0 target 0 lun 0: <WD, Elements 1078, 1065> disk fixed
 sd0(umass0:0:0:0): not ready, data = 00 00 00 00 04 01 00 00 00 00
 sd0: drive offline
 sd0: fabricating a geometry
 mvsata0:1:0: lost interrupt
         type: ata tc_bcount: 512 tc_skip: 0
 wd0: IDENTIFY failed
 mvsata0:1:0: lost interrupt
         type: ata tc_bcount: 512 tc_skip: 0
 wd1 at atabus1 drive 2
 mvsata0:1:2: lost interrupt
         type: ata tc_bcount: 512 tc_skip: 0
 wd1: IDENTIFY failed
 mvsata0:1:2: lost interrupt
         type: ata tc_bcount: 512 tc_skip: 0
 WARNING: 6 errors while detecting hardware; check system log.
 boot device: <unknown>
 -----

 The only `patch' I had to make to even get it compiled was making sure the
 edma_mode variable is used in mvsata_setup_channel() i.e. before
 sys/dev/ic/mvsata.c:1050


From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: kern/52419: mvsata fails to disable edma
Date: Tue, 30 Apr 2019 04:38:56 +0900

 > I upgraded this machine from netbsd-7 to netbsd-8 yesterday and started 
 > rebuilding all pkgs (only few installed). During the first day and only
 > moderate disk activity (the pkg rebuild) it "crashed" four times
 > like this:
 > 
 > "something" went wrong in disk access, I get the "unable to stop EDMA"
 > error printed on the console and from that point all disk transfers
 > fail - I have to hard reset the machine.

 I see the similar "unable to stop EDMA" messages on my HP T5325
 with SATA SSD:

 >> cpu0 at mainbus0 core 0: Sheeva 88SV131 rev 1 (ARM9E-S V5TE core)
  :
 >> mvsata0 at mvsoc0 unit 0 offset 0x80000-0x87fff irq 21: Marvell Serial-ATA Host Controller (SATAHC)
 >> mvsata0: GenIIe, 1hc, 2port/hc
  :
 >> atabus1 at mvsata0 channel 1
  :
 >> mvsata0 port 1: device present, speed: 3.0Gb/s
 >> wd1 at atabus1 drive 0
 >> wd1: <SUNEAST SSD SE800 mSATA 256GB>
 >> wd1: 238 GB, 496149 cyl, 16 head, 63 sec, 512 bytes/sect x 500118192 sectors
  :
 >> wd1a: device timeout writing fsbn 329886296 of 329886296-329886303 (wd1 bn 330934872; cn 328308 tn 6 sn 30), retrying
 >> mvsata0:0:1: device disconnect
 >> mvsata0:0:1: EDMA self disable happen 0x88
 >> mvsata0:0:1: unable to stop EDMA

 I have not tried netbsd-7 branch kernels, but NetBSD/evbarm 6.1.5 kernel
 worked without problem to build pkgsrc binaries for weeks.

 It looks there is ~no functional changes in mvsata.c between 7.x and 8.x.
 Maybe critical timing issue, or compiler related bugs?

 Whole boot messages is here:

 ---
        _   _     .____    
       | |_| |    |  _ \  
       |  _  |    | (_))   
       | |-| |    | |      
       |_| |_|    |_|  ..  
  _   _     ____              _
 | | | |   | __ )  ___   ___ | |_ 
 | | | |___|  _ \ / _ \ / _ \| __| 
 | |_| |___| |_) | (_) | (_) | |_ 
  \___/    |____/ \___/ \___/ \__| 
  ** LOADER **
  ** BOARD: DB-88F6281A-BP LE 

 U-Boot 1.1.4 (Jan  8 2010 - 14:03:56) MIC version : 3.4.19-16

 U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CD4E0

 Soc: 88F6281 A1 (DDR2)
 CPU running @ 1200Mhz L2 running @ 400Mhz
 SysClock = 400Mhz , TClock = 200Mhz 

 DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
 DRAM CS[0] base 0x00000000   size 256MB 
 DRAM CS[1] base 0x10000000   size 256MB 
 DRAM Total size 512MB  16bit width
 Addresses 8M - 0M are saved for the U-Boot usage.
 Mem malloc Initialization (8M - 7M): Done
 [1024kB@f8000000] Flash:  1 MB

 CPU : Marvell Feroceon (Rev 1)

 Streaming disabled 
 Write allocate disabled


 USB 0: host mode
 PEX 0: PCI Express Root Complex Interface
 PEX interface detected Link X1
 Net:   egiga0 [PRIME], egiga1
 Hit any key to stop autoboot: 0 
 HP>> usb start
 (Re)start USB...
 USB:   scanning bus for devices... 3 USB Device(s) found
 Waiting for storage device(s) to settle before scanning...
 1 Storage Device(s) found
 HP>> fatload usb 0:1 0x00800000 netbsd.ub; bootm 0x00800000
 reading netbsd.ub
 ............................................................................................................................................................................................................
 ...................................................
 ..................................................................................................................................................................................................................................................................

 5274324 bytes read
 ## Booting image at 00800000 ...
    Image Name:   NetBSD/hpt5325 8.0
    Created:      2019-04-29  18:46:03 UTC
    Image Type:   ARM NetBSD Kernel Image (uncompressed)
    Data Size:    5274260 Bytes =  5 MB
    Load Address: 00008000
    Entry Point:  00008000
    Verifying Checksum ... OK
 OK
 ## Transferring control to NetBSD stage-2 loader (at address 00008000) ...

 NetBSD/evbarm (hpt5325) booting ...
 [ Kernel symbol table missing! ]
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
     2018 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 8.0 (HPT5325) #6: Tue Apr 30 03:45:49 JST 2019
 	tsutsui@mirage:/s/src/sys/arch/evbarm/compile/HPT5325
 total memory = 512 MB
 avail memory = 496 MB
 sysctl_createv: sysctl_create(machine_arch) returned 17
 mainbus0 (root)
 cpu0 at mainbus0 core 0: Sheeva 88SV131 rev 1 (ARM9E-S V5TE core)
 cpu0: DC enabled IC enabled WB enabled EABT branch prediction enabled
 cpu0: 16KB/32B 4-way L1 VIVT Instruction cache
 cpu0: 16KB/32B 4-way write-back-locking-C L1 VIVT Data cache
 mvsoc0 at mainbus0: Marvell 88F6281 Rev. A1  Kirkwood
 mvsoc0: CPU Clock 1200.000 MHz  SysClock 400.000 MHz  TClock 200.000 MHz
 mvsoctmr0 at mvsoc0 unit 0 offset 0x20300-0x203ff irq 65: Marvell SoC Timer
 mvsocgpp0 at mvsoc0 unit 0 offset 0x10100-0x101ff irq 35: Marvell SoC General Purpose I/O Port Interface
 mvsocgpp0: 50 gpio pins
 mvsocgpp0: interrupts 96..103, intr 35
 mvsocgpp0: interrupts 104..111, intr 36
 mvsocgpp0: interrupts 112..119, intr 37
 mvsocgpp0: interrupts 120..127, intr 38
 mvsocgpp0: interrupts 128..135, intr 39
 mvsocgpp0: interrupts 136..143, intr 40
 mvsocgpp0: interrupts 144..151, intr 41
 mvsocgpp0:   Data Out:                 	0x00000000
 mvsocgpp0:   Data Out Enable Control:  	0x00000000
 mvsocgpp0:   Data Blink Enable:        	0x00000000
 mvsocgpp0:   Data In Polarity:         	0x00000000
 mvsocgpp0:   Data In:                  	0x00000000
 mvsocgpp0:   Interrupt Cause:          	0x00000000
 mvsocgpp0:   Interrupt Mask:           	0x00000000
 mvsocgpp0:   Interrupt Level Mask:     	0x00000000
 mvsocgpp0:   High Data Out:            	0x0000d000
 mvsocgpp0:   High Data Out Enable Ctrl:	0xfffe2fff
 mvsocgpp0:   High Blink Enable:        	0x00000000
 mvsocgpp0:   High Data In Polarity:    	0x00000040
 mvsocgpp0:   High Data In:             	0x0002f040
 mvsocgpp0:   High Interrupt Cause:     	0x00000000
 mvsocgpp0:   High Interrupt Mask:      	0x00000000
 mvsocgpp0:   High Interrupt Level Mask:	0x00000000
 gpio0 at mvsocgpp0: 50 pins
 mvsocrtc0 at mvsoc0 unit 0 offset 0x10300-0x10317: Marvell SoC Real Time Clock
 com0 at mvsoc0 unit 0 offset 0x12000-0x1201f irq 33: ns16550a, working fifo
 com0: console
 com1 at mvsoc0 unit 1 offset 0x12100-0x1211f irq 34: ns16550a, working fifo
 ehci0 at mvsoc0 unit 0 offset 0x50000-0x50fff irq 19: Marvell USB 2.0 Interface
 usb0 at ehci0: USB revision 2.0
 gtidmac0 at mvsoc0 unit 0 offset 0x60000-0x60fff: Marvell IDMA Controller/XOR Engine
 gtidmac0: XOR Engine 4 channels, intr 5, 6, 7, 8
 gttwsi0 at mvsoc0 unit 0 offset 0x11000-0x110ff irq 29: Marvell TWSI controller
 iic0 at gttwsi0: I2C bus
 mvcesa0 at mvsoc0 unit 0 offset 0x3d000-0x3dfff irq 22: Marvell Cryptographic Engines and Security Accelerator
 mvgbec0 at mvsoc0 unit 0 offset 0x70000-0x73fff: Marvell Gigabit Ethernet Controller
 mvgbe0 at mvgbec0 port 0 irq 11
 mvgbe0: Ethernet address f4:ce:46:24:b2:ed
 ukphy0 at mvgbe0 phy 8: OUI 0x000ac2, model 0x0022, rev. 0
 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 mvgbec1 at mvsoc0 unit 1 offset 0x74000-0x77fff: Marvell Gigabit Ethernet Controller
 mvgbe at mvgbec1 port 0 not configured
 mvpex0 at mvsoc0 unit 0 offset 0x40000-0x41fff irq 9: Marvell PCI Express Interface
 extent_alloc(0xc2b7e410, 0x4000000, 0x4) returned 35
 extent `pexmem' (0xe0000000 - 0xe0ffffff), flags = 0x0
 PCI: bus 0, device 1, function 0: Failed to allocate PCI memory space (67108864 req)
 PCI bus configuration failed: unable to assign all I/O and memory ranges.
 pci0 at mvpex0
 vendor 11ab product 6281 (miscellaneous memory, revision 0x03) at pci0 dev 0 function 0 not configured
 vendor 18ca product 0027 (VGA display) at pci0 dev 1 function 0 not configured
 mvsata0 at mvsoc0 unit 0 offset 0x80000-0x87fff irq 21: Marvell Serial-ATA Host Controller (SATAHC)
 mvsata0: GenIIe, 1hc, 2port/hc
 atabus0 at mvsata0 channel 0
 atabus1 at mvsata0 channel 1
 mvsdio at mvsoc0 unit 0 not configured
 uhub0 at usb0: Marvell (0000) EHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 1
 mvsata0 port 0: device present, speed: 3.0Gb/s
 mvsata0 port 1: device present, speed: 3.0Gb/s
 wd0 at atabus0 drive 0
 wd0: <SM224>
 wd0: 463 MB, 942 cyl, 16 head, 63 sec, 512 bytes/sect x 949536 sectors
 wd1 at atabus1 drive 0
 wd1: <SUNEAST SSD SE800 mSATA 256GB>
 wd1: 238 GB, 496149 cyl, 16 head, 63 sec, 512 bytes/sect x 500118192 sectors
 uhub1 at uhub0 port 1: SMSC (0x424) USB 2.0 4-Port Hub (0x2514), class 9/0, rev 2.00/0.00, addr 2
 uhub1: multiple transaction translators
 umass0 at uhub1 port 4 configuration 1 interface 0
 umass0: JMicron (0x152d) USB to ATA/ATAPI Bridge (0x2338), rev 2.00/1.00, addr 3
 scsibus0 at umass0: 2 targets, 1 lun per target
 sd0 at scsibus0 target 0 lun 0: <WDC WD80, 0JD-75MSA3, 1E04> disk fixed
 sd0: 76293 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 156250000 sectors
 boot device: <unknown>
 root device: sd0
 dump device (default sd0b): 
 file system (default generic): 
 root on sd0a dumps on sd0b
 root file system type: ffs
 kern.module.path=/stand/evbarm/8.0/modules
 init path (default /sbin/init): 
 init: trying /sbin/init
 /etc/rc: WARNING: $rc_configured is not set properly - see rc.conf(5).
 /etc/rc.conf is not configured.  Multiuser boot aborted.
 Enter pathname of shell or RETURN for /bin/sh: 
 Terminal type is vt100.
 We recommend that you create a non-root account and use su(1) for root access.
 # mount /tmp
 # swapon /dev/sd0b
 # newfs -b 16384 -f 4096 -i 8192 /dev/rwd1a
 /dev/rwd1a: 241664.0MB (494927872 sectors) block size 16384, fragment size 4096
 	using 833 cylinder groups of 290.12MB, 18568 blks, 36608 inodes.
 super-block backups (for fsck_ffs -b #) at:
 32, 594208, 1188384, 1782560, 2376736, 2970912, 3565088, 4159264, 4753440,
 ...............................................................................
 # mount -o log /dev/wd1a /mnt
 # dump 0f - /dev/rsd0a | (cd /mnt; restore xf -)
   DUMP: Date of this level 0 dump: Tue Apr 30 04:13:11 2019
   DUMP: Date of last level 0 dump: the epoch
   DUMP: Dumping /dev/rsd0a (an unlisted file system) to standard output
   DUMP: Label: none
   DUMP: mapping (Pass I) [regular files]
   DUMP: mapping (Pass II) [directories]
   DUMP: estimated 10389943 tape blocks.
   DUMP: Volume 1 started at: Tue Apr 30 04:13:36 2019
   DUMP: dumping (Pass III) [directories]
   DUMP: dumping (Pass IV) [regular files]
   DUMP: 3.35% done, finished in 2:28
 wd1a: device timeout writing fsbn 329886296 of 329886296-329886303 (wd1 bn 330934872; cn 328308 tn 6 sn 30), retrying
 mvsata0:0:1: device disconnect
 mvsata0:0:1: EDMA self disable happen 0x88
 mvsata0:0:1: unable to stop EDMA
 wd1a: device timeout writing fsbn 329886296 of 329886296-329886303 (wd1 bn 330934872; cn 328308 tn 6 sn 30), retrying
 mvsata0:0:1: unable to stop EDMA
 wd1a: device timeout writing fsbn 329886296 of 329886296-329886303 (wd1 bn 330934872; cn 328308 tn 6 sn 30), retrying
 mvsata0:0:1: unable to stop EDMA
 wd1a: device timeout writing fsbn 329886296 of 329886296-329886303 (wd1 bn 330934872; cn 328308 tn 6 sn 30), retrying
 mvsata0:0:1: unable to stop EDMA
 mvsata0: channel 1: drive 0 recal drive fault
 mvsata0:0:1: unable to stop EDMA
 wd1a: device fault writing fsbn 329886296 of 329886296-329886303 (wd1 bn 330934872; cn 328308 tn 6 sn 30), retrying
 mvsata0:0:1: unable to stop EDMA
 mvsata0: channel 1: drive 0 recal drive fault
 mvsata0:0:1: unable to stop EDMA
 wd1a: device fault writing fsbn 329886296 of 329886296-329886303 (wd1 bn 330934872; cn 328308 tn 6 sn 30)
 mvsata0:0:1: unable to stop EDMA
 wd1a: device timeout writing fsbn 329886304 of 329886304-329886319 (wd1 bn 330934880; cn 328308 tn 6 sn 38), retrying

 ---
 Izumi Tsutsui

From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/52419: mvsata fails to disable edma
Date: Mon, 4 Nov 2019 15:55:39 +0000

 I no longer see the EDMA messages. (lost interrupts and can't access disk,
 but no EDMA messages, even without MVSATA_WITHOUTDMA)

From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52419 CVS commit: src/sys/dev/ic
Date: Sun, 22 Dec 2019 20:54:00 +0000

 Module Name:	src
 Committed By:	jdolecek
 Date:		Sun Dec 22 20:54:00 UTC 2019

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

 Log Message:
 remove check for idle status when disabling EDMA, and always toggle
 the disable regardless of current state - this particularly seems
 to fail during error recovery, and on my system this also fails
 during regular boot

 this matches both FreeBSD and Linux drivers - neither of those checks
 the idle status

 should help with PR kern/52419 and maybe also the lock spinout part
 of PR kern/52126


 To generate a diff of this commit:
 cvs rdiff -u -r1.49 -r1.50 src/sys/dev/ic/mvsata.c

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

Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-By: jdolecek@NetBSD.org
Responsible-Changed-When: Sun, 22 Dec 2019 21:12:06 +0000
Responsible-Changed-Why:
I'm looking at this.


State-Changed-From-To: open->feedback
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Sun, 22 Dec 2019 21:12:35 +0000
State-Changed-Why:
Can you check if rev. 1.50 of sys/dev/ic/mvsata.c fixed this?


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/52419 (mvsata fails to disable edma)
Date: Wed, 25 Dec 2019 10:32:50 +0100

 Not easy to test with -current; the machine just rebooted w/o any panic
 message or whatever when I stressed the disk a bit.

 Martin

Responsible-Changed-From-To: jdolecek->kern-bug-people
Responsible-Changed-By: jdolecek@NetBSD.org
Responsible-Changed-When: Wed, 05 May 2021 19:17:46 +0000
Responsible-Changed-Why:
I won't work on mvsata(4) anymore.


State-Changed-From-To: feedback->open
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Wed, 05 May 2021 19:17:46 +0000
State-Changed-Why:
Feedback provided.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.