Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2001 15:18:44 -0700 (PDT)
From:      Jim McGrath <jmcgrath@sitaranetworks.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/29249: Bug in cu version of the wx (82543) driver.
Message-ID:  <200107262218.f6QMIif72179@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         29249
>Category:       kern
>Synopsis:       Bug in cu version of the wx (82543) driver.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 26 15:20:08 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jim McGrath
>Release:        The bug is present in -current
>Organization:
Sitara Networks
>Environment:
>Description:
miibus_attach() in sys/dev/mii/mii.c makes an assumption about the location of the arpcom structure in the softc structure.  See the line

	mii->mii_ifp = device_get_softc(device_get_parent(dev));

However, softc, which has struct wxmdvar as its first element, doesn't have struct arpcom as the first element of struct wxmdvar.

This problem is not encountered in the fiber version of the NIC because no use is made of the mii.

struct wxmdvar {
	struct device *		dev;	/* backpointer to device */
	struct arpcom 		arpcom;	/* per-interface network data */
	struct resource *	mem;	/* resource descriptor for registers */

>How-To-Repeat:
Try to get LIVENGOOD_CU working.
>Fix:
I moved the struct arpcom to the first location of struct wxmdvar and this solved my problems.  I did not find any positional dependencies for struct device *dev;
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107262218.f6QMIif72179>