diff options
-rw-r--r-- | Makefile.inc1 | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_tools/freebsd-native.h | 4 | ||||
-rw-r--r-- | lib/clang/clang.build.mk | 4 | ||||
-rw-r--r-- | sys/arm/versatile/versatile_pci.c | 3 | ||||
-rw-r--r-- | sys/boot/i386/btx/btx/btx.S | 7 | ||||
-rw-r--r-- | sys/dev/ata/ata-all.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/ata-card.c | 2 | ||||
-rw-r--r-- | sys/dev/bxe/bxe.c | 24 | ||||
-rw-r--r-- | sys/dev/bxe/bxe_stats.c | 11 | ||||
-rw-r--r-- | sys/dev/bxe/ecore_sp.h | 9 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c | 1 | ||||
-rw-r--r-- | sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c | 30 | ||||
-rw-r--r-- | sys/dev/vmware/vmxnet3/if_vmx.c | 2 | ||||
-rw-r--r-- | sys/dev/vmware/vmxnet3/if_vmxvar.h | 11 | ||||
-rw-r--r-- | sys/net80211/ieee80211_freebsd.c | 4 |
15 files changed, 63 insertions, 53 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index ac10c2b..e2d9f88 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -329,7 +329,7 @@ TARGET_ABI= gnueabi .else TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XFLAGS+= -target ${TARGET_TRIPLE} .endif .endif diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index 30cd9b1..8e523fa 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -7,8 +7,8 @@ #define FREEBSD_NATIVE 1 /* Fake out gcc/config/freebsd<version>.h. */ -#define FBSD_MAJOR 10 -#define FBSD_CC_VER 1000001 /* form like __FreeBSD_version */ +#define FBSD_MAJOR 11 +#define FBSD_CC_VER 1100001 /* form like __FreeBSD_version */ #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 9bcf506..b43b28a 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -27,8 +27,8 @@ TARGET_ABI= gnueabi TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.0 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd11.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" diff --git a/sys/arm/versatile/versatile_pci.c b/sys/arm/versatile/versatile_pci.c index 131209a..e65dbb6 100644 --- a/sys/arm/versatile/versatile_pci.c +++ b/sys/arm/versatile/versatile_pci.c @@ -360,6 +360,9 @@ versatile_pci_activate_resource(device_t bus, device_t child, int type, int rid, res = (BUS_ACTIVATE_RESOURCE(device_get_parent(bus), child, type, rid, r)); break; + default: + res = ENXIO; + break; } return (res); diff --git a/sys/boot/i386/btx/btx/btx.S b/sys/boot/i386/btx/btx/btx.S index ef3d0c7..87d09a5 100644 --- a/sys/boot/i386/btx/btx/btx.S +++ b/sys/boot/i386/btx/btx/btx.S @@ -41,6 +41,8 @@ .set PSL_RESERVED_DEFAULT,0x00000002 .set PSL_T,0x00000100 # Trap flag .set PSL_I,0x00000200 # Interrupt enable flag + .set PSL_D,0x00000400 # String instruction direction + .set PSL_NT,0x00004000 # Nested task flag .set PSL_VM,0x00020000 # Virtual 8086 mode flag .set PSL_AC,0x00040000 # Alignment check flag /* @@ -611,8 +613,8 @@ rret_tramp: movw $MEM_ESPR-0x08,%sp # Reset stack pointer pushl %ds # regs pushl %es pushfl # Save %eflags - cli # Disable interrupts - std # String ops dec + pushl $PSL_RESERVED_DEFAULT|PSL_D # Use clean %eflags with + popfl # string ops dec xorw %ax,%ax # Reset seg movw %ax,%ds # regs movw %ax,%es # (%ss is already 0) @@ -675,6 +677,7 @@ rret_tramp.1: xorl %ecx,%ecx # Zero testl $V86F_FLAGS,%edx # User wants flags? jz rret_tramp.3 # No movl MEM_ESPR-0x3c,%eax # Read real mode flags + andl $~(PSL_T|PSL_NT),%eax # Clear unsafe flags movw %ax,-0x08(%esi) # Update user flags (low 16) /* * Return to the user task diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index cfd025f..4860faf 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -92,7 +92,7 @@ FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver"); int ata_probe(device_t dev) { - return 0; + return (BUS_PROBE_DEFAULT); } int diff --git a/sys/dev/ata/ata-card.c b/sys/dev/ata/ata-card.c index eb49c2c..5346b8f 100644 --- a/sys/dev/ata/ata-card.c +++ b/sys/dev/ata/ata-card.c @@ -140,7 +140,7 @@ ata_pccard_attach(device_t dev) ch-> flags |= ATA_NO_SLAVE; ata_generic_hw(dev); err = ata_probe(dev); - if (err) + if (err > 0) return (err); return (ata_attach(dev)); } diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 0588d24..bf0710a 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -34,7 +34,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.17" +#define BXE_DRIVER_VERSION "1.78.18" #include "bxe.h" #include "ecore_sp.h" @@ -936,8 +936,8 @@ bxe_dma_alloc(struct bxe_softc *sc, int rc; if (dma->size > 0) { - BLOGE(sc, "dma block '%s' already has size %lu\n", msg, - (unsigned long) dma->size); + BLOGE(sc, "dma block '%s' already has size %lu\n", msg, + (unsigned long)dma->size); return (1); } @@ -14201,8 +14201,14 @@ bxe_media_detect(struct bxe_softc *sc) uint32_t phy_idx = bxe_get_cur_phy_idx(sc); switch (sc->link_params.phy[phy_idx].media_type) { case ELINK_ETH_PHY_SFPP_10G_FIBER: - case ELINK_ETH_PHY_SFP_1G_FIBER: case ELINK_ETH_PHY_XFP_FIBER: + BLOGI(sc, "Found 10Gb Fiber media.\n"); + sc->media = IFM_10G_SR; + break; + case ELINK_ETH_PHY_SFP_1G_FIBER: + BLOGI(sc, "Found 1Gb Fiber media.\n"); + sc->media = IFM_1000_SX; + break; case ELINK_ETH_PHY_KR: case ELINK_ETH_PHY_CX4: BLOGI(sc, "Found 10GBase-CX4 media.\n"); @@ -14213,8 +14219,14 @@ bxe_media_detect(struct bxe_softc *sc) sc->media = IFM_10G_TWINAX; break; case ELINK_ETH_PHY_BASE_T: - BLOGI(sc, "Found 10GBase-T media.\n"); - sc->media = IFM_10G_T; + if (sc->link_params.speed_cap_mask[0] & + PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) { + BLOGI(sc, "Found 10GBase-T media.\n"); + sc->media = IFM_10G_T; + } else { + BLOGI(sc, "Found 1000Base-T media.\n"); + sc->media = IFM_1000_T; + } break; case ELINK_ETH_PHY_NOT_PRESENT: BLOGI(sc, "Media not present.\n"); diff --git a/sys/dev/bxe/bxe_stats.c b/sys/dev/bxe/bxe_stats.c index 78b8dd8..977f6cf 100644 --- a/sys/dev/bxe/bxe_stats.c +++ b/sys/dev/bxe/bxe_stats.c @@ -263,6 +263,17 @@ bxe_stats_pmf_update(struct bxe_softc *sc) int loader_idx = PMF_DMAE_C(sc); uint32_t *stats_comp = BXE_SP(sc, stats_comp); + if (sc->devinfo.bc_ver <= 0x06001400) { + /* + * Bootcode v6.0.21 fixed a GRC timeout that occurs when accessing + * BRB registers while the BRB block is in reset. The DMA transfer + * below triggers this issue resulting in the DMAE to stop + * functioning. Skip this initial stats transfer for old bootcode + * versions <= 6.0.20. + */ + return; + } + /* sanity */ if (!sc->port.pmf || !sc->port.port_stx) { BLOGE(sc, "BUG!\n"); diff --git a/sys/dev/bxe/ecore_sp.h b/sys/dev/bxe/ecore_sp.h index 19607e5..ae7ddee 100644 --- a/sys/dev/bxe/ecore_sp.h +++ b/sys/dev/bxe/ecore_sp.h @@ -77,9 +77,14 @@ struct bxe_softc; typedef bus_addr_t ecore_dma_addr_t; /* expected to be 64 bit wide */ typedef volatile int ecore_atomic_t; -#if __FreeBSD_version < 1000002 -typedef int bool; +#ifndef __bool_true_false_are_defined +#ifndef __cplusplus +#define bool _Bool +#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) +typedef _Bool bool; #endif +#endif /* !__cplusplus */ +#endif /* !__bool_true_false_are_defined$ */ #define ETH_ALEN ETHER_ADDR_LEN /* 6 */ diff --git a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c index c8652a0..1825a43 100644 --- a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c +++ b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c @@ -298,3 +298,4 @@ DECLARE_MODULE(iw_cxgb, iwch_mod_data, SI_SUB_EXEC, SI_ORDER_ANY); MODULE_DEPEND(t3_tom, cxgbc, 1, 1, 1); MODULE_DEPEND(iw_cxgb, toecore, 1, 1, 1); MODULE_DEPEND(iw_cxgb, t3_tom, 1, 1, 1); +MODULE_DEPEND(iw_cxgb, ibcore, 1, 1, 1); diff --git a/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c b/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c index 9e5cf55..6ca0665 100644 --- a/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c +++ b/sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c @@ -92,6 +92,7 @@ static int hv_check_for_hyper_v(void); static int hv_ata_pci_probe(device_t dev) { + device_t parent = device_get_parent(dev); int ata_disk_enable; ata_disk_enable = 0; @@ -102,23 +103,9 @@ hv_ata_pci_probe(device_t dev) if (!hv_check_for_hyper_v()) return (ENXIO); - if (bootverbose) - device_printf(dev, - "hv_ata_pci_probe dev_class/subslcass = %d, %d\n", - pci_get_class(dev), pci_get_subclass(dev)); - - /* is this a storage class device ? */ - if (pci_get_class(dev) != PCIC_STORAGE) + if (device_get_unit(parent) != 0 || device_get_ivars(dev) != 0) return (ENXIO); - /* is this an IDE/ATA type device ? */ - if (pci_get_subclass(dev) != PCIS_STORAGE_IDE) - return (ENXIO); - - if(bootverbose) - device_printf(dev, - "Hyper-V probe for disabling ATA-PCI, emulated driver\n"); - /* * On Hyper-V the default is to use the enlightened driver for * IDE disks. However, if the user wishes to use the native @@ -126,15 +113,14 @@ hv_ata_pci_probe(device_t dev) * hw_ata.disk_enable must be explicitly set to 1. */ if (getenv_int("hw.ata.disk_enable", &ata_disk_enable)) { - if(bootverbose) + if (bootverbose) device_printf(dev, "hw.ata.disk_enable flag is disabling Hyper-V" " ATA driver support\n"); return (ENXIO); } - if (bootverbose) - device_printf(dev, "Hyper-V ATA storage driver enabled.\n"); + device_set_desc(dev, "Hyper-V ATA storage disengage driver"); return (BUS_PROBE_VENDOR); } @@ -193,12 +179,12 @@ static device_method_t hv_ata_pci_methods[] = { devclass_t hv_ata_pci_devclass; static driver_t hv_ata_pci_disengage_driver = { - "pciata-disable", + "ata", hv_ata_pci_methods, - sizeof(struct ata_pci_controller), + 0, }; -DRIVER_MODULE(atapci_dis, pci, hv_ata_pci_disengage_driver, - hv_ata_pci_devclass, NULL, NULL); +DRIVER_MODULE(atapci_dis, atapci, hv_ata_pci_disengage_driver, + hv_ata_pci_devclass, NULL, NULL); MODULE_VERSION(atapci_dis, 1); MODULE_DEPEND(atapci_dis, ata, 1, 1, 1); diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c index 1cab2d5..21f0947 100644 --- a/sys/dev/vmware/vmxnet3/if_vmx.c +++ b/sys/dev/vmware/vmxnet3/if_vmx.c @@ -1317,7 +1317,7 @@ vmxnet3_init_shared_data(struct vmxnet3_softc *sc) /* DriverInfo */ ds->version = VMXNET3_DRIVER_VERSION; - ds->guest = VMXNET3_GOS_FREEBSD | VMXNET3_GUEST_OS_VERSION | + ds->guest = VMXNET3_GOS_FREEBSD | #ifdef __LP64__ VMXNET3_GOS_64BIT; #else diff --git a/sys/dev/vmware/vmxnet3/if_vmxvar.h b/sys/dev/vmware/vmxnet3/if_vmxvar.h index 2e7d02d..c905eb8 100644 --- a/sys/dev/vmware/vmxnet3/if_vmxvar.h +++ b/sys/dev/vmware/vmxnet3/if_vmxvar.h @@ -248,17 +248,6 @@ struct vmxnet3_softc { #define VMXNET3_DRIVER_VERSION 0x00010000 /* - * Convert the FreeBSD version in to something the hypervisor - * understands. This is apparently what VMware's driver reports - * so mimic it even though it probably is not required. - */ -#define VMXNET3_GUEST_OS_VERSION \ - (((__FreeBSD_version / 100000) << 14) | \ - (((__FreeBSD_version / 1000) % 100) << 6 ) | \ - (((__FreeBSD_version / 100) % 10) << 30) | \ - ((__FreeBSD_version % 100) << 22)) - -/* * Max descriptors per Tx packet. We must limit the size of the * any TSO packets based on the number of segments. */ diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index b616c44..8c97f1e 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -808,9 +808,9 @@ static eventhandler_tag wlan_ifllevent; static void bpf_track(void *arg, struct ifnet *ifp, int dlt, int attach) { - /* NB: identify vap's by if_start */ + /* NB: identify vap's by if_init */ if (dlt == DLT_IEEE802_11_RADIO && - ifp->if_transmit == ieee80211_vap_transmit) { + ifp->if_init == ieee80211_init) { struct ieee80211vap *vap = ifp->if_softc; /* * Track bpf radiotap listener state. We mark the vap |