Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jan 2003 17:05:05 +0100 (CET)
From:      Hartmut Brandt <brandt@fokus.gmd.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   sparc64/46871: HME driver not built as module and miibus dependency broken
Message-ID:  <200301081605.h08G55VA000825@catssrv.fokus.gmd.de>

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

>Number:         46871
>Category:       sparc64
>Synopsis:       HME driver not built as module and miibus dependency broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-sparc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 08 08:10:03 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Hartmut Brandt
>Release:        FreeBSD 5.0-CURRENT sparc64
>Organization:
FhI Fokus
>Environment:
System: FreeBSD catssrv.fokus.gmd.de 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Tue Jan 7 18:15:41 CET 2003 root@catssrv.fokus.gmd.de:/opt/obj/usr/src/sys/CATSSRV sparc64


	
>Description:

The driver for the HME ethernet card is not built as a module.

There is a typo in the dependency on miibus in the HME driver.

	
>How-To-Repeat:

Do

	ls -l /boot/kernel/if_hme.ko

and observe that the file is not found.

Create the module by applying part of the patches below and try to load
the module. Observe that it cannot be loaded.
	
>Fix:

Create sys/modules/hme and place the following Makefile into this
directory.

# $FreeBSD: src/sys/modules/xl/Makefile,v 1.13 2001/01/06 14:00:42 obrien Exp $

.PATH: ${.CURDIR}/../../dev/hme

KMOD=	if_hme
SRCS=	if_hme.c if_hme_pci.c opt_bdg.h device_if.h bus_if.h pci_if.h
SRCS+=	miibus_if.h

.include <bsd.kmod.mk>
	

Then apply the following patch and rebuild your kernel.

Index: modules/Makefile
===================================================================
RCS file: /usr/ncvs/src/sys/modules/Makefile,v
retrieving revision 1.294
diff -c -r1.294 Makefile
*** modules/Makefile	13 Dec 2002 00:32:29 -0000	1.294
--- modules/Makefile	8 Jan 2003 16:02:05 -0000
***************
*** 150,155 ****
--- 150,159 ----
  SUBDIR+=syscons
  .endif
  
+ .if ${MACHINE_ARCH} == "sparc64"
+ SUBDIR+=hme
+ .endif
+ 
  # XXX some of these can move to the general case when de-i386'ed
  # XXX some of these can move now, but are untested on other architectures.
  .if ${MACHINE_ARCH} == "i386"
Index: dev/hme/if_hme.c
===================================================================
RCS file: /usr/ncvs/src/sys/dev/hme/if_hme.c,v
retrieving revision 1.8
diff -c -r1.8 if_hme.c
*** dev/hme/if_hme.c	6 Jan 2003 22:12:57 -0000	1.8
--- dev/hme/if_hme.c	8 Jan 2003 16:02:05 -0000
***************
*** 122,128 ****
  static int hme_nerr;
  
  DRIVER_MODULE(miibus, hme, miibus_driver, miibus_devclass, 0, 0);
! MODULE_DEPEND(hem, miibus, 1, 1, 1);
  
  #define	HME_SPC_READ_4(spc, sc, offs) \
  	bus_space_read_4((sc)->sc_ ## spc ## t, (sc)->sc_ ## spc ## h, \
--- 122,128 ----
  static int hme_nerr;
  
  DRIVER_MODULE(miibus, hme, miibus_driver, miibus_devclass, 0, 0);
! MODULE_DEPEND(hme, miibus, 1, 1, 1);
  
  #define	HME_SPC_READ_4(spc, sc, offs) \
  	bus_space_read_4((sc)->sc_ ## spc ## t, (sc)->sc_ ## spc ## h, \

>Release-Note:
>Audit-Trail:
>Unformatted:

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




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