From owner-freebsd-bugs Thu Jul 26 15:20:19 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3D03E37B401 for ; Thu, 26 Jul 2001 15:20:09 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6QMK9O73400; Thu, 26 Jul 2001 15:20:09 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A9E0437B403 for ; Thu, 26 Jul 2001 15:18:44 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6QMIif72179; Thu, 26 Jul 2001 15:18:44 -0700 (PDT) (envelope-from nobody) Message-Id: <200107262218.f6QMIif72179@freefall.freebsd.org> Date: Thu, 26 Jul 2001 15:18:44 -0700 (PDT) From: Jim McGrath To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/29249: Bug in cu version of the wx (82543) driver. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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