NetBSD Problem Report #46530

From ryo_on@yk.rim.or.jp  Sun Jun  3 09:19:54 2012
Return-Path: <ryo_on@yk.rim.or.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id A8D6B63BA27
	for <gnats-bugs@gnats.netbsd.org>; Sun,  3 Jun 2012 09:19:54 +0000 (UTC)
Message-Id: <20120603091954.A8D6B63BA27@www.NetBSD.org>
Date: Sun,  3 Jun 2012 09:19:54 +0000 (UTC)
From: ryoon@NetBSD.org
Reply-To: ryoon@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2 on qemu-1.0.1 and 1.1.0 
X-Send-Pr-Version: 3.95

>Number:         46530
>Category:       port-sparc
>Synopsis:       Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2 on qemu-1.0.1 and 1.1.0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 03 09:20:03 +0000 2012
>Closed-Date:    Thu May 26 04:39:43 +0000 2022
>Last-Modified:  Thu May 26 04:39:43 +0000 2022
>Originator:     Ryo ONODERA
>Release:        NetBSD 6.99.7
>Organization:

>Environment:


System: NetBSD hydrogen.elements.tetera.org 6.99.7 NetBSD 6.99.7 (LEAFGIRLC) #3: Sat May 19 14:13:12 JST 2012 root@hydrogen.elements.tetera.org:/usr/obj/sys/arch/i386/compile/LEAFGIRLC i386
Architecture: i386
Machine: i386
>Description:
Installing NetBSD/sparc 5.1.2 and 6.0_BETA2 to qemu-1.0.1 and 1.1.0 fails.
With qemu-0.15.1, 5.1.2 works fine (6.0_BETA2 is not tested).

My disk image is created with the following command.
% qemu-img create -f qcow2 3GB_2.img 3G

I have gotten
disklabel: warning, partition b: not starting on cylinder boundary
message, when disklabel is invoked from sysinst.

And with already-installed NetBSD/sparc 5.1 image on qemu-1.1.0,
I have gotten the following errors.

* In dmesg (6.0_BETA2)
sd0(esp0:0:0:0): esp0: timed out [ecb 0xf0542f88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf0542f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
sd0(esp0:0:0:0): esp0: timed out [ecb 0xf0542f88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf0542f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN

cd0 at scsibus0 target 2 lun 0: <QEMU, QEMU CD-ROM, 1.1.> cdrom removable
cd0(esp0:0:2:0): esp0: timed out [ecb 0xf0542f88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf0542f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
cd0(esp0:0:2:0): esp0: timed out [ecb 0xf0542f88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf0542f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN

* On console (6.0_BETA2)
esp0: unexpected status after select: [intr 10, stat 93, step 0]
esp0: unexpected status after select: [intr 10, stat 93, step 0]
(repeated)

And the following is dmesg of 5.1.2 and 6.0_BETA2.

* NetBSD/sparc 5.1.2 on qemu-1.1.0

% qemu-system-sparc -M SS-10 -m 128M -cdrom sparccd-5.1.2.iso -hda 3GB_2.img -boot d -nographic
zstty1 at zs0 channel 1
zs1 at obio0 slot 0 offset 0x0 level 12 softpri 6
kbd0 at zs1 channel 0: baud rate 76800
ms0 at zs1 channel 1: baud rate 76800
fdc0 at obio0 slot 0 offset 0x700000 level 11: no drives attached
auxreg0 at obio0 slot 0 offset 0x800000
power0 at obio0 slot 0 offset 0xa01000 level 2
iommu0 at mainbus0 ioaddr 0xe0000000: version 0x3/0x0, page-size 4096, range 64MB
sbus0 at iommu0: clock = 21.250 MHz
tcx0 at sbus0 slot 2 offset 0x800000 level 5 (ipl 9): SUNW,tcx, 1024 x 768, id 0, rev 0, sense 0
tcx0: attached to /dev/fb0
dma0 at sbus0 slot 15 offset 0x400000: DMA rev 2
esp0 at dma0 slot 15 offset 0x800000 level 4: ESP200, 40MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
ledma0 at sbus0 slot 15 offset 0x400010: DMA rev 2
le0 at ledma0 slot 15 offset 0xc00000 level 6: address 52:54:00:12:34:56
le0: 8 receive buffers, 2 transmit buffers
power-management at sbus0 slot 15 offset 0xa000000 not configured
eccmemctl0 at mainbus0 ioaddr 0x0: version 0x0/0x1
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 1.1.> disk fixed
sd0: 3072 MB, 6241 cyl, 16 head, 63 sec, 512 bytes/sect x 6291456 sectors
sd0(esp0:0:0:0): esp0: timed out [ecb 0xf0542f88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf0542f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
sd0(esp0:0:0:0): esp0: timed out [ecb 0xf0542f88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf0542f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN
sd0: async, 8-bit transfers
cd0 at scsibus0 target 2 lun 0: <QEMU, QEMU CD-ROM, 1.1.> cdrom removable
cd0(esp0:0:2:0): esp0: timed out [ecb 0xf0542f88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf0542f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
cd0(esp0:0:2:0): esp0: timed out [ecb 0xf0542f88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf0542f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN
cd0: async, 8-bit transfers
root on md0a dumps on md0b
root file system type: ffs
WARNING: clock gained 121 days
WARNING: CHECK AND RESET THE DATE!
Welcome to the NetBSD/sparc microroot setup utility.

We've just completed the first stage of a two-stage procedure to load a
fully functional NetBSD installation environment on your machine.  In the
second stage which is to follow now, a set of additional installation
utilities must be load from your NetBSD/sparc installation medium.

This procedure supports one of the following media:

1) cdrom
2) tape
3) floppy

Installation medium to load the additional utilities from:

* NetBSD/sparc 6.0_BETA2 on qemu-1.1.0


% qemu-system-sparc -M SS-10 -m 128M -cdrom NetBSD-6.0_BETA2-sparc.iso -hda 3GB_2.img -boot d -nographic
zstty1 at zs0 channel 1
zs1 at obio0 slot 0 offset 0x0 level 12 softpri 6
zstty2 at zs1 channel 0
zstty3 at zs1 channel 1
fdc0 at obio0 slot 0 offset 0x700000 level 11: no drives attached
auxreg0 at obio0 slot 0 offset 0x800000
power0 at obio0 slot 0 offset 0xa01000 level 2
iommu0 at mainbus0 ioaddr 0xe0000000: version 0x3/0x0, page-size 4096, range 64MB
sbus0 at iommu0: clock = 21.250 MHz
genfb0 at sbus0 slot 2 offset 0x800000 level 5 (ipl 9)
genfb0: 1024 x 768 at 8 bit
genfb0: framebuffer at offset 0x0
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    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 6.0_BETA2 (INSTALL)
total memory = 111 MB
avail memory = 106 MB
timecounter: Timecounters tick every 10.000 msec
bootpath: /iommu0/sbus0/espdma0/esp0/sd@2,0:d
mainbus0 (root): SUNW,SPARCstation-10: hostid 72000000
cpu0 at mainbus0: TMS390Z50 v0 or TMS390Z55 @ 170 MHz, on-chip FPU
cpu0: physical 20K instruction (64 b/l), 16K data (32 b/l), 1024K external (32 b/l): cache enabled
obio0 at mainbus0
clock0 at obio0 slot 0 offset 0x200000: mk48t08
timer0 at obio0 slot 0 offset 0x300000: delay constant 1, frequency = 1000000 Hz
timecounter: Timecounter "timer-counter" frequency 1000000 Hz quality 100
zs0 at obio0 slot 0 offset 0x100000 level 12 softpri 6
zstty0 at zs0 channel 0 (console i/o)
zstty1 at zs0 channel 1
zs1 at obio0 slot 0 offset 0x0 level 12 softpri 6
zstty2 at zs1 channel 0
zstty3 at zs1 channel 1
fdc0 at obio0 slot 0 offset 0x700000 level 11: no drives attached
auxreg0 at obio0 slot 0 offset 0x800000
power0 at obio0 slot 0 offset 0xa01000 level 2
iommu0 at mainbus0 ioaddr 0xe0000000: version 0x3/0x0, page-size 4096, range 64MB
sbus0 at iommu0: clock = 21.250 MHz
genfb0 at sbus0 slot 2 offset 0x800000 level 5 (ipl 9)
genfb0: 1024 x 768 at 8 bit
genfb0: framebuffer at offset 0x0
genfb0: framebuffer at 0xfe027000, size 1024x768, depth 8, stride 1024
wsdisplay1 at genfb0 kbdmux 1
dma0 at sbus0 slot 15 offset 0x400000: DMA rev 2
esp0 at dma0 slot 15 offset 0x800000 level 4: ESP200, 40MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
ledma0 at sbus0 slot 15 offset 0x400010: DMA rev 2
le0 at ledma0 slot 15 offset 0xc00000 level 6: address 52:54:00:12:34:56
le0: 8 receive buffers, 2 transmit buffers
power-management at sbus0 slot 15 offset 0xa000000 not configured
eccmemctl0 at mainbus0 ioaddr 0x0: version 0x0/0x1
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 1.1.> disk fixed
sd0: 3072 MB, 6241 cyl, 16 head, 63 sec, 512 bytes/sect x 6291456 sectors
sd0(esp0:0:0:0): esp0: timed out [ecb 0xf061af88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf061af88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
sd0(esp0:0:0:0): esp0: timed out [ecb 0xf061af88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf061af88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN
sd0: async, 8-bit transfers
cd0 at scsibus0 target 2 lun 0: <QEMU, QEMU CD-ROM, 1.1.> cdrom removable
cd0(esp0:0:2:0): esp0: timed out [ecb 0xf061af88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf061af88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
cd0(esp0:0:2:0): esp0: timed out [ecb 0xf061af88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf061af88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN
cd0: async, 8-bit transfers
root on md0a dumps on md0b
root file system type: ffs
Welcome to the NetBSD/sparc microroot setup utility.

We've just completed the first stage of a two-stage procedure to load a
fully functional NetBSD installation environment on your machine.  In the
second stage which is to follow now, a set of additional installation
utilities must be load from your NetBSD/sparc installation medium.

This procedure supports one of the following media:

1) cdrom
2) tape
3) floppy

Installation medium to load the additional utilities from:


>How-To-Repeat:
See above dmesg section.

qemu-1.1.0 is available via pkgsrc/wip/qemu.
I have tested on NetBSD/i386 5.99.7.

>Fix:

I have no idea, please fix.


>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-sparc/46530: Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2 on qemu-1.0.1 and 1.1.0
Date: Tue, 5 Jun 2012 17:11:30 +0200

 On Sun, Jun 03, 2012 at 09:20:03AM +0000, ryoon@NetBSD.org wrote:
 > esp0: unexpected status after select: [intr 10, stat 93, step 0]
 > esp0: unexpected status after select: [intr 10, stat 93, step 0]

 I can reproduce that with -current, and I also get:

 (esp0:0:0): select; 11 left in DMA buffer [intr 18, stat 87, step 4]
 (esp0:0:0): select; 11 left in DMA buffer [intr 18, stat 87, step 4]
 (esp0:0:0): select; 11 left in DMA buffer [intr 18, stat 87, step 4]

 Martin

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-sparc/46530: Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2 on qemu-1.0.1 and 1.1.0
Date: Wed, 6 Jun 2012 09:18:54 +0200

 With more debugging in the driver enabled:

 [ncr53c9x_scsipi_request] [0x8, 6]->0 [ncr53c9x_sched] [ncr53c9_select(t0,l0,cmd:8,tag:0,0)] DATA_IN_PHASE STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] 
 [ncr53c9x_scsipi_request] [0x8, 6]->0 [ncr53c9x_sched] [ncr53c9_select(t0,l0,cmd:8,tag:0,0)] DATA_IN_PHASE STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] 
 [ncr53c9x_scsipi_request] [0x8, 6]->0 [ncr53c9x_sched] [ncr53c9_select(t0,l0,cmd:8,tag:0,0)] DATA_IN_PHASE STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched]
 DATA_IN_PHASE STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 OUT_PHASE [8192] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 OUT_PHASE [8192] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 IN_PHASE STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0 
 [ncr53c9x_scsipi_request] [0xa, 6]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:a,tag:0,0)] DATA_OUT_PHASE [8192] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0xa, 6]->0 [ncr53c9x_sched] [ncr53x_select(t0,l0,cmd:a,tag:0,0)] DATA_OUT_PHASE [8192] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0xa, 6]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:a,tag:0,0)] DATA_OUT_PHASE [8192] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0xa, 6]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:a,tag:0,0)] DATA_OUT_PHASE [8192] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0xa, 6]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:a,tag:0,0)] DATA_OUT_PHASE [8192] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0xa, 6]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:a,tag:0,0)] DATA_OUT_PHASE [1024] STATSTATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0xa, 6]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:a,tag:0,0)] DATA_OUT_PHASE [512] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0x35, 10]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:35,tag:0,0)] (esp0:0:0): select; 11 left in DMA buffer [intr 18, stat 87, step 4]
 MESSAGE_IN_PHASE STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0x35, 10]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:35,tag:0,0)] esp0: unexpected status after select: [intr 10, stat 93, step 0]
 [NCR_INIT(1) 2] [ncr53c9x_done(error:6)] error=6
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0x35, 10]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:35,tag:0,0)] esp0: unexpected status after select: [intr 10, stat 93, step 0]
 [NCR_INIT(1) 2] [ncr53c9x_done(error:6)] error=6
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0x35, 10]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:35,tag:0,0)] esp0: unexpected status after select: [intr 10, stat 93, step 0]
 [NCR_INIT(1) 2] [ncr53c9x_done(error:6)] error=6
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0x35, 10]->0 [nc[ncr53c9x_scsipi_request] [0xa, 6]->0 [ncr53c9x_sched] [ncr53c9x_select(t0,l0,cmd:a,tag:0,0)] DATA_OUT_PHASE [512] STATUS_PHASE <stat:(0,0)>[ncr53c9x_done(error:0)] error=0
 [ncr53c9x_sched] [ncr53c9x_scsipi_request] [0x35, 10]->0


 (hope I didn't mangle something when extracting this from the log manually)

 Martin

State-Changed-From-To: open->closed
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Mon, 09 Jul 2012 09:10:13 +0000
State-Changed-Why:
martin@'s commit
http://mail-index.netbsd.org/pkgsrc-changes/2012/06/18/msg074594.html
have fixed this problem.


State-Changed-From-To: closed->open
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Sun, 23 Sep 2012 15:13:12 +0000
State-Changed-Why:
With qemu-1.2.0nb1, NetBSD/sparc 6.0_RC2 generates the follwoing errors.
And martin@'s patch is not intented to fix this problem.
I have no idea about previous no error qemu, but this PR should be re-opened.


From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and
 6.0_BETA2 on qemu-1.0.1 and 1.1.0)
Date: Mon, 24 Sep 2012 00:14:42 +0900 (JST)

 Sorry I have forgotten t include the error messages.

 esp0: !TC on DATA XFER [intr 18, stat 82, step 4] prevphase 2, resid 0
 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0


Responsible-Changed-From-To: port-sparc-maintainer->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Sun, 23 Sep 2012 19:44:43 +0000
Responsible-Changed-Why:
I think this is a qemu bug - I'll look at it.



From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: martin@NetBSD.org, ryoon@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2
	 on qemu-1.0.1 and 1.1.0)
Date: Mon, 24 Sep 2012 05:07:54 +0900

 > I think this is a qemu bug - I'll look at it.

 It looks qemu's esp.c has some inconsistent ops around
 DMA command xfer termination.

 The following patch for qemu-1.2.0 would suppress most warning messages.
 (still not sure what it actually tries though)

 --- qemu-1.2.0/hw/esp.c.orig	2012-09-05 23:03:06.000000000 +0900
 +++ qemu-1.2.0/hw/esp.c	2012-09-24 04:57:37.000000000 +0900
 @@ -91,6 +91,10 @@
          dmalen |= s->rregs[ESP_TCMID] << 8;
          dmalen |= s->rregs[ESP_TCHI] << 16;
          s->dma_memory_read(s->dma_opaque, buf, dmalen);
 +        s->rregs[ESP_RSTAT] |= STAT_TC;
 +        s->rregs[ESP_TCLO] = 0;
 +        s->rregs[ESP_TCMID] = 0;
 +        s->rregs[ESP_TCHI] = 0;
      } else {
          dmalen = s->ti_size;
          memcpy(buf, s->ti_buf, dmalen);
 @@ -242,6 +246,10 @@
      if (s->do_cmd) {
          trace_esp_do_dma(s->cmdlen, len);
          s->dma_memory_read(s->dma_opaque, &s->cmdbuf[s->cmdlen], len);
 +        s->rregs[ESP_RSTAT] |= STAT_TC;
 +        s->rregs[ESP_TCLO] = 0;
 +        s->rregs[ESP_TCMID] = 0;
 +        s->rregs[ESP_TCHI] = 0;
          s->ti_size = 0;
          s->cmdlen = 0;
          s->do_cmd = 0;

 ---
 Izumi Tsutsui

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Cc: martin@NetBSD.org
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and
 6.0_BETA2 on qemu-1.0.1 and 1.1.0)
Date: Tue, 25 Sep 2012 02:38:33 +0900 (JST)

 Hi,

 From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>, Date: Sun, 23 Sep 2012 20:10:07 +0000 (UTC)

 > The following reply was made to PR port-sparc/46530; it has been noted by GNATS.
 > 
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 > To: gnats-bugs@NetBSD.org
 > Cc: martin@NetBSD.org, ryoon@NetBSD.org, tsutsui@ceres.dti.ne.jp
 > Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2
 > 	 on qemu-1.0.1 and 1.1.0)
 > Date: Mon, 24 Sep 2012 05:07:54 +0900
 > 
 >  > I think this is a qemu bug - I'll look at it.
 >  
 >  It looks qemu's esp.c has some inconsistent ops around
 >  DMA command xfer termination.
 >  
 >  The following patch for qemu-1.2.0 would suppress most warning messages.
 >  (still not sure what it actually tries though)
 >  
 >  --- qemu-1.2.0/hw/esp.c.orig	2012-09-05 23:03:06.000000000 +0900
 >  +++ qemu-1.2.0/hw/esp.c	2012-09-24 04:57:37.000000000 +0900
 >  @@ -91,6 +91,10 @@
 >           dmalen |= s->rregs[ESP_TCMID] << 8;
 >           dmalen |= s->rregs[ESP_TCHI] << 16;
 >           s->dma_memory_read(s->dma_opaque, buf, dmalen);
 >  +        s->rregs[ESP_RSTAT] |= STAT_TC;
 >  +        s->rregs[ESP_TCLO] = 0;
 >  +        s->rregs[ESP_TCMID] = 0;
 >  +        s->rregs[ESP_TCHI] = 0;
 >       } else {
 >           dmalen = s->ti_size;
 >           memcpy(buf, s->ti_buf, dmalen);
 >  @@ -242,6 +246,10 @@
 >       if (s->do_cmd) {
 >           trace_esp_do_dma(s->cmdlen, len);
 >           s->dma_memory_read(s->dma_opaque, &s->cmdbuf[s->cmdlen], len);
 >  +        s->rregs[ESP_RSTAT] |= STAT_TC;
 >  +        s->rregs[ESP_TCLO] = 0;
 >  +        s->rregs[ESP_TCMID] = 0;
 >  +        s->rregs[ESP_TCHI] = 0;
 >           s->ti_size = 0;
 >           s->cmdlen = 0;
 >           s->do_cmd = 0;

 Your patch suppress the output of errors.
 I will pkgsrc bulk build on the VM and check the error message.

 If bulk build does not make errors, I will integrate the patch to
 emulators/qemu.

 Thank you.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Cc: 
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and
 6.0_BETA2 on qemu-1.0.1 and 1.1.0)
Date: Wed, 26 Sep 2012 03:12:07 +0900 (JST)

 Hi,

 Sadly with tsutsui@'s patch,
 I have gotten the errors.

 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0

 Frequency is relatively low, but reproducable.

 I have submit the patch to qemu-devel.
 And I will follow the report.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2 on qemu-1.0.1 and 1.1.0)
Date: Wed, 26 Sep 2012 08:54:51 +0200

 On Tue, Sep 25, 2012 at 06:15:09PM +0000, Ryo ONODERA wrote:
 >  Sadly with tsutsui@'s patch,
 >  I have gotten the errors.
 >  
 >  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0

 I've seen that before and would guess it is unrelated.
 Does installation work for you despite this error messages?

 Martin

From: jnemeth@victoria.tc.ca (John Nemeth)
To: gnats-bugs@NetBSD.org, martin@NetBSD.org, gnats-admin@NetBSD.org,
        netbsd-bugs@NetBSD.org, ryoon@NetBSD.org
Cc: 
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2 on qemu-1.0.1 and 1.1.0)
Date: Thu, 27 Sep 2012 23:07:33 -0700

 On Jan 11,  6:22am, Ryo ONODERA wrote:
 }
 } The following reply was made to PR port-sparc/46530; it has been noted by GNATS.
 } 
 } From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
 } To: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
 } Cc: 
 } Date: Wed, 26 Sep 2012 03:12:07 +0900 (JST)
 } 
 }  Sadly with tsutsui@'s patch,
 }  I have gotten the errors.
 }  
 }  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 }  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 }  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 }  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 }  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 }  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 }  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 }  
 }  Frequency is relatively low, but reproducable.
 }  
 }  I have submit the patch to qemu-devel.
 }  And I will follow the report.

      I've seen these messages on my Ultra 2 with a Seagate ST373453LC
 hard disk.  It is a 72.5 GB, 15,000 RPM Ultra SCSI drive.  The drive
 works fine in a PC:

 ahc1 at pci8 dev 1 function 0: Adaptec 2940 Ultra SCSI adapter
 ahc1: interrupting at ioapic0 pin 22
 ahc1: aic7880: Ultra Wide Channel A, SCSI Id7, 16/253 SCBs
 scsibus0 at ahc1: 16 targets, 8 luns per target
 sd0 at scsibus0 target 0 lun 0: <IBM-SSG, S53D073, C61A> disk fixed
 sd0: 70006 MB, 31310 cyl, 8 head, 572 sec, 512 bytes/sect x 143374000 sectors
 sd0: sync (100.00ns offset 8), 16-bit (20.000MB/s) transfers, tagged queueing

 The drive was rebadged by IBM with at least some firmware customisation
 (i.e.  model string).

      This means that the bug might not be in qemu, but rather with our
 esp(4).

 }-- End of excerpt from Ryo ONODERA

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and6.0_BETA2
	 on qemu-1.0.1 and 1.1.0)
Date: Fri, 28 Sep 2012 21:36:21 +0900

 >  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 >  
 >  Frequency is relatively low, but reproducable.

 Does it happen even on old (0.15.1 etc) qemu?

 ---
 Izumi Tsutsui

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, martin@duskware.de
Cc: martin@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and
 6.0_BETA2 on qemu-1.0.1 and 1.1.0)
Date: Sat, 29 Sep 2012 00:50:45 +0900 (JST)

 From: Martin Husemann <martin@duskware.de>, Date: Wed, 26 Sep 2012 06:55:02 +0000 (UTC)

 > The following reply was made to PR port-sparc/46530; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and 6.0_BETA2 on qemu-1.0.1 and 1.1.0)
 > Date: Wed, 26 Sep 2012 08:54:51 +0200
 > 
 >  On Tue, Sep 25, 2012 at 06:15:09PM +0000, Ryo ONODERA wrote:
 >  >  Sadly with tsutsui@'s patch,
 >  >  I have gotten the errors.
 >  >  
 >  >  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 >  
 >  I've seen that before and would guess it is unrelated.
 >  Does installation work for you despite this error messages?

 I can finish installation of 6.0_RC2.


From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Cc: martin@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2
 and6.0_BETA2 on qemu-1.0.1 and 1.1.0)
Date: Sat, 29 Sep 2012 01:04:21 +0900 (JST)

 From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>, Date: Fri, 28 Sep 2012 12:40:05 +0000 (UTC)

 > The following reply was made to PR port-sparc/46530; it has been noted by GNATS.
 > 
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 > To: gnats-bugs@NetBSD.org
 > Cc: tsutsui@ceres.dti.ne.jp
 > Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2 and6.0_BETA2
 > 	 on qemu-1.0.1 and 1.1.0)
 > Date: Fri, 28 Sep 2012 21:36:21 +0900
 > 
 >  >  esp0: !TC on DATA XFER [intr 10, stat 83, step 0] prevphase 2, resid 0
 >  >  
 >  >  Frequency is relatively low, but reproducable.
 >  
 >  Does it happen even on old (0.15.1 etc) qemu?

 It is too complicated. Many problems are mixed...

 It seems that !TC error is not happened on qemu-0.15.1 and -0.14
 in short time test run.
 But I have gotten the following errors.

 cd0(esp0:0:2:0): command aborted, retrying, cmd 0x35, info 0x0, data = 00 00 00 00 00 06 00
 cd0(esp0:0:2:0): command aborted, cmd 0x35, info 0x0, data = 00 00 00 00 00 06 00


 On qemu-0.15.1 and -0.14, I have gotten timeout errors.
 I cannot understand why I had missed these errors...

 6.0_RC2 on qemu-1.2.0

 sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 1.2.> disk fixed
 sd0: 3072 MB, 6241 cyl, 16 head, 63 sec, 512 bytes/sect x 6291456 sectors


 5.1.2 on qemu-1.2.0

 sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 1.2.> disk fixed
 sd0: 3072 MB, 6241 cyl, 16 head, 63 sec, 512 bytes/sect x 6291456 sectors


 6.0_RC2 on qemu-0.15.1

 sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 0.15> disk fixed
 sd0: fabricating a geometry
 sd0: 3072 MB, 3072 cyl, 64 head, 32 sec, 512 bytes/sect x 6291456 sectors
 sd0(esp0:0:0:0): esp0: timed out [ecb 0xf0ad3f88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf0ad3f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
 sd0(esp0:0:0:0): esp0: timed out [ecb 0xf0ad3f88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf0ad3f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN
 sd0: async, 8-bit transfers


 5.1.2 on qemu-0.15.1

 sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 0.15> disk fixed
 sd0: fabricating a geometry
 sd0: 3072 MB, 3072 cyl, 64 head, 32 sec, 512 bytes/sect x 6291456 sectors
 sd0(esp0:0:0:0): esp0: timed out [ecb 0xf07e2f88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf07e2f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
 sd0(esp0:0:0:0): esp0: timed out [ecb 0xf07e2f88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf07e2f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN
 sd0: async, 8-bit transfers


 6.0_RC2 on qemu-0.14

 sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 0.14> disk fixed
 sd0: fabricating a geometry
 sd0: 3072 MB, 3072 cyl, 64 head, 32 sec, 512 bytes/sect x 6291456 sectors
 sd0(esp0:0:0:0): esp0: timed out [ecb 0xf0ad3f88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf0ad3f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
 sd0(esp0:0:0:0): esp0: timed out [ecb 0xf0ad3f88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf0ad3f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN
 sd0: async, 8-bit transfers


 5.1.2 on qemu-0.14

 sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 0.14> disk fixed
 sd0: fabricating a geometry
 sd0: 3072 MB, 3072 cyl, 64 head, 32 sec, 512 bytes/sect x 6291456 sectors
 sd0(esp0:0:0:0): esp0: timed out [ecb 0xf07e2f88 (flags 0x1, dleft 0, stat 0)], <state 2, nexus 0xf07e2f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) >
 sd0(esp0:0:0:0): esp0: timed out [ecb 0xf07e2f88 (flags 0x41, dleft 0, stat 0)], <state 2, nexus 0xf07e2f88, phase(l 7, c 100, p 3), resid 0, msg(q 0,o 0) > AGAIN
 sd0: async, 8-bit transfers


From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-sparc/46530 (Install failure of NetBSD/sparc 5.1.2and6.0_BETA2
	 on qemu-1.0.1 and 1.1.0)
Date: Sat, 29 Sep 2012 02:40:39 +0900

 > On qemu-0.15.1 and -0.14, I have gotten timeout errors.
 > I cannot understand why I had missed these errors...

 Are these errors are reproducible everytime?
 On my environment, !TC (stat 0x83) errors *sometimes* happen.

 > 6.0_RC2 on qemu-1.2.0
 > 
 > sd0 at scsibus0 target 0 lun 0: <QEMU, QEMU HARDDISK, 1.2.> disk fixed
 > sd0: 3072 MB, 6241 cyl, 16 head, 63 sec, 512 bytes/sect x 6291456 sectors

 Note on qemu-1.2.0 it doesn't print the following line:
 >> sd0: async, 8-bit transfers

 This is probably because QEMU's esp.c returns all bits of CFG2 register
 (so our ncr53c9x recognizes it as ESP200 and assumes SELATN3 is valid)
 but QEMU doesn't implement SELATN3 command.

 Making QEMU's esp.c ignores CFG2 and CFG3 registers
 seems to fix !TC messages, but now it *sometimes* gets
 following error:
 >> esp0: unexpected status after select: [intr 10, stat 97, step 0]
 so I'm still afraid QEMU has some timing issue between scsi and esp.

 ---
 @@ -537,10 +556,12 @@
      case ESP_WBUSID ... ESP_WSYNO:
          break;
      case ESP_CFG1:
 -    case ESP_CFG2: case ESP_CFG3:
      case ESP_RES3: case ESP_RES4:
          s->rregs[saddr] = val;
          break;
 +    case ESP_CFG2: case ESP_CFG3:
 +        s->rregs[saddr] = 0;
 +        break;
      case ESP_WCCF ... ESP_WTEST:
          break;
      default:
 ---
 Izumi Tsutsui

State-Changed-From-To: open->feedback
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Mon, 14 Jan 2019 00:20:42 +0000
State-Changed-Why:
are all these problems fixed?  i think so..


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 26 May 2022 04:39:43 +0000
State-Changed-Why:
3-year and change feedback timeout


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