Skip to content

Commit

Permalink
Update FreeBSD network drivers with the 9.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
korli committed Jan 8, 2013
1 parent 82ee340 commit 648db73
Show file tree
Hide file tree
Showing 179 changed files with 16,580 additions and 6,893 deletions.
5 changes: 2 additions & 3 deletions src/add-ons/kernel/drivers/network/3com/dev/mii/bmtphy.c
Expand Up @@ -56,7 +56,7 @@
*/

#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/dev/mii/bmtphy.c,v 1.12.10.8.2.1 2010/12/21 17:09:25 kensmith Exp $");
__FBSDID("$FreeBSD$");

/*
* Driver for the Broadcom BCM5201/BCM5202 "Mini-Theta" PHYs. This also
Expand Down Expand Up @@ -91,8 +91,7 @@ static device_method_t bmtphy_methods[] = {
DEVMETHOD(device_attach, bmtphy_attach),
DEVMETHOD(device_detach, mii_phy_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),

{ 0, 0 }
DEVMETHOD_END
};

static devclass_t bmtphy_devclass;
Expand Down
Expand Up @@ -28,7 +28,7 @@
*
* from NetBSD: bmtphyreg.h,v 1.1 2001/06/02 21:42:10 thorpej Exp
*
* $FreeBSD: src/sys/dev/mii/bmtphyreg.h,v 1.2.22.2.2.1 2010/12/21 17:09:25 kensmith Exp $
* $FreeBSD$
*/

#ifndef _DEV_MII_BMTPHYREG_H_
Expand Down
4 changes: 2 additions & 2 deletions src/add-ons/kernel/drivers/network/3com/dev/mii/ukphy.c
Expand Up @@ -55,7 +55,7 @@
*/

#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/dev/mii/ukphy.c,v 1.20.10.6.2.1 2010/12/21 17:09:25 kensmith Exp $");
__FBSDID("$FreeBSD$");

/*
* driver for generic unknown PHYs
Expand Down Expand Up @@ -86,7 +86,7 @@ static device_method_t ukphy_methods[] = {
DEVMETHOD(device_attach, ukphy_attach),
DEVMETHOD(device_detach, mii_phy_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
{ 0, 0 }
DEVMETHOD_END
};

static devclass_t ukphy_devclass;
Expand Down
Expand Up @@ -31,7 +31,7 @@
*/

#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/dev/mii/ukphy_subr.c,v 1.10.2.4.2.1 2010/12/21 17:09:25 kensmith Exp $");
__FBSDID("$FreeBSD$");

/*
* Subroutines shared by the ukphy driver and other PHY drivers.
Expand Down
22 changes: 8 additions & 14 deletions src/add-ons/kernel/drivers/network/3com/dev/xl/if_xl.c
Expand Up @@ -31,7 +31,7 @@
*/

#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/dev/xl/if_xl.c,v 1.8.2.7.2.1 2010/12/21 17:09:25 kensmith Exp $");
__FBSDID("$FreeBSD$");

/*
* 3Com 3c90x Etherlink XL PCI NIC driver
Expand Down Expand Up @@ -310,17 +310,13 @@ static device_method_t xl_methods[] = {
DEVMETHOD(device_suspend, xl_suspend),
DEVMETHOD(device_resume, xl_resume),

/* bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_driver_added, bus_generic_driver_added),

/* MII interface */
DEVMETHOD(miibus_readreg, xl_miibus_readreg),
DEVMETHOD(miibus_writereg, xl_miibus_writereg),
DEVMETHOD(miibus_statchg, xl_miibus_statchg),
DEVMETHOD(miibus_mediainit, xl_miibus_mediainit),

{ 0, 0 }
DEVMETHOD_END
};

static driver_t xl_driver = {
Expand All @@ -331,8 +327,9 @@ static driver_t xl_driver = {

static devclass_t xl_devclass;

DRIVER_MODULE(xl, pci, xl_driver, xl_devclass, 0, 0);
DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, 0, 0);
DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL,
SI_ORDER_ANY);
DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL);

static void
xl_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
Expand Down Expand Up @@ -2185,12 +2182,9 @@ xl_intr(void *arg)
#endif
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
break;
if (status & XL_STAT_UP_COMPLETE) {
int curpkts;

curpkts = ifp->if_ipackets;
xl_rxeof(sc);
if (curpkts == ifp->if_ipackets) {
if (status & XL_STAT_UP_COMPLETE) {
if (xl_rxeof(sc) == 0) {
while (xl_rx_resync(sc))
xl_rxeof(sc);
}
Expand Down Expand Up @@ -2226,7 +2220,7 @@ xl_intr(void *arg)
}

if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) &&
ifp->if_drv_flags & IFF_DRV_RUNNING) {
ifp->if_drv_flags & IFF_DRV_RUNNING) {
if (sc->xl_type == XL_TYPE_905B)
xl_start_90xB_locked(ifp);
else
Expand Down
2 changes: 1 addition & 1 deletion src/add-ons/kernel/drivers/network/3com/dev/xl/if_xlreg.h
Expand Up @@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/xl/if_xlreg.h,v 1.1.2.2.2.1 2010/12/21 17:09:25 kensmith Exp $
* $FreeBSD$
*/

#define XL_EE_READ 0x0080 /* read, 5 bit address */
Expand Down
2 changes: 1 addition & 1 deletion src/add-ons/kernel/drivers/network/3com/dev/xl/xlphy.c
Expand Up @@ -86,7 +86,7 @@ static device_method_t xlphy_methods[] = {
DEVMETHOD(device_attach, xlphy_attach),
DEVMETHOD(device_detach, mii_phy_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
{ 0, 0 }
DEVMETHOD_END
};

static devclass_t xlphy_devclass;
Expand Down

0 comments on commit 648db73

Please sign in to comment.