NetBSD Problem Report #32583
From hauke@Espresso.Rhein-Neckar.DE Fri Jan 20 21:03:00 2006
Return-Path: <hauke@Espresso.Rhein-Neckar.DE>
Received: from la3serv.rninet.de (la3serv.rninet.de [62.225.55.3])
by narn.netbsd.org (Postfix) with ESMTP id 3299E63B90F
for <gnats-bugs@gnats.NetBSD.org>; Fri, 20 Jan 2006 21:02:58 +0000 (UTC)
Message-Id: <200601202047.k0KKlS8e005263@pizza.causeuse.org>
Date: Fri, 20 Jan 2006 21:47:28 +0100 (CET)
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Reply-To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@netbsd.org
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Subject: mac68k netbsd-2 panics during rcp(1)
X-Send-Pr-Version: 3.95
>Number: 32583
>Category: port-mac68k
>Synopsis: mac68k netbsd-2 panics during rcp(1)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: tsutsui
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 20 21:05:00 +0000 2006
>Closed-Date: Sat Sep 16 10:31:10 +0000 2006
>Last-Modified: Sat Sep 16 10:31:10 +0000 2006
>Originator: Hauke Fath
>Release: NetBSD 2.1_STABLE
>Organization:
Falling Raindrops
>Environment:
System: NetBSD mirth 2.1_STABLE NetBSD 2.1_STABLE (NCRSCSI030) #0: Sun Jan 15 21:14:57 CET 2006 hauke@q700:/usr/src/sys/arch/mac68k/compile/NCRSCSI030 mac68k
Architecture: m68k
Machine: mac68k
>Description:
A Macintosh IIsi with Nubus adapter and Nubus Ethernet card panics
when I attempt to rcp a file from another machine. The panic is most
likely during the first rcp attempt; if that succeeds, the machine
tends to stay up.
Kernel config:
# $NetBSD: GENERICSBC,v 1.27.2.3 2004/07/15 20:21:52 he Exp $
#
# GENERICSBC
include "arch/mac68k/conf/std.mac68k"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERICSBC-$Revision: 1.27.2.3 $"
maxusers 16 # estimated number of users
# CPU support. At least one is REQUIRED.
options M68040
options M68030
options M68020 # Note: must have 68851 PMMU
# CPU-related options.
options FPSP
options FPU_EMULATE
# Standard system options
options INSECURE # disable kernel security levels
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options KTRACE # system call tracing via ktrace(1)
options SYSVMSG # System V-like message queues
options SYSVSEM # System V-like semaphores
#options SEMMNI=10 # number of semaphore identifiers
#options SEMMNS=60 # number of semaphores in system
#options SEMUME=10 # max number of undo entries per process
#options SEMMNU=30 # number of undo structures in system
options SYSVSHM # System V-like memory sharing
#options SHMMAXPGS=1024 # 1024 pages is the default
options P1003_1B_SEMAPHORE # p1003.1b semaphore support
options LKM # loadable kernel modules
options USERCONF # userconf(4) support
#options PIPE_SOCKETPAIR # smaller, but slower pipe(2)
options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
# Diagnostic/debugging support options
options DIAGNOSTIC # cheap kernel consistency checks
options DEBUG # expensive debugging checks/support
options SBC_DEBUG # mac68k/dev/sbc.c
options KMEMSTATS # kernel memory statistics (vmstat -m)
options DDB # in-kernel debugger
#options DDB_HISTORY_SIZE=100 # enable history editing in DDB
#options KGDB # remote debugger
#options KGDB_DEV=0xc01 # kgdb device number (dev_t)
#options KGDB_DEVRATE=38400 # baud rate
#makeoptions DEBUG="-g" # compile full symbol table
# Compatibility options
options COMPAT_14 # NetBSD 1.4,
options COMPAT_15 # NetBSD 1.5,
options COMPAT_16 # NetBSD 1.6,
options COMPAT_43 # and 4.3BSD
# The following is needed to run pre-NetBSD 1.6 binaries under ELF.
options COMPAT_AOUT_M68K # compatibility with NetBSD/m68k a.out
options EXEC_AOUT # support for exec'ing a.out
# File systems
file-system FFS # UFS
file-system MFS # memory file system
file-system NFS # Network File System client
file-system FDESC # /dev/fd
file-system KERNFS # /kern
file-system NULLFS # loopback file system
file-system PROCFS # /proc
file-system UNION # union file system
# File system options
options SOFTDEP # FFS soft updates support.
#options NFSSERVER # Network File System server
# Networking options
#options GATEWAY # packet forwarding
options INET # IP + ICMP + TCP + UDP
# These options enable verbose messages for several subsystems.
# Warning, these may compile large string tables into the kernel!
options SCSIVERBOSE # human readable SCSI error messages
# wscons options
options WSEMUL_VT100 # VT100 / VT220 emulation
options WSDISPLAY_COMPAT_ITEFONT # use ite font (6x10)
# rcons options; note that 1-bit and 8-bit displays are supported by default.
options RCONS_2BPP # Support for 2-bit display
options RCONS_4BPP # Support for 4-bit display
options RCONS_16BPP # Support for 16-bit display
# Mac-specific options
options GRF_COMPAT # Include grf compatibility code
#options MRG_ADB # Use ROM-based ADB driver
options ZS_CONSOLE_ABORT
options NFS_BOOT_DHCP
# Kernel root file system and dump configuration.
config netbsd root on ? type ?
#
# Device configuration
#
mainbus0 at root
fpu0 at mainbus? # Floating-Point Coprocessor support
# Basic Bus Support
# On-board I/O bus support
obio0 at mainbus?
# NuBus support
nubus0 at mainbus?
# Console Devices
# Apple Desktop Bus interface
adb0 at obio?
aed* at adb? # ADB event device
akbd* at adb? # ADB keyboard
ams* at adb? # ADB mouse
# Basic frame buffer support
intvid0 at obio? # Internal video hardware
macvid* at nubus? # NuBus video card
# Device-independent frame buffer interface
macfb* at intvid?
macfb* at macvid?
# Workstation Console devices
wsdisplay* at macfb? console ?
wskbd* at akbd? console ?
wsmouse* at ams?
# Serial Devices
# On-board serial interface
zsc0 at obio?
zstty* at zsc? channel ?
# SCSI Controllers and Devices
# SCSI controllers
# XXX - use only one of ncrscsi or sbc
ncrscsi0 at obio? # SCSI NCR 5380
#sbc0 at obio? flags 0x1 # MI SCSI NCR 5380
esp0 at obio? # SCSI NCR 53C9x
esp1 at obio? # SCSI NCR 53C9x
# SCSI bus support
scsibus* at scsi?
# SCSI devices
sd* at scsibus? target ? lun ? # SCSI disk drives
uk* at scsibus? target ? lun ? # SCSI unknown
# Network Interfaces
# On-board Ethernet controllers
sn* at obio? # SONIC-based (DP83932, DP83916)
#mc* at obio? # MACE-based
# NuBus Ethernet controllers
ae* at nubus? # DP8390-based
sn* at nubus? # SONIC-based (DP83932, DP83916)
#sm* at nubus? # SMC 91cxx-based
#netdock* at nubus? # Asante NetDock, Newer Ether MicroDock
#nsphy* at mii? phy ?
#ukphy* at mii? phy ?
# Audio Devices
# On-board audio hardware
#asc0 at obio? # ASC/EASC audio
# Pseudo-Devices
# disk/mass storage pseudo-devices
pseudo-device md 1 # memory disk device (ramdisk)
pseudo-device vnd 4 # disk-like interface to files
# network pseudo-devices
pseudo-device bpfilter 12 # Berkeley packet filter
pseudo-device loop # network loopback
# miscellaneous pseudo-devices
pseudo-device grf 2 # grf emulation for wscons
pseudo-device ite 1 # ite emulation for wscons
pseudo-device pty # pseudo-terminals
pseudo-device clockctl # user control of clock subsystem
# random number generator pseudo-device
pseudo-device rnd # /dev/random and in-kernel generator
Bootlog:
Bootstrapping NetBSD/mac68k.
Getting mapping from MMU.
Loaded at 0x4000000
System RAM: 17498112 bytes in 4272 pages.
Low = 0x50000, high = 0x100000
Low = 0x4000000, high = 0x55000000
On-board video at addr 0xfee08000 (phys 0x0), len 0x50000.
Done.
Bootstrapping the pmap system.
Pmap bootstrapped.
Moving ROMBase from 0x40800000 to 0x9f6000.
Video address 0xfee08000 -> 0xbf6000.
Loaded initial symtab at 0x19dad0, strtab at 0x1da91c, # entries 14959
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
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 2.1_STABLE (NCRSCSI030) #0: Sun Jan 15 21:14:57 CET 2006
hauke@q700:/usr/src/sys/arch/mac68k/compile/NCRSCSI030
Apple Macintosh IIsi (68030)
cpu: delay factor 266
total memory = 16384 KB
avail memory = 13604 KB
mrg: 'Mac IIsi class ROMs' ROM glue, tracing off, debug off, silent traps
mrg: I/O map kludge for ROMs that use hardware addresses directly.
mainbus0 (root)
obio0 at mainbus0
adb0 at obio0
intvid0 at obio0 @ 0: RBV video subsystem, Macintosh II display
intvid0: 640 x 480, monochrome
macfb0 at intvid0
wsdisplay0 at macfb0 (kbdmux ignored)
ncrscsi0 at obio0
scsibus0 at ncrscsi0 channel 0: 8 targets, 8 luns per target
zsc0 at obio0 chip type 0
zsc0 channel 0: d_speed 9600 DCD clk 0 CTS clk 0
zstty0 at zsc0 channel 0 (console i/o)
zsc0 channel 1: d_speed 9600 DCD clk 0 CTS clk 0
zstty1 at zsc0 channel 1
nubus0 at mainbus0
ae0 at nubus0 slot 9: Ethernet A-Series, 64KB memory
ae0: Ethernet address 00:40:10:02:0e:59
fpu0 at mainbus0 (mc68882)
adb0 (direct, IIsi series): 2 targets
aed0 at adb0 addr 0: ADB Event device
akbd0 at adb0 addr 2: extended keyboard
wskbd0 at akbd0 (mux ignored)
ams0 at adb0 addr 3: EMP trackball <LT01> 3-button, 200 dpi
wsmouse0 at ams0 (mux ignored)
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <CONNER, CP30540 545MB3.5, B0BC> disk fixed
sd0: 520 MB, 2242 cyl, 6 head, 79 sec, 512 bytes/sect x 1065912 sectors
sd1 at scsibus0 target 2 lun 0: <QUANTUM, FIREBALL_TM1280S, 300X> disk fixed
sd1: 1222 MB, 6810 cyl, 2 head, 183 sec, 512 bytes/sect x 2503872 sectors
boot device: sd1
root on sd1a dumps on sd1b
mountroot: trying nfs...
mountroot: trying ffs...
time read from PRAM: 0xbff70735
Date and time: January 20, 2006 21:31:33
PRAM: 0x43d156b5, macos_boottime: 0x43d156a6.
root file system type: ffs
init: copying out path `/sbin/init' 11
Fri Jan 20 21:31:39 CET 2006
Crashlog:
[hauke@mirth] ~ > rcp pizza:/u2/NetBSD/port-mac68k-9679/netbsd.ncrscsi .
trap type 0, code = 0x72d, v = 0x29e0000
kernel program counter = 0x110ad6
kernel: Bus error trap
pid = 398, lid = 1, pc = 00110AD6, ps = 2208, sfc = 1, dfc = 1
Registers:
0 1 2 3 4 5 6 7
dreg: FFFE861D 00000000 00000000 029B0C3C 0047003B 00000001 00000002 000005DC
areg: 029E0002 042A3C5E 00000000 0046A670 0047D800 0046A600 042A3C24 FFFFBF10
Kernel stack (042A3B38):
2A3B38: 0011668E 042A3BB8 00000080 00000000 029B0C3C 0047003B 00000001 00000002
2A3B58: 000005DC 00000000 0046A670 0047D800 0046A600 00000001 0010FC32 00000001
2A3B78: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2A3B98: 00000000 00000000 0011000A 042A3C24 00003090 00000000 0000072D 029E0000
2A3BB8: FFFE861D 00000000 00000000 029B0C3C 0047003B 00000001 00000002 000005DC
2A3BD8: 029E0002 042A3C5E 00000000 0046A670 0047D800 0046A600 042A3C24 FFFFBF10
2A3BF8: 00000000 22080011 0AD6A008 06EE072D 538066FA 029E0000 029E0000 00000000
2A3C18: 30C10000 00000001 00000C3C 042A3C64 000FCF98 00000000 0047DB34 00000C3C
2A3C38: 00000000 00000000 00000003 00002100 0047D840 00000000 0047D800 0046A600
2A3C58: 0047D840 00000000 0047D800 042A3C88 000208EE 0047D800 0046A600 00000C00
2A3C78: 00000000 0000003B 0046A636 0046A600 042A3CC8 000C657E 0047D840 FFFFFFBF
2A3C98: 00000001 004E32B8 00000400 004E32BC 004E32BC 0046A644 0046A600 0047D840
2A3CB8: 08002018 767E0000 00000014 00000019 042A3D3C 00014E78 0047D840 0046A600
2A3CD8: 004E32BC 004E418C 00000010 00000001 00000005 00000000 0000832C 00000002
2A3CF8: 0046A658 005074F0 001239D4 0000002D 00000040 00000100 00000000 00000000
2A3D18: 00000000 00000014 00000000 0000832C 00000005 00000000 005074F0 00000028
panic: Bus error
Stopped in pid 398.1 (rcmd) at netbsd:cpu_Debugger+0x6: unlk a6
db> t
cpu_Debugger(2204,0,42a3bb8,42a3ba4,1166ae) + 6
panic(14b83d,0,29b0c3c,47003b,1) + f8
trap(0,72d,29e0000) + 25c
mac68k_bssr2(0,47db34,c3c,0,0) + 20
ae_write_mbuf(47d800,46a600) + 6c
dp8390_start(47d840) + 82
ether_output(47d840,46a600,4e32bc,4e418c,10) + 28c
ip_output(46a600,0,4e32b8,400,0,4e2960) + 3c6
tcp_output(5074f0,4e29a4,46a000,2000,8327) + 768
tcp_usrreq(4e2960,9,46a000,0,0,41ea664) + 2ac
sosend(4e2960,0,42a3eb8,46a0000,0) + 2b6
so_write(41207e0,4120808,42a3eb8,4d8200,1) + 1e
dofilewrite(41ea664,3,41207e0,ffffbf6c,5) + 7a
sys_write(40ea700,42a3f44,42a3f3c) + 60
syscall_plain(4,40ea700,42a3fb4,40b7a9c,3) + 82
syscall(4) + 4e
trap0() + e
db>
>How-To-Repeat:
Set up a networked Macintosh IIsi with a recent netbsd-2
build, try to rcp file over the network.
>Fix:
None known.
>Release-Note:
>Audit-Trail:
From: Dave Huang <khym@azeotrope.org>
To: gnats-bugs@netbsd.org
Cc: port-mac68k-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Fri, 20 Jan 2006 15:39:16 -0600
On Fri, Jan 20, 2006 at 09:05:01PM +0000, Hauke Fath wrote:
> mac68k_bssr2(0,47db34,c3c,0,0) + 20
Hmm, so bus_space_set_region_2() is being called with a count argument
of 0? (the last argument). The bus_space(9) manpage mentions,
"Functions which take a count of bytes have undefined results if the
specified count is zero," and mac68k's implementation treats a count
of 0 as being 2^32.
It looks like the last section of ae_write_mbuf() tries to pad the
packet with 0s at the end if it's shorter than the shortest allowable
ethernet frame, but if it's exactly one byte shorted, (ETHER_MIN_LEN -
ETHER_CRC_LEN - totlen) == 1, and it'll call bus_space_set_region_2()
with a count of 0. So, perhaps try this diff to round up instead of
down if totlen is odd?
Index: if_ae.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/if_ae.c,v
retrieving revision 1.77
diff -u -r1.77 if_ae.c
--- if_ae.c 11 Dec 2005 12:18:02 -0000 1.77
+++ if_ae.c 20 Jan 2006 21:37:31 -0000
@@ -173,7 +173,7 @@
}
if (totlen < ETHER_MIN_LEN - ETHER_CRC_LEN) {
bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
- (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
+ (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen + 1) >> 1);
totlen = ETHER_MIN_LEN - ETHER_CRC_LEN;
}
return (totlen);
--
Name: Dave Huang | Mammal, mammal / their names are called /
INet: khym@azeotrope.org | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 30 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
From: Dave Huang <khym@azeotrope.org>
To: gnats-bugs@netbsd.org
Cc: port-mac68k-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Fri, 20 Jan 2006 16:31:49 -0600
On Fri, Jan 20, 2006 at 03:39:15PM -0600, Dave Huang wrote:
> Hmm, so bus_space_set_region_2() is being called with a count argument
> of 0? (the last argument). The bus_space(9) manpage mentions,
> "Functions which take a count of bytes have undefined results if the
> specified count is zero," and mac68k's implementation treats a count
> of 0 as being 2^32.
Actually, I just noticed that bus_space_set_region_2() is a macro that
checks for a 0 count, and only calls the actual function
(mac68k_bssr2()) if count is non-zero. In which case, I don't know why
mac68k_bssr2() is getting called with a 0 count.
From: Scott Reynolds <scottr@clank.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Mon, 23 Jan 2006 10:14:10 -0600
This doesn't even make sense. As Dave points out, there's no way the
mac68k_bssr[124]() functions should ever get called with a zero
count. (Stray pointer, perhaps?)
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@NetBSD.org
Cc: port-mac68k-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Mon, 23 Jan 2006 23:06:24 +0100
At 16:15 Uhr +0000 23.1.2006, Scott Reynolds wrote:
>The following reply was made to PR port-mac68k/32583; it has been noted by
>GNATS.
>
>From: Scott Reynolds <scottr@clank.org>
>To: gnats-bugs@netbsd.org
>Cc:
>Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
>Date: Mon, 23 Jan 2006 10:14:10 -0600
>
> This doesn't even make sense.
I hear you. But the IIsi doesn't, and insists on panicking reliably at the
same spot, with the same stack trace.
HW seems to be fine, I ran a memory check for a few hours without any
trouble. The type of scsi driver makes no difference.
Thanks to Chuck's recent fixes, I could provide a coredump, if that helps.
> As Dave points out, there's no way the
> mac68k_bssr[124]() functions should ever get called with a zero
> count. (Stray pointer, perhaps?)
Sounds plausible...
NetBSD 2.1_STABLE (GENERICSBC) #1: Tue Nov 1 23:38:51 CET 2005
hf@heiligenberg:/var/obj/netbsd-builds/2_0/mac68k/sys/arch/mac68k/compil
e/GENERICSBC
doesn't panic, btw.
hauke
--
"It's never straight up and down" (DEVO)
From: Dave Huang <khym@azeotrope.org>
To: gnats-bugs@netbsd.org
Cc: netbsd-bugs@netbsd.org,
Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Mon, 23 Jan 2006 16:42:10 -0600
On Mon, Jan 23, 2006 at 10:35:05PM +0000, Hauke Fath wrote:
> I hear you. But the IIsi doesn't, and insists on panicking reliably at the
> same spot, with the same stack trace.
Even though it seems impossible for a count of 0 to make it through to
mac68k_bssr2, I don't think it's right for the ae driver to pass a
count of 0 in the first place. Could you try the patch I posted
earlier and see if that seems to make any difference?
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: Scott Reynolds <scottr@clank.org>
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>,
Dave Huang <khym@azeotrope.org>, port-mac68k-maintainer@netbsd.org,
gnats-bugs@netbsd.org, Chuck Silvers <chuq@chuq.com>
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Tue, 24 Jan 2006 22:20:46 +0100
At 13:17 Uhr -0600 24.1.2006, Scott Reynolds wrote:
>I'd almost rather see what happens if DIAGNOSTIC is set.
The kernel in question was built with DEBUG and DIAGNOSTIC.
>This will
>cause a panic if bus_space_set_region_2() is called with a zero
>count. While I agree in principle that if_ae shouldn't attempt it, I
>also can't find a way for the driver to get to that condition under
>normal conditions. It might be instructive to add a debug printf that
>displays the value (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) to see if
>this is actually working out to be 1.
[hauke@pizza] /<5>mac68k/dev > cvs diff -u if_ae.c
Index: if_ae.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/if_ae.c,v
retrieving revision 1.75
diff -u -u -r1.75 if_ae.c
--- if_ae.c 15 Jul 2003 02:43:16 -0000 1.75
+++ if_ae.c 24 Jan 2006 21:15:30 -0000
@@ -171,7 +171,10 @@
}
}
}
-
+#if defined(DEBUG)
+ printf("ae_write_mbuf() (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) =
%d\n",
+ (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen));
+#endif
if (wantbyte) {
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
[...]
ae_write_mbuf() (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) = -14
ae_write_mbuf() (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) = 6
ae_write_mbuf() (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) = 1
trap type 0, code = 0x72d, v = 0x29d0000
kernel program counter = 0xfeb6e
kernel: Bus error trap
pid = 38, lid = 1, pc = 000FEB6E, ps = 2208, sfc = 1, dfc = 1
[registers etc.pp. as before]
Note that this is not the first network access by any means: The machine
runs dhclient, timed, sendmail, and the 'deadly' rcp (ftp does the same
trick) was issued in an xterm started via rsh.
hauke
--
"It's never straight up and down" (DEVO)
From: Dave Huang <khym@azeotrope.org>
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Tue, 24 Jan 2006 16:14:40 -0600
On Tue, Jan 24, 2006 at 10:20:46PM +0100, Hauke Fath wrote:
> ae_write_mbuf() (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) = -14
> ae_write_mbuf() (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) = 6
> ae_write_mbuf() (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) = 1
> trap type 0, code = 0x72d, v = 0x29d0000
> kernel program counter = 0xfeb6e
> kernel: Bus error trap
> pid = 38, lid = 1, pc = 000FEB6E, ps = 2208, sfc = 1, dfc = 1
Sounds like the patch I sent should fix the problem... I do agree with
Scott that this shouldn't happen, even with if_ae.c as it is. Very
strange indeed... could you send me a copy of your kernel? (Or make it
available for download).
And do try the patch to see if it really does fix the problem :)
--
Name: Dave Huang | Mammal, mammal / their names are called /
INet: khym@azeotrope.org | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 30 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
From: Dave Huang <khym@azeotrope.org>
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: Scott Reynolds <scottr@clank.org>,
port-mac68k-maintainer@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Tue, 24 Jan 2006 16:53:37 -0600
On Tue, Jan 24, 2006 at 10:20:46PM +0100, Hauke Fath wrote:
> At 13:17 Uhr -0600 24.1.2006, Scott Reynolds wrote:
> >I'd almost rather see what happens if DIAGNOSTIC is set.
>
> The kernel in question was built with DEBUG and DIAGNOSTIC.
Ohhh! :)
#define bus_space_set_region_2(t, h, o, val, c) do { \
if (!c) panic("bus_space_set_region_2 called with zero count."); \
(h).bssr2(t,&(h),o,val,c); } while (0)
bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
(ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
So, that "if" line expands to:
if (!(ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1) panic([...]);
ETHER_MIN_LEN - ETHER_CRC_LEN - totlen == 1, so that's
if (!(1) >> 1) panic();
or
if (0 >> 1) panic();
Needs more parentheses :)
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: Dave Huang <khym@azeotrope.org>
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>,
Scott Reynolds <scottr@clank.org>, port-mac68k-maintainer@netbsd.org,
gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Wed, 25 Jan 2006 22:06:29 +0100
At 16:53 Uhr -0600 24.1.2006, Dave Huang wrote:
>#define bus_space_set_region_2(t, h, o, val, c) do { \
> if (!c) panic("bus_space_set_region_2 called with zero count."); \
> (h).bssr2(t,&(h),o,val,c); } while (0)
>
> bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
> (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
>
>So, that "if" line expands to:
>
> if (!(ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1) panic([...]);
>
>ETHER_MIN_LEN - ETHER_CRC_LEN - totlen == 1, so that's
> if (!(1) >> 1) panic();
>or
> if (0 >> 1) panic();
>
>Needs more parentheses :)
Meaning you'd want
if (!(c)) panic(...)
instead above?
hauke
--
"It's never straight up and down" (DEVO)
From: Dave Huang <khym@azeotrope.org>
To: gnats-bugs@netbsd.org,
Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: port-mac68k-maintainer@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Wed, 25 Jan 2006 15:46:26 -0600
On Wed, Jan 25, 2006 at 09:25:02PM +0000, Hauke Fath wrote:
> Meaning you'd want
>
> if (!(c)) panic(...)
>
> instead above?
Yes, or to conform to the NetBSD style guide,
if ((c) == 0) panic(...)
However, that doesn't fix the actual bug; it just fixes the DIAGNOSTIC
check so that it'll panic with a useful message instead of getting a
bus error trap.
The actual fix is in the patch to sys/arch/mac68k/dev/if_ae.c that I
sent back on Jan 20:
http://mail-index.netbsd.org/netbsd-bugs/2006/01/20/0032.html
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: Dave Huang <khym@azeotrope.org>,
Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>,
Scott Reynolds <scottr@clank.org>, port-mac68k-maintainer@netbsd.org,
gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Wed, 25 Jan 2006 22:59:48 +0100
At 22:06 Uhr +0100 25.1.2006, Hauke Fath wrote:
>At 16:53 Uhr -0600 24.1.2006, Dave Huang wrote:
>>#define bus_space_set_region_2(t, h, o, val, c) do { \
>> if (!c) panic("bus_space_set_region_2 called with zero count."); \
>> (h).bssr2(t,&(h),o,val,c); } while (0)
>>
>> bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
>> (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
>>
>>So, that "if" line expands to:
>>
>> if (!(ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1) panic([...]);
>>
>>ETHER_MIN_LEN - ETHER_CRC_LEN - totlen == 1, so that's
>> if (!(1) >> 1) panic();
>>or
>> if (0 >> 1) panic();
>>
>>Needs more parentheses :)
>
>Meaning you'd want
>
>if (!(c)) panic(...)
>
>instead above?
login: panic: bus_space_set_region_2 called with zero count.
Stopped in pid 38.1 (rcmd) at netbsd:cpu_Debugger+0x6: unlk a6
db>
- better that way.
[hauke@pizza] /<5>mac68k/dev > cvs diff -u if_ae.c
Index: if_ae.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/if_ae.c,v
retrieving revision 1.75
diff -u -u -r1.75 if_ae.c
--- if_ae.c 15 Jul 2003 02:43:16 -0000 1.75
+++ if_ae.c 25 Jan 2006 21:58:10 -0000
@@ -180,7 +180,7 @@
}
if (totlen < ETHER_MIN_LEN - ETHER_CRC_LEN) {
bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
- (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
+ ((ETHER_MIN_LEN - ETHER_CRC_LEN - totlen + 1) >> 1));
totlen = ETHER_MIN_LEN - ETHER_CRC_LEN;
}
return (totlen);
fixes the issue.
Many thanks, gentlemen. :)
hauke
--
"It's never straight up and down" (DEVO)
From: Scott Reynolds <scottr@clank.org>
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>,
gnats-bugs@netbsd.org
Cc: port-mac68k-maintainer@netbsd.org,
Dave Huang <khym@azeotrope.org>
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Thu, 26 Jan 2006 01:18:00 -0600 (CST)
I figured out what was bugging me; there's another bug in if_ae.c besides
the one Dave patched. Basically, the problem is coming in when we try to
pad out the frame to the minimum length. I originally thought the driver
was failing to pad the last byte whenever the shortfall was an odd number
of bytes. However, that's not the case. All we -really- need to do is
account for when wantbyte is set after the loop terminates and adjust the
pad count appropriately.
The appended patch should do the trick. Please try it out and let me know
the result.
Thanks in advance!
--scott
PS -- you might notice that I don't add 1 before shifting. I'm taking
advantage of the fact that (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen -
wantbyte) must always be an even number.
Index: if_ae.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/if_ae.c,v
retrieving revision 1.75
diff -c -r1.75 if_ae.c
*** if_ae.c 15 Jul 2003 02:43:16 -0000 1.75
--- if_ae.c 26 Jan 2006 07:12:41 -0000
***************
*** 172,186 ****
}
}
if (wantbyte) {
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
buf, (u_int16_t *)savebyte, 1);
! buf += 2;
}
! if (totlen < ETHER_MIN_LEN - ETHER_CRC_LEN) {
bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
! (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
totlen = ETHER_MIN_LEN - ETHER_CRC_LEN;
}
return (totlen);
--- 172,188 ----
}
}
+ len = ETHER_MIN_LEN - ETHER_CRC_LEN - totlen;
if (wantbyte) {
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
buf, (u_int16_t *)savebyte, 1);
! buf += 2;
! len--;
}
! if (len > 0) {
bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
! len >> 1);
totlen = ETHER_MIN_LEN - ETHER_CRC_LEN;
}
return (totlen);
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: Scott Reynolds <scottr@clank.org>
Cc: gnats-bugs@netbsd.org, port-mac68k-maintainer@netbsd.org,
Dave Huang <khym@azeotrope.org>
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Fri, 27 Jan 2006 00:31:46 +0100
At 1:18 Uhr -0600 26.1.2006, Scott Reynolds wrote:
>The appended patch should do the trick. Please try it out and let me know
>the result.
>
>Thanks in advance!
Compiles on the way, results tomorrow.
G'night,
hauke
--
"It's never straight up and down" (DEVO)
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@netbsd.org
Cc: port-mac68k-maintainer@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Sat, 28 Jan 2006 23:25:31 +0100
At 8:20 Uhr +0000 26.1.2006, Scott Reynolds wrote:
> The appended patch should do the trick. Please try it out and let me know
> the result.
[hauke@mirth] ~ > rcp pizza:/etc/amd.conf /tmp/
rcp: rcmd: poll: protocol failure in circuit setup
[hauke@mirth] ~ >
-- close, but not quite... dito ftp:
[hauke@mirth] ~ > ftp hauke@pizza
Connected to pizza.causeuse.org.
220-
220 pizza.causeuse.org FTP server (NetBSD-ftpd 20050303) ready.
331 Password required for hauke.
Password:
230-
NetBSD 3.0_STABLE (PIZZA) #1: Tue Jan 3 22:52:41 CET 2006
Welcome to NetBSD!
230 User hauke logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
421 Service not available, remote server timed out. Connection closed
ftp>
hauke
--
"It's never straight up and down" (DEVO)
From: Dave Huang <khym@azeotrope.org>
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: Scott Reynolds <scottr@clank.org>,
port-mac68k-maintainer@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Sun, 3 Sep 2006 03:36:07 -0500
> From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
> To: gnats-bugs@netbsd.org
> Cc: port-mac68k-maintainer@netbsd.org
> Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
> Date: Sat, 28 Jan 2006 23:25:31 +0100
>
> At 8:20 Uhr +0000 26.1.2006, Scott Reynolds wrote:
> > The appended patch should do the trick. Please try it out and let me know
> > the result.
>
> [hauke@mirth] ~ > rcp pizza:/etc/amd.conf /tmp/
> rcp: rcmd: poll: protocol failure in circuit setup
> [hauke@mirth] ~ >
>
> -- close, but not quite... dito ftp:
Ah, yeah, I see the bug Scott's talking about... if the original
packet that needs to be padded has an odd length, it'll write one
extra word of padding (I don't know if that actually causes any
problems though; it seems like it'd be harmless :)
However, Scott's patch has a minor bug where if the packet is exactly
one byte too short, the function will write the correct data out to
the ethernet chip, but will report that it wrote one byte less than it
actually did (i.e., it'll write 60 bytes, but report that it wrote 59).
What about this?
Index: if_ae.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/if_ae.c,v
retrieving revision 1.77
diff -u -r1.77 if_ae.c
--- if_ae.c 11 Dec 2005 12:18:02 -0000 1.77
+++ if_ae.c 3 Sep 2006 08:27:17 -0000
@@ -165,15 +165,18 @@
}
}
+ len = ETHER_MIN_LEN - ETHER_CRC_LEN - totlen;
if (wantbyte) {
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
buf, (u_int16_t *)savebyte, 1);
- buf += 2;
+ buf += 2;
+ if (len-- > 0)
+ totlen++;
}
- if (totlen < ETHER_MIN_LEN - ETHER_CRC_LEN) {
+ if (len > 0) {
bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
- (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
+ len >> 1);
totlen = ETHER_MIN_LEN - ETHER_CRC_LEN;
}
return (totlen);
--
Name: Dave Huang | Mammal, mammal / their names are called /
INet: khym@azeotrope.org | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 30 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: Dave Huang <khym@azeotrope.org>
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>,
Scott Reynolds <scottr@clank.org>, port-mac68k-maintainer@netbsd.org,
gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Sun, 3 Sep 2006 20:54:48 +0200
At 3:36 Uhr -0500 3.9.2006, Dave Huang wrote:
>Ah, yeah, I see the bug Scott's talking about... if the original
>packet that needs to be padded has an odd length, it'll write one
>extra word of padding (I don't know if that actually causes any
>problems though; it seems like it'd be harmless :)
Dave, first of all thanks for picking this up. I've prodded Scott twice via
email, on May 1 and May 29, but never received an answer.
Unfortunately, the tail of our mail exchange with the last patch he sent
(the one that worked for me) was not cc'ed to gnats-bugs@netbsd.org as it
should have been.
>However, Scott's patch has a minor bug where if the packet is exactly
>one byte too short, the function will write the correct data out to
>the ethernet chip, but will report that it wrote one byte less than it
>actually did (i.e., it'll write 60 bytes, but report that it wrote 59).
>
>What about this?
Your patch and the last one that Scott provided differ only in that
>Index: if_ae.c
>===================================================================
>RCS file: /cvsroot/src/sys/arch/mac68k/dev/if_ae.c,v
>retrieving revision 1.77
>diff -u -r1.77 if_ae.c
>--- if_ae.c 11 Dec 2005 12:18:02 -0000 1.77
>+++ if_ae.c 3 Sep 2006 08:27:17 -0000
>@@ -165,15 +165,18 @@
> }
> }
>
>+ len = ETHER_MIN_LEN - ETHER_CRC_LEN - totlen;
> if (wantbyte) {
> savebyte[1] = 0;
> bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
> buf, (u_int16_t *)savebyte, 1);
>- buf += 2;
>+ buf += 2;
>+ if (len-- > 0)
>+ totlen++;
his has an additional
len--;
here.
> }
>- if (totlen < ETHER_MIN_LEN - ETHER_CRC_LEN) {
>+ if (len > 0) {
> bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
>- (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
>+ len >> 1);
> totlen = ETHER_MIN_LEN - ETHER_CRC_LEN;
> }
> return (totlen);
Since I have just returned from a 3.000 km cycle tour, and part of my mind
is still in the Scottish Highlands, I'll ask you first what difference this
makes, before making misguided attempts to wrap my mind around the code. ;)
hauke
--
"It's never straight up and down" (DEVO)
From: khym@azeotrope.org
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: Scott Reynolds <scottr@clank.org>,
port-mac68k-maintainer@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Sun, 3 Sep 2006 18:44:12 -0500
On Sun, Sep 03, 2006 at 08:54:48PM +0200, Hauke Fath wrote:
> Your patch and the last one that Scott provided differ only in that
>
> >Index: if_ae.c
> >===================================================================
> >RCS file: /cvsroot/src/sys/arch/mac68k/dev/if_ae.c,v
> >retrieving revision 1.77
> >diff -u -r1.77 if_ae.c
> >--- if_ae.c 11 Dec 2005 12:18:02 -0000 1.77
> >+++ if_ae.c 3 Sep 2006 08:27:17 -0000
> >@@ -165,15 +165,18 @@
> > }
> > }
> >
> >+ len = ETHER_MIN_LEN - ETHER_CRC_LEN - totlen;
> > if (wantbyte) {
> > savebyte[1] = 0;
> > bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
> > buf, (u_int16_t *)savebyte, 1);
> >- buf += 2;
> >+ buf += 2;
> >+ if (len-- > 0)
> >+ totlen++;
>
> his has an additional
>
> len--;
>
> here.
Hmm, Scott's patch has:
if (len-- > 0)
totlen++;
len--;
rather than
if (len > 0)
totlen++;
len--;
? ("len--" vs. "len" in the first line) The latter would be identical to
my patch (and is perhaps easier to read). The former seems like it would
cause problems with short packets not being padded enough. For example,
consider a packet that's 57 bytes long (ETHER_MIN_LEN - ETHER_CRC_LEN -
3), or 3 bytes too short. The main loop will have written 56 bytes,
leaving the last byte stored in savebyte[0] for the if (wantbyte) section
to output. len will have been set to 3 by the assignment immediately
before the if (wantbyte). So, the if (wantbyte) writes the last byte,
plus a byte of padding. len will be decremented to 2, totlen incremented
to 58, then len decremented again to 1. Then the if (len > 0) section
will call bus_space_set_region_2() with a count of (len >> 1), which
is 0. Which is not a valid value, and would cause the bus error that
started this PR in the first place :)
However, if that first line is "if (len > 0)", rather then "if (len--
> 0)", it seems like everything should be fine. The main loop writes 56
bytes, len is set to 3. if (wantbyte) writes the 57th byte, plus a byte
of padding, len is decremented to 2 and totlen incremented to 58. The if
(len > 0) writes another 2 bytes of padding and sets totlen to 60.
At least that's my understanding of how things should work :)
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: khym@azeotrope.org
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>,
Scott Reynolds <scottr@clank.org>, port-mac68k-maintainer@netbsd.org,
gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Mon, 4 Sep 2006 02:19:50 +0200
At 18:44 Uhr -0500 3.9.2006, khym@azeotrope.org wrote:
>Hmm, Scott's patch has:
>
> if (len-- > 0)
> totlen++;
> len--;
>
>rather than
>
> if (len > 0)
> totlen++;
> len--;
>
>?
No; maybe I should have waited for the other half of my mind coming back
from the Scottish Highlands first. ;)
The mail with the last patch he sent me, and which works for me, in full
length:
<snip>
From: Scott Reynolds <scottr@clank.org>
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Tue, 31 Jan 2006 01:11:51 -0600
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
OK, so I didn't account for totlen being one less than ETHER_MIN_LEN
- ETHER_CRC_LEN. This catches that case. (If it's easier, just add
the "if (len > 0) totlen++;" lines before the "len--".)
Sorry for any hassle -- I really appreciate you double checking my
work. I don't have any machines running with an ae interface at the
moment.
--scott
Index: if_ae.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/if_ae.c,v
retrieving revision 1.75
diff -c -r1.75 if_ae.c
*** if_ae.c 15 Jul 2003 02:43:16 -0000 1.75
--- if_ae.c 31 Jan 2006 07:04:53 -0000
***************
*** 172,186 ****
}
}
if (wantbyte) {
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
buf, (u_int16_t *)savebyte, 1);
! buf += 2;
}
! if (totlen < ETHER_MIN_LEN - ETHER_CRC_LEN) {
bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
! (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
totlen = ETHER_MIN_LEN - ETHER_CRC_LEN;
}
return (totlen);
--- 172,190 ----
}
}
+ len = ETHER_MIN_LEN - ETHER_CRC_LEN - totlen;
if (wantbyte) {
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
buf, (u_int16_t *)savebyte, 1);
! buf += 2;
! if (len > 0)
! totlen++;
! len--;
}
! if (len > 0) {
bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
! len >> 1);
totlen = ETHER_MIN_LEN - ETHER_CRC_LEN;
}
return (totlen);
</snip>
--
"It's never straight up and down" (DEVO)
From: khym@azeotrope.org
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: Scott Reynolds <scottr@clank.org>,
port-mac68k-maintainer@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: port-mac68k/32583: mac68k netbsd-2 panics during rcp(1)
Date: Sun, 3 Sep 2006 21:56:20 -0500
On Mon, Sep 04, 2006 at 02:19:50AM +0200, Hauke Fath wrote:
> The mail with the last patch he sent me, and which works for me, in full
> length:
OK, his patch is equivalent to mine, and is easier to read. If it works
for you, I think we should go with it :) Just need to find someone who
can commit it...
From: Izumi Tsutsui <tsutsui@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/32583 CVS commit: src/sys/arch/mac68k/dev
Date: Sat, 9 Sep 2006 06:25:08 +0000 (UTC)
Module Name: src
Committed By: tsutsui
Date: Sat Sep 9 06:25:08 UTC 2006
Modified Files:
src/sys/arch/mac68k/dev: if_ae.c
Log Message:
Apply patch from Scott Reynolds in PR port-mac68k/32583
with some tweaks (add a comment and macro):
Handle odd byte case correctly in (ETHER_MIN_LEN-ETHER_CRC_LEN) padding
so that bus_space_set_region_2() won't be called with count==0.
To generate a diff of this commit:
cvs rdiff -r1.77 -r1.78 src/sys/arch/mac68k/dev/if_ae.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: port-mac68k-maintainer->tsutsui
Responsible-Changed-By: tsutsui@netbsd.org
Responsible-Changed-When: Sat, 09 Sep 2006 15:31:04 +0900
Responsible-Changed-Why:
I've committed patch.
State-Changed-From-To: open->feedback
State-Changed-By: tsutsui@netbsd.org
State-Changed-When: Sat, 09 Sep 2006 15:31:04 +0900
State-Changed-Why:
Please confirm committed fix.
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@NetBSD.org, port-mac68k-maintainer@NetBSD.org,
netbsd-bugs@NetBSD.org, gnats-admin@NetBSD.org,
Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Subject: Re: port-mac68k/32583 (mac68k netbsd-2 panics during rcp(1))
Date: Sat, 9 Sep 2006 12:32:53 +0200
At 6:31 Uhr +0000 9.9.2006, tsutsui@NetBSD.org wrote:
>State-Changed-From-To: open->feedback
>State-Changed-By: tsutsui@netbsd.org
>State-Changed-When: Sat, 09 Sep 2006 15:31:04 +0900
>State-Changed-Why:
>Please confirm committed fix.
Thanks for committing this! I haven't got a -current mac68k system to try,
but the changes are identical to what I have in my netbsd-2 tree. So I'd
give it a thumbs-up.
Please request a pull-up to the relevant netbsd-{2,3,4}* branches.
hauke
--
"It's never straight up and down" (DEVO)
From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/32583 CVS commit: [netbsd-2] src/sys/arch/mac68k/dev
Date: Mon, 11 Sep 2006 21:26:54 +0000 (UTC)
Module Name: src
Committed By: tron
Date: Mon Sep 11 21:26:54 UTC 2006
Modified Files:
src/sys/arch/mac68k/dev [netbsd-2]: if_ae.c
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #10692):
sys/arch/mac68k/dev/if_ae.c: revision 1.78
Apply patch from Scott Reynolds in PR port-mac68k/32583
with some tweaks (add a comment and macro):
Handle odd byte case correctly in (ETHER_MIN_LEN-ETHER_CRC_LEN) padding
so that bus_space_set_region_2() won't be called with count==0.
To generate a diff of this commit:
cvs rdiff -r1.75 -r1.75.6.1 src/sys/arch/mac68k/dev/if_ae.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jeff Rizzo <riz@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/32583 CVS commit: [netbsd-4] src/sys/arch/mac68k
Date: Thu, 14 Sep 2006 19:17:40 +0000 (UTC)
Module Name: src
Committed By: riz
Date: Thu Sep 14 19:17:40 UTC 2006
Modified Files:
src/sys/arch/mac68k/dev [netbsd-4]: if_ae.c
src/sys/arch/mac68k/include [netbsd-4]: bus.h
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #154):
sys/arch/mac68k/include/bus.h: revision 1.25
sys/arch/mac68k/dev/if_ae.c: revision 1.78
Apply patch from Scott Reynolds in PR port-mac68k/32583
with some tweaks (add a comment and macro):
Handle odd byte case correctly in (ETHER_MIN_LEN-ETHER_CRC_LEN) padding
so that bus_space_set_region_2() won't be called with count==0.
Apply patch in PR port-mac68k/33636 from Dave Huang (with wrapping long lines).
i.e. args in macro should be wrapped with parentheses.
To generate a diff of this commit:
cvs rdiff -r1.77 -r1.77.18.1 src/sys/arch/mac68k/dev/if_ae.c
cvs rdiff -r1.24 -r1.24.12.1 src/sys/arch/mac68k/include/bus.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Geert Hendrickx <ghen@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/32583 CVS commit: [netbsd-3] src/sys/arch/mac68k
Date: Sat, 16 Sep 2006 11:38:15 +0000 (UTC)
Module Name: src
Committed By: ghen
Date: Sat Sep 16 11:38:15 UTC 2006
Modified Files:
src/sys/arch/mac68k/dev [netbsd-3]: if_ae.c
src/sys/arch/mac68k/include [netbsd-3]: bus.h
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1512):
sys/arch/mac68k/include/bus.h: revision 1.25
sys/arch/mac68k/dev/if_ae.c: revision 1.78
Apply patch from Scott Reynolds in PR port-mac68k/32583
with some tweaks (add a comment and macro):
Handle odd byte case correctly in (ETHER_MIN_LEN-ETHER_CRC_LEN) padding
so that bus_space_set_region_2() won't be called with count==0.
Apply patch in PR port-mac68k/33636 from Dave Huang (with wrapping long lines).
i.e. args in macro should be wrapped with parentheses.
To generate a diff of this commit:
cvs rdiff -r1.76 -r1.76.8.1 src/sys/arch/mac68k/dev/if_ae.c
cvs rdiff -r1.21 -r1.21.8.1 src/sys/arch/mac68k/include/bus.h
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: tsutsui@netbsd.org
State-Changed-When: Sat, 16 Sep 2006 19:31:10 +0900
State-Changed-Why:
Fix confirmed and pulled up to netbsd-2, netbsd-3, and netbsd-4.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.