Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2019 09:04:23 +0200
From:      "O. Hartmann" <ohartmann@walstatt.org>
To:        "Stephen J. Kiernan" <stevek@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r351244 - head/sys/dev/usb/net
Message-ID:  <20190820090413.6c08b565@freyja>
In-Reply-To: <201908200106.x7K16hWT067244@repo.freebsd.org>
References:  <201908200106.x7K16hWT067244@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Aug 2019 01:06:43 +0000 (UTC)
"Stephen J. Kiernan" <stevek@FreeBSD.org> wrote:

> Author: stevek
> Date: Tue Aug 20 01:06:43 2019
> New Revision: 351244
> URL: https://svnweb.freebsd.org/changeset/base/351244
>
> Log:
>   usb_ethernet.h includes a number of mii headers, but only does so in
>   order to have struct mii_data available. However, it only really needs
>   a forward declaration of struct mii_data for use in pointer form for
>   the return type of a function prototype.
>
>   Custom kernel configuration that have usb and fdt enabled, but no miib=
us,
>   end up with compilation failures because miibus_if.h will not get
>   generated.
>
>   Due to the above, the following changes have been made to usb_ethernet=
.h:
>    * remove the inclusion of mii headers
>    * forward-declare struct mii_data
>    * include net/ifq.h to satify the need for complete struct ifqueue
>
>   Reviewed by:	ian
>   Obtained from:	Juniper Networks, Inc.
>   Differential Revision:	https://reviews.freebsd.org/D21293
>
> Modified:
>   head/sys/dev/usb/net/usb_ethernet.h
>
> Modified: head/sys/dev/usb/net/usb_ethernet.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> --- head/sys/dev/usb/net/usb_ethernet.h	Tue Aug 20 00:50:17
> 2019	(r351243) +++ head/sys/dev/usb/net/usb_ethernet.h	Tue Aug
> 20 01:06:43 2019	(r351244) @@ -45,14 +45,11 @@
>  #include <net/if_dl.h>
>  #include <net/if_media.h>
>  #include <net/if_types.h>
> +#include <net/ifq.h>
>  #include <net/bpf.h>
>  #include <net/ethernet.h>
>
> -#include "miibus_if.h"
> -
> -#include <dev/mii/mii.h>
> -#include <dev/mii/miivar.h>
> -
> +struct mii_data;
>  struct usb_ether;
>  struct usb_device_request;
>
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"

This breaks buildkernel:

[...]
=3D=3D=3D> usb/udl (all)
Building
/usr/obj/usr/src/amd64.amd64/sys/WOTAN/modules/usr/src/sys/modules/usb/udl=
/udl.ko
=3D=3D=3D> usb/uether (all) Building
/usr/obj/usr/src/amd64.amd64/sys/WOTAN/modules/usr/src/sys/modules/usb/uet=
her/uether.ko
=3D=3D=3D> usb/aue (all) Building
/usr/obj/usr/src/amd64.amd64/sys/WOTAN/modules/usr/src/sys/modules/usb/aue=
/if_aue.o
/usr/src/sys/dev/usb/net/if_aue.c:197:8: error: unknown type name
'miibus_readreg_t' static miibus_readreg_t aue_miibus_readreg; ^
/usr/src/sys/dev/usb/net/if_aue.c:198:8: error: unknown type name
'miibus_writereg_t' static miibus_writereg_t aue_miibus_writereg;
       ^
/usr/src/sys/dev/usb/net/if_aue.c:199:8: error: unknown type name
'miibus_statchg_t' static miibus_statchg_t aue_miibus_statchg;
       ^
/usr/src/sys/dev/usb/net/if_aue.c:262:2: error: use of undeclared identifi=
er
'miibus_readreg_desc' DEVMETHOD(miibus_readreg, aue_miibus_readreg),
        ^
/usr/src/sys/sys/bus.h:751:19: note: expanded from macro 'DEVMETHOD'
#define DEVMETHOD       KOBJMETHOD
[...]

Kind regards,
oh



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