From owner-freebsd-bugs Thu May 20 14:40:42 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from mx.nsu.ru (mx.nsu.ru [193.124.215.71]) by hub.freebsd.org (Postfix) with ESMTP id 5BB4514FC1 for ; Thu, 20 May 1999 14:40:32 -0700 (PDT) (envelope-from semen@iclub.nsu.ru) Received: from iclub.nsu.ru (semen@iclub.nsu.ru [193.124.222.66]) by mx.nsu.ru (8.9.1/8.9.0) with ESMTP id EAA05533; Fri, 21 May 1999 04:37:23 +0700 (NOVST) Received: from localhost (semen@localhost) by iclub.nsu.ru (8.9.3/8.8.5) with ESMTP id EAA57990; Fri, 21 May 1999 04:37:23 +0700 (NSS) Date: Fri, 21 May 1999 04:37:23 +0700 (NSS) From: Ustimenko Semen To: amagai@nue.org Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: pending/11754: tx driver, SIOCGIFADDR ioctl does not work In-Reply-To: <199905200418.NAA10350@may.nue.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 20 May 1999 amagai@nue.org wrote: > My pr 11754 was not accepted by gnats, what's happened... > > By the way, SIOCGIFADDR ioctl does not work on tx (SMC chip) network > driver. The SIOCGIFADDR ioctl [src/pci/if_tx.c, epic_ifioctl] > invokes ether_ioctl() [src/net/if_ethersubr.c]. Here, MAC address > is copied out, as follows. > > bcopy(((struct arpcom *)ifp->if_softc)->ac_enaddr, > (caddr_t) sa->sa_data, ETHER_ADDR_LEN); > > So, "struct arpcom arpcom" must be a first element of softc structure. > > /* $OpenBSD: if_txvar.h,v 1.3 1998/10/10 04:30:09 jason Exp $ */ > /* $Id: if_txvar.h,v 1.1.4.1 1999/04/23 05:47:53 semenu Exp $ */ > > ================================================================ > --- if_txvar.h' Tue May 18 15:40:12 1999 > +++ if_txvar.h Tue May 18 15:41:15 1999 > @@ -329,6 +329,7 @@ > bus_space_tag_t sc_st; > bus_space_handle_t sc_sh; > #else /* __FreeBSD__ */ > + struct arpcom arpcom; > #if defined(EPIC_USEIOSPACE) > u_int32_t iobase; > #else > @@ -338,7 +339,6 @@ > #if !defined(EPIC_NOIFMEDIA) > struct ifmedia ifmedia; > #endif > - struct arpcom arpcom; > u_int32_t unit; > struct epic_rx_buffer rx_buffer[RX_RING_SIZE]; > struct epic_tx_buffer tx_buffer[TX_RING_SIZE]; > ================================================================ > All right, thank you! Except you have removed arpcom from OpenBSDbranch... I'll commit correct patch soon. Thank you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message