Subject: kern/28955: wm(4) broken on IQ31244 since if_wm.c revision 1.53
To: None <,,>
From: Richard Earnshaw <>
List: netbsd-bugs
Date: 01/13/2005 22:33:00
>Number:         28955
>Category:       kern
>Synopsis:       wm(4) broken on IQ31244 since if_wm.c revision 1.53
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 13 22:33:00 +0000 2005
>Originator:     Richard Earnshaw
>Release:        NetBSD 2.0
System: NetBSD 2.0 NetBSD 2.0 (IQ31244) #35: Thu Jan 13 22:12:18 GMT 2005 evbarm
Architecture: arm
Machine: evbarm
	Revision 1.53 if if_wm.c introduced a reset of the if_wm device using
	an IO map handle.  Since this time the IQ31244 port seems to have been
	completely unable to communicate over the wm device (the chip seems to
	be incompletely reset).  Symptoms are that packets are being received
	but are complete garbage (in fact, it seems like the buffers fetched
	from the chip are for other packets sent long before, a remote host
	constantly pinging the machine sees packets returned after about 180
	seconds at a ping rate of 1/sec.
	Try to run an IQ31244 board as a diskless machine.

	The following patch is a work-around, but it does show where the
	problem lies:

Index: if_wm.c
RCS file: /cvsroot/src/sys/dev/pci/if_wm.c,v
retrieving revision
diff -p -p -r1.68.2.5 if_wm.c
*** if_wm.c     8 Jan 2005 08:59:16 -0000
--- if_wm.c     13 Jan 2005 22:28:42 -0000
*************** wm_attach(struct device *parent, struct 
*** 793,798 ****
--- 793,800 ----
+       sc->sc_flags &= ~WM_F_IOH_VALID;
        /* Enable bus mastering.  Disable MWI on the i82542 2.0. */
        preg = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);