NetBSD Problem Report #55540

From www@netbsd.org  Tue Aug  4 14:54:20 2020
Return-Path: <www@netbsd.org>
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 CAC5C1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  4 Aug 2020 14:54:20 +0000 (UTC)
Message-Id: <20200804145419.45C661A923A@mollari.NetBSD.org>
Date: Tue,  4 Aug 2020 14:54:19 +0000 (UTC)
From: kyra.sable@mail.ru
Reply-To: kyra.sable@mail.ru
To: gnats-bugs@NetBSD.org
Subject: aceride Fails To Downgrade Transfer Mode
X-Send-Pr-Version: www-1.0

>Number:         55540
>Category:       kern
>Synopsis:       aceride Fails To Downgrade Transfer Mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jdolecek
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 04 14:55:00 +0000 2020
>Closed-Date:    Wed Jan 20 21:25:59 +0000 2021
>Last-Modified:  Wed Jan 20 21:25:59 +0000 2021
>Originator:     Kyra Sable
>Release:        9.99.69
>Organization:
>Environment:
>Description:
The latest sparc64 CD install image fails to start due to the transfer mode for aceride not downgrading to PIO4. This is a known issue with DMA transfers and ATAPI devices on this particular chip. The NetBSD 9 installer handles this situation and starts as expected.

This issue probably isn't specific to sparc64, but this chip is very common in later non-SCSI Sun machines (like this one).

NetBSD HEAD:

ok boot cdrom
Boot device: /pci@1f,0/ide@d/cdrom@2,0:f  File and args:
NetBSD IEEE 1275 Multi-FS Bootblock
Version $NetBSD: bootblk.fth,v 1.15 2015/08/20 05:40:08 dholland Exp $
>> NetBSD/sparc64 OpenFirmware Boot, Revision 1.20 (Mon Aug  3 21:12:29 UTC 2020)
=0xc052b0
Loading netbsd: 12604016+508720+341880 [775656+514109]=0xf0b190
[   1.0000000] pool redzone disabled for 'kmem-08192'
[   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, 2019, 2020 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 9.99.69 (GENERIC) #0: Mon Aug  3 21:12:29 UTC 2020
[   1.0000000]  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/sparc64/compile/GENERIC
[   1.0000000] total memory = 2048 MB
[   1.0000000] avail memory = 1990 MB
[   1.0000000] pool redzone disabled for 'buf64k'
[   1.0000000] entropy: no seed from bootloader
[   1.0000000] mainbus0 (root): SUNW,UltraAX-i2 (Sun Fire V100): hostid XXXXXXXX
[   1.0000000] cpu0 at mainbus0: SUNW,UltraSPARC-IIe @ 548 MHz, CPU id 0
[   1.0000000] cpu0: manuf 17, impl 13, mask 33
[   1.0000000] cpu0: system tick frequency 5.555 MHz
[   1.0000000] cpu0: 16K instruction (32 b/l), 16K data (32 b/l), 512K external (64 b/l)
[   1.0000000] psycho0 at mainbus0
[   1.0000000] psycho0: SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 0; PCI bus 0
[   1.0000000] pci0 at psycho0
[   1.0000000] ebus0 at pci0 dev 7 function 0: Acer Labs M1533 PCI-ISA Bridge, revision 0x00
[   1.0000000] dma at ebus0 addr 0-ffff ipl 2a not configured
[   1.0000000] rtc0 at ebus0 addr 70-71: mc146818 compatible time-of-day clock: m5819
[   1.0000000] power at ebus0 addr 2000-2007 ipl 23 not configured
[   1.0000000] lom0 at ebus0 addr 8010-8011 ipl 2a: SUNW,lomh: LOMlite2 rev 3.12
[   1.0000000] com0 at ebus0 addr 3f8-3ff ipl 2b: ns16550a, working fifo
[   1.0000000] com0: console
[   1.0000000] com1 at ebus0 addr 2e8-2ef ipl 2b: ns16550a, working fifo
[   1.0000000] flashprom at ebus0 addr 0-7ffff not configured
[   1.0000000] alipm0 at pci0 dev 3 function 0: 74KHz clock
[   1.0000000] iic0 at alipm0: I2C bus
[   1.0000000] admtemp0 at iic0 addr 0x18: MAX1617A temperature sensor: id. 0x41, rev. 0x34
[   1.0000000] spdmem0 at iic0 addr 0x54
[   1.0000000] spdmem0: SDRAM (registered), data ECC, 512MB, 133MHz (PC-133)
[   1.0000000] spdmem1 at iic0 addr 0x55
[   1.0000000] spdmem1: SDRAM (registered), data ECC, 512MB, 133MHz (PC-133)
[   1.0000000] spdmem2 at iic0 addr 0x56
[   1.0000000] spdmem2: SDRAM (registered), data ECC, 512MB, 133MHz (PC-133)
[   1.0000000] spdmem3 at iic0 addr 0x57
[   1.0000000] spdmem3: SDRAM (registered), data ECC, 512MB, 133MHz (PC-133)
[   1.0000000] seeprom0 at iic0 addr 0x50: i2c-nvram: size 8192
[   1.0000000] seeprom1 at iic0 addr 0x51: motherboard-fru: size 8192
[   1.0000000] tlp0 at pci0 dev 12 function 0: Davicom DM9102A Ethernet, pass 3.1
[   1.0000000] tlp0: interrupting at ivec 3006
[   1.0000000] tlp0: Ethernet address 00:03:ba:XX:XX:XX
[   1.0000000] dmphy0 at tlp0 phy 1: DM9102 10/100 media interface, rev. 0
[   1.0000000] dmphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[   1.0000000] tlp1 at pci0 dev 5 function 0: Davicom DM9102A Ethernet, pass 3.1
interrupt_vector: spurious vector 7de at pil 13
[   1.0000000] tlp1: interrupting at ivec 301c
[   1.0000000] tlp1: Ethernet address 00:03:ba:XX:XX:XX
[   1.0000000] dmphy1 at tlp1 phy 1: DM9102 10/100 media interface, rev. 0
[   1.0000000] dmphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[   1.0000000] ohci0 at pci0 dev 10 function 0: Acer Labs M5237 USB 1.1 Host Controller (rev. 0x03)
[   1.0000000] ohci0: interrupting at ivec 24
[   1.0000000] ohci0: OHCI version 1.0, legacy support
[   1.0000000] usb0 at ohci0: USB revision 1.0
[   1.0000000] aceride0 at pci0 dev 13 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc3)
[   1.0000000] aceride0: using ivec 180c for native-PCI interrupt
[   1.0000000] atabus0 at aceride0 channel 0
[   1.0000000] atabus1 at aceride0 channel 1
[   1.0000000] pcons at mainbus0 not configured
[   1.0000000] entropy: WARNING: extracting entropy too early
[   1.0000338] No counter-timer -- using STICK at 5.555MHz as system clock.
[   1.1500157] uhub0 at usb0: NetBSD (0x0000) OHCI root hub (0x0000), class 9/0, rev 1.00/1.00, addr 1
[   4.2399788] wd0 at atabus0 drive 0
[   4.2839863] wd0: <SAMSUNG SP0802N>
[   4.3266917] wd0: 76351 MB, 155127 cyl, 16 head, 63 sec, 512 bytes/sect x 156368016 sectors
[   4.5138276] atapibus0 at atabus1: 2 targets
[   4.5699770] cd0 at atapibus0 drive 0: <HL-DT-ST GCE-8525B, , 1.05> cdrom removable
aceride0:1:0: lost interrupt
[   5.8492319]  type: atapi tc_bcount: 32 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
[   5.9759980] aceride0:1:0: device timeout, c_bcount=32, c_skip=0
[   5.9759980] cd0: excessive DMA errors - 4 in last 1 transfers
[   6.1152334] cd0(aceride0:1:0): generic HBA error
aceride0:1:0: lost interrupt
[   7.1991845]  type: atapi tc_bcount: 32 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
[   7.3259510] aceride0:1:0: device timeout, c_bcount=32, c_skip=0
[   7.3966078] cd0(aceride0:1:0): generic HBA error
[   7.4516797] cd0: sector size 0
aceride0:1:0: lost interrupt
[   8.5091339]  type: atapi tc_bcount: 32 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
[   8.6359000] aceride0:1:0: device timeout, c_bcount=32, c_skip=0
[   8.7065567] cd0(aceride0:1:0): generic HBA error
aceride0:1:0: lost interrupt
[   9.7891574]  type: atapi tc_bcount: 32 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
[   9.9159244] aceride0:1:0: device timeout, c_bcount=32, c_skip=0
[   9.9865811] cd0(aceride0:1:0): generic HBA error
[  10.0416505] root on cd0a dumps on cd0b
aceride0:1:0: lost interrupt
[  11.1091858]  type: atapi tc_bcount: 32 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
[  11.2359522] aceride0:1:0: device timeout, c_bcount=32, c_skip=0
[  11.3066087] cd0(aceride0:1:0): generic HBA error
aceride0:1:0: lost interrupt
[  12.3891051]  type: atapi tc_bcount: 32 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
[  12.5158717] aceride0:1:0: device timeout, c_bcount=32, c_skip=0
[  12.5865289] cd0(aceride0:1:0): generic HBA error
[  12.6415988] vfs_mountroot: can't open root device
[  12.6977081] cannot mount root, error = 5
[  12.7444661] root device (default cd0a):

NetBSD 9 STABLE:

ok boot cdrom
Boot device: /pci@1f,0/ide@d/cdrom@2,0:f  File and args:
NetBSD IEEE 1275 Multi-FS Bootblock
Version $NetBSD: bootblk.fth,v 1.15 2015/08/20 05:40:08 dholland Exp $
>> NetBSD/sparc64 OpenFirmware Boot, Revision 1.20 (Mon Aug  3 09:20:29 UTC 2020)
=0x9593a8
Loading netbsd: 9802600+480912+338472 [716496+470955]=0xdea8e8
[   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, 2019, 2020 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 9.0_STABLE (GENERIC) #0: Mon Aug  3 09:20:29 UTC 2020
[   1.0000000]  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/sparc64/compile/GENERIC
[   1.0000000] total memory = 2048 MB
[   1.0000000] avail memory = 1992 MB
[   1.0000000] running cgd selftest aes-xts-256 aes-xts-512 done
[   1.0000000] mainbus0 (root): SUNW,UltraAX-i2 (Sun Fire V100): hostid XXXXXXXX
[   1.0000000] cpu0 at mainbus0: SUNW,UltraSPARC-IIe @ 548 MHz, CPU id 0
[   1.0000000] cpu0: manuf 17, impl 13, mask 33
[   1.0000000] cpu0: system tick frequency 5.555 MHz
[   1.0000000] cpu0: 16K instruction (32 b/l), 16K data (32 b/l), 512K external (64 b/l)
[   1.0000000] psycho0 at mainbus0
[   1.0000000] psycho0: SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 0; PCI bus 0
[   1.0000000] pci0 at psycho0
[   1.0000000] ebus0 at pci0 dev 7 function 0: Acer Labs M1533 PCI-ISA Bridge, revision 0x00
[   1.0000000] dma at ebus0 addr 0-ffff ipl 2a not configured
[   1.0000000] rtc0 at ebus0 addr 70-71: mc146818 compatible time-of-day clock: m5819
[   1.0000000] power at ebus0 addr 2000-2007 ipl 23 not configured
[   1.0000000] lom0 at ebus0 addr 8010-8011 ipl 2a: SUNW,lomh: LOMlite2 rev 3.12
[   1.0000000] com0 at ebus0 addr 3f8-3ff ipl 2b: ns16550a, working fifo
[   1.0000000] com0: console
[   1.0000000] com1 at ebus0 addr 2e8-2ef ipl 2b: ns16550a, working fifo
[   1.0000000] flashprom at ebus0 addr 0-7ffff not configured
[   1.0000000] alipm0 at pci0 dev 3 function 0: 74KHz clock
[   1.0000000] iic0 at alipm0: I2C bus
[   1.0000000] admtemp0 at iic0 addr 0x18: MAX1617A temperature sensor: id. 0x41, rev. 0x34
[   1.0000000] spdmem0 at iic0 addr 0x54
[   1.0000000] spdmem0: SDRAM (registered), data ECC, 512MB, 133MHz (PC-133)
[   1.0000000] spdmem1 at iic0 addr 0x55
[   1.0000000] spdmem1: SDRAM (registered), data ECC, 512MB, 133MHz (PC-133)
[   1.0000000] spdmem2 at iic0 addr 0x56
[   1.0000000] spdmem2: SDRAM (registered), data ECC, 512MB, 133MHz (PC-133)
[   1.0000000] spdmem3 at iic0 addr 0x57
[   1.0000000] spdmem3: SDRAM (registered), data ECC, 512MB, 133MHz (PC-133)
[   1.0000000] seeprom0 at iic0 addr 0x50: i2c-nvram: size 8192
[   1.0000000] seeprom1 at iic0 addr 0x51: motherboard-fru: size 8192
[   1.0000000] tlp0 at pci0 dev 12 function 0: Davicom DM9102A Ethernet, pass 3.1
[   1.0000000] tlp0: interrupting at ivec 3006
[   1.0000000] tlp0: Ethernet address 00:03:ba:XX:XX:XX
[   1.0000000] dmphy0 at tlp0 phy 1: DM9102 10/100 media interface, rev. 0
[   1.0000000] dmphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[   1.0000000] tlp1 at pci0 dev 5 function 0: Davicom DM9102A Ethernet, pass 3.1
[   1.0000000] tlp1: interrupting at ivec 301c
[   1.0000000] tlp1: Ethernet address 00:03:ba:XX:XX:XX
[   1.0000000] dmphy1 at tlp1 phy 1: DM9102 10/100 media interface, rev. 0
[   1.0000000] dmphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[   1.0000000] ohci0 at pci0 dev 10 function 0: Acer Labs M5237 USB 1.1 Host Controller (rev. 0x03)
[   1.0000000] ohci0: interrupting at ivec 24
[   1.0000000] ohci0: OHCI version 1.0, legacy support
[   1.0000000] usb0 at ohci0: USB revision 1.0
[   1.0000000] aceride0 at pci0 dev 13 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc3)
[   1.0000000] aceride0: using ivec 180c for native-PCI interrupt
[   1.0000000] atabus0 at aceride0 channel 0
[   1.0000000] atabus1 at aceride0 channel 1
[   1.0000000] pcons at mainbus0 not configured
[   1.0000356] No counter-timer -- using STICK at 5.555MHz as system clock.
[   1.1300089] uhub0 at usb0: NetBSD (0000) OHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
[   4.2099777] wd0 at atabus0 drive 0
[   4.2538160] wd0: <SAMSUNG SP0802N>
[   4.2965217] wd0: 76351 MB, 155127 cyl, 16 head, 63 sec, 512 bytes/sect x 156368016 sectors
[   4.3999782] atapibus0 at atabus1: 2 targets
[   4.4499773] cd0 at atapibus0 drive 0: <HL-DT-ST GCE-8525B, , 1.05> cdrom removable
aceride0:1:0: lost interrupt
[   5.5991961]  type: atapi tc_bcount: 32 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
[   5.7259624] aceride0:1:0: device timeout, c_bcount=32, c_skip=0
[   5.7259624] cd0: transfer error, downgrading to Ultra-DMA mode 1
[   5.8699635] cd0(aceride0:1:0): generic HBA error
aceride0:1:0: lost interrupt
[   7.9291952]  type: atapi tc_bcount: 32 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
[   8.0559614] aceride0:1:0: device timeout, c_bcount=32, c_skip=0
[   8.0559614] cd0: transfer error, downgrading to PIO mode 4
[   8.1921088] cd0(aceride0:1:0): generic HBA error
[   9.2199278] root on cd0a dumps on cd0b
[   9.5599258] root file system type: cd9660
[   9.7499225] kern.module.path=/stand/sparc64/9.0/modules

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-sparc64-maintainer->kern-bug-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sat, 08 Aug 2020 23:17:14 +0000
Responsible-Changed-Why:
let's assume it's not sparc64-specific.

(also, I don't think aceride will have changed that much since -9, so
it might not be that much work to locate the change that broke it)


From: Kyra Sable <kyra.sable@mail.ru>
To: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
 port-sparc64-maintainer@netbsd.org, netbsd-bugs@netbsd.org,
 gnats-admin@netbsd.org, dholland@NetBSD.org
Cc: 
Subject: Re: kern/55540 (aceride Fails To Downgrade Transfer Mode)
Date: Sat, 8 Aug 2020 23:20:14 -0400

 On 2020-08-08 19:17, dholland@NetBSD.org wrote:
 > Synopsis: aceride Fails To Downgrade Transfer Mode
 > 
 > Responsible-Changed-From-To: port-sparc64-maintainer->kern-bug-people
 > Responsible-Changed-By: dholland@NetBSD.org
 > Responsible-Changed-When: Sat, 08 Aug 2020 23:17:14 +0000
 > Responsible-Changed-Why:
 > let's assume it's not sparc64-specific.
 > 
 > (also, I don't think aceride will have changed that much since -9, so
 > it might not be that much work to locate the change that broke it)

 Looks like it's indeed not sparc64-specific. Here's the culprit:

 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ata/ata.c?rev=1.159&content-type=text/x-cvsweb-markup

 Scarcely "not relevant any more" given NetBSD's intended target audience.

Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 09 Aug 2020 04:04:16 +0000
Responsible-Changed-Why:
Could you look into this? Seems to be your change...


From: Martin Husemann <martin@duskware.de>
To: Kyra Sable <kyra.sable@mail.ru>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55540 (aceride Fails To Downgrade Transfer Mode)
Date: Sun, 9 Aug 2020 07:43:02 +0200

 On Sat, Aug 08, 2020 at 11:20:14PM -0400, Kyra Sable wrote:
 > Scarcely "not relevant any more" given NetBSD's intended target audience.

 Thanks for hunting this done, but I think you misunderstood the commit log
 message. We certainly still care for this devices still.

 I have never seen this exact version of the error / downgrade path, and
 I am typing this on a machine that has one:

 aceride0 at pci3 dev 13 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc4)
 aceride0: bus-master DMA support present
 aceride0: using PIO transfers above 137GB as workaround for 48bit DMA access bug, expect reduced performance
 aceride0: primary channel configured to native-PCI mode
 aceride0: using ivec 1f98 for native-PCI interrupt
 [..]
 cd0 at atapibus0 drive 0: <JLMS XJ-HD166S, , D3S4> cdrom removable
 cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
 cd0(aceride0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)

 and the cd works fine.

 BUT: I have a ATA<->SD card converter on that ATA bus that I use to boot the
 machine (all "disks" on SATA that firmware does not know about), and I have
 to disable UDMA on that, otherwise it will not be able write to the "disk".

 (but then failure mode looks quite different to what you reported).

 I always assumed this is a bug in the firmware of the SD card converter.

 I will put another (real) ATA disk in this machine and test, and also check
 if I have more machines with aceride.

 This might be a driver bug, or a quirk in combination with certain ATA disks
 and aceride. We need to dig deeper and avoid the original HBA error, or
 recognize the issue and adjust capabilities, so we end up with a working
 setup w/o the error -> degration path.

 Martin

 P.S.: Jaromir - could this be similar to the cmdide issue we fixed recently?

From: Jaromir Dolecek <jaromir.dolecek@gmail.com>
To: gnats-bugs@netbsd.org
Cc: jdolecek@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
 kyra.sable@mail.ru
Subject: Re: kern/55540 (aceride Fails To Downgrade Transfer Mode)
Date: Sun, 9 Aug 2020 11:09:07 +0200

 I will look into this once I am back from vacations on Aug 16th

 > Le 9 ao=C3=BBt 2020 =C3=A0 07:45, Martin Husemann <martin@duskware.de> a =C3=
 =A9crit :
 >=20
 > =EF=BB=BFThe following reply was made to PR kern/55540; it has been noted b=
 y GNATS.
 >=20
 > From: Martin Husemann <martin@duskware.de>
 > To: Kyra Sable <kyra.sable@mail.ru>
 > Cc: gnats-bugs@netbsd.org
 > Subject: Re: kern/55540 (aceride Fails To Downgrade Transfer Mode)
 > Date: Sun, 9 Aug 2020 07:43:02 +0200
 >=20
 >> On Sat, Aug 08, 2020 at 11:20:14PM -0400, Kyra Sable wrote:
 >> Scarcely "not relevant any more" given NetBSD's intended target audience.=

 >=20
 > Thanks for hunting this done, but I think you misunderstood the commit log=

 > message. We certainly still care for this devices still.
 >=20
 > I have never seen this exact version of the error / downgrade path, and
 > I am typing this on a machine that has one:
 >=20
 > aceride0 at pci3 dev 13 function 0: Acer Labs M5229 UDMA IDE Controller (r=
 ev. 0xc4)
 > aceride0: bus-master DMA support present
 > aceride0: using PIO transfers above 137GB as workaround for 48bit DMA acce=
 ss bug, expect reduced performance
 > aceride0: primary channel configured to native-PCI mode
 > aceride0: using ivec 1f98 for native-PCI interrupt
 > [..]
 > cd0 at atapibus0 drive 0: <JLMS XJ-HD166S, , D3S4> cdrom removable
 > cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
 > cd0(aceride0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DM=
 A)
 >=20
 > and the cd works fine.
 >=20
 > BUT: I have a ATA<->SD card converter on that ATA bus that I use to boot t=
 he
 > machine (all "disks" on SATA that firmware does not know about), and I hav=
 e
 > to disable UDMA on that, otherwise it will not be able write to the "disk"=
 .
 >=20
 > (but then failure mode looks quite different to what you reported).
 >=20
 > I always assumed this is a bug in the firmware of the SD card converter.
 >=20
 > I will put another (real) ATA disk in this machine and test, and also chec=
 k
 > if I have more machines with aceride.
 >=20
 > This might be a driver bug, or a quirk in combination with certain ATA dis=
 ks
 > and aceride. We need to dig deeper and avoid the original HBA error, or
 > recognize the issue and adjust capabilities, so we end up with a working
 > setup w/o the error -> degration path.
 >=20
 > Martin
 >=20
 > P.S.: Jaromir - could this be similar to the cmdide issue we fixed recentl=
 y?
 >=20

From: Kyra Sable <kyra.sable@mail.ru>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55540 (aceride Fails To Downgrade Transfer Mode)
Date: Sun, 9 Aug 2020 17:50:40 -0400

 On 2020-08-09 01:43, Martin Husemann wrote:
 > On Sat, Aug 08, 2020 at 11:20:14PM -0400, Kyra Sable wrote:
 >> Scarcely "not relevant any more" given NetBSD's intended target audience.
 > 
 > Thanks for hunting this done, but I think you misunderstood the commit log
 > message. We certainly still care for this devices still.

 Ah okay, my bad. There seems to be a disturbing trend of rotting support 
 for sparc64 (and especially sparc). I thought this was yet another 
 example of that.

 > This might be a driver bug, or a quirk in combination with certain ATA disks
 > and aceride. We need to dig deeper and avoid the original HBA error, or
 > recognize the issue and adjust capabilities, so we end up with a working
 > setup w/o the error -> degration path.

 AFAIK this is a known issue specific to ATAPI devices (an LG CD-ROM 
 here) and this chip. I've never had an issue with hard drives. Here's 
 the Linux approach (on the very same hardware):

 aceride0 at pci0 dev 13 function 0: Acer Labs M5229 UDMA IDE Controller 
 (rev. 0xc3)
 ata2.00: WARNING: ATAPI DMA disabled for reliability issues.  It can be 
 enabled
 ata2.00: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs 
 node.
 scsi 1:0:0:0: CD-ROM            HL-DT-ST CD-RW GCE-8525B  1.05 PQ: 0 ANSI: 5
 sr 1:0:0:0: [sr0] scsi3-mmc drive: 40x/52x writer cd/rw xa/form2 cdda tray
 cdrom: Uniform CD-ROM driver Revision: 3.20
 sr 1:0:0:0: Attached scsi CD-ROM sr0

State-Changed-From-To: open->feedback
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Sun, 16 Aug 2020 14:53:05 +0000
State-Changed-Why:
Can you confirm whether following patch fixes the behaviour?

http://www.netbsd.org/~jdolecek/aceride_atapi_nodma.diff.txt

Thanks.


From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55540 CVS commit: src/sys/dev/pci
Date: Sun, 20 Dec 2020 19:30:04 +0000

 Module Name:	src
 Committed By:	jdolecek
 Date:		Sun Dec 20 19:30:04 UTC 2020

 Modified Files:
 	src/sys/dev/pci: aceride.c

 Log Message:
 disable (U)DMA for ATAPI on aceride(4), the chip doesn't support it
 PR port-sparc64/55540


 To generate a diff of this commit:
 cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/aceride.c

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

State-Changed-From-To: feedback->closed
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Wed, 20 Jan 2021 21:25:59 +0000
State-Changed-Why:
The last commit should have fixed.


>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.