broadcom570x: sync with FreeBSD 11.1.
* add a few sysctl definitions, kern_getenv().
This commit is contained in:
parent
57ca9c743d
commit
645dc27d9d
@ -28,51 +28,6 @@
|
||||
#ifndef _BCEREG_H_DEFINED
|
||||
#define _BCEREG_H_DEFINED
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/endian.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sockio.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <net/bpf.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_media.h>
|
||||
|
||||
#include <net/if_types.h>
|
||||
#include <net/if_vlan_var.h>
|
||||
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/if_ether.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/ip6.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/udp.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/rman.h>
|
||||
|
||||
#include <dev/mii/mii.h>
|
||||
#include <dev/mii/miivar.h>
|
||||
#include "miidevs.h"
|
||||
#include <dev/mii/brgphyreg.h>
|
||||
|
||||
#include <dev/pci/pcireg.h>
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
||||
#include "miibus_if.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* Conversion to FreeBSD type definitions. */
|
||||
/****************************************************************************/
|
||||
@ -281,7 +236,6 @@
|
||||
*
|
||||
* #define BCE_DEBUG
|
||||
* #define BCE_NVRAM_WRITE_SUPPORT
|
||||
* #define BCE_JUMBO_HDRSPLIT
|
||||
*/
|
||||
|
||||
/****************************************************************************/
|
||||
@ -465,7 +419,7 @@
|
||||
/* Returns FALSE in "defects" per 2^31 - 1 calls, otherwise returns TRUE. */
|
||||
#define DB_RANDOMFALSE(defects) (random() > defects)
|
||||
#define DB_OR_RANDOMFALSE(defects) || (random() > defects)
|
||||
#define DB_AND_RANDOMFALSE(defects) && (random() > ddfects)
|
||||
#define DB_AND_RANDOMFALSE(defects) && (random() > defects)
|
||||
|
||||
/* Returns TRUE in "defects" per 2^31 - 1 calls, otherwise returns FALSE. */
|
||||
#define DB_RANDOMTRUE(defects) (random() < defects)
|
||||
@ -6135,7 +6089,7 @@ struct l2_fhdr {
|
||||
/****************************************************************************/
|
||||
/* The following definitions refer to pre-defined locations in processor */
|
||||
/* memory space which allows the driver to enable particular functionality */
|
||||
/* within the firmware or read specfic information about the running */
|
||||
/* within the firmware or read specific information about the running */
|
||||
/* firmware. */
|
||||
/****************************************************************************/
|
||||
|
||||
@ -6220,7 +6174,7 @@ struct l2_fhdr {
|
||||
#define RX_IDX(x) ((x) & USABLE_RX_BD_PER_PAGE)
|
||||
|
||||
/*
|
||||
* To accomodate jumbo frames, the page chain should
|
||||
* To accommodate jumbo frames, the page chain should
|
||||
* be 4 times larger than the receive chain.
|
||||
*/
|
||||
#define DEFAULT_PG_PAGES (DEFAULT_RX_PAGES * 4)
|
||||
@ -6738,6 +6692,7 @@ struct bce_softc
|
||||
u32 l2fhdr_error_count;
|
||||
u32 dma_map_addr_tx_failed_count;
|
||||
u32 dma_map_addr_rx_failed_count;
|
||||
u32 watchdog_timeouts;
|
||||
|
||||
/* Host coalescing block command register */
|
||||
u32 hc_command;
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network broadcom570x dev bge ;
|
||||
|
||||
UseHeaders [ FDirName $(SUBDIR) .. .. ] : true ;
|
||||
UseHeaders [ FDirName $(SUBDIR) .. mii ] : true ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ] : true ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_network compat ] : true ;
|
||||
|
||||
UsePrivateHeaders net system ;
|
||||
UsePrivateKernelHeaders ;
|
||||
@ -12,10 +12,10 @@ SubDirCcFlags [ FDefines _KERNEL=1 FBSD_DRIVER=1 _XOPEN_SOURCE ] ;
|
||||
KernelAddon broadcom570x :
|
||||
if_bge.c
|
||||
glue.c
|
||||
: broadcom570x_mii.a libfreebsd_network.a
|
||||
: broadcom570x_mii.a libfreebsd11_network.a
|
||||
;
|
||||
|
||||
ObjectHdrs [ FGristFiles if_bge$(SUFOBJ) ]
|
||||
: [ FDirName $(TARGET_COMMON_DEBUG_OBJECT_DIR_$(TARGET_PACKAGING_ARCH)) libs
|
||||
compat freebsd_network ] ;
|
||||
Includes [ FGristFiles if_bge.c ] : <src!libs!compat!freebsd_network>miidevs.h ;
|
||||
compat freebsd11_network ] ;
|
||||
Includes [ FGristFiles if_bge.c ] : <src!libs!compat!freebsd11_network>miidevs.h ;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -329,6 +329,7 @@
|
||||
#define BGE_CHIPID_BCM57780_A1 0x57780001
|
||||
#define BGE_CHIPID_BCM5717_A0 0x05717000
|
||||
#define BGE_CHIPID_BCM5717_B0 0x05717100
|
||||
#define BGE_CHIPID_BCM5717_C0 0x05717200
|
||||
#define BGE_CHIPID_BCM5719_A0 0x05719000
|
||||
#define BGE_CHIPID_BCM5720_A0 0x05720000
|
||||
#define BGE_CHIPID_BCM5762_A0 0x05762000
|
||||
@ -791,11 +792,11 @@
|
||||
#define BGE_LEDCTL_10MBPS_LED 0x00000008
|
||||
#define BGE_LEDCTL_TRAFLED_OVERRIDE 0x00000010
|
||||
#define BGE_LEDCTL_TRAFLED_BLINK 0x00000020
|
||||
#define BGE_LEDCTL_TREFLED_BLINK_2 0x00000040
|
||||
#define BGE_LEDCTL_TRAFLED_BLINK_2 0x00000040
|
||||
#define BGE_LEDCTL_1000MBPS_STS 0x00000080
|
||||
#define BGE_LEDCTL_100MBPS_STS 0x00000100
|
||||
#define BGE_LEDCTL_10MBPS_STS 0x00000200
|
||||
#define BGE_LEDCTL_TRADLED_STS 0x00000400
|
||||
#define BGE_LEDCTL_TRAFLED_STS 0x00000400
|
||||
#define BGE_LEDCTL_BLINKPERIOD 0x7FF80000
|
||||
#define BGE_LEDCTL_BLINKPERIOD_OVERRIDE 0x80000000
|
||||
|
||||
@ -841,6 +842,7 @@
|
||||
#define BGE_RXMODE_RX_NO_CRC_CHECK 0x00000200
|
||||
#define BGE_RXMODE_RX_KEEP_VLAN_DIAG 0x00000400
|
||||
#define BGE_RXMODE_IPV6_ENABLE 0x01000000
|
||||
#define BGE_RXMODE_IPV4_FRAG_FIX 0x02000000
|
||||
|
||||
/* Receive MAC status register */
|
||||
#define BGE_RXSTAT_REMOTE_XOFFED 0x00000001
|
||||
@ -2451,6 +2453,7 @@ struct bge_status_block {
|
||||
#define BCOM_DEVICEID_BCM5715 0x1678
|
||||
#define BCOM_DEVICEID_BCM5715S 0x1679
|
||||
#define BCOM_DEVICEID_BCM5717 0x1655
|
||||
#define BCOM_DEVICEID_BCM5717C 0x1665
|
||||
#define BCOM_DEVICEID_BCM5718 0x1656
|
||||
#define BCOM_DEVICEID_BCM5719 0x1657
|
||||
#define BCOM_DEVICEID_BCM5720_PP 0x1658 /* Not released to public. */
|
||||
@ -2861,16 +2864,6 @@ struct bge_gib {
|
||||
#define BGE_DMA_MAXADDR 0xFFFFFFFFFF
|
||||
#endif
|
||||
|
||||
#ifdef PAE
|
||||
#define BGE_DMA_BNDRY 0x80000000
|
||||
#else
|
||||
#if (BUS_SPACE_MAXADDR > 0xFFFFFFFF)
|
||||
#define BGE_DMA_BNDRY 0x100000000
|
||||
#else
|
||||
#define BGE_DMA_BNDRY 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Ring structures. Most of these reside in host memory and we tell
|
||||
* the NIC where they are via the ring control blocks. The exceptions
|
||||
|
@ -1,7 +1,7 @@
|
||||
SubDir HAIKU_TOP src add-ons kernel drivers network broadcom570x dev mii ;
|
||||
|
||||
UseHeaders [ FDirName $(SUBDIR) .. .. ] : true ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ] : true ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd11_network compat ] : true ;
|
||||
|
||||
UsePrivateHeaders net system ;
|
||||
UsePrivateKernelHeaders ;
|
||||
@ -17,5 +17,5 @@ KernelStaticLibrary broadcom570x_mii.a
|
||||
|
||||
ObjectHdrs [ FGristFiles brgphy$(SUFOBJ) ]
|
||||
: [ FDirName $(TARGET_COMMON_DEBUG_OBJECT_DIR_$(TARGET_PACKAGING_ARCH)) libs
|
||||
compat freebsd_network ] ;
|
||||
Includes [ FGristFiles brgphy.c ] : <src!libs!compat!freebsd_network>miidevs.h ;
|
||||
compat freebsd11_network ] ;
|
||||
Includes [ FGristFiles brgphy.c ] : <src!libs!compat!freebsd11_network>miidevs.h ;
|
||||
|
@ -43,8 +43,10 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/module.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/taskqueue.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_var.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if_media.h>
|
||||
|
||||
@ -116,7 +118,10 @@ static void brgphy_jumbo_settings(struct mii_softc *, u_long);
|
||||
static const struct mii_phydesc brgphys[] = {
|
||||
MII_PHY_DESC(BROADCOM, BCM5400),
|
||||
MII_PHY_DESC(BROADCOM, BCM5401),
|
||||
MII_PHY_DESC(BROADCOM, BCM5402),
|
||||
MII_PHY_DESC(BROADCOM, BCM5411),
|
||||
MII_PHY_DESC(BROADCOM, BCM5404),
|
||||
MII_PHY_DESC(BROADCOM, BCM5424),
|
||||
MII_PHY_DESC(BROADCOM, BCM54K2),
|
||||
MII_PHY_DESC(BROADCOM, BCM5701),
|
||||
MII_PHY_DESC(BROADCOM, BCM5703),
|
||||
@ -129,6 +134,9 @@ static const struct mii_phydesc brgphys[] = {
|
||||
MII_PHY_DESC(BROADCOM, BCM5752),
|
||||
MII_PHY_DESC(BROADCOM, BCM5780),
|
||||
MII_PHY_DESC(BROADCOM, BCM5708C),
|
||||
MII_PHY_DESC(BROADCOM, BCM5466),
|
||||
MII_PHY_DESC(BROADCOM2, BCM5478),
|
||||
MII_PHY_DESC(BROADCOM2, BCM5488),
|
||||
MII_PHY_DESC(BROADCOM2, BCM5482),
|
||||
MII_PHY_DESC(BROADCOM2, BCM5708S),
|
||||
MII_PHY_DESC(BROADCOM2, BCM5709C),
|
||||
@ -158,25 +166,33 @@ static const struct mii_phy_funcs brgphy_funcs = {
|
||||
brgphy_reset
|
||||
};
|
||||
|
||||
#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21"
|
||||
#define HS21_BCM_CHIPID 0x57081021
|
||||
static const struct hs21_type {
|
||||
const uint32_t id;
|
||||
const char *prod;
|
||||
} hs21_type_lists[] = {
|
||||
{ 0x57081021, "IBM eServer BladeCenter HS21" },
|
||||
{ 0x57081011, "IBM eServer BladeCenter HS21 -[8853PAU]-" },
|
||||
};
|
||||
|
||||
static int
|
||||
detect_hs21(struct bce_softc *bce_sc)
|
||||
{
|
||||
char *sysenv;
|
||||
int found;
|
||||
int found, i;
|
||||
|
||||
found = 0;
|
||||
if (bce_sc->bce_chipid == HS21_BCM_CHIPID) {
|
||||
sysenv = getenv("smbios.system.product");
|
||||
if (sysenv != NULL) {
|
||||
if (strncmp(sysenv, HS21_PRODUCT_ID,
|
||||
strlen(HS21_PRODUCT_ID)) == 0)
|
||||
found = 1;
|
||||
freeenv(sysenv);
|
||||
sysenv = kern_getenv("smbios.system.product");
|
||||
if (sysenv == NULL)
|
||||
return (found);
|
||||
for (i = 0; i < nitems(hs21_type_lists); i++) {
|
||||
if (bce_sc->bce_chipid == hs21_type_lists[i].id &&
|
||||
strncmp(sysenv, hs21_type_lists[i].prod,
|
||||
strlen(hs21_type_lists[i].prod)) == 0) {
|
||||
found++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
freeenv(sysenv);
|
||||
return (found);
|
||||
}
|
||||
|
||||
@ -196,7 +212,6 @@ brgphy_attach(device_t dev)
|
||||
struct bge_softc *bge_sc = NULL;
|
||||
struct bce_softc *bce_sc = NULL;
|
||||
struct mii_softc *sc;
|
||||
struct ifnet *ifp;
|
||||
|
||||
bsc = device_get_softc(dev);
|
||||
sc = &bsc->mii_sc;
|
||||
@ -205,13 +220,12 @@ brgphy_attach(device_t dev)
|
||||
&brgphy_funcs, 0);
|
||||
|
||||
bsc->serdes_flags = 0;
|
||||
ifp = sc->mii_pdata->mii_ifp;
|
||||
|
||||
/* Find the MAC driver associated with this PHY. */
|
||||
if (strcmp(ifp->if_dname, "bge") == 0)
|
||||
bge_sc = ifp->if_softc;
|
||||
else if (strcmp(ifp->if_dname, "bce") == 0)
|
||||
bce_sc = ifp->if_softc;
|
||||
if (mii_dev_mac_match(dev, "bge"))
|
||||
bge_sc = mii_dev_mac_softc(dev);
|
||||
else if (mii_dev_mac_match(dev, "bce"))
|
||||
bce_sc = mii_dev_mac_softc(dev);
|
||||
|
||||
/* Handle any special cases based on the PHY ID */
|
||||
switch (sc->mii_mpd_oui) {
|
||||
@ -266,20 +280,25 @@ brgphy_attach(device_t dev)
|
||||
sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
|
||||
device_printf(dev, " ");
|
||||
|
||||
#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL)
|
||||
|
||||
/* Add the supported media types */
|
||||
if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) {
|
||||
mii_phy_add_media(sc);
|
||||
printf("\n");
|
||||
} else {
|
||||
sc->mii_anegticks = MII_ANEGTICKS_GIGE;
|
||||
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst),
|
||||
BRGPHY_S1000 | BRGPHY_BMCR_FDX);
|
||||
ifmedia_add(&sc->mii_pdata->mii_media,
|
||||
IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst),
|
||||
0, NULL);
|
||||
printf("1000baseSX-FDX, ");
|
||||
/* 2.5G support is a software enabled feature on the 5708S and 5709S. */
|
||||
if (bce_sc && (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)) {
|
||||
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0);
|
||||
/*
|
||||
* 2.5G support is a software enabled feature
|
||||
* on the 5708S and 5709S.
|
||||
*/
|
||||
if (bce_sc && (bce_sc->bce_phy_flags &
|
||||
BCE_PHY_2_5G_CAPABLE_FLAG)) {
|
||||
ifmedia_add(&sc->mii_pdata->mii_media,
|
||||
IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX,
|
||||
sc->mii_inst), 0, NULL);
|
||||
printf("2500baseSX-FDX, ");
|
||||
} else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc &&
|
||||
(detect_hs21(bce_sc) != 0)) {
|
||||
@ -295,11 +314,11 @@ brgphy_attach(device_t dev)
|
||||
printf("auto-neg workaround, ");
|
||||
bsc->serdes_flags |= BRGPHY_NOANWAIT;
|
||||
}
|
||||
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0);
|
||||
ifmedia_add(&sc->mii_pdata->mii_media, IFM_MAKEWORD(IFM_ETHER,
|
||||
IFM_AUTO, 0, sc->mii_inst), 0, NULL);
|
||||
printf("auto\n");
|
||||
}
|
||||
|
||||
#undef ADD
|
||||
MIIBUS_MEDIAINIT(sc->mii_dev);
|
||||
return (0);
|
||||
}
|
||||
@ -314,10 +333,6 @@ brgphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
|
||||
case MII_POLLSTAT:
|
||||
break;
|
||||
case MII_MEDIACHG:
|
||||
/* If the interface is not up, don't do anything. */
|
||||
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
|
||||
break;
|
||||
|
||||
/* Todo: Why is this here? Is it really needed? */
|
||||
PHY_RESET(sc); /* XXX hardware bug work-around */
|
||||
|
||||
@ -337,11 +352,6 @@ brgphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
|
||||
}
|
||||
break;
|
||||
case MII_TICK:
|
||||
/* Bail if the interface isn't up. */
|
||||
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
|
||||
return (0);
|
||||
|
||||
|
||||
/* Bail if autoneg isn't in process. */
|
||||
if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) {
|
||||
sc->mii_ticks = 0;
|
||||
@ -887,7 +897,7 @@ brgphy_reset(struct mii_softc *sc)
|
||||
{
|
||||
struct bge_softc *bge_sc = NULL;
|
||||
struct bce_softc *bce_sc = NULL;
|
||||
struct ifnet *ifp;
|
||||
if_t ifp;
|
||||
int i, val;
|
||||
|
||||
/*
|
||||
@ -940,11 +950,10 @@ brgphy_reset(struct mii_softc *sc)
|
||||
ifp = sc->mii_pdata->mii_ifp;
|
||||
|
||||
/* Find the driver associated with this PHY. */
|
||||
if (strcmp(ifp->if_dname, "bge") == 0) {
|
||||
bge_sc = ifp->if_softc;
|
||||
} else if (strcmp(ifp->if_dname, "bce") == 0) {
|
||||
bce_sc = ifp->if_softc;
|
||||
}
|
||||
if (mii_phy_mac_match(sc, "bge"))
|
||||
bge_sc = mii_phy_mac_softc(sc);
|
||||
else if (mii_phy_mac_match(sc, "bce"))
|
||||
bce_sc = mii_phy_mac_softc(sc);
|
||||
|
||||
if (bge_sc) {
|
||||
/* Fix up various bugs */
|
||||
@ -962,7 +971,7 @@ brgphy_reset(struct mii_softc *sc)
|
||||
brgphy_fixup_jitter_bug(sc);
|
||||
|
||||
if (bge_sc->bge_flags & BGE_FLAG_JUMBO)
|
||||
brgphy_jumbo_settings(sc, ifp->if_mtu);
|
||||
brgphy_jumbo_settings(sc, if_getmtu(ifp));
|
||||
|
||||
if ((bge_sc->bge_phy_flags & BGE_PHY_NO_WIRESPEED) == 0)
|
||||
brgphy_ethernet_wirespeed(sc);
|
||||
@ -1073,11 +1082,11 @@ brgphy_reset(struct mii_softc *sc)
|
||||
(BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Bx))
|
||||
brgphy_fixup_disable_early_dac(sc);
|
||||
|
||||
brgphy_jumbo_settings(sc, ifp->if_mtu);
|
||||
brgphy_jumbo_settings(sc, if_getmtu(ifp));
|
||||
brgphy_ethernet_wirespeed(sc);
|
||||
} else {
|
||||
brgphy_fixup_ber_bug(sc);
|
||||
brgphy_jumbo_settings(sc, ifp->if_mtu);
|
||||
brgphy_jumbo_settings(sc, if_getmtu(ifp));
|
||||
brgphy_ethernet_wirespeed(sc);
|
||||
}
|
||||
}
|
||||
|
@ -140,12 +140,6 @@ ukphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
|
||||
break;
|
||||
|
||||
case MII_MEDIACHG:
|
||||
/*
|
||||
* If the interface is not up, don't do anything.
|
||||
*/
|
||||
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
|
||||
break;
|
||||
|
||||
mii_phy_setmedia(sc);
|
||||
break;
|
||||
|
||||
|
@ -50,8 +50,16 @@ struct sysctl_oid_list {
|
||||
#define CTLFLAG_SKIP 0x01000000 /* Skip this sysctl when listing */
|
||||
#define CTLMASK_SECURE 0x00F00000 /* Secure level */
|
||||
#define CTLFLAG_TUN 0x00080000 /* Tunable variable */
|
||||
#define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN)
|
||||
#define CTLFLAG_RWTUN (CTLFLAG_RW|CTLFLAG_TUN)
|
||||
#define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */
|
||||
#define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN)
|
||||
#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */
|
||||
#define CTLFLAG_DYING 0x00010000 /* Oid is being removed */
|
||||
#define CTLFLAG_CAPRD 0x00008000 /* Can be read in capability mode */
|
||||
#define CTLFLAG_CAPWR 0x00004000 /* Can be written in capability mode */
|
||||
#define CTLFLAG_STATS 0x00002000 /* Statistics, not a tuneable */
|
||||
#define CTLFLAG_NOFETCH 0x00001000 /* Don't fetch tunable from getenv() */
|
||||
#define CTLFLAG_CAPRW (CTLFLAG_CAPRD|CTLFLAG_CAPWR)
|
||||
|
||||
|
||||
static inline int
|
||||
|
@ -99,5 +99,6 @@ void free_unr(struct unrhdr *, u_int);
|
||||
|
||||
extern char *getenv(const char *name);
|
||||
extern void freeenv(char *env);
|
||||
extern char *kern_getenv(const char *name);
|
||||
|
||||
#endif /* _FBSD_COMPAT_SYS_SYSTM_H_ */
|
||||
|
@ -18,3 +18,11 @@ getenv(const char *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
kern_getenv(const char *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user