Index: head/sys/arm/conf/ALPINE =================================================================== --- head/sys/arm/conf/ALPINE (revision 307669) +++ head/sys/arm/conf/ALPINE (revision 307670) @@ -1,80 +1,84 @@ # Kernel configuration for Alpine Board. # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the # latest information. # # An exhaustive list of options and more detailed explanations of the # device lines is also present in the ../../conf/NOTES and NOTES files. # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # # $FreeBSD$ ident ALPINE include "std.armv6" include "../annapurna/alpine/std.alpine" makeoptions MODULES_OVERRIDE="" makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options SMP # Enable multiple cores # Interrupt controller device gic options INTRNG # Annapurna Alpine drivers device al_ccu # Alpine Cache Coherency Unit device al_nb_service # Alpine North Bridge Service +device al_iofic # I/O Fabric Interrupt Controller +device al_serdes # Serializer/Deserializer +device al_udma # Universal DMA # Pseudo devices device loop device random device pty device md device gpio # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) #device ctl # CAM Target Layer # Serial ports device uart # PCI/PCIE device pci device pci_host_generic device al_pci # Annapurna Alpine PCI-E # Ethernet device ether device mii device bpf +device al_eth # Annapurna Alpine Ethernet NIC options DEVICE_POLLING # USB ethernet support, requires miibus device miibus #FDT options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=annapurna-alpine.dts Index: head/sys/arm64/conf/GENERIC =================================================================== --- head/sys/arm64/conf/GENERIC (revision 307669) +++ head/sys/arm64/conf/GENERIC (revision 307670) @@ -1,230 +1,234 @@ # # GENERIC -- Generic kernel configuration file for FreeBSD/arm64 # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the # latest information. # # An exhaustive list of options and more detailed explanations of the # device lines is also present in the ../../conf/NOTES and NOTES files. # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # # $FreeBSD$ cpu ARM64 ident GENERIC makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options NFSCL # Network Filesystem Client options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options VFP # Floating-point support options RACCT # Resource accounting framework options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits options SMP options INTRNG # Debugging support. Always need this: options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): options DDB # Support DDB. #options GDB # Support remote GDB. options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # SoC support options SOC_ALLWINNER_A64 options SOC_CAVM_THUNDERX options SOC_HISI_HI6220 # Annapurna Alpine drivers device al_ccu # Alpine Cache Coherency Unit device al_nb_service # Alpine North Bridge Service +device al_iofic # I/O Fabric Interrupt Controller +device al_serdes # Serializer/Deserializer +device al_udma # Universal DMA # VirtIO support device virtio device virtio_mmio device virtio_blk device vtnet # CPU frequency control device cpufreq # Bus drivers device pci device al_pci # Annapurna Alpine PCI-E options PCI_HP # PCI-Express native HotPlug options PCI_IOV # PCI SR-IOV support # Ethernet NICs device mii device miibus # MII bus support device awg # Allwinner EMAC Gigabit Ethernet device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family device ix # Intel 10Gb Ethernet Family device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet device vnic # Cavium ThunderX NIC +device al_eth # Annapurna Alpine Ethernet NIC # Block devices device ahci device scbus device da # ATA/SCSI peripherals device pass # Passthrough device (direct ATA/SCSI access) # MMC/SD/SDIO Card slot support device sdhci device aw_mmc # Allwinner SD/MMC controller device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device dwmmc # Serial (COM) ports device uart # Generic UART driver device uart_ns8250 # ns8250-type UART driver device uart_snps device pl011 # USB support options USB_DEBUG # enable debug msgs device aw_ehci # Allwinner EHCI USB interface (USB 2.0) device aw_usbphy # Allwinner USB PHY device dwcotg # DWC OTG controller device ohci # OHCI USB interface device ehci # EHCI USB interface (USB 2.0) device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) device ukbd # Keyboard device umass # Disks/Mass storage - Requires scbus and da # USB ethernet support device smcphy device smsc # GPIO device aw_gpio # Allwinner GPIO controller device gpio device gpioled device fdt_pinctrl # I2C device aw_rsb # Allwinner Reduced Serial Bus device bcm2835_bsc # Broadcom BCM283x I2C bus device iicbus # Clock and reset controllers device aw_ccu # Allwinner clock controller # Interrupt controllers device aw_nmi # Allwinner NMI support # Real-time clock support device aw_rtc # Allwinner Real-time Clock # Watchdog controllers device aw_wdog # Allwinner Watchdog # Power management controllers device axp81x # X-Powers AXP81x PMIC # EFUSE device aw_sid # Allwinner Secure ID EFUSE # Thermal sensors device aw_thermal # Allwinner Thermal Sensor Controller # SPI device spibus device bcm2835_spi # Broadcom BCM283x SPI bus # Console device vt device kbdmux # Pseudo devices. device loop # Network loopback device random # Entropy device device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device firmware # firmware assist module device psci # Support for ARM PSCI # EXT_RESOURCES pseudo devices options EXT_RESOURCES device clk device phy device hwreset device regulator # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter # Chip-specific errata options THUNDERX_PASS_1_1_ERRATA options FDT #device acpi # The crypto framework is required by IPSEC device crypto # Required by IPSEC Index: head/sys/conf/files =================================================================== --- head/sys/conf/files (revision 307669) +++ head/sys/conf/files (revision 307670) @@ -1,4518 +1,4557 @@ # $FreeBSD$ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. # acpi_quirks.h optional acpi \ dependency "$S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ compile-with "${AWK} -f $S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ no-obj no-implicit-rule before-depend \ clean "acpi_quirks.h" bhnd_nvram_map.h optional bhnd \ dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -h" \ no-obj no-implicit-rule before-depend \ clean "bhnd_nvram_map.h" bhnd_nvram_map_data.h optional bhnd \ dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -d" \ no-obj no-implicit-rule before-depend \ clean "bhnd_nvram_map_data.h" # # The 'fdt_dtb_file' target covers an actual DTB file name, which is derived # from the specified source (DTS) file: .dts -> .dtb # fdt_dtb_file optional fdt fdt_dtb_static \ compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}'" \ no-obj no-implicit-rule before-depend \ clean "${FDT_DTS_FILE:R}.dtb" fdt_static_dtb.h optional fdt fdt_dtb_static \ compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}'" \ dependency "fdt_dtb_file" \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" feeder_eq_gen.h optional sound \ dependency "$S/tools/sound/feeder_eq_mkfilter.awk" \ compile-with "${AWK} -f $S/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > feeder_eq_gen.h" \ no-obj no-implicit-rule before-depend \ clean "feeder_eq_gen.h" feeder_rate_gen.h optional sound \ dependency "$S/tools/sound/feeder_rate_mkfilter.awk" \ compile-with "${AWK} -f $S/tools/sound/feeder_rate_mkfilter.awk -- ${FEEDER_RATE_PRESETS} > feeder_rate_gen.h" \ no-obj no-implicit-rule before-depend \ clean "feeder_rate_gen.h" snd_fxdiv_gen.h optional sound \ dependency "$S/tools/sound/snd_fxdiv_gen.awk" \ compile-with "${AWK} -f $S/tools/sound/snd_fxdiv_gen.awk -- > snd_fxdiv_gen.h" \ no-obj no-implicit-rule before-depend \ clean "snd_fxdiv_gen.h" miidevs.h optional miibus | mii \ dependency "$S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ compile-with "${AWK} -f $S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ no-obj no-implicit-rule before-depend \ clean "miidevs.h" pccarddevs.h standard \ dependency "$S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ compile-with "${AWK} -f $S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ no-obj no-implicit-rule before-depend \ clean "pccarddevs.h" kbdmuxmap.h optional kbdmux_dflt_keymap \ compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${KBDMUX_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > kbdmuxmap.h" \ no-obj no-implicit-rule before-depend \ clean "kbdmuxmap.h" teken_state.h optional sc | vt \ dependency "$S/teken/gensequences $S/teken/sequences" \ compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ no-obj no-implicit-rule before-depend \ clean "teken_state.h" usbdevs.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ no-obj no-implicit-rule before-depend \ clean "usbdevs.h" usbdevs_data.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -d" \ no-obj no-implicit-rule before-depend \ clean "usbdevs_data.h" cam/cam.c optional scbus cam/cam_compat.c optional scbus cam/cam_iosched.c optional scbus cam/cam_periph.c optional scbus cam/cam_queue.c optional scbus cam/cam_sim.c optional scbus cam/cam_xpt.c optional scbus cam/ata/ata_all.c optional scbus cam/ata/ata_xpt.c optional scbus cam/ata/ata_pmp.c optional scbus cam/nvme/nvme_all.c optional scbus nvme !nvd cam/nvme/nvme_da.c optional scbus nvme da !nvd cam/nvme/nvme_xpt.c optional scbus nvme !nvd cam/scsi/scsi_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd cam/scsi/scsi_ch.c optional ch cam/ata/ata_da.c optional ada | da cam/ctl/ctl.c optional ctl cam/ctl/ctl_backend.c optional ctl cam/ctl/ctl_backend_block.c optional ctl cam/ctl/ctl_backend_ramdisk.c optional ctl cam/ctl/ctl_cmd_table.c optional ctl cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl cam/ctl/ctl_frontend_ioctl.c optional ctl cam/ctl/ctl_frontend_iscsi.c optional ctl cam/ctl/ctl_ha.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl cam/ctl/ctl_tpc.c optional ctl cam/ctl/ctl_tpc_local.c optional ctl cam/ctl/ctl_error.c optional ctl cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/scsi/scsi_da.c optional da cam/scsi/scsi_low.c optional ct | ncv | nsp | stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa cam/scsi/scsi_enc.c optional ses cam/scsi/scsi_enc_ses.c optional ses cam/scsi/scsi_enc_safte.c optional ses cam/scsi/scsi_sg.c optional sg cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ cam/scsi/smp_all.c optional scbus # shared between zfs and dtrace cddl/compat/opensolaris/kern/opensolaris.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_proc.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs | dtrace compile-with "${CDDL_C}" # zfs specific cddl/compat/opensolaris/kern/opensolaris_acl.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_dtrace.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_kobj.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_kstat.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_lookup.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_policy.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_string.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_sysevent.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_uio.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vfs.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vm.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_zone.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/acl/acl_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/avl/avl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_fnvpair.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair_alloc_fixed.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/unicode/u8_textprep.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfeature_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_comutil.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_deleg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zpool_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zprop_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/gfs.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/vnode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bplist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c optional zfs compile-with "${ZFS_C}" \ warning "kernel contains CDDL licensed ZFS filesystem" cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/gzip.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/unique.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_byteswap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zle.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/callb.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/fm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/list.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/nvpair_alloc_system.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/adler32.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/deflate.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/inffast.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/inflate.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/inftrees.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/opensolaris_crc32.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/trees.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod_subr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zutil.c optional zfs compile-with "${ZFS_C}" # dtrace specific cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ warning "kernel contains CDDL licensed DTRACE" cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc | dtraceall compile-with "${CDDL_C}" cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" cddl/dev/fbt/fbt.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" cddl/dev/systrace/systrace.c optional dtrace_systrace | dtraceall compile-with "${CDDL_C}" cddl/dev/prototype.c optional dtrace_prototype | dtraceall compile-with "${CDDL_C}" fs/nfsclient/nfs_clkdtrace.c optional dtnfscl nfscl | dtraceall nfscl compile-with "${CDDL_C}" compat/cloudabi/cloudabi_clock.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_errno.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_fd.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_file.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_futex.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_mem.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_proc.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_random.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_sock.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_thread.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_vdso.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi32/cloudabi32_fd.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_module.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_poll.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_sock.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_syscalls.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_sysent.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_thread.c optional compat_cloudabi32 compat/cloudabi64/cloudabi64_fd.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_module.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_poll.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_sock.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_syscalls.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_sysent.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_thread.c optional compat_cloudabi64 compat/freebsd32/freebsd32_capability.c optional compat_freebsd32 compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 contrib/dev/acpica/common/ahids.c optional acpi acpi_debug contrib/dev/acpica/common/ahuuids.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbconvert.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbhistry.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbinput.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbmethod.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbnames.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbobject.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbstats.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbtest.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbutils.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbxface.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmbuffer.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmcstyle.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmdeferred.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmnames.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmopcode.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrc.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcl.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcl2.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcs.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmutils.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmwalk.c optional acpi acpi_debug contrib/dev/acpica/components/dispatcher/dsargs.c optional acpi contrib/dev/acpica/components/dispatcher/dscontrol.c optional acpi contrib/dev/acpica/components/dispatcher/dsdebug.c optional acpi contrib/dev/acpica/components/dispatcher/dsfield.c optional acpi contrib/dev/acpica/components/dispatcher/dsinit.c optional acpi contrib/dev/acpica/components/dispatcher/dsmethod.c optional acpi contrib/dev/acpica/components/dispatcher/dsmthdat.c optional acpi contrib/dev/acpica/components/dispatcher/dsobject.c optional acpi contrib/dev/acpica/components/dispatcher/dsopcode.c optional acpi contrib/dev/acpica/components/dispatcher/dsutils.c optional acpi contrib/dev/acpica/components/dispatcher/dswexec.c optional acpi contrib/dev/acpica/components/dispatcher/dswload.c optional acpi contrib/dev/acpica/components/dispatcher/dswload2.c optional acpi contrib/dev/acpica/components/dispatcher/dswscope.c optional acpi contrib/dev/acpica/components/dispatcher/dswstate.c optional acpi contrib/dev/acpica/components/events/evevent.c optional acpi contrib/dev/acpica/components/events/evglock.c optional acpi contrib/dev/acpica/components/events/evgpe.c optional acpi contrib/dev/acpica/components/events/evgpeblk.c optional acpi contrib/dev/acpica/components/events/evgpeinit.c optional acpi contrib/dev/acpica/components/events/evgpeutil.c optional acpi contrib/dev/acpica/components/events/evhandler.c optional acpi contrib/dev/acpica/components/events/evmisc.c optional acpi contrib/dev/acpica/components/events/evregion.c optional acpi contrib/dev/acpica/components/events/evrgnini.c optional acpi contrib/dev/acpica/components/events/evsci.c optional acpi contrib/dev/acpica/components/events/evxface.c optional acpi contrib/dev/acpica/components/events/evxfevnt.c optional acpi contrib/dev/acpica/components/events/evxfgpe.c optional acpi contrib/dev/acpica/components/events/evxfregn.c optional acpi contrib/dev/acpica/components/executer/exconcat.c optional acpi contrib/dev/acpica/components/executer/exconfig.c optional acpi contrib/dev/acpica/components/executer/exconvrt.c optional acpi contrib/dev/acpica/components/executer/excreate.c optional acpi contrib/dev/acpica/components/executer/exdebug.c optional acpi contrib/dev/acpica/components/executer/exdump.c optional acpi contrib/dev/acpica/components/executer/exfield.c optional acpi contrib/dev/acpica/components/executer/exfldio.c optional acpi contrib/dev/acpica/components/executer/exmisc.c optional acpi contrib/dev/acpica/components/executer/exmutex.c optional acpi contrib/dev/acpica/components/executer/exnames.c optional acpi contrib/dev/acpica/components/executer/exoparg1.c optional acpi contrib/dev/acpica/components/executer/exoparg2.c optional acpi contrib/dev/acpica/components/executer/exoparg3.c optional acpi contrib/dev/acpica/components/executer/exoparg6.c optional acpi contrib/dev/acpica/components/executer/exprep.c optional acpi contrib/dev/acpica/components/executer/exregion.c optional acpi contrib/dev/acpica/components/executer/exresnte.c optional acpi contrib/dev/acpica/components/executer/exresolv.c optional acpi contrib/dev/acpica/components/executer/exresop.c optional acpi contrib/dev/acpica/components/executer/exstore.c optional acpi contrib/dev/acpica/components/executer/exstoren.c optional acpi contrib/dev/acpica/components/executer/exstorob.c optional acpi contrib/dev/acpica/components/executer/exsystem.c optional acpi contrib/dev/acpica/components/executer/extrace.c optional acpi contrib/dev/acpica/components/executer/exutils.c optional acpi contrib/dev/acpica/components/hardware/hwacpi.c optional acpi contrib/dev/acpica/components/hardware/hwesleep.c optional acpi contrib/dev/acpica/components/hardware/hwgpe.c optional acpi contrib/dev/acpica/components/hardware/hwpci.c optional acpi contrib/dev/acpica/components/hardware/hwregs.c optional acpi contrib/dev/acpica/components/hardware/hwsleep.c optional acpi contrib/dev/acpica/components/hardware/hwtimer.c optional acpi contrib/dev/acpica/components/hardware/hwvalid.c optional acpi contrib/dev/acpica/components/hardware/hwxface.c optional acpi contrib/dev/acpica/components/hardware/hwxfsleep.c optional acpi contrib/dev/acpica/components/namespace/nsaccess.c optional acpi contrib/dev/acpica/components/namespace/nsalloc.c optional acpi contrib/dev/acpica/components/namespace/nsarguments.c optional acpi contrib/dev/acpica/components/namespace/nsconvert.c optional acpi contrib/dev/acpica/components/namespace/nsdump.c optional acpi contrib/dev/acpica/components/namespace/nseval.c optional acpi contrib/dev/acpica/components/namespace/nsinit.c optional acpi contrib/dev/acpica/components/namespace/nsload.c optional acpi contrib/dev/acpica/components/namespace/nsnames.c optional acpi contrib/dev/acpica/components/namespace/nsobject.c optional acpi contrib/dev/acpica/components/namespace/nsparse.c optional acpi contrib/dev/acpica/components/namespace/nspredef.c optional acpi contrib/dev/acpica/components/namespace/nsprepkg.c optional acpi contrib/dev/acpica/components/namespace/nsrepair.c optional acpi contrib/dev/acpica/components/namespace/nsrepair2.c optional acpi contrib/dev/acpica/components/namespace/nssearch.c optional acpi contrib/dev/acpica/components/namespace/nsutils.c optional acpi contrib/dev/acpica/components/namespace/nswalk.c optional acpi contrib/dev/acpica/components/namespace/nsxfeval.c optional acpi contrib/dev/acpica/components/namespace/nsxfname.c optional acpi contrib/dev/acpica/components/namespace/nsxfobj.c optional acpi contrib/dev/acpica/components/parser/psargs.c optional acpi contrib/dev/acpica/components/parser/psloop.c optional acpi contrib/dev/acpica/components/parser/psobject.c optional acpi contrib/dev/acpica/components/parser/psopcode.c optional acpi contrib/dev/acpica/components/parser/psopinfo.c optional acpi contrib/dev/acpica/components/parser/psparse.c optional acpi contrib/dev/acpica/components/parser/psscope.c optional acpi contrib/dev/acpica/components/parser/pstree.c optional acpi contrib/dev/acpica/components/parser/psutils.c optional acpi contrib/dev/acpica/components/parser/pswalk.c optional acpi contrib/dev/acpica/components/parser/psxface.c optional acpi contrib/dev/acpica/components/resources/rsaddr.c optional acpi contrib/dev/acpica/components/resources/rscalc.c optional acpi contrib/dev/acpica/components/resources/rscreate.c optional acpi contrib/dev/acpica/components/resources/rsdump.c optional acpi acpi_debug contrib/dev/acpica/components/resources/rsdumpinfo.c optional acpi contrib/dev/acpica/components/resources/rsinfo.c optional acpi contrib/dev/acpica/components/resources/rsio.c optional acpi contrib/dev/acpica/components/resources/rsirq.c optional acpi contrib/dev/acpica/components/resources/rslist.c optional acpi contrib/dev/acpica/components/resources/rsmemory.c optional acpi contrib/dev/acpica/components/resources/rsmisc.c optional acpi contrib/dev/acpica/components/resources/rsserial.c optional acpi contrib/dev/acpica/components/resources/rsutils.c optional acpi contrib/dev/acpica/components/resources/rsxface.c optional acpi contrib/dev/acpica/components/tables/tbdata.c optional acpi contrib/dev/acpica/components/tables/tbfadt.c optional acpi contrib/dev/acpica/components/tables/tbfind.c optional acpi contrib/dev/acpica/components/tables/tbinstal.c optional acpi contrib/dev/acpica/components/tables/tbprint.c optional acpi contrib/dev/acpica/components/tables/tbutils.c optional acpi contrib/dev/acpica/components/tables/tbxface.c optional acpi contrib/dev/acpica/components/tables/tbxfload.c optional acpi contrib/dev/acpica/components/tables/tbxfroot.c optional acpi contrib/dev/acpica/components/utilities/utaddress.c optional acpi contrib/dev/acpica/components/utilities/utalloc.c optional acpi contrib/dev/acpica/components/utilities/utascii.c optional acpi contrib/dev/acpica/components/utilities/utbuffer.c optional acpi contrib/dev/acpica/components/utilities/utcache.c optional acpi contrib/dev/acpica/components/utilities/utcopy.c optional acpi contrib/dev/acpica/components/utilities/utdebug.c optional acpi contrib/dev/acpica/components/utilities/utdecode.c optional acpi contrib/dev/acpica/components/utilities/utdelete.c optional acpi contrib/dev/acpica/components/utilities/uterror.c optional acpi contrib/dev/acpica/components/utilities/uteval.c optional acpi contrib/dev/acpica/components/utilities/utexcep.c optional acpi contrib/dev/acpica/components/utilities/utglobal.c optional acpi contrib/dev/acpica/components/utilities/uthex.c optional acpi contrib/dev/acpica/components/utilities/utids.c optional acpi contrib/dev/acpica/components/utilities/utinit.c optional acpi contrib/dev/acpica/components/utilities/utlock.c optional acpi contrib/dev/acpica/components/utilities/utmath.c optional acpi contrib/dev/acpica/components/utilities/utmisc.c optional acpi contrib/dev/acpica/components/utilities/utmutex.c optional acpi contrib/dev/acpica/components/utilities/utnonansi.c optional acpi contrib/dev/acpica/components/utilities/utobject.c optional acpi contrib/dev/acpica/components/utilities/utosi.c optional acpi contrib/dev/acpica/components/utilities/utownerid.c optional acpi contrib/dev/acpica/components/utilities/utpredef.c optional acpi contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi contrib/dev/acpica/components/utilities/utstring.c optional acpi contrib/dev/acpica/components/utilities/utstrtoul64.c optional acpi contrib/dev/acpica/components/utilities/utuuid.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utxface.c optional acpi contrib/dev/acpica/components/utilities/utxferror.c optional acpi contrib/dev/acpica/components/utilities/utxfinit.c optional acpi #contrib/dev/acpica/components/utilities/utxfmutex.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_frag.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_log.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_sync.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_nat6.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_rules.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_scan.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_dstlist.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/radix_ipf.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/libfdt/fdt.c optional fdt contrib/libfdt/fdt_ro.c optional fdt contrib/libfdt/fdt_rw.c optional fdt contrib/libfdt/fdt_strerror.c optional fdt contrib/libfdt/fdt_sw.c optional fdt contrib/libfdt/fdt_wip.c optional fdt contrib/libnv/cnvlist.c standard contrib/libnv/dnvlist.c standard contrib/libnv/nvlist.c standard contrib/libnv/nvpair.c standard contrib/ngatm/netnatm/api/cc_conn.c optional ngatm_ccatm \ compile-with "${NORMAL_C_NOWERROR} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_data.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_dump.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_port.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_sig.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_user.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/unisap.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/misc/straddr.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/misc/unimsg_common.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/traffic.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/uni_ie.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/uni_msg.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/saal/saal_sscfu.c optional ngatm_sscfu \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/saal/saal_sscop.c optional ngatm_sscop \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_call.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_coord.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_party.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_print.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_reset.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_uni.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_unimsgcpy.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" crypto/blowfish/bf_ecb.c optional ipsec crypto/blowfish/bf_skey.c optional crypto | ipsec crypto/camellia/camellia.c optional crypto | ipsec crypto/camellia/camellia-api.c optional crypto | ipsec crypto/des/des_ecb.c optional crypto | ipsec | netsmb crypto/des/des_setkey.c optional crypto | ipsec | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi crypto/rijndael/rijndael-alg-fst.c optional crypto | geom_bde | \ ipsec | random !random_loadable | wlan_ccmp crypto/rijndael/rijndael-api-fst.c optional geom_bde | random !random_loadable crypto/rijndael/rijndael-api.c optional crypto | ipsec | wlan_ccmp crypto/sha1.c optional carp | crypto | ipsec | \ netgraph_mppc_encryption | sctp crypto/sha2/sha256c.c optional crypto | geom_bde | ipsec | random !random_loadable | \ sctp | zfs crypto/sha2/sha512c.c optional crypto | geom_bde | ipsec | zfs crypto/skein/skein.c optional crypto | zfs crypto/skein/skein_block.c optional crypto | zfs crypto/siphash/siphash.c optional inet | inet6 crypto/siphash/siphash_test.c optional inet | inet6 ddb/db_access.c optional ddb ddb/db_break.c optional ddb ddb/db_capture.c optional ddb ddb/db_command.c optional ddb ddb/db_examine.c optional ddb ddb/db_expr.c optional ddb ddb/db_input.c optional ddb ddb/db_lex.c optional ddb ddb/db_main.c optional ddb ddb/db_output.c optional ddb ddb/db_print.c optional ddb ddb/db_ps.c optional ddb ddb/db_run.c optional ddb ddb/db_script.c optional ddb ddb/db_sym.c optional ddb ddb/db_thread.c optional ddb ddb/db_textdump.c optional ddb ddb/db_variables.c optional ddb ddb/db_watch.c optional ddb ddb/db_write_cmd.c optional ddb dev/aac/aac.c optional aac dev/aac/aac_cam.c optional aacp aac dev/aac/aac_debug.c optional aac dev/aac/aac_disk.c optional aac dev/aac/aac_linux.c optional aac compat_linux dev/aac/aac_pci.c optional aac pci dev/aacraid/aacraid.c optional aacraid dev/aacraid/aacraid_cam.c optional aacraid scbus dev/aacraid/aacraid_debug.c optional aacraid dev/aacraid/aacraid_linux.c optional aacraid compat_linux dev/aacraid/aacraid_pci.c optional aacraid pci dev/acpi_support/acpi_wmi.c optional acpi_wmi acpi dev/acpi_support/acpi_asus.c optional acpi_asus acpi dev/acpi_support/acpi_asus_wmi.c optional acpi_asus_wmi acpi dev/acpi_support/acpi_fujitsu.c optional acpi_fujitsu acpi dev/acpi_support/acpi_hp.c optional acpi_hp acpi dev/acpi_support/acpi_ibm.c optional acpi_ibm acpi dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi dev/acpi_support/acpi_sony.c optional acpi_sony acpi dev/acpi_support/acpi_toshiba.c optional acpi_toshiba acpi dev/acpi_support/atk0110.c optional aibs acpi dev/acpica/Osd/OsdDebug.c optional acpi dev/acpica/Osd/OsdHardware.c optional acpi dev/acpica/Osd/OsdInterrupt.c optional acpi dev/acpica/Osd/OsdMemory.c optional acpi dev/acpica/Osd/OsdSchedule.c optional acpi dev/acpica/Osd/OsdStream.c optional acpi dev/acpica/Osd/OsdSynch.c optional acpi dev/acpica/Osd/OsdTable.c optional acpi dev/acpica/acpi.c optional acpi dev/acpica/acpi_acad.c optional acpi dev/acpica/acpi_battery.c optional acpi dev/acpica/acpi_button.c optional acpi dev/acpica/acpi_cmbat.c optional acpi dev/acpica/acpi_cpu.c optional acpi dev/acpica/acpi_ec.c optional acpi dev/acpica/acpi_isab.c optional acpi isa dev/acpica/acpi_lid.c optional acpi dev/acpica/acpi_package.c optional acpi dev/acpica/acpi_pci.c optional acpi pci dev/acpica/acpi_pci_link.c optional acpi pci dev/acpica/acpi_pcib.c optional acpi pci dev/acpica/acpi_pcib_acpi.c optional acpi pci dev/acpica/acpi_pcib_pci.c optional acpi pci dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi dev/acpica/acpi_resource.c optional acpi dev/acpica/acpi_smbat.c optional acpi dev/acpica/acpi_thermal.c optional acpi dev/acpica/acpi_throttle.c optional acpi dev/acpica/acpi_timer.c optional acpi dev/acpica/acpi_video.c optional acpi_video acpi dev/acpica/acpi_dock.c optional acpi_dock acpi dev/adlink/adlink.c optional adlink dev/advansys/adv_eisa.c optional adv eisa dev/advansys/adv_pci.c optional adv pci dev/advansys/advansys.c optional adv dev/advansys/advlib.c optional adv dev/advansys/advmcode.c optional adv dev/advansys/adw_pci.c optional adw pci dev/advansys/adwcam.c optional adw dev/advansys/adwlib.c optional adw dev/advansys/adwmcode.c optional adw dev/ae/if_ae.c optional ae pci dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci dev/agp/agp_if.m optional agp pci dev/aha/aha.c optional aha dev/aha/aha_isa.c optional aha isa dev/aha/aha_mca.c optional aha mca dev/ahb/ahb.c optional ahb eisa dev/ahci/ahci.c optional ahci dev/ahci/ahciem.c optional ahci dev/ahci/ahci_pci.c optional ahci pci dev/aic/aic.c optional aic dev/aic/aic_pccard.c optional aic pccard dev/aic7xxx/ahc_eisa.c optional ahc eisa dev/aic7xxx/ahc_isa.c optional ahc isa dev/aic7xxx/ahc_pci.c optional ahc pci \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/aic7xxx/ahd_pci.c optional ahd pci \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/aic7xxx/aic7770.c optional ahc dev/aic7xxx/aic79xx.c optional ahd pci dev/aic7xxx/aic79xx_osm.c optional ahd pci dev/aic7xxx/aic79xx_pci.c optional ahd pci dev/aic7xxx/aic79xx_reg_print.c optional ahd pci ahd_reg_pretty_print dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci dev/aic7xxx/aic7xxx_reg_print.c optional ahc ahc_reg_pretty_print +dev/al_eth/al_eth.c optional al_eth \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +dev/al_eth/al_init_eth_lm.c optional al_eth \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +dev/al_eth/al_init_eth_kr.c optional al_eth \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/al_hal_iofic.c optional al_iofic \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/al_hal_serdes_25g.c optional al_serdes \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/al_hal_serdes_hssp.c optional al_serdes \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/al_hal_udma_config.c optional al_udma \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/al_hal_udma_debug.c optional al_udma \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/al_hal_udma_iofic.c optional al_udma \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/al_hal_udma_main.c optional al_udma \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/al_serdes.c optional al_serdes \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/eth/al_hal_eth_kr.c optional al_eth \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" +contrib/alpine-hal/eth/al_hal_eth_main.c optional al_eth \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" dev/alc/if_alc.c optional alc pci dev/ale/if_ale.c optional ale pci dev/alpm/alpm.c optional alpm pci dev/altera/avgen/altera_avgen.c optional altera_avgen dev/altera/avgen/altera_avgen_fdt.c optional altera_avgen fdt dev/altera/avgen/altera_avgen_nexus.c optional altera_avgen dev/altera/sdcard/altera_sdcard.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_disk.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_io.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_fdt.c optional altera_sdcard fdt dev/altera/sdcard/altera_sdcard_nexus.c optional altera_sdcard dev/altera/pio/pio.c optional altera_pio dev/altera/pio/pio_if.m optional altera_pio dev/amdpm/amdpm.c optional amdpm pci | nfpm pci dev/amdsmb/amdsmb.c optional amdsmb pci dev/amr/amr.c optional amr dev/amr/amr_cam.c optional amrp amr dev/amr/amr_disk.c optional amr dev/amr/amr_linux.c optional amr compat_linux dev/amr/amr_pci.c optional amr pci dev/an/if_an.c optional an dev/an/if_an_isa.c optional an isa dev/an/if_an_pccard.c optional an pccard dev/an/if_an_pci.c optional an pci # dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore dev/ata/ata-dma.c optional ata | atacore dev/ata/ata-lowlevel.c optional ata | atacore dev/ata/ata-sata.c optional ata | atacore dev/ata/ata-card.c optional ata pccard | atapccard dev/ata/ata-cbus.c optional ata pc98 | atapc98 dev/ata/ata-isa.c optional ata isa | ataisa dev/ata/ata-pci.c optional ata pci | atapci dev/ata/chipsets/ata-acard.c optional ata pci | ataacard dev/ata/chipsets/ata-acerlabs.c optional ata pci | ataacerlabs dev/ata/chipsets/ata-amd.c optional ata pci | ataamd dev/ata/chipsets/ata-ati.c optional ata pci | ataati dev/ata/chipsets/ata-cenatek.c optional ata pci | atacenatek dev/ata/chipsets/ata-cypress.c optional ata pci | atacypress dev/ata/chipsets/ata-cyrix.c optional ata pci | atacyrix dev/ata/chipsets/ata-highpoint.c optional ata pci | atahighpoint dev/ata/chipsets/ata-intel.c optional ata pci | ataintel dev/ata/chipsets/ata-ite.c optional ata pci | ataite dev/ata/chipsets/ata-jmicron.c optional ata pci | atajmicron dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell dev/ata/chipsets/ata-micron.c optional ata pci | atamicron dev/ata/chipsets/ata-national.c optional ata pci | atanational dev/ata/chipsets/ata-netcell.c optional ata pci | atanetcell dev/ata/chipsets/ata-nvidia.c optional ata pci | atanvidia dev/ata/chipsets/ata-promise.c optional ata pci | atapromise dev/ata/chipsets/ata-serverworks.c optional ata pci | ataserverworks dev/ata/chipsets/ata-siliconimage.c optional ata pci | atasiliconimage | ataati dev/ata/chipsets/ata-sis.c optional ata pci | atasis dev/ata/chipsets/ata-via.c optional ata pci | atavia # dev/ath/if_ath_pci.c optional ath_pci pci \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/if_ath_ahb.c optional ath_ahb \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/if_ath.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_alq.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_beacon.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_btcoex.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_btcoex_mci.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_debug.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_descdma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_keycache.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_ioctl.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_led.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_lna_div.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx_edma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx_ht.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tdma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_sysctl.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_rx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_rx_edma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_spectral.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ah_osdep.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/ath_hal/ah.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v1.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v3.c optional ath_hal | ath_ar5211 | ath_ar5212 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v14.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v4k.c \ optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_9287.c \ optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_regdomain.c optional ath \ compile-with "${NORMAL_C} ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} -I$S/dev/ath" # ar5210 dev/ath/ath_hal/ar5210/ar5210_attach.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_beacon.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_interrupts.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_keycache.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_misc.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_phy.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_power.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_recv.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_reset.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_xmit.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5211 dev/ath/ath_hal/ar5211/ar5211_attach.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_beacon.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_interrupts.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_keycache.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_misc.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_phy.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_power.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_recv.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_reset.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_xmit.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5212 dev/ath/ath_hal/ar5212/ar5212_ani.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_attach.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_beacon.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_eeprom.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_gpio.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_interrupts.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_keycache.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_misc.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_phy.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_power.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_recv.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_reset.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_rfgain.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_xmit.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5416 (depends on ar5212) dev/ath/ath_hal/ar5416/ar5416_ani.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_attach.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_beacon.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_btcoex.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_iq.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_eeprom.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_gpio.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_interrupts.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_keycache.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_misc.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_phy.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_power.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_radar.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_recv.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_reset.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_spectral.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_xmit.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9130 (depends upon ar5416) - also requires AH_SUPPORT_AR9130 # # Since this is an embedded MAC SoC, there's no need to compile it into the # default HAL. dev/ath/ath_hal/ar9001/ar9130_attach.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9001/ar9130_phy.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9001/ar9130_eeprom.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9160 (depends on ar5416) dev/ath/ath_hal/ar9001/ar9160_attach.c optional ath_hal | ath_ar9160 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9280 (depends on ar5416) dev/ath/ath_hal/ar9002/ar9280_attach.c optional ath_hal | ath_ar9280 | \ ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9280_olc.c optional ath_hal | ath_ar9280 | \ ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9285 (depends on ar5416 and ar9280) dev/ath/ath_hal/ar9002/ar9285_attach.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_btcoex.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_reset.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_cal.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_phy.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_diversity.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9287 (depends on ar5416) dev/ath/ath_hal/ar9002/ar9287_attach.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_reset.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_cal.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_olc.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9300 contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal ${NO_WCONSTANT_CONVERSION}" contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_interrupts.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_mci.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_paprd.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_phy.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_power.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal ${NO_WSOMETIMES_UNINITIALIZED} -Wno-unused-function" contrib/dev/ath/ath_hal/ar9300/ar9300_stub.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_timer.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" # rf backends dev/ath/ath_hal/ar5212/ar2316.c optional ath_rf2316 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2317.c optional ath_rf2317 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2413.c optional ath_hal | ath_rf2413 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2425.c optional ath_hal | ath_rf2425 | ath_rf2417 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5111.c optional ath_hal | ath_rf5111 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5112.c optional ath_hal | ath_rf5112 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5413.c optional ath_hal | ath_rf5413 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar2133.c optional ath_hal | ath_ar5416 | \ ath_ar9130 | ath_ar9160 | ath_ar9280 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9280.c optional ath_hal | ath_ar9280 | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ath rate control algorithms dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/onoe/onoe.c optional ath_rate_onoe \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \ compile-with "${NORMAL_C} -I$S/dev/ath" # ath DFS modules dev/ath/ath_dfs/null/dfs_null.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge dev/bhnd/bhnd.c optional bhnd dev/bhnd/bhnd_erom.c optional bhnd dev/bhnd/bhnd_erom_if.m optional bhnd dev/bhnd/bhnd_nexus.c optional bhnd siba_nexus | \ bhnd bcma_nexus dev/bhnd/bhnd_subr.c optional bhnd dev/bhnd/bhnd_bus_if.m optional bhnd dev/bhnd/bhndb/bhnd_bhndb.c optional bhndb bhnd dev/bhnd/bhndb/bhndb.c optional bhndb bhnd dev/bhnd/bhndb/bhndb_bus_if.m optional bhndb bhnd dev/bhnd/bhndb/bhndb_hwdata.c optional bhndb bhnd dev/bhnd/bhndb/bhndb_if.m optional bhndb bhnd dev/bhnd/bhndb/bhndb_pci.c optional bhndb bhnd pci dev/bhnd/bhndb/bhndb_pci_hwdata.c optional bhndb bhnd pci dev/bhnd/bhndb/bhndb_pci_sprom.c optional bhndb bhnd pci dev/bhnd/bhndb/bhndb_subr.c optional bhndb bhnd dev/bhnd/bcma/bcma.c optional bcma bhnd dev/bhnd/bcma/bcma_bhndb.c optional bcma bhnd bhndb dev/bhnd/bcma/bcma_erom.c optional bcma bhnd dev/bhnd/bcma/bcma_nexus.c optional bcma_nexus bcma bhnd dev/bhnd/bcma/bcma_subr.c optional bcma bhnd dev/bhnd/cores/chipc/bhnd_chipc_if.m optional bhnd dev/bhnd/cores/chipc/bhnd_sprom_chipc.c optional bhnd dev/bhnd/cores/chipc/bhnd_pmu_chipc.c optional bhnd dev/bhnd/cores/chipc/chipc.c optional bhnd dev/bhnd/cores/chipc/chipc_cfi.c optional bhnd cfi dev/bhnd/cores/chipc/chipc_slicer.c optional bhnd cfi | bhnd spibus dev/bhnd/cores/chipc/chipc_spi.c optional bhnd spibus dev/bhnd/cores/chipc/chipc_subr.c optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl.c optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_subr.c optional bhnd dev/bhnd/cores/pci/bhnd_pci.c optional bhnd pci dev/bhnd/cores/pci/bhnd_pci_hostb.c optional bhndb bhnd pci dev/bhnd/cores/pci/bhnd_pcib.c optional bhnd_pcib bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2.c optional bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c optional bhndb bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2b.c optional bhnd_pcie2b bhnd pci dev/bhnd/cores/pmu/bhnd_pmu.c optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_core.c optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_if.m optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram.c optional bhnd dev/bhnd/nvram/bhnd_nvram_common.c optional bhnd dev/bhnd/nvram/bhnd_nvram_cfe.c optional bhnd siba_nexus cfe | \ bhnd bcma_nexus cfe dev/bhnd/nvram/bhnd_nvram_if.m optional bhnd dev/bhnd/nvram/bhnd_nvram_parser.c optional bhnd dev/bhnd/nvram/bhnd_sprom.c optional bhnd dev/bhnd/nvram/bhnd_sprom_parser.c optional bhnd dev/bhnd/siba/siba.c optional siba bhnd dev/bhnd/siba/siba_bhndb.c optional siba bhnd bhndb dev/bhnd/siba/siba_erom.c optional siba bhnd dev/bhnd/siba/siba_nexus.c optional siba_nexus siba bhnd dev/bhnd/siba/siba_subr.c optional siba bhnd # dev/bktr/bktr_audio.c optional bktr pci dev/bktr/bktr_card.c optional bktr pci dev/bktr/bktr_core.c optional bktr pci dev/bktr/bktr_i2c.c optional bktr pci smbus dev/bktr/bktr_os.c optional bktr pci dev/bktr/bktr_tuner.c optional bktr pci dev/bktr/msp34xx.c optional bktr pci dev/buslogic/bt.c optional bt dev/buslogic/bt_eisa.c optional bt eisa dev/buslogic/bt_isa.c optional bt isa dev/buslogic/bt_mca.c optional bt mca dev/buslogic/bt_pci.c optional bt pci dev/bwi/bwimac.c optional bwi dev/bwi/bwiphy.c optional bwi dev/bwi/bwirf.c optional bwi dev/bwi/if_bwi.c optional bwi dev/bwi/if_bwi_pci.c optional bwi pci # XXX Work around clang warnings, until maintainer approves fix. dev/bwn/if_bwn.c optional bwn siba_bwn \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/bwn/if_bwn_pci.c optional bwn pci bhnd dev/bwn/if_bwn_phy_common.c optional bwn siba_bwn dev/bwn/if_bwn_phy_g.c optional bwn siba_bwn \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED} ${NO_WCONSTANT_CONVERSION}" dev/bwn/if_bwn_phy_lp.c optional bwn siba_bwn \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/bwn/if_bwn_phy_n.c optional bwn siba_bwn dev/bwn/if_bwn_util.c optional bwn siba_bwn dev/bwn/bwn_mac.c optional bwn bhnd dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus dev/cas/if_cas.c optional cas dev/cfi/cfi_bus_fdt.c optional cfi fdt dev/cfi/cfi_bus_nexus.c optional cfi dev/cfi/cfi_core.c optional cfi dev/cfi/cfi_dev.c optional cfi dev/cfi/cfi_disk.c optional cfid dev/ciss/ciss.c optional ciss dev/cm/smc90cx6.c optional cm dev/cmx/cmx.c optional cmx dev/cmx/cmx_pccard.c optional cmx pccard dev/cpufreq/ichss.c optional cpufreq pci dev/cs/if_cs.c optional cs dev/cs/if_cs_isa.c optional cs isa dev/cs/if_cs_pccard.c optional cs pccard dev/cxgb/cxgb_main.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_sge.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mc5.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_vsc7323.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_vsc8211.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_ael1002.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_aq100x.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mv88e1xxx.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_xgmac.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_t3_hw.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_tn1010.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/sys/uipc_mvec.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgbe/t4_if.m optional cxgbe pci dev/cxgbe/t4_iov.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sge.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_tracer.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_vf.c optional cxgbev pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4_hw.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4vf_hw.c optional cxgbev pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" t4fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t4fw_cfg.c" t4fw_cfg.fwo optional cxgbe \ dependency "t4fw_cfg.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw_cfg.fwo" t4fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw_cfg.fw" t4fw_cfg_uwire.fwo optional cxgbe \ dependency "t4fw_cfg_uwire.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw_cfg_uwire.fwo" t4fw_cfg_uwire.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw_cfg_uwire.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw_cfg_uwire.fw" t4fw.fwo optional cxgbe \ dependency "t4fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw-1.15.37.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" t5fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t5fw_cfg.fw:t5fw_cfg t5fw.fw:t5fw -mt5fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t5fw_cfg.c" t5fw_cfg.fwo optional cxgbe \ dependency "t5fw_cfg.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t5fw_cfg.fwo" t5fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t5fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw_cfg.fw" t5fw.fwo optional cxgbe \ dependency "t5fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t5fw-1.15.37.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci dev/cyapa/cyapa.c optional cyapa smbus dev/dc/if_dc.c optional dc pci dev/dc/dcphy.c optional dc pci dev/dc/pnphy.c optional dc pci dev/dcons/dcons.c optional dcons dev/dcons/dcons_crom.c optional dcons_crom dev/dcons/dcons_os.c optional dcons dev/de/if_de.c optional de pci dev/dpt/dpt_eisa.c optional dpt eisa dev/dpt/dpt_pci.c optional dpt pci dev/dpt/dpt_scsi.c optional dpt dev/drm/ati_pcigart.c optional drm dev/drm/drm_agpsupport.c optional drm dev/drm/drm_auth.c optional drm dev/drm/drm_bufs.c optional drm dev/drm/drm_context.c optional drm dev/drm/drm_dma.c optional drm dev/drm/drm_drawable.c optional drm dev/drm/drm_drv.c optional drm dev/drm/drm_fops.c optional drm dev/drm/drm_hashtab.c optional drm dev/drm/drm_ioctl.c optional drm dev/drm/drm_irq.c optional drm dev/drm/drm_lock.c optional drm dev/drm/drm_memory.c optional drm dev/drm/drm_mm.c optional drm dev/drm/drm_pci.c optional drm dev/drm/drm_scatter.c optional drm dev/drm/drm_sman.c optional drm dev/drm/drm_sysctl.c optional drm dev/drm/drm_vm.c optional drm dev/drm/i915_dma.c optional i915drm dev/drm/i915_drv.c optional i915drm dev/drm/i915_irq.c optional i915drm dev/drm/i915_mem.c optional i915drm dev/drm/i915_suspend.c optional i915drm dev/drm/mach64_dma.c optional mach64drm dev/drm/mach64_drv.c optional mach64drm dev/drm/mach64_irq.c optional mach64drm dev/drm/mach64_state.c optional mach64drm dev/drm/mga_dma.c optional mgadrm dev/drm/mga_drv.c optional mgadrm dev/drm/mga_irq.c optional mgadrm dev/drm/mga_state.c optional mgadrm dev/drm/mga_warp.c optional mgadrm dev/drm/r128_cce.c optional r128drm \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/drm/r128_drv.c optional r128drm dev/drm/r128_irq.c optional r128drm dev/drm/r128_state.c optional r128drm dev/drm/r300_cmdbuf.c optional radeondrm dev/drm/r600_blit.c optional radeondrm dev/drm/r600_cp.c optional radeondrm \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/drm/radeon_cp.c optional radeondrm \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/drm/radeon_cs.c optional radeondrm dev/drm/radeon_drv.c optional radeondrm dev/drm/radeon_irq.c optional radeondrm dev/drm/radeon_mem.c optional radeondrm dev/drm/radeon_state.c optional radeondrm dev/drm/savage_bci.c optional savagedrm dev/drm/savage_drv.c optional savagedrm dev/drm/savage_state.c optional savagedrm dev/drm/sis_drv.c optional sisdrm dev/drm/sis_ds.c optional sisdrm dev/drm/sis_mm.c optional sisdrm dev/drm/tdfx_drv.c optional tdfxdrm dev/drm/via_dma.c optional viadrm dev/drm/via_dmablit.c optional viadrm dev/drm/via_drv.c optional viadrm dev/drm/via_irq.c optional viadrm dev/drm/via_map.c optional viadrm dev/drm/via_mm.c optional viadrm dev/drm/via_verifier.c optional viadrm dev/drm/via_video.c optional viadrm dev/ed/if_ed.c optional ed dev/ed/if_ed_novell.c optional ed dev/ed/if_ed_rtl80x9.c optional ed dev/ed/if_ed_pccard.c optional ed pccard dev/ed/if_ed_pci.c optional ed pci dev/efidev/efidev.c optional efirt dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa dev/e1000/if_em.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/if_lem.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/if_igb.c optional igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_80003es2lan.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82540.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82541.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82542.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82543.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82571.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82575.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_ich8lan.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_i210.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_api.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mac.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_manage.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_nvm.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_phy.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_vf.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mbx.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_osdep.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/et/if_et.c optional et dev/en/if_en_pci.c optional en pci dev/en/midway.c optional en dev/ep/if_ep.c optional ep dev/ep/if_ep_eisa.c optional ep eisa dev/ep/if_ep_isa.c optional ep isa dev/ep/if_ep_mca.c optional ep mca dev/ep/if_ep_pccard.c optional ep pccard dev/esp/esp_pci.c optional esp pci dev/esp/ncr53c9x.c optional esp dev/etherswitch/arswitch/arswitch.c optional arswitch dev/etherswitch/arswitch/arswitch_reg.c optional arswitch dev/etherswitch/arswitch/arswitch_phy.c optional arswitch dev/etherswitch/arswitch/arswitch_8216.c optional arswitch dev/etherswitch/arswitch/arswitch_8226.c optional arswitch dev/etherswitch/arswitch/arswitch_8316.c optional arswitch dev/etherswitch/arswitch/arswitch_8327.c optional arswitch dev/etherswitch/arswitch/arswitch_7240.c optional arswitch dev/etherswitch/arswitch/arswitch_9340.c optional arswitch dev/etherswitch/arswitch/arswitch_vlans.c optional arswitch dev/etherswitch/etherswitch.c optional etherswitch dev/etherswitch/etherswitch_if.m optional etherswitch dev/etherswitch/ip17x/ip17x.c optional ip17x dev/etherswitch/ip17x/ip175c.c optional ip17x dev/etherswitch/ip17x/ip175d.c optional ip17x dev/etherswitch/ip17x/ip17x_phy.c optional ip17x dev/etherswitch/ip17x/ip17x_vlans.c optional ip17x dev/etherswitch/miiproxy.c optional miiproxy dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb dev/etherswitch/ukswitch/ukswitch.c optional ukswitch dev/evdev/cdev.c optional evdev dev/evdev/evdev.c optional evdev dev/evdev/evdev_mt.c optional evdev dev/evdev/evdev_utils.c optional evdev dev/evdev/uinput.c optional evdev uinput dev/ex/if_ex.c optional ex dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex pccard dev/exca/exca.c optional cbb dev/extres/clk/clk.c optional ext_resources clk dev/extres/clk/clkdev_if.m optional ext_resources clk dev/extres/clk/clknode_if.m optional ext_resources clk dev/extres/clk/clk_bus.c optional ext_resources clk fdt dev/extres/clk/clk_div.c optional ext_resources clk dev/extres/clk/clk_fixed.c optional ext_resources clk dev/extres/clk/clk_gate.c optional ext_resources clk dev/extres/clk/clk_mux.c optional ext_resources clk dev/extres/phy/phy.c optional ext_resources phy dev/extres/phy/phy_if.m optional ext_resources phy dev/extres/hwreset/hwreset.c optional ext_resources hwreset dev/extres/hwreset/hwreset_if.m optional ext_resources hwreset dev/extres/regulator/regdev_if.m optional ext_resources regulator dev/extres/regulator/regnode_if.m optional ext_resources regulator dev/extres/regulator/regulator.c optional ext_resources regulator dev/extres/regulator/regulator_bus.c optional ext_resources regulator fdt dev/extres/regulator/regulator_fixed.c optional ext_resources regulator dev/fatm/if_fatm.c optional fatm pci dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash dev/fdt/fdt_clock.c optional fdt fdt_clock dev/fdt/fdt_clock_if.m optional fdt fdt_clock dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_pinctrl.c optional fdt fdt_pinctrl dev/fdt/fdt_pinctrl_if.m optional fdt fdt_pinctrl dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand | fdt mx25l dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "fdt_dtb_file" dev/fdt/simplebus.c optional fdt dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe pccard dev/filemon/filemon.c optional filemon dev/firewire/firewire.c optional firewire dev/firewire/fwcrom.c optional firewire dev/firewire/fwdev.c optional firewire dev/firewire/fwdma.c optional firewire dev/firewire/fwmem.c optional firewire dev/firewire/fwohci.c optional firewire dev/firewire/fwohci_pci.c optional firewire pci dev/firewire/if_fwe.c optional fwe dev/firewire/if_fwip.c optional fwip dev/firewire/sbp.c optional sbp dev/firewire/sbp_targ.c optional sbp_targ dev/flash/at45d.c optional at45d dev/flash/mx25l.c optional mx25l dev/fxp/if_fxp.c optional fxp dev/fxp/inphy.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci dev/gem/if_gem_sbus.c optional gem sbus dev/gpio/gpiobacklight.c optional gpiobacklight fdt dev/gpio/gpiokeys.c optional gpiokeys fdt dev/gpio/gpiokeys_codes.c optional gpiokeys fdt dev/gpio/gpiobus.c optional gpio \ dependency "gpiobus_if.h" dev/gpio/gpioc.c optional gpio \ dependency "gpio_if.h" dev/gpio/gpioiic.c optional gpioiic dev/gpio/gpioled.c optional gpioled dev/gpio/gpioregulator.c optional gpioregulator fdt ext_resources dev/gpio/gpiospi.c optional gpiospi dev/gpio/gpio_if.m optional gpio dev/gpio/gpiobus_if.m optional gpio dev/gpio/gpiopps.c optional gpiopps dev/gpio/ofw_gpiobus.c optional fdt gpio dev/hatm/if_hatm.c optional hatm pci dev/hatm/if_hatm_intr.c optional hatm pci dev/hatm/if_hatm_ioctl.c optional hatm pci dev/hatm/if_hatm_rx.c optional hatm pci dev/hatm/if_hatm_tx.c optional hatm pci dev/hifn/hifn7751.c optional hifn dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci dev/hme/if_hme_sbus.c optional hme sbus dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc dev/ichiic/ig4_iic.c optional ig4 smbus dev/ichiic/ig4_pci.c optional ig4 pci smbus dev/ichsmb/ichsmb.c optional ichsmb dev/ichsmb/ichsmb_pci.c optional ichsmb pci dev/ida/ida.c optional ida dev/ida/ida_disk.c optional ida dev/ida/ida_eisa.c optional ida eisa dev/ida/ida_pci.c optional ida pci dev/iicbus/ad7418.c optional ad7418 dev/iicbus/ds1307.c optional ds1307 dev/iicbus/ds133x.c optional ds133x dev/iicbus/ds1374.c optional ds1374 dev/iicbus/ds1672.c optional ds1672 dev/iicbus/ds3231.c optional ds3231 dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic dev/iicbus/iicbb.c optional iicbb dev/iicbus/iicbb_if.m optional iicbb dev/iicbus/iicbus.c optional iicbus dev/iicbus/iicbus_if.m optional iicbus dev/iicbus/iiconf.c optional iicbus dev/iicbus/iicsmb.c optional iicsmb \ dependency "iicbus_if.h" dev/iicbus/iicoc.c optional iicoc dev/iicbus/lm75.c optional lm75 dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/pcf8563.c optional pcf8563 dev/iicbus/s35390a.c optional s35390a dev/iir/iir.c optional iir dev/iir/iir_ctrl.c optional iir dev/iir/iir_pci.c optional iir pci dev/intpm/intpm.c optional intpm pci # XXX Work around clang warning, until maintainer approves fix. dev/ips/ips.c optional ips \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/ips/ips_commands.c optional ips dev/ips/ips_disk.c optional ips dev/ips/ips_ioctl.c optional ips dev/ips/ips_pci.c optional ips pci dev/ipw/if_ipw.c optional ipw ipwbssfw.c optional ipwbssfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_bss.fw:ipw_bss:130 -lintel_ipw -mipw_bss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwbssfw.c" ipw_bss.fwo optional ipwbssfw | ipwfw \ dependency "ipw_bss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_bss.fwo" ipw_bss.fw optional ipwbssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_bss.fw" ipwibssfw.c optional ipwibssfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_ibss.fw:ipw_ibss:130 -lintel_ipw -mipw_ibss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwibssfw.c" ipw_ibss.fwo optional ipwibssfw | ipwfw \ dependency "ipw_ibss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_ibss.fwo" ipw_ibss.fw optional ipwibssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_ibss.fw" ipwmonitorfw.c optional ipwmonitorfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_monitor.fw:ipw_monitor:130 -lintel_ipw -mipw_monitor -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwmonitorfw.c" ipw_monitor.fwo optional ipwmonitorfw | ipwfw \ dependency "ipw_monitor.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_monitor.fwo" ipw_monitor.fw optional ipwmonitorfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_monitor.fw" dev/iscsi/icl.c optional iscsi | ctl dev/iscsi/icl_conn_if.m optional iscsi | ctl dev/iscsi/icl_soft.c optional iscsi | ctl dev/iscsi/icl_soft_proxy.c optional iscsi | ctl dev/iscsi/iscsi.c optional iscsi scbus dev/iscsi_initiator/iscsi.c optional iscsi_initiator scbus dev/iscsi_initiator/iscsi_subr.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_cam.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_soc.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_sm.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_subr.c optional iscsi_initiator scbus dev/ismt/ismt.c optional ismt dev/isl/isl.c optional isl smbus dev/isp/isp.c optional isp dev/isp/isp_freebsd.c optional isp dev/isp/isp_library.c optional isp dev/isp/isp_pci.c optional isp pci dev/isp/isp_sbus.c optional isp sbus dev/isp/isp_target.c optional isp dev/ispfw/ispfw.c optional ispfw dev/iwi/if_iwi.c optional iwi iwibssfw.c optional iwibssfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_bss.fw:iwi_bss:300 -lintel_iwi -miwi_bss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwibssfw.c" iwi_bss.fwo optional iwibssfw | iwifw \ dependency "iwi_bss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_bss.fwo" iwi_bss.fw optional iwibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_bss.fw" iwiibssfw.c optional iwiibssfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_ibss.fw:iwi_ibss:300 -lintel_iwi -miwi_ibss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwiibssfw.c" iwi_ibss.fwo optional iwiibssfw | iwifw \ dependency "iwi_ibss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_ibss.fwo" iwi_ibss.fw optional iwiibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_ibss.fw" iwimonitorfw.c optional iwimonitorfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_monitor.fw:iwi_monitor:300 -lintel_iwi -miwi_monitor -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwimonitorfw.c" iwi_monitor.fwo optional iwimonitorfw | iwifw \ dependency "iwi_monitor.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_monitor.fwo" iwi_monitor.fw optional iwimonitorfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_monitor.fw" dev/iwm/if_iwm.c optional iwm dev/iwm/if_iwm_binding.c optional iwm dev/iwm/if_iwm_led.c optional iwm dev/iwm/if_iwm_mac_ctxt.c optional iwm dev/iwm/if_iwm_pcie_trans.c optional iwm dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm dev/iwm/if_iwm_power.c optional iwm dev/iwm/if_iwm_scan.c optional iwm dev/iwm/if_iwm_time_event.c optional iwm dev/iwm/if_iwm_util.c optional iwm iwm3160fw.c optional iwm3160fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm3160.fw:iwm3160fw -miwm3160fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm3160fw.c" iwm3160fw.fwo optional iwm3160fw | iwmfw \ dependency "iwm3160.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm3160fw.fwo" iwm3160.fw optional iwm3160fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-3160-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3160.fw" iwm7260fw.c optional iwm7260fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7260.fw:iwm7260fw -miwm7260fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm7260fw.c" iwm7260fw.fwo optional iwm7260fw | iwmfw \ dependency "iwm7260.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm7260fw.fwo" iwm7260.fw optional iwm7260fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-7260-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7260.fw" iwm7265fw.c optional iwm7265fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7265.fw:iwm7265fw -miwm7265fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm7265fw.c" iwm7265fw.fwo optional iwm7265fw | iwmfw \ dependency "iwm7265.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm7265fw.fwo" iwm7265.fw optional iwm7265fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-7265-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265.fw" iwm8000Cfw.c optional iwm8000Cfw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8000C.fw:iwm8000Cfw -miwm8000Cfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm8000Cfw.c" iwm8000Cfw.fwo optional iwm8000Cfw | iwmfw \ dependency "iwm8000C.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm8000Cfw.fwo" iwm8000C.fw optional iwm8000Cfw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8000C.fw" dev/iwn/if_iwn.c optional iwn iwn1000fw.c optional iwn1000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw -miwn1000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn1000fw.c" iwn1000fw.fwo optional iwn1000fw | iwnfw \ dependency "iwn1000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn1000fw.fwo" iwn1000.fw optional iwn1000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn1000.fw" iwn100fw.c optional iwn100fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn100.fw:iwn100fw -miwn100fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn100fw.c" iwn100fw.fwo optional iwn100fw | iwnfw \ dependency "iwn100.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn100fw.fwo" iwn100.fw optional iwn100fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-100-39.31.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn100.fw" iwn105fw.c optional iwn105fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn105.fw:iwn105fw -miwn105fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn105fw.c" iwn105fw.fwo optional iwn105fw | iwnfw \ dependency "iwn105.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn105fw.fwo" iwn105.fw optional iwn105fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-105-6-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn105.fw" iwn135fw.c optional iwn135fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn135.fw:iwn135fw -miwn135fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn135fw.c" iwn135fw.fwo optional iwn135fw | iwnfw \ dependency "iwn135.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn135fw.fwo" iwn135.fw optional iwn135fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-135-6-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn135.fw" iwn2000fw.c optional iwn2000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2000.fw:iwn2000fw -miwn2000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn2000fw.c" iwn2000fw.fwo optional iwn2000fw | iwnfw \ dependency "iwn2000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn2000fw.fwo" iwn2000.fw optional iwn2000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-2000-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn2000.fw" iwn2030fw.c optional iwn2030fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2030.fw:iwn2030fw -miwn2030fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn2030fw.c" iwn2030fw.fwo optional iwn2030fw | iwnfw \ dependency "iwn2030.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn2030fw.fwo" iwn2030.fw optional iwn2030fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwnwifi-2030-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn2030.fw" iwn4965fw.c optional iwn4965fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn4965.fw:iwn4965fw -miwn4965fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn4965fw.c" iwn4965fw.fwo optional iwn4965fw | iwnfw \ dependency "iwn4965.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn4965fw.fwo" iwn4965.fw optional iwn4965fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn4965.fw" iwn5000fw.c optional iwn5000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5000.fw:iwn5000fw -miwn5000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn5000fw.c" iwn5000fw.fwo optional iwn5000fw | iwnfw \ dependency "iwn5000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5000fw.fwo" iwn5000.fw optional iwn5000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5000.fw" iwn5150fw.c optional iwn5150fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5150.fw:iwn5150fw -miwn5150fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn5150fw.c" iwn5150fw.fwo optional iwn5150fw | iwnfw \ dependency "iwn5150.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5150fw.fwo" iwn5150.fw optional iwn5150fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu"\ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5150.fw" iwn6000fw.c optional iwn6000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000.fw:iwn6000fw -miwn6000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000fw.c" iwn6000fw.fwo optional iwn6000fw | iwnfw \ dependency "iwn6000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000.fw" iwn6000g2afw.c optional iwn6000g2afw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2a.fw:iwn6000g2afw -miwn6000g2afw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000g2afw.c" iwn6000g2afw.fwo optional iwn6000g2afw | iwnfw \ dependency "iwn6000g2a.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2afw.fwo" iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2a.fw" iwn6000g2bfw.c optional iwn6000g2bfw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2b.fw:iwn6000g2bfw -miwn6000g2bfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000g2bfw.c" iwn6000g2bfw.fwo optional iwn6000g2bfw | iwnfw \ dependency "iwn6000g2b.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2bfw.fwo" iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2b.fw" iwn6050fw.c optional iwn6050fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6050.fw:iwn6050fw -miwn6050fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6050fw.c" iwn6050fw.fwo optional iwn6050fw | iwnfw \ dependency "iwn6050.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6050fw.fwo" iwn6050.fw optional iwn6050fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6050.fw" dev/ixgb/if_ixgb.c optional ixgb dev/ixgb/ixgb_ee.c optional ixgb dev/ixgb/ixgb_hw.c optional ixgb dev/ixgbe/if_ix.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_ixv.c optional ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/ix_txrx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_osdep.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_phy.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_api.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_common.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_mbx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_vf.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82598.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82599.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x540.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x550.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82598.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82599.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa dev/kbd/kbd.c optional atkbd | pckbd | sc | ukbd | vt dev/kbdmux/kbdmux.c optional kbdmux dev/ksyms/ksyms.c optional ksyms dev/le/am7990.c optional le dev/le/am79900.c optional le dev/le/if_le_pci.c optional le pci dev/le/lance.c optional le dev/led/led.c standard dev/lge/if_lge.c optional lge dev/lmc/if_lmc.c optional lmc dev/malo/if_malo.c optional malo dev/malo/if_malohal.c optional malo dev/malo/if_malo_pci.c optional malo pci dev/mc146818/mc146818.c optional mc146818 dev/mca/mca_bus.c optional mca dev/md/md.c optional md dev/mdio/mdio_if.m optional miiproxy | mdio dev/mdio/mdio.c optional miiproxy | mdio dev/mem/memdev.c optional mem dev/mem/memutil.c optional mem dev/mfi/mfi.c optional mfi dev/mfi/mfi_debug.c optional mfi dev/mfi/mfi_pci.c optional mfi pci dev/mfi/mfi_disk.c optional mfi dev/mfi/mfi_syspd.c optional mfi dev/mfi/mfi_tbolt.c optional mfi dev/mfi/mfi_linux.c optional mfi compat_linux dev/mfi/mfi_cam.c optional mfip scbus dev/mii/acphy.c optional miibus | acphy dev/mii/amphy.c optional miibus | amphy dev/mii/atphy.c optional miibus | atphy dev/mii/axphy.c optional miibus | axphy dev/mii/bmtphy.c optional miibus | bmtphy dev/mii/brgphy.c optional miibus | brgphy dev/mii/ciphy.c optional miibus | ciphy dev/mii/e1000phy.c optional miibus | e1000phy dev/mii/gentbi.c optional miibus | gentbi dev/mii/icsphy.c optional miibus | icsphy dev/mii/ip1000phy.c optional miibus | ip1000phy dev/mii/jmphy.c optional miibus | jmphy dev/mii/lxtphy.c optional miibus | lxtphy dev/mii/micphy.c optional miibus fdt | micphy fdt dev/mii/mii.c optional miibus | mii dev/mii/mii_bitbang.c optional miibus | mii_bitbang dev/mii/mii_physubr.c optional miibus | mii dev/mii/miibus_if.m optional miibus | mii dev/mii/mlphy.c optional miibus | mlphy dev/mii/nsgphy.c optional miibus | nsgphy dev/mii/nsphy.c optional miibus | nsphy dev/mii/nsphyter.c optional miibus | nsphyter dev/mii/pnaphy.c optional miibus | pnaphy dev/mii/qsphy.c optional miibus | qsphy dev/mii/rdcphy.c optional miibus | rdcphy dev/mii/rgephy.c optional miibus | rgephy dev/mii/rlphy.c optional miibus | rlphy dev/mii/rlswitch.c optional rlswitch dev/mii/smcphy.c optional miibus | smcphy dev/mii/smscphy.c optional miibus | smscphy dev/mii/tdkphy.c optional miibus | tdkphy dev/mii/tlphy.c optional miibus | tlphy dev/mii/truephy.c optional miibus | truephy dev/mii/ukphy.c optional miibus | mii dev/mii/ukphy_subr.c optional miibus | mii dev/mii/xmphy.c optional miibus | xmphy dev/mk48txx/mk48txx.c optional mk48txx dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx pci dev/mly/mly.c optional mly dev/mmc/mmc.c optional mmc dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard dev/mmc/mmcsd.c optional mmcsd dev/mn/if_mn.c optional mn pci dev/mpr/mpr.c optional mpr dev/mpr/mpr_config.c optional mpr # XXX Work around clang warning, until maintainer approves fix. dev/mpr/mpr_mapping.c optional mpr \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/mpr/mpr_pci.c optional mpr pci dev/mpr/mpr_sas.c optional mpr \ compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" dev/mpr/mpr_sas_lsi.c optional mpr dev/mpr/mpr_table.c optional mpr dev/mpr/mpr_user.c optional mpr dev/mps/mps.c optional mps dev/mps/mps_config.c optional mps # XXX Work around clang warning, until maintainer approves fix. dev/mps/mps_mapping.c optional mps \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/mps/mps_pci.c optional mps pci dev/mps/mps_sas.c optional mps \ compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" dev/mps/mps_sas_lsi.c optional mps dev/mps/mps_table.c optional mps dev/mps/mps_user.c optional mps dev/mpt/mpt.c optional mpt dev/mpt/mpt_cam.c optional mpt dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt dev/mrsas/mrsas.c optional mrsas dev/mrsas/mrsas_cam.c optional mrsas dev/mrsas/mrsas_ioctl.c optional mrsas dev/mrsas/mrsas_fp.c optional mrsas dev/msk/if_msk.c optional msk dev/mvs/mvs.c optional mvs dev/mvs/mvs_if.m optional mvs dev/mvs/mvs_pci.c optional mvs pci dev/mwl/if_mwl.c optional mwl dev/mwl/if_mwl_pci.c optional mwl pci dev/mwl/mwlhal.c optional mwl mwlfw.c optional mwlfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot -mmwl -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "mwlfw.c" mw88W8363.fwo optional mwlfw \ dependency "mw88W8363.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mw88W8363.fwo" mw88W8363.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mw88W8363.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mw88W8363.fw" mwlboot.fwo optional mwlfw \ dependency "mwlboot.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mwlboot.fwo" mwlboot.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mwlboot.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mwlboot.fw" dev/mxge/if_mxge.c optional mxge pci dev/mxge/mxge_eth_z8e.c optional mxge pci dev/mxge/mxge_ethp_z8e.c optional mxge pci dev/mxge/mxge_rss_eth_z8e.c optional mxge pci dev/mxge/mxge_rss_ethp_z8e.c optional mxge pci dev/my/if_my.c optional my dev/nand/nand.c optional nand dev/nand/nand_bbt.c optional nand dev/nand/nand_cdev.c optional nand dev/nand/nand_generic.c optional nand dev/nand/nand_geom.c optional nand dev/nand/nand_id.c optional nand dev/nand/nandbus.c optional nand dev/nand/nandbus_if.m optional nand dev/nand/nand_if.m optional nand dev/nand/nandsim.c optional nandsim nand dev/nand/nandsim_chip.c optional nandsim nand dev/nand/nandsim_ctrl.c optional nandsim nand dev/nand/nandsim_log.c optional nandsim nand dev/nand/nandsim_swap.c optional nandsim nand dev/nand/nfc_if.m optional nand dev/ncr/ncr.c optional ncr pci dev/ncv/ncr53c500.c optional ncv dev/ncv/ncr53c500_pccard.c optional ncv pccard dev/netmap/if_ptnet.c optional netmap dev/netmap/netmap.c optional netmap dev/netmap/netmap_freebsd.c optional netmap dev/netmap/netmap_generic.c optional netmap dev/netmap/netmap_mbq.c optional netmap dev/netmap/netmap_mem2.c optional netmap dev/netmap/netmap_monitor.c optional netmap dev/netmap/netmap_offloadings.c optional netmap dev/netmap/netmap_pipe.c optional netmap dev/netmap/netmap_pt.c optional netmap dev/netmap/netmap_vale.c optional netmap # compile-with "${NORMAL_C} -Wconversion -Wextra" dev/nfsmb/nfsmb.c optional nfsmb pci dev/nge/if_nge.c optional nge dev/nxge/if_nxge.c optional nxge \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-device.c optional nxge \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-mm.c optional nxge dev/nxge/xgehal/xge-queue.c optional nxge dev/nxge/xgehal/xgehal-driver.c optional nxge \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-ring.c optional nxge \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-channel.c optional nxge \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-fifo.c optional nxge \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-stats.c optional nxge \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-config.c optional nxge dev/nxge/xgehal/xgehal-mgmt.c optional nxge \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nmdm/nmdm.c optional nmdm dev/nsp/nsp.c optional nsp dev/nsp/nsp_pccard.c optional nsp pccard dev/null/null.c standard dev/oce/oce_hw.c optional oce pci dev/oce/oce_if.c optional oce pci dev/oce/oce_mbox.c optional oce pci dev/oce/oce_queue.c optional oce pci dev/oce/oce_sysctl.c optional oce pci dev/oce/oce_util.c optional oce pci dev/ofw/ofw_bus_if.m optional fdt dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt dev/ofw/ofw_subr.c optional fdt dev/ofw/ofwbus.c optional fdt dev/ofw/openfirm.c optional fdt dev/ofw/openfirmio.c optional fdt dev/ow/ow.c optional ow \ dependency "owll_if.h" \ dependency "own_if.h" dev/ow/owll_if.m optional ow dev/ow/own_if.m optional ow dev/ow/ow_temp.c optional ow_temp dev/ow/owc_gpiobus.c optional owc gpio dev/patm/if_patm.c optional patm pci dev/patm/if_patm_attach.c optional patm pci dev/patm/if_patm_intr.c optional patm pci dev/patm/if_patm_ioctl.c optional patm pci dev/patm/if_patm_rtables.c optional patm pci dev/patm/if_patm_rx.c optional patm pci dev/patm/if_patm_tx.c optional patm pci dev/pbio/pbio.c optional pbio isa dev/pccard/card_if.m standard dev/pccard/pccard.c optional pccard dev/pccard/pccard_cis.c optional pccard dev/pccard/pccard_cis_quirks.c optional pccard dev/pccard/pccard_device.c optional pccard dev/pccard/power_if.m standard dev/pccbb/pccbb.c optional cbb dev/pccbb/pccbb_isa.c optional cbb isa dev/pccbb/pccbb_pci.c optional cbb pci dev/pcf/pcf.c optional pcf dev/pci/eisa_pci.c optional pci eisa dev/pci/fixup_pci.c optional pci dev/pci/hostb_pci.c optional pci dev/pci/ignore_pci.c optional pci dev/pci/isa_pci.c optional pci isa dev/pci/pci.c optional pci dev/pci/pci_if.m standard dev/pci/pci_iov.c optional pci pci_iov dev/pci/pci_iov_if.m standard dev/pci/pci_iov_schema.c optional pci pci_iov dev/pci/pci_pci.c optional pci dev/pci/pci_subr.c optional pci dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard dev/pci/pcib_support.c standard dev/pci/vga_pci.c optional pci dev/pcn/if_pcn.c optional pcn pci dev/pdq/if_fea.c optional fea eisa dev/pdq/if_fpa.c optional fpa pci dev/pdq/pdq.c optional nowerror fea eisa | fpa pci dev/pdq/pdq_ifsubr.c optional nowerror fea eisa | fpa pci dev/pms/freebsd/driver/ini/src/agtiapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sadisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/mpi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saframe.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sahw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sainit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saint.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sampicmd.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sampirsp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saphy.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sasata.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sasmp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sassp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/satimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sautil.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saioctlcmd.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/mpidebug.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dminit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmsmp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmdisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmtimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/sminit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsatcb.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsathw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smtimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdinit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdesgl.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdint.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdioctl.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdhw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tddmcmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdtimers.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdcb.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdinit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/sat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/ossasat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/sathw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/ppbus/if_plip.c optional plip dev/ppbus/immio.c optional vpo dev/ppbus/lpbb.c optional lpbb dev/ppbus/lpt.c optional lpt dev/ppbus/pcfclock.c optional pcfclock dev/ppbus/ppb_1284.c optional ppbus dev/ppbus/ppb_base.c optional ppbus dev/ppbus/ppb_msq.c optional ppbus dev/ppbus/ppbconf.c optional ppbus dev/ppbus/ppbus_if.m optional ppbus dev/ppbus/ppi.c optional ppi dev/ppbus/pps.c optional pps dev/ppbus/vpo.c optional vpo dev/ppbus/vpoio.c optional vpo dev/ppc/ppc.c optional ppc dev/ppc/ppc_acpi.c optional ppc acpi dev/ppc/ppc_isa.c optional ppc isa dev/ppc/ppc_pci.c optional ppc pci dev/ppc/ppc_puc.c optional ppc puc dev/proto/proto_bus_isa.c optional proto acpi | proto isa dev/proto/proto_bus_pci.c optional proto pci dev/proto/proto_busdma.c optional proto dev/proto/proto_core.c optional proto dev/pst/pst-iop.c optional pst dev/pst/pst-pci.c optional pst pci dev/pst/pst-raid.c optional pst dev/pty/pty.c optional pty dev/puc/puc.c optional puc dev/puc/puc_cfg.c optional puc dev/puc/puc_pccard.c optional puc pccard dev/puc/puc_pci.c optional puc pci dev/puc/pucdata.c optional puc pci dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral dev/ral/rt2860.c optional ral dev/ral/if_ral_pci.c optional ral pci rt2561fw.c optional rt2561fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561.fw:rt2561fw -mrt2561 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2561fw.c" rt2561fw.fwo optional rt2561fw | ralfw \ dependency "rt2561.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561fw.fwo" rt2561.fw optional rt2561fw | ralfw \ dependency "$S/contrib/dev/ral/rt2561.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561.fw" rt2561sfw.c optional rt2561sfw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561s.fw:rt2561sfw -mrt2561s -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2561sfw.c" rt2561sfw.fwo optional rt2561sfw | ralfw \ dependency "rt2561s.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561sfw.fwo" rt2561s.fw optional rt2561sfw | ralfw \ dependency "$S/contrib/dev/ral/rt2561s.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561s.fw" rt2661fw.c optional rt2661fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2661.fw:rt2661fw -mrt2661 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2661fw.c" rt2661fw.fwo optional rt2661fw | ralfw \ dependency "rt2661.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2661fw.fwo" rt2661.fw optional rt2661fw | ralfw \ dependency "$S/contrib/dev/ral/rt2661.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2661.fw" rt2860fw.c optional rt2860fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2860.fw:rt2860fw -mrt2860 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2860fw.c" rt2860fw.fwo optional rt2860fw | ralfw \ dependency "rt2860.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2860fw.fwo" rt2860.fw optional rt2860fw | ralfw \ dependency "$S/contrib/dev/ral/rt2860.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2860.fw" dev/random/random_infra.c optional random dev/random/random_harvestq.c optional random dev/random/randomdev.c optional random random_yarrow | \ random !random_yarrow !random_loadable dev/random/yarrow.c optional random random_yarrow dev/random/fortuna.c optional random !random_yarrow !random_loadable dev/random/hash.c optional random random_yarrow | \ random !random_yarrow !random_loadable dev/rc/rc.c optional rc dev/rccgpio/rccgpio.c optional rccgpio gpio dev/re/if_re.c optional re dev/rl/if_rl.c optional rl pci dev/rndtest/rndtest.c optional rndtest dev/rp/rp.c optional rp dev/rp/rp_isa.c optional rp isa dev/rp/rp_pci.c optional rp pci # dev/rtwn/if_rtwn.c optional rtwn dev/rtwn/if_rtwn_beacon.c optional rtwn dev/rtwn/if_rtwn_calib.c optional rtwn dev/rtwn/if_rtwn_cam.c optional rtwn dev/rtwn/if_rtwn_efuse.c optional rtwn dev/rtwn/if_rtwn_fw.c optional rtwn dev/rtwn/if_rtwn_rx.c optional rtwn dev/rtwn/if_rtwn_task.c optional rtwn dev/rtwn/if_rtwn_tx.c optional rtwn # dev/rtwn/pci/rtwn_pci_attach.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_reg.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_rx.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_tx.c optional rtwn_pci pci # dev/rtwn/usb/rtwn_usb_attach.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_ep.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_reg.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_rx.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_tx.c optional rtwn_usb # RTL8188E dev/rtwn/rtl8188e/r88e_beacon.c optional rtwn dev/rtwn/rtl8188e/r88e_calib.c optional rtwn dev/rtwn/rtl8188e/r88e_chan.c optional rtwn dev/rtwn/rtl8188e/r88e_fw.c optional rtwn dev/rtwn/rtl8188e/r88e_init.c optional rtwn dev/rtwn/rtl8188e/r88e_led.c optional rtwn dev/rtwn/rtl8188e/r88e_tx.c optional rtwn dev/rtwn/rtl8188e/r88e_rf.c optional rtwn dev/rtwn/rtl8188e/r88e_rom.c optional rtwn dev/rtwn/rtl8188e/r88e_rx.c optional rtwn dev/rtwn/rtl8188e/usb/r88eu_attach.c optional rtwn_usb dev/rtwn/rtl8188e/usb/r88eu_init.c optional rtwn_usb dev/rtwn/rtl8188e/usb/r88eu_rx.c optional rtwn_usb # RTL8192C dev/rtwn/rtl8192c/r92c_attach.c optional rtwn dev/rtwn/rtl8192c/r92c_beacon.c optional rtwn dev/rtwn/rtl8192c/r92c_calib.c optional rtwn dev/rtwn/rtl8192c/r92c_chan.c optional rtwn dev/rtwn/rtl8192c/r92c_fw.c optional rtwn dev/rtwn/rtl8192c/r92c_init.c optional rtwn dev/rtwn/rtl8192c/r92c_rf.c optional rtwn dev/rtwn/rtl8192c/r92c_rom.c optional rtwn dev/rtwn/rtl8192c/r92c_rx.c optional rtwn dev/rtwn/rtl8192c/r92c_tx.c optional rtwn dev/rtwn/rtl8192c/pci/r92ce_attach.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_calib.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_fw.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_init.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_led.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_rx.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_tx.c optional rtwn_pci pci dev/rtwn/rtl8192c/usb/r92cu_attach.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_init.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_led.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_rx.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_tx.c optional rtwn_usb # RTL8812A dev/rtwn/rtl8812a/r12a_beacon.c optional rtwn dev/rtwn/rtl8812a/r12a_calib.c optional rtwn dev/rtwn/rtl8812a/r12a_caps.c optional rtwn dev/rtwn/rtl8812a/r12a_chan.c optional rtwn dev/rtwn/rtl8812a/r12a_fw.c optional rtwn dev/rtwn/rtl8812a/r12a_init.c optional rtwn dev/rtwn/rtl8812a/r12a_led.c optional rtwn dev/rtwn/rtl8812a/r12a_rf.c optional rtwn dev/rtwn/rtl8812a/r12a_rom.c optional rtwn dev/rtwn/rtl8812a/r12a_rx.c optional rtwn dev/rtwn/rtl8812a/r12a_tx.c optional rtwn dev/rtwn/rtl8812a/usb/r12au_attach.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_init.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_rx.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_tx.c optional rtwn_usb # RTL8821A dev/rtwn/rtl8821a/r21a_beacon.c optional rtwn dev/rtwn/rtl8821a/r21a_calib.c optional rtwn dev/rtwn/rtl8821a/r21a_chan.c optional rtwn dev/rtwn/rtl8821a/r21a_fw.c optional rtwn dev/rtwn/rtl8821a/r21a_init.c optional rtwn dev/rtwn/rtl8821a/r21a_led.c optional rtwn dev/rtwn/rtl8821a/r21a_rom.c optional rtwn dev/rtwn/rtl8821a/r21a_rx.c optional rtwn dev/rtwn/rtl8821a/usb/r21au_attach.c optional rtwn_usb dev/rtwn/rtl8821a/usb/r21au_init.c optional rtwn_usb rtwn-rtl8188eufw.c optional rtwn-rtl8188eufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8188eufw.fw:rtwn-rtl8188eufw:111 -mrtwn-rtl8188eufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8188eufw.c" rtwn-rtl8188eufw.fwo optional rtwn-rtl8188eufw | rtwnfw \ dependency "rtwn-rtl8188eufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8188eufw.fwo" rtwn-rtl8188eufw.fw optional rtwn-rtl8188eufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8188eufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8188eufw.fw" rtwn-rtl8192cfwE.c optional rtwn-rtl8192cfwE | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwE.fw:rtwn-rtl8192cfwE:111 -mrtwn-rtl8192cfwE -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwE.c" rtwn-rtl8192cfwE.fwo optional rtwn-rtl8192cfwE | rtwnfw \ dependency "rtwn-rtl8192cfwE.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwE.fwo" rtwn-rtl8192cfwE.fw optional rtwn-rtl8192cfwE | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwE.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwE.fw" rtwn-rtl8192cfwE_B.c optional rtwn-rtl8192cfwE_B | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwE_B.fw:rtwn-rtl8192cfwE_B:111 -mrtwn-rtl8192cfwE_B -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwE_B.c" rtwn-rtl8192cfwE_B.fwo optional rtwn-rtl8192cfwE_B | rtwnfw \ dependency "rtwn-rtl8192cfwE_B.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwE_B.fwo" rtwn-rtl8192cfwE_B.fw optional rtwn-rtl8192cfwE_B | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwE_B.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwE_B.fw" rtwn-rtl8192cfwT.c optional rtwn-rtl8192cfwT | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwT.fw:rtwn-rtl8192cfwT:111 -mrtwn-rtl8192cfwT -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwT.c" rtwn-rtl8192cfwT.fwo optional rtwn-rtl8192cfwT | rtwnfw \ dependency "rtwn-rtl8192cfwT.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwT.fwo" rtwn-rtl8192cfwT.fw optional rtwn-rtl8192cfwT | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwT.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwT.fw" rtwn-rtl8192cfwU.c optional rtwn-rtl8192cfwU | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwU.fw:rtwn-rtl8192cfwU:111 -mrtwn-rtl8192cfwU -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwU.c" rtwn-rtl8192cfwU.fwo optional rtwn-rtl8192cfwU | rtwnfw \ dependency "rtwn-rtl8192cfwU.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwU.fwo" rtwn-rtl8192cfwU.fw optional rtwn-rtl8192cfwU | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwU.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwU.fw" rtwn-rtl8812aufw.c optional rtwn-rtl8812aufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8812aufw.fw:rtwn-rtl8812aufw:111 -mrtwn-rtl8812aufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8812aufw.c" rtwn-rtl8812aufw.fwo optional rtwn-rtl8812aufw | rtwnfw \ dependency "rtwn-rtl8812aufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8812aufw.fwo" rtwn-rtl8812aufw.fw optional rtwn-rtl8812aufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8812aufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8812aufw.fw" rtwn-rtl8821aufw.c optional rtwn-rtl8821aufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8821aufw.fw:rtwn-rtl8821aufw:111 -mrtwn-rtl8821aufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8821aufw.c" rtwn-rtl8821aufw.fwo optional rtwn-rtl8821aufw | rtwnfw \ dependency "rtwn-rtl8821aufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8821aufw.fwo" rtwn-rtl8821aufw.fw optional rtwn-rtl8821aufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8821aufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8821aufw.fw" dev/safe/safe.c optional safe dev/scc/scc_if.m optional scc dev/scc/scc_bfe_ebus.c optional scc ebus dev/scc/scc_bfe_quicc.c optional scc quicc dev/scc/scc_bfe_sbus.c optional scc fhc | scc sbus dev/scc/scc_core.c optional scc dev/scc/scc_dev_quicc.c optional scc quicc dev/scc/scc_dev_sab82532.c optional scc dev/scc/scc_dev_z8530.c optional scc dev/sdhci/sdhci.c optional sdhci dev/sdhci/sdhci_if.m optional sdhci dev/sdhci/sdhci_pci.c optional sdhci pci dev/sf/if_sf.c optional sf pci dev/sge/if_sge.c optional sge pci dev/siba/siba_bwn.c optional siba_bwn pci dev/siba/siba_core.c optional siba_bwn pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci dev/sk/if_sk.c optional sk pci dev/smbus/smb.c optional smb dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus dev/smbus/smbus_if.m optional smbus dev/smc/if_smc.c optional smc dev/smc/if_smc_fdt.c optional smc fdt dev/sn/if_sn.c optional sn dev/sn/if_sn_isa.c optional sn isa dev/sn/if_sn_pccard.c optional sn pccard dev/snp/snp.c optional snp dev/sound/clone.c optional sound dev/sound/unit.c optional sound dev/sound/isa/ad1816.c optional snd_ad1816 isa dev/sound/isa/ess.c optional snd_ess isa dev/sound/isa/gusc.c optional snd_gusc isa dev/sound/isa/mss.c optional snd_mss isa dev/sound/isa/sb16.c optional snd_sb16 isa dev/sound/isa/sb8.c optional snd_sb8 isa dev/sound/isa/sbc.c optional snd_sbc isa dev/sound/isa/sndbuf_dma.c optional sound isa dev/sound/pci/als4000.c optional snd_als4000 pci dev/sound/pci/atiixp.c optional snd_atiixp pci dev/sound/pci/cmi.c optional snd_cmi pci dev/sound/pci/cs4281.c optional snd_cs4281 pci dev/sound/pci/csa.c optional snd_csa pci dev/sound/pci/csapcm.c optional snd_csa pci dev/sound/pci/ds1.c optional snd_ds1 pci dev/sound/pci/emu10k1.c optional snd_emu10k1 pci dev/sound/pci/emu10kx.c optional snd_emu10kx pci dev/sound/pci/emu10kx-pcm.c optional snd_emu10kx pci dev/sound/pci/emu10kx-midi.c optional snd_emu10kx pci dev/sound/pci/envy24.c optional snd_envy24 pci dev/sound/pci/envy24ht.c optional snd_envy24ht pci dev/sound/pci/es137x.c optional snd_es137x pci dev/sound/pci/fm801.c optional snd_fm801 pci dev/sound/pci/ich.c optional snd_ich pci dev/sound/pci/maestro.c optional snd_maestro pci dev/sound/pci/maestro3.c optional snd_maestro3 pci dev/sound/pci/neomagic.c optional snd_neomagic pci dev/sound/pci/solo.c optional snd_solo pci dev/sound/pci/spicds.c optional snd_spicds pci dev/sound/pci/t4dwave.c optional snd_t4dwave pci dev/sound/pci/via8233.c optional snd_via8233 pci dev/sound/pci/via82c686.c optional snd_via82c686 pci dev/sound/pci/vibes.c optional snd_vibes pci dev/sound/pci/hda/hdaa.c optional snd_hda pci dev/sound/pci/hda/hdaa_patches.c optional snd_hda pci dev/sound/pci/hda/hdac.c optional snd_hda pci dev/sound/pci/hda/hdac_if.m optional snd_hda pci dev/sound/pci/hda/hdacc.c optional snd_hda pci dev/sound/pci/hdspe.c optional snd_hdspe pci dev/sound/pci/hdspe-pcm.c optional snd_hdspe pci dev/sound/pcm/ac97.c optional sound dev/sound/pcm/ac97_if.m optional sound dev/sound/pcm/ac97_patch.c optional sound dev/sound/pcm/buffer.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/channel.c optional sound dev/sound/pcm/channel_if.m optional sound dev/sound/pcm/dsp.c optional sound dev/sound/pcm/feeder.c optional sound dev/sound/pcm/feeder_chain.c optional sound dev/sound/pcm/feeder_eq.c optional sound \ dependency "feeder_eq_gen.h" \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_if.m optional sound dev/sound/pcm/feeder_format.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_matrix.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_mixer.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_rate.c optional sound \ dependency "feeder_rate_gen.h" \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_volume.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/mixer.c optional sound dev/sound/pcm/mixer_if.m optional sound dev/sound/pcm/sndstat.c optional sound dev/sound/pcm/sound.c optional sound dev/sound/pcm/vchan.c optional sound dev/sound/usb/uaudio.c optional snd_uaudio usb dev/sound/usb/uaudio_pcm.c optional snd_uaudio usb dev/sound/midi/midi.c optional sound dev/sound/midi/mpu401.c optional sound dev/sound/midi/mpu_if.m optional sound dev/sound/midi/mpufoi_if.m optional sound dev/sound/midi/sequencer.c optional sound dev/sound/midi/synth_if.m optional sound dev/spibus/ofw_spibus.c optional fdt spibus dev/spibus/spibus.c optional spibus \ dependency "spibus_if.h" dev/spibus/spigen.c optional spigen dev/spibus/spibus_if.m optional spibus dev/ste/if_ste.c optional ste pci dev/stg/tmc18c30.c optional stg dev/stg/tmc18c30_isa.c optional stg isa dev/stg/tmc18c30_pccard.c optional stg pccard dev/stg/tmc18c30_pci.c optional stg pci dev/stg/tmc18c30_subr.c optional stg dev/stge/if_stge.c optional stge dev/streams/streams.c optional streams dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" dev/syscons/blank/blank_saver.c optional blank_saver dev/syscons/daemon/daemon_saver.c optional daemon_saver dev/syscons/dragon/dragon_saver.c optional dragon_saver dev/syscons/fade/fade_saver.c optional fade_saver dev/syscons/fire/fire_saver.c optional fire_saver dev/syscons/green/green_saver.c optional green_saver dev/syscons/logo/logo.c optional logo_saver dev/syscons/logo/logo_saver.c optional logo_saver dev/syscons/rain/rain_saver.c optional rain_saver dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc dev/syscons/scterm.c optional sc dev/syscons/scvidctl.c optional sc dev/syscons/snake/snake_saver.c optional snake_saver dev/syscons/star/star_saver.c optional star_saver dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc dev/syscons/warp/warp_saver.c optional warp_saver dev/tdfx/tdfx_linux.c optional tdfx_linux tdfx compat_linux dev/tdfx/tdfx_pci.c optional tdfx pci dev/ti/if_ti.c optional ti pci dev/tl/if_tl.c optional tl pci dev/trm/trm.c optional trm dev/twa/tw_cl_init.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_intr.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_io.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_misc.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_osl_cam.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_osl_freebsd.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe dev/tws/tws.c optional tws dev/tws/tws_cam.c optional tws dev/tws/tws_hdm.c optional tws dev/tws/tws_services.c optional tws dev/tws/tws_user.c optional tws dev/tx/if_tx.c optional tx dev/txp/if_txp.c optional txp dev/uart/uart_bus_acpi.c optional uart acpi dev/uart/uart_bus_ebus.c optional uart ebus dev/uart/uart_bus_fdt.c optional uart fdt dev/uart/uart_bus_isa.c optional uart isa dev/uart/uart_bus_pccard.c optional uart pccard dev/uart/uart_bus_pci.c optional uart pci dev/uart/uart_bus_puc.c optional uart puc dev/uart/uart_bus_scc.c optional uart scc dev/uart/uart_core.c optional uart dev/uart/uart_dbg.c optional uart gdb dev/uart/uart_dev_ns8250.c optional uart uart_ns8250 | uart uart_snps dev/uart/uart_dev_pl011.c optional uart pl011 dev/uart/uart_dev_quicc.c optional uart quicc dev/uart/uart_dev_sab82532.c optional uart uart_sab82532 dev/uart/uart_dev_sab82532.c optional uart scc dev/uart/uart_dev_snps.c optional uart uart_snps dev/uart/uart_dev_z8530.c optional uart uart_z8530 dev/uart/uart_dev_z8530.c optional uart scc dev/uart/uart_if.m optional uart dev/uart/uart_subr.c optional uart dev/uart/uart_tty.c optional uart dev/ubsec/ubsec.c optional ubsec # # USB controller drivers # dev/usb/controller/at91dci.c optional at91dci dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 dev/usb/controller/musb_otg.c optional musb dev/usb/controller/musb_otg_atmelarm.c optional musb at91rm9200 dev/usb/controller/dwc_otg.c optional dwcotg dev/usb/controller/dwc_otg_fdt.c optional dwcotg fdt dev/usb/controller/ehci.c optional ehci dev/usb/controller/ehci_pci.c optional ehci pci dev/usb/controller/ohci.c optional ohci dev/usb/controller/ohci_pci.c optional ohci pci dev/usb/controller/uhci.c optional uhci dev/usb/controller/uhci_pci.c optional uhci pci dev/usb/controller/xhci.c optional xhci dev/usb/controller/xhci_pci.c optional xhci pci dev/usb/controller/saf1761_otg.c optional saf1761otg dev/usb/controller/saf1761_otg_fdt.c optional saf1761otg fdt dev/usb/controller/uss820dci.c optional uss820dci dev/usb/controller/uss820dci_atmelarm.c optional uss820dci at91rm9200 dev/usb/controller/usb_controller.c optional usb # # USB storage drivers # dev/usb/storage/umass.c optional umass dev/usb/storage/urio.c optional urio dev/usb/storage/ustorage_fs.c optional usfs # # USB core # dev/usb/usb_busdma.c optional usb dev/usb/usb_core.c optional usb dev/usb/usb_debug.c optional usb dev/usb/usb_dev.c optional usb dev/usb/usb_device.c optional usb dev/usb/usb_dynamic.c optional usb dev/usb/usb_error.c optional usb dev/usb/usb_generic.c optional usb dev/usb/usb_handle_request.c optional usb dev/usb/usb_hid.c optional usb dev/usb/usb_hub.c optional usb dev/usb/usb_if.m optional usb dev/usb/usb_lookup.c optional usb dev/usb/usb_mbuf.c optional usb dev/usb/usb_msctest.c optional usb dev/usb/usb_parse.c optional usb dev/usb/usb_pf.c optional usb dev/usb/usb_process.c optional usb dev/usb/usb_request.c optional usb dev/usb/usb_transfer.c optional usb dev/usb/usb_util.c optional usb # # USB network drivers # dev/usb/net/if_aue.c optional aue dev/usb/net/if_axe.c optional axe dev/usb/net/if_axge.c optional axge dev/usb/net/if_cdce.c optional cdce dev/usb/net/if_cue.c optional cue dev/usb/net/if_ipheth.c optional ipheth dev/usb/net/if_kue.c optional kue dev/usb/net/if_mos.c optional mos dev/usb/net/if_rue.c optional rue dev/usb/net/if_smsc.c optional smsc dev/usb/net/if_udav.c optional udav dev/usb/net/if_ure.c optional ure dev/usb/net/if_usie.c optional usie dev/usb/net/if_urndis.c optional urndis dev/usb/net/ruephy.c optional rue dev/usb/net/usb_ethernet.c optional uether | aue | axe | axge | cdce | \ cue | ipheth | kue | mos | rue | \ smsc | udav | ure | urndis dev/usb/net/uhso.c optional uhso # # USB WLAN drivers # dev/usb/wlan/if_rsu.c optional rsu rsu-rtl8712fw.c optional rsu-rtl8712fw | rsufw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rsu-rtl8712fw.fw:rsu-rtl8712fw:120 -mrsu-rtl8712fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rsu-rtl8712fw.c" rsu-rtl8712fw.fwo optional rsu-rtl8712fw | rsufw \ dependency "rsu-rtl8712fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rsu-rtl8712fw.fwo" rsu-rtl8712fw.fw optional rsu-rtl8712.fw | rsufw \ dependency "$S/contrib/dev/rsu/rsu-rtl8712fw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rsu-rtl8712fw.fw" dev/usb/wlan/if_rum.c optional rum dev/usb/wlan/if_run.c optional run runfw.c optional runfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk run.fw:runfw -mrunfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "runfw.c" runfw.fwo optional runfw \ dependency "run.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "runfw.fwo" run.fw optional runfw \ dependency "$S/contrib/dev/run/rt2870.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "run.fw" dev/usb/wlan/if_uath.c optional uath dev/usb/wlan/if_upgt.c optional upgt dev/usb/wlan/if_ural.c optional ural dev/usb/wlan/if_urtw.c optional urtw dev/usb/wlan/if_zyd.c optional zyd # # USB serial and parallel port drivers # dev/usb/serial/u3g.c optional u3g dev/usb/serial/uark.c optional uark dev/usb/serial/ubsa.c optional ubsa dev/usb/serial/ubser.c optional ubser dev/usb/serial/uchcom.c optional uchcom dev/usb/serial/ucycom.c optional ucycom dev/usb/serial/ufoma.c optional ufoma dev/usb/serial/uftdi.c optional uftdi dev/usb/serial/ugensa.c optional ugensa dev/usb/serial/uipaq.c optional uipaq dev/usb/serial/ulpt.c optional ulpt dev/usb/serial/umcs.c optional umcs dev/usb/serial/umct.c optional umct dev/usb/serial/umodem.c optional umodem dev/usb/serial/umoscom.c optional umoscom dev/usb/serial/uplcom.c optional uplcom dev/usb/serial/uslcom.c optional uslcom dev/usb/serial/uvisor.c optional uvisor dev/usb/serial/uvscom.c optional uvscom dev/usb/serial/usb_serial.c optional ucom | u3g | uark | ubsa | ubser | \ uchcom | ucycom | ufoma | uftdi | \ ugensa | uipaq | umcs | umct | \ umodem | umoscom | uplcom | usie | \ uslcom | uvisor | uvscom # # USB misc drivers # dev/usb/misc/ufm.c optional ufm dev/usb/misc/udbp.c optional udbp dev/usb/misc/ugold.c optional ugold dev/usb/misc/uled.c optional uled # # USB input drivers # dev/usb/input/atp.c optional atp dev/usb/input/uep.c optional uep dev/usb/input/uhid.c optional uhid dev/usb/input/ukbd.c optional ukbd dev/usb/input/ums.c optional ums dev/usb/input/wsp.c optional wsp # # USB quirks # dev/usb/quirk/usb_quirk.c optional usb # # USB templates # dev/usb/template/usb_template.c optional usb_template dev/usb/template/usb_template_audio.c optional usb_template dev/usb/template/usb_template_cdce.c optional usb_template dev/usb/template/usb_template_kbd.c optional usb_template dev/usb/template/usb_template_modem.c optional usb_template dev/usb/template/usb_template_mouse.c optional usb_template dev/usb/template/usb_template_msc.c optional usb_template dev/usb/template/usb_template_mtp.c optional usb_template dev/usb/template/usb_template_phone.c optional usb_template dev/usb/template/usb_template_serialnet.c optional usb_template dev/usb/template/usb_template_midi.c optional usb_template # # USB video drivers # dev/usb/video/udl.c optional udl # # USB END # dev/videomode/videomode.c optional videomode dev/videomode/edid.c optional videomode dev/videomode/pickmode.c optional videomode dev/videomode/vesagtf.c optional videomode dev/utopia/idtphy.c optional utopia dev/utopia/suni.c optional utopia dev/utopia/utopia.c optional utopia dev/vge/if_vge.c optional vge dev/viapm/viapm.c optional viapm pci dev/virtio/virtio.c optional virtio dev/virtio/virtqueue.c optional virtio dev/virtio/virtio_bus_if.m optional virtio dev/virtio/virtio_if.m optional virtio dev/virtio/pci/virtio_pci.c optional virtio_pci dev/virtio/mmio/virtio_mmio.c optional virtio_mmio dev/virtio/mmio/virtio_mmio_if.m optional virtio_mmio dev/virtio/network/if_vtnet.c optional vtnet dev/virtio/block/virtio_blk.c optional virtio_blk dev/virtio/balloon/virtio_balloon.c optional virtio_balloon dev/virtio/scsi/virtio_scsi.c optional virtio_scsi dev/virtio/random/virtio_random.c optional virtio_random dev/virtio/console/virtio_console.c optional virtio_console dev/vkbd/vkbd.c optional vkbd dev/vr/if_vr.c optional vr pci dev/vt/colors/vt_termcolors.c optional vt dev/vt/font/vt_font_default.c optional vt dev/vt/font/vt_mouse_cursor.c optional vt dev/vt/hw/efifb/efifb.c optional vt_efifb dev/vt/hw/fb/vt_fb.c optional vt dev/vt/hw/vga/vt_vga.c optional vt vt_vga dev/vt/logo/logo_freebsd.c optional vt splash dev/vt/logo/logo_beastie.c optional vt splash dev/vt/vt_buf.c optional vt dev/vt/vt_consolectl.c optional vt dev/vt/vt_core.c optional vt dev/vt/vt_cpulogos.c optional vt splash dev/vt/vt_font.c optional vt dev/vt/vt_sysmouse.c optional vt dev/vte/if_vte.c optional vte pci dev/vx/if_vx.c optional vx dev/vx/if_vx_eisa.c optional vx eisa dev/vx/if_vx_pci.c optional vx pci dev/vxge/vxge.c optional vxge dev/vxge/vxgehal/vxgehal-ifmsg.c optional vxge dev/vxge/vxgehal/vxgehal-mrpcim.c optional vxge dev/vxge/vxgehal/vxge-queue.c optional vxge dev/vxge/vxgehal/vxgehal-ring.c optional vxge dev/vxge/vxgehal/vxgehal-swapper.c optional vxge dev/vxge/vxgehal/vxgehal-mgmt.c optional vxge dev/vxge/vxgehal/vxgehal-srpcim.c optional vxge dev/vxge/vxgehal/vxgehal-config.c optional vxge dev/vxge/vxgehal/vxgehal-blockpool.c optional vxge dev/vxge/vxgehal/vxgehal-doorbells.c optional vxge dev/vxge/vxgehal/vxgehal-mgmtaux.c optional vxge dev/vxge/vxgehal/vxgehal-device.c optional vxge dev/vxge/vxgehal/vxgehal-mm.c optional vxge dev/vxge/vxgehal/vxgehal-driver.c optional vxge dev/vxge/vxgehal/vxgehal-virtualpath.c optional vxge dev/vxge/vxgehal/vxgehal-channel.c optional vxge dev/vxge/vxgehal/vxgehal-fifo.c optional vxge dev/watchdog/watchdog.c standard dev/wb/if_wb.c optional wb pci dev/wi/if_wi.c optional wi dev/wi/if_wi_pccard.c optional wi pccard dev/wi/if_wi_pci.c optional wi pci dev/wpi/if_wpi.c optional wpi pci wpifw.c optional wpifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk wpi.fw:wpifw:153229 -mwpi -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "wpifw.c" wpifw.fwo optional wpifw \ dependency "wpi.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "wpifw.fwo" wpi.fw optional wpifw \ dependency "$S/contrib/dev/wpi/iwlwifi-3945-15.32.2.9.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "wpi.fw" dev/xe/if_xe.c optional xe dev/xe/if_xe_pccard.c optional xe pccard dev/xen/balloon/balloon.c optional xenhvm dev/xen/blkfront/blkfront.c optional xenhvm dev/xen/blkback/blkback.c optional xenhvm dev/xen/console/xen_console.c optional xenhvm dev/xen/control/control.c optional xenhvm dev/xen/grant_table/grant_table.c optional xenhvm dev/xen/netback/netback.c optional xenhvm dev/xen/netfront/netfront.c optional xenhvm dev/xen/xenpci/xenpci.c optional xenpci dev/xen/timer/timer.c optional xenhvm dev/xen/pvcpu/pvcpu.c optional xenhvm dev/xen/xenstore/xenstore.c optional xenhvm dev/xen/xenstore/xenstore_dev.c optional xenhvm dev/xen/xenstore/xenstored_dev.c optional xenhvm dev/xen/evtchn/evtchn_dev.c optional xenhvm dev/xen/privcmd/privcmd.c optional xenhvm dev/xen/debug/debug.c optional xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/autofs/autofs.c optional autofs fs/autofs/autofs_vfsops.c optional autofs fs/autofs/autofs_vnops.c optional autofs fs/deadfs/dead_vnops.c standard fs/devfs/devfs_devs.c standard fs/devfs/devfs_dir.c standard fs/devfs/devfs_rule.c standard fs/devfs/devfs_vfsops.c standard fs/devfs/devfs_vnops.c standard fs/fdescfs/fdesc_vfsops.c optional fdescfs fs/fdescfs/fdesc_vnops.c optional fdescfs fs/fifofs/fifo_vnops.c standard fs/cuse/cuse.c optional cuse fs/fuse/fuse_device.c optional fuse fs/fuse/fuse_file.c optional fuse fs/fuse/fuse_internal.c optional fuse fs/fuse/fuse_io.c optional fuse fs/fuse/fuse_ipc.c optional fuse fs/fuse/fuse_main.c optional fuse fs/fuse/fuse_node.c optional fuse fs/fuse/fuse_vfsops.c optional fuse fs/fuse/fuse_vnops.c optional fuse fs/msdosfs/msdosfs_conv.c optional msdosfs fs/msdosfs/msdosfs_denode.c optional msdosfs fs/msdosfs/msdosfs_fat.c optional msdosfs fs/msdosfs/msdosfs_fileno.c optional msdosfs fs/msdosfs/msdosfs_iconv.c optional msdosfs_iconv fs/msdosfs/msdosfs_lookup.c optional msdosfs fs/msdosfs/msdosfs_vfsops.c optional msdosfs fs/msdosfs/msdosfs_vnops.c optional msdosfs fs/nandfs/bmap.c optional nandfs fs/nandfs/nandfs_alloc.c optional nandfs fs/nandfs/nandfs_bmap.c optional nandfs fs/nandfs/nandfs_buffer.c optional nandfs fs/nandfs/nandfs_cleaner.c optional nandfs fs/nandfs/nandfs_cpfile.c optional nandfs fs/nandfs/nandfs_dat.c optional nandfs fs/nandfs/nandfs_dir.c optional nandfs fs/nandfs/nandfs_ifile.c optional nandfs fs/nandfs/nandfs_segment.c optional nandfs fs/nandfs/nandfs_subr.c optional nandfs fs/nandfs/nandfs_sufile.c optional nandfs fs/nandfs/nandfs_vfsops.c optional nandfs fs/nandfs/nandfs_vnops.c optional nandfs fs/nfs/nfs_commonkrpc.c optional nfscl | nfsd fs/nfs/nfs_commonsubs.c optional nfscl | nfsd fs/nfs/nfs_commonport.c optional nfscl | nfsd fs/nfs/nfs_commonacl.c optional nfscl | nfsd fs/nfsclient/nfs_clcomsubs.c optional nfscl fs/nfsclient/nfs_clsubs.c optional nfscl fs/nfsclient/nfs_clstate.c optional nfscl fs/nfsclient/nfs_clkrpc.c optional nfscl fs/nfsclient/nfs_clrpcops.c optional nfscl fs/nfsclient/nfs_clvnops.c optional nfscl fs/nfsclient/nfs_clnode.c optional nfscl fs/nfsclient/nfs_clvfsops.c optional nfscl fs/nfsclient/nfs_clport.c optional nfscl fs/nfsclient/nfs_clbio.c optional nfscl fs/nfsclient/nfs_clnfsiod.c optional nfscl fs/nfsserver/nfs_fha_new.c optional nfsd inet fs/nfsserver/nfs_nfsdsocket.c optional nfsd inet fs/nfsserver/nfs_nfsdsubs.c optional nfsd inet fs/nfsserver/nfs_nfsdstate.c optional nfsd inet fs/nfsserver/nfs_nfsdkrpc.c optional nfsd inet fs/nfsserver/nfs_nfsdserv.c optional nfsd inet fs/nfsserver/nfs_nfsdport.c optional nfsd inet fs/nfsserver/nfs_nfsdcache.c optional nfsd inet fs/nullfs/null_subr.c optional nullfs fs/nullfs/null_vfsops.c optional nullfs fs/nullfs/null_vnops.c optional nullfs fs/procfs/procfs.c optional procfs fs/procfs/procfs_ctl.c optional procfs fs/procfs/procfs_dbregs.c optional procfs fs/procfs/procfs_fpregs.c optional procfs fs/procfs/procfs_ioctl.c optional procfs fs/procfs/procfs_map.c optional procfs fs/procfs/procfs_mem.c optional procfs fs/procfs/procfs_note.c optional procfs fs/procfs/procfs_osrel.c optional procfs fs/procfs/procfs_regs.c optional procfs fs/procfs/procfs_rlimit.c optional procfs fs/procfs/procfs_status.c optional procfs fs/procfs/procfs_type.c optional procfs fs/pseudofs/pseudofs.c optional pseudofs fs/pseudofs/pseudofs_fileno.c optional pseudofs fs/pseudofs/pseudofs_vncache.c optional pseudofs fs/pseudofs/pseudofs_vnops.c optional pseudofs fs/smbfs/smbfs_io.c optional smbfs fs/smbfs/smbfs_node.c optional smbfs fs/smbfs/smbfs_smb.c optional smbfs fs/smbfs/smbfs_subr.c optional smbfs fs/smbfs/smbfs_vfsops.c optional smbfs fs/smbfs/smbfs_vnops.c optional smbfs fs/udf/osta.c optional udf fs/udf/udf_iconv.c optional udf_iconv fs/udf/udf_vfsops.c optional udf fs/udf/udf_vnops.c optional udf fs/unionfs/union_subr.c optional unionfs fs/unionfs/union_vfsops.c optional unionfs fs/unionfs/union_vnops.c optional unionfs fs/tmpfs/tmpfs_vnops.c optional tmpfs fs/tmpfs/tmpfs_fifoops.c optional tmpfs fs/tmpfs/tmpfs_vfsops.c optional tmpfs fs/tmpfs/tmpfs_subr.c optional tmpfs gdb/gdb_cons.c optional gdb gdb/gdb_main.c optional gdb gdb/gdb_packet.c optional gdb geom/bde/g_bde.c optional geom_bde geom/bde/g_bde_crypt.c optional geom_bde geom/bde/g_bde_lock.c optional geom_bde geom/bde/g_bde_work.c optional geom_bde geom/cache/g_cache.c optional geom_cache geom/concat/g_concat.c optional geom_concat geom/eli/g_eli.c optional geom_eli geom/eli/g_eli_crypto.c optional geom_eli geom/eli/g_eli_ctl.c optional geom_eli geom/eli/g_eli_hmac.c optional geom_eli geom/eli/g_eli_integrity.c optional geom_eli geom/eli/g_eli_key.c optional geom_eli geom/eli/g_eli_key_cache.c optional geom_eli geom/eli/g_eli_privacy.c optional geom_eli geom/eli/pkcs5v2.c optional geom_eli geom/gate/g_gate.c optional geom_gate geom/geom_aes.c optional geom_aes geom/geom_bsd.c optional geom_bsd geom/geom_bsd_enc.c optional geom_bsd | geom_part_bsd geom/geom_ccd.c optional ccd | geom_ccd geom/geom_ctl.c standard geom/geom_dev.c standard geom/geom_disk.c standard geom/geom_dump.c standard geom/geom_event.c standard geom/geom_fox.c optional geom_fox geom/geom_flashmap.c optional fdt cfi | fdt nand | fdt mx25l geom/geom_io.c standard geom/geom_kern.c standard geom/geom_map.c optional geom_map geom/geom_mbr.c optional geom_mbr geom/geom_mbr_enc.c optional geom_mbr geom/geom_pc98.c optional geom_pc98 geom/geom_pc98_enc.c optional geom_pc98 geom/geom_redboot.c optional geom_redboot geom/geom_slice.c standard geom/geom_subr.c standard geom/geom_sunlabel.c optional geom_sunlabel geom/geom_sunlabel_enc.c optional geom_sunlabel geom/geom_vfs.c standard geom/geom_vol_ffs.c optional geom_vol geom/journal/g_journal.c optional geom_journal geom/journal/g_journal_ufs.c optional geom_journal geom/label/g_label.c optional geom_label | geom_label_gpt geom/label/g_label_ext2fs.c optional geom_label geom/label/g_label_iso9660.c optional geom_label geom/label/g_label_msdosfs.c optional geom_label geom/label/g_label_ntfs.c optional geom_label geom/label/g_label_reiserfs.c optional geom_label geom/label/g_label_ufs.c optional geom_label geom/label/g_label_gpt.c optional geom_label | geom_label_gpt geom/label/g_label_disk_ident.c optional geom_label geom/linux_lvm/g_linux_lvm.c optional geom_linux_lvm geom/mirror/g_mirror.c optional geom_mirror geom/mirror/g_mirror_ctl.c optional geom_mirror geom/mountver/g_mountver.c optional geom_mountver geom/multipath/g_multipath.c optional geom_multipath geom/nop/g_nop.c optional geom_nop geom/part/g_part.c standard geom/part/g_part_if.m standard geom/part/g_part_apm.c optional geom_part_apm geom/part/g_part_bsd.c optional geom_part_bsd geom/part/g_part_bsd64.c optional geom_part_bsd64 geom/part/g_part_ebr.c optional geom_part_ebr geom/part/g_part_gpt.c optional geom_part_gpt geom/part/g_part_ldm.c optional geom_part_ldm geom/part/g_part_mbr.c optional geom_part_mbr geom/part/g_part_pc98.c optional geom_part_pc98 geom/part/g_part_vtoc8.c optional geom_part_vtoc8 geom/raid/g_raid.c optional geom_raid geom/raid/g_raid_ctl.c optional geom_raid geom/raid/g_raid_md_if.m optional geom_raid geom/raid/g_raid_tr_if.m optional geom_raid geom/raid/md_ddf.c optional geom_raid geom/raid/md_intel.c optional geom_raid geom/raid/md_jmicron.c optional geom_raid geom/raid/md_nvidia.c optional geom_raid geom/raid/md_promise.c optional geom_raid geom/raid/md_sii.c optional geom_raid geom/raid/tr_concat.c optional geom_raid geom/raid/tr_raid0.c optional geom_raid geom/raid/tr_raid1.c optional geom_raid geom/raid/tr_raid1e.c optional geom_raid geom/raid/tr_raid5.c optional geom_raid geom/raid3/g_raid3.c optional geom_raid3 geom/raid3/g_raid3_ctl.c optional geom_raid3 geom/shsec/g_shsec.c optional geom_shsec geom/stripe/g_stripe.c optional geom_stripe contrib/xz-embedded/freebsd/xz_malloc.c \ optional xz_embedded | geom_uzip \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_crc32.c \ optional xz_embedded | geom_uzip \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c \ optional xz_embedded | geom_uzip \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c \ optional xz_embedded | geom_uzip \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c \ optional xz_embedded | geom_uzip \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" geom/uzip/g_uzip.c optional geom_uzip geom/uzip/g_uzip_lzma.c optional geom_uzip geom/uzip/g_uzip_wrkthr.c optional geom_uzip geom/uzip/g_uzip_zlib.c optional geom_uzip geom/vinum/geom_vinum.c optional geom_vinum geom/vinum/geom_vinum_create.c optional geom_vinum geom/vinum/geom_vinum_drive.c optional geom_vinum geom/vinum/geom_vinum_plex.c optional geom_vinum geom/vinum/geom_vinum_volume.c optional geom_vinum geom/vinum/geom_vinum_subr.c optional geom_vinum geom/vinum/geom_vinum_raid5.c optional geom_vinum geom/vinum/geom_vinum_share.c optional geom_vinum geom/vinum/geom_vinum_list.c optional geom_vinum geom/vinum/geom_vinum_rm.c optional geom_vinum geom/vinum/geom_vinum_init.c optional geom_vinum geom/vinum/geom_vinum_state.c optional geom_vinum geom/vinum/geom_vinum_rename.c optional geom_vinum geom/vinum/geom_vinum_move.c optional geom_vinum geom/vinum/geom_vinum_events.c optional geom_vinum geom/virstor/binstream.c optional geom_virstor geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor geom/zero/g_zero.c optional geom_zero fs/ext2fs/ext2_alloc.c optional ext2fs fs/ext2fs/ext2_balloc.c optional ext2fs fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs fs/ext2fs/ext2_hash.c optional ext2fs fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs fs/ext2fs/ext2_vnops.c optional ext2fs # isa/isa_if.m standard isa/isa_common.c optional isa isa/isahint.c optional isa isa/pnp.c optional isa isapnp isa/pnpparse.c optional isa isapnp fs/cd9660/cd9660_bmap.c optional cd9660 fs/cd9660/cd9660_lookup.c optional cd9660 fs/cd9660/cd9660_node.c optional cd9660 fs/cd9660/cd9660_rrip.c optional cd9660 fs/cd9660/cd9660_util.c optional cd9660 fs/cd9660/cd9660_vfsops.c optional cd9660 fs/cd9660/cd9660_vnops.c optional cd9660 fs/cd9660/cd9660_iconv.c optional cd9660_iconv kern/bus_if.m standard kern/clock_if.m standard kern/cpufreq_if.m standard kern/device_if.m standard kern/imgact_binmisc.c optional imagact_binmisc kern/imgact_elf.c standard kern/imgact_elf32.c optional compat_freebsd32 kern/imgact_shell.c standard kern/inflate.c optional gzip kern/init_main.c standard kern/init_sysent.c standard kern/ksched.c optional _kposix_priority_scheduling kern/kern_acct.c standard kern/kern_alq.c optional alq kern/kern_clock.c standard kern/kern_condvar.c standard kern/kern_conf.c standard kern/kern_cons.c standard kern/kern_cpu.c standard kern/kern_cpuset.c standard kern/kern_context.c standard kern/kern_descrip.c standard kern/kern_dtrace.c optional kdtrace_hooks kern/kern_dump.c standard kern/kern_environment.c standard kern/kern_et.c standard kern/kern_event.c standard kern/kern_exec.c standard kern/kern_exit.c standard kern/kern_fail.c standard kern/kern_ffclock.c standard kern/kern_fork.c standard kern/kern_gzio.c optional gzio kern/kern_hhook.c standard kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard kern/kern_khelp.c standard kern/kern_kthread.c standard kern/kern_ktr.c optional ktr kern/kern_ktrace.c standard kern/kern_linker.c standard kern/kern_lock.c standard kern/kern_lockf.c standard kern/kern_lockstat.c optional kdtrace_hooks kern/kern_loginclass.c standard kern/kern_malloc.c standard kern/kern_mbuf.c standard kern/kern_mib.c standard kern/kern_module.c standard kern/kern_mtxpool.c standard kern/kern_mutex.c standard kern/kern_ntptime.c standard kern/kern_numa.c standard kern/kern_osd.c standard kern/kern_physio.c standard kern/kern_pmc.c standard kern/kern_poll.c optional device_polling kern/kern_priv.c standard kern/kern_proc.c standard kern/kern_procctl.c standard kern/kern_prot.c standard kern/kern_racct.c standard kern/kern_rangelock.c standard kern/kern_rctl.c standard kern/kern_resource.c standard kern/kern_rmlock.c standard kern/kern_rwlock.c standard kern/kern_sdt.c optional kdtrace_hooks kern/kern_sema.c standard kern/kern_sendfile.c standard kern/kern_sharedpage.c standard kern/kern_shutdown.c standard kern/kern_sig.c standard kern/kern_switch.c standard kern/kern_sx.c standard kern/kern_synch.c standard kern/kern_syscalls.c standard kern/kern_sysctl.c standard kern/kern_tc.c standard kern/kern_thr.c standard kern/kern_thread.c standard kern/kern_time.c standard kern/kern_timeout.c standard kern/kern_umtx.c standard kern/kern_uuid.c standard kern/kern_xxx.c standard kern/link_elf.c standard kern/linker_if.m standard kern/md4c.c optional netsmb kern/md5c.c standard kern/p1003_1b.c standard kern/posix4_mib.c standard kern/sched_4bsd.c optional sched_4bsd kern/sched_ule.c optional sched_ule kern/serdev_if.m standard kern/stack_protector.c standard \ compile-with "${NORMAL_C:N-fstack-protector*}" kern/subr_acl_nfs4.c optional ufs_acl | zfs kern/subr_acl_posix1e.c optional ufs_acl kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_bus.c standard kern/subr_bus_dma.c standard kern/subr_bufring.c standard kern/subr_capability.c standard kern/subr_clock.c standard kern/subr_counter.c standard kern/subr_devstat.c standard kern/subr_disk.c standard kern/subr_eventhandler.c standard kern/subr_fattime.c standard kern/subr_firmware.c optional firmware kern/subr_gtaskqueue.c standard kern/subr_hash.c standard kern/subr_hints.c standard kern/subr_kdb.c standard kern/subr_kobj.c standard kern/subr_lock.c standard kern/subr_log.c standard kern/subr_mbpool.c optional libmbpool kern/subr_mchain.c optional libmchain kern/subr_module.c standard kern/subr_msgbuf.c standard kern/subr_param.c standard kern/subr_pcpu.c standard kern/subr_pctrie.c standard kern/subr_power.c standard kern/subr_prf.c standard kern/subr_prof.c standard kern/subr_rman.c standard kern/subr_rtc.c standard kern/subr_sbuf.c standard kern/subr_scanf.c standard kern/subr_sglist.c standard kern/subr_sleepqueue.c standard kern/subr_smp.c standard kern/subr_stack.c optional ddb | stack | ktr kern/subr_taskqueue.c standard kern/subr_terminal.c optional vt kern/subr_trap.c standard kern/subr_turnstile.c standard kern/subr_uio.c standard kern/subr_unit.c standard kern/subr_vmem.c standard kern/subr_witness.c optional witness kern/sys_capability.c standard kern/sys_generic.c standard kern/sys_pipe.c standard kern/sys_procdesc.c standard kern/sys_process.c standard kern/sys_socket.c standard kern/syscalls.c standard kern/sysv_ipc.c standard kern/sysv_msg.c optional sysvmsg kern/sysv_sem.c optional sysvsem kern/sysv_shm.c optional sysvshm kern/tty.c standard kern/tty_compat.c optional compat_43tty kern/tty_info.c standard kern/tty_inq.c standard kern/tty_outq.c standard kern/tty_pts.c standard kern/tty_tty.c standard kern/tty_ttydisc.c standard kern/uipc_accf.c standard kern/uipc_debug.c optional ddb kern/uipc_domain.c standard kern/uipc_mbuf.c standard kern/uipc_mbuf2.c standard kern/uipc_mbufhash.c standard kern/uipc_mqueue.c optional p1003_1b_mqueue kern/uipc_sem.c optional p1003_1b_semaphores kern/uipc_shm.c standard kern/uipc_sockbuf.c standard kern/uipc_socket.c standard kern/uipc_syscalls.c standard kern/uipc_usrreq.c standard kern/vfs_acl.c standard kern/vfs_aio.c standard kern/vfs_bio.c standard kern/vfs_cache.c standard kern/vfs_cluster.c standard kern/vfs_default.c standard kern/vfs_export.c standard kern/vfs_extattr.c standard kern/vfs_hash.c standard kern/vfs_init.c standard kern/vfs_lookup.c standard kern/vfs_mount.c standard kern/vfs_mountroot.c standard kern/vfs_subr.c standard kern/vfs_syscalls.c standard kern/vfs_vnops.c standard # # Kernel GSS-API # gssd.h optional kgssapi \ dependency "$S/kgssapi/gssd.x" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h" \ no-obj no-implicit-rule before-depend local \ clean "gssd.h" gssd_xdr.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c" \ no-implicit-rule before-depend local \ clean "gssd_xdr.c" gssd_clnt.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c" \ no-implicit-rule before-depend local \ clean "gssd_clnt.c" kgssapi/gss_accept_sec_context.c optional kgssapi kgssapi/gss_add_oid_set_member.c optional kgssapi kgssapi/gss_acquire_cred.c optional kgssapi kgssapi/gss_canonicalize_name.c optional kgssapi kgssapi/gss_create_empty_oid_set.c optional kgssapi kgssapi/gss_delete_sec_context.c optional kgssapi kgssapi/gss_display_status.c optional kgssapi kgssapi/gss_export_name.c optional kgssapi kgssapi/gss_get_mic.c optional kgssapi kgssapi/gss_init_sec_context.c optional kgssapi kgssapi/gss_impl.c optional kgssapi kgssapi/gss_import_name.c optional kgssapi kgssapi/gss_names.c optional kgssapi kgssapi/gss_pname_to_uid.c optional kgssapi kgssapi/gss_release_buffer.c optional kgssapi kgssapi/gss_release_cred.c optional kgssapi kgssapi/gss_release_name.c optional kgssapi kgssapi/gss_release_oid_set.c optional kgssapi kgssapi/gss_set_cred_option.c optional kgssapi kgssapi/gss_test_oid_set_member.c optional kgssapi kgssapi/gss_unwrap.c optional kgssapi kgssapi/gss_verify_mic.c optional kgssapi kgssapi/gss_wrap.c optional kgssapi kgssapi/gss_wrap_size_limit.c optional kgssapi kgssapi/gssd_prot.c optional kgssapi kgssapi/krb5/krb5_mech.c optional kgssapi kgssapi/krb5/kcrypto.c optional kgssapi kgssapi/krb5/kcrypto_aes.c optional kgssapi kgssapi/krb5/kcrypto_arcfour.c optional kgssapi kgssapi/krb5/kcrypto_des.c optional kgssapi kgssapi/krb5/kcrypto_des3.c optional kgssapi kgssapi/kgss_if.m optional kgssapi kgssapi/gsstest.c optional kgssapi_debug # These files in libkern/ are those needed by all architectures. Some # of the files in libkern/ are only needed on some architectures, e.g., # libkern/divdi3.c is needed by i386 but not alpha. Also, some of these # routines may be optimized for a particular platform. In either case, # the file should be moved to conf/files. from here. # libkern/arc4random.c standard libkern/asprintf.c standard libkern/bcd.c standard libkern/bsearch.c standard libkern/crc32.c standard libkern/explicit_bzero.c standard libkern/fnmatch.c standard libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv libkern/iconv_ucs.c optional libiconv libkern/iconv_xlat.c optional libiconv libkern/iconv_xlat16.c optional libiconv libkern/inet_aton.c standard libkern/inet_ntoa.c standard libkern/inet_ntop.c standard libkern/inet_pton.c standard libkern/jenkins_hash.c standard libkern/murmur3_32.c standard libkern/mcount.c optional profiling-routine libkern/memcchr.c standard libkern/memchr.c standard libkern/memcmp.c standard libkern/memmem.c optional gdb libkern/qsort.c standard libkern/qsort_r.c standard libkern/random.c standard libkern/scanc.c standard libkern/strcasecmp.c standard libkern/strcat.c standard libkern/strchr.c standard libkern/strcmp.c standard libkern/strcpy.c standard libkern/strcspn.c standard libkern/strdup.c standard libkern/strndup.c standard libkern/strlcat.c standard libkern/strlcpy.c standard libkern/strlen.c standard libkern/strncat.c standard libkern/strncmp.c standard libkern/strncpy.c standard libkern/strnlen.c standard libkern/strrchr.c standard libkern/strsep.c standard libkern/strspn.c standard libkern/strstr.c standard libkern/strtol.c standard libkern/strtoq.c standard libkern/strtoul.c standard libkern/strtouq.c standard libkern/strvalid.c standard libkern/timingsafe_bcmp.c standard libkern/zlib.c optional crypto | geom_uzip | ipsec | \ mxge | netgraph_deflate | \ ddb_ctf | gzio net/altq/altq_cbq.c optional altq net/altq/altq_cdnr.c optional altq net/altq/altq_codel.c optional altq net/altq/altq_hfsc.c optional altq net/altq/altq_fairq.c optional altq net/altq/altq_priq.c optional altq net/altq/altq_red.c optional altq net/altq/altq_rio.c optional altq net/altq/altq_rmclass.c optional altq net/altq/altq_subr.c optional altq net/bpf.c standard net/bpf_buffer.c optional bpf net/bpf_jitter.c optional bpf_jitter net/bpf_filter.c optional bpf | netgraph_bpf net/bpf_zerocopy.c optional bpf net/bridgestp.c optional bridge | if_bridge net/flowtable.c optional flowtable inet | flowtable inet6 net/ieee8023ad_lacp.c optional lagg net/if.c standard net/if_arcsubr.c optional arcnet net/if_atmsubr.c optional atm net/if_bridge.c optional bridge inet | if_bridge inet net/if_clone.c standard net/if_dead.c standard net/if_debug.c optional ddb net/if_disc.c optional disc net/if_edsc.c optional edsc net/if_enc.c optional enc inet | enc inet6 net/if_epair.c optional epair net/if_ethersubr.c optional ether net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip net/if_gif.c optional gif inet | gif inet6 | \ netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet | gre inet6 net/if_iso88025subr.c optional token net/if_lagg.c optional lagg net/if_loop.c optional loop net/if_llatbl.c standard net/if_me.c optional me inet net/if_media.c standard net/if_mib.c standard net/if_spppfr.c optional sppp | netgraph_sppp net/if_spppsubr.c optional sppp | netgraph_sppp net/if_stf.c optional stf inet inet6 net/if_tun.c optional tun net/if_tap.c optional tap net/if_vlan.c optional vlan net/if_vxlan.c optional vxlan inet | vxlan inet6 net/ifdi_if.m optional ether pci net/iflib.c optional ether pci net/mp_ring.c optional ether net/mppcc.c optional netgraph_mppc_compression net/mppcd.c optional netgraph_mppc_compression net/netisr.c standard net/pfil.c optional ether | inet net/radix.c standard net/radix_mpath.c standard net/raw_cb.c standard net/raw_usrreq.c standard net/route.c standard net/rss_config.c optional inet rss | inet6 rss net/rtsock.c standard net/slcompress.c optional netgraph_vjc | sppp | \ netgraph_sppp net/toeplitz.c optional inet rss | inet6 rss net/vnet.c optional vimage net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl net80211/ieee80211_action.c optional wlan net80211/ieee80211_ageq.c optional wlan net80211/ieee80211_adhoc.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_ageq.c optional wlan net80211/ieee80211_amrr.c optional wlan | wlan_amrr net80211/ieee80211_crypto.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_crypto_ccmp.c optional wlan wlan_ccmp net80211/ieee80211_crypto_none.c optional wlan net80211/ieee80211_crypto_tkip.c optional wlan wlan_tkip net80211/ieee80211_crypto_wep.c optional wlan wlan_wep net80211/ieee80211_ddb.c optional wlan ddb net80211/ieee80211_dfs.c optional wlan net80211/ieee80211_freebsd.c optional wlan net80211/ieee80211_hostap.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_ht.c optional wlan net80211/ieee80211_hwmp.c optional wlan ieee80211_support_mesh net80211/ieee80211_input.c optional wlan net80211/ieee80211_ioctl.c optional wlan net80211/ieee80211_mesh.c optional wlan ieee80211_support_mesh \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_monitor.c optional wlan net80211/ieee80211_node.c optional wlan net80211/ieee80211_output.c optional wlan net80211/ieee80211_phy.c optional wlan net80211/ieee80211_power.c optional wlan net80211/ieee80211_proto.c optional wlan net80211/ieee80211_radiotap.c optional wlan net80211/ieee80211_ratectl.c optional wlan net80211/ieee80211_ratectl_none.c optional wlan net80211/ieee80211_regdomain.c optional wlan net80211/ieee80211_rssadapt.c optional wlan wlan_rssadapt net80211/ieee80211_scan.c optional wlan net80211/ieee80211_scan_sta.c optional wlan net80211/ieee80211_sta.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_superg.c optional wlan ieee80211_support_superg net80211/ieee80211_scan_sw.c optional wlan net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan wlan_xauth net80211/ieee80211_alq.c optional wlan ieee80211_alq netgraph/atm/ccatm/ng_ccatm.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/ng_atm.c optional ngatm_atm netgraph/atm/ngatmbase.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/sscfu/ng_sscfu.c optional ngatm_sscfu \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/sscop/ng_sscop.c optional ngatm_sscop \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/uni/ng_uni.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/bluetooth/common/ng_bluetooth.c optional netgraph_bluetooth netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c optional netgraph_bluetooth_bt3c netgraph/bluetooth/drivers/h4/ng_h4.c optional netgraph_bluetooth_h4 netgraph/bluetooth/drivers/ubt/ng_ubt.c optional netgraph_bluetooth_ubt usb netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c optional netgraph_bluetooth_ubtbcmfw usb netgraph/bluetooth/hci/ng_hci_cmds.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_evnt.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_main.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_misc.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_ulpi.c optional netgraph_bluetooth_hci netgraph/bluetooth/l2cap/ng_l2cap_cmds.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_evnt.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_llpi.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_main.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_misc.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/socket/ng_btsocket.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_hci_raw.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_l2cap.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_rfcomm.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_sco.c optional netgraph_bluetooth_socket netgraph/netflow/netflow.c optional netgraph_netflow netgraph/netflow/netflow_v9.c optional netgraph_netflow netgraph/netflow/ng_netflow.c optional netgraph_netflow netgraph/ng_UI.c optional netgraph_UI netgraph/ng_async.c optional netgraph_async netgraph/ng_atmllc.c optional netgraph_atmllc netgraph/ng_base.c optional netgraph netgraph/ng_bpf.c optional netgraph_bpf netgraph/ng_bridge.c optional netgraph_bridge netgraph/ng_car.c optional netgraph_car netgraph/ng_cisco.c optional netgraph_cisco netgraph/ng_deflate.c optional netgraph_deflate netgraph/ng_device.c optional netgraph_device netgraph/ng_echo.c optional netgraph_echo netgraph/ng_eiface.c optional netgraph_eiface netgraph/ng_ether.c optional netgraph_ether netgraph/ng_ether_echo.c optional netgraph_ether_echo netgraph/ng_frame_relay.c optional netgraph_frame_relay netgraph/ng_gif.c optional netgraph_gif inet6 | netgraph_gif inet netgraph/ng_gif_demux.c optional netgraph_gif_demux netgraph/ng_hole.c optional netgraph_hole netgraph/ng_iface.c optional netgraph_iface netgraph/ng_ip_input.c optional netgraph_ip_input netgraph/ng_ipfw.c optional netgraph_ipfw inet ipfirewall netgraph/ng_ksocket.c optional netgraph_ksocket netgraph/ng_l2tp.c optional netgraph_l2tp netgraph/ng_lmi.c optional netgraph_lmi netgraph/ng_mppc.c optional netgraph_mppc_compression | \ netgraph_mppc_encryption netgraph/ng_nat.c optional netgraph_nat inet libalias netgraph/ng_one2many.c optional netgraph_one2many netgraph/ng_parse.c optional netgraph netgraph/ng_patch.c optional netgraph_patch netgraph/ng_pipe.c optional netgraph_pipe netgraph/ng_ppp.c optional netgraph_ppp netgraph/ng_pppoe.c optional netgraph_pppoe netgraph/ng_pptpgre.c optional netgraph_pptpgre netgraph/ng_pred1.c optional netgraph_pred1 netgraph/ng_rfc1490.c optional netgraph_rfc1490 netgraph/ng_socket.c optional netgraph_socket netgraph/ng_split.c optional netgraph_split netgraph/ng_sppp.c optional netgraph_sppp netgraph/ng_tag.c optional netgraph_tag netgraph/ng_tcpmss.c optional netgraph_tcpmss netgraph/ng_tee.c optional netgraph_tee netgraph/ng_tty.c optional netgraph_tty netgraph/ng_vjc.c optional netgraph_vjc netgraph/ng_vlan.c optional netgraph_vlan netinet/accf_data.c optional accept_filter_data inet netinet/accf_dns.c optional accept_filter_dns inet netinet/accf_http.c optional accept_filter_http inet netinet/if_atm.c optional atm netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet netinet/in_debug.c optional inet ddb netinet/in_kdtrace.c optional inet | inet6 netinet/ip_carp.c optional inet carp | inet6 carp netinet/in_fib.c optional inet netinet/in_gif.c optional gif inet | netgraph_gif inet netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet netinet/in_jail.c optional inet netinet/in_mcast.c optional inet netinet/in_pcb.c optional inet | inet6 netinet/in_pcbgroup.c optional inet pcbgroup | inet6 pcbgroup netinet/in_prot.c optional inet | inet6 netinet/in_proto.c optional inet | inet6 netinet/in_rmx.c optional inet netinet/in_rss.c optional inet rss netinet/ip_divert.c optional inet ipdivert ipfirewall netinet/ip_ecn.c optional inet | inet6 netinet/ip_encap.c optional inet | inet6 netinet/ip_fastfwd.c optional inet netinet/ip_icmp.c optional inet | inet6 netinet/ip_input.c optional inet netinet/ip_ipsec.c optional inet ipsec netinet/ip_mroute.c optional mrouting inet netinet/ip_options.c optional inet netinet/ip_output.c optional inet netinet/ip_reass.c optional inet netinet/raw_ip.c optional inet | inet6 netinet/cc/cc.c optional inet | inet6 netinet/cc/cc_newreno.c optional inet | inet6 netinet/sctp_asconf.c optional inet sctp | inet6 sctp netinet/sctp_auth.c optional inet sctp | inet6 sctp netinet/sctp_bsd_addr.c optional inet sctp | inet6 sctp netinet/sctp_cc_functions.c optional inet sctp | inet6 sctp netinet/sctp_crc32.c optional inet sctp | inet6 sctp netinet/sctp_indata.c optional inet sctp | inet6 sctp netinet/sctp_input.c optional inet sctp | inet6 sctp netinet/sctp_output.c optional inet sctp | inet6 sctp netinet/sctp_pcb.c optional inet sctp | inet6 sctp netinet/sctp_peeloff.c optional inet sctp | inet6 sctp netinet/sctp_ss_functions.c optional inet sctp | inet6 sctp netinet/sctp_syscalls.c optional inet sctp | inet6 sctp netinet/sctp_sysctl.c optional inet sctp | inet6 sctp netinet/sctp_timer.c optional inet sctp | inet6 sctp netinet/sctp_usrreq.c optional inet sctp | inet6 sctp netinet/sctputil.c optional inet sctp | inet6 sctp netinet/siftr.c optional inet siftr alq | inet6 siftr alq netinet/tcp_debug.c optional tcpdebug netinet/tcp_fastopen.c optional inet tcp_rfc7413 | inet6 tcp_rfc7413 netinet/tcp_hostcache.c optional inet | inet6 netinet/tcp_input.c optional inet | inet6 netinet/tcp_lro.c optional inet | inet6 netinet/tcp_output.c optional inet | inet6 netinet/tcp_offload.c optional tcp_offload inet | tcp_offload inet6 netinet/tcp_pcap.c optional inet tcppcap | inet6 tcppcap netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 netinet/tcp_subr.c optional inet | inet6 netinet/tcp_syncache.c optional inet | inet6 netinet/tcp_timer.c optional inet | inet6 netinet/tcp_timewait.c optional inet | inet6 netinet/tcp_usrreq.c optional inet | inet6 netinet/udp_usrreq.c optional inet | inet6 netinet/libalias/alias.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_db.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_mod.c optional libalias | netgraph_nat netinet/libalias/alias_proxy.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_util.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_sctp.c optional libalias inet | netgraph_nat inet netinet6/dest6.c optional inet6 netinet6/frag6.c optional inet6 netinet6/icmp6.c optional inet6 netinet6/in6.c optional inet6 netinet6/in6_cksum.c optional inet6 netinet6/in6_fib.c optional inet6 netinet6/in6_gif.c optional gif inet6 | netgraph_gif inet6 netinet6/in6_ifattach.c optional inet6 netinet6/in6_jail.c optional inet6 netinet6/in6_mcast.c optional inet6 netinet6/in6_pcb.c optional inet6 netinet6/in6_pcbgroup.c optional inet6 pcbgroup netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 netinet6/in6_rss.c optional inet6 rss netinet6/in6_src.c optional inet6 netinet6/ip6_forward.c optional inet6 netinet6/ip6_gre.c optional gre inet6 netinet6/ip6_id.c optional inet6 netinet6/ip6_input.c optional inet6 netinet6/ip6_mroute.c optional mrouting inet6 netinet6/ip6_output.c optional inet6 netinet6/ip6_ipsec.c optional inet6 ipsec netinet6/mld6.c optional inet6 netinet6/nd6.c optional inet6 netinet6/nd6_nbr.c optional inet6 netinet6/nd6_rtr.c optional inet6 netinet6/raw_ip6.c optional inet6 netinet6/route6.c optional inet6 netinet6/scope6.c optional inet6 netinet6/sctp6_usrreq.c optional inet6 sctp netinet6/udp6_usrreq.c optional inet6 netipsec/ipsec.c optional ipsec inet | ipsec inet6 netipsec/ipsec_input.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mbuf.c optional ipsec inet | ipsec inet6 netipsec/ipsec_output.c optional ipsec inet | ipsec inet6 netipsec/key.c optional ipsec inet | ipsec inet6 netipsec/key_debug.c optional ipsec inet | ipsec inet6 netipsec/keysock.c optional ipsec inet | ipsec inet6 netipsec/xform_ah.c optional ipsec inet | ipsec inet6 netipsec/xform_esp.c optional ipsec inet | ipsec inet6 netipsec/xform_ipcomp.c optional ipsec inet | ipsec inet6 netipsec/xform_tcp.c optional ipsec inet tcp_signature | \ ipsec inet6 tcp_signature netnatm/natm.c optional natm netnatm/natm_pcb.c optional natm netnatm/natm_proto.c optional natm netpfil/ipfw/dn_aqm_codel.c optional inet dummynet netpfil/ipfw/dn_aqm_pie.c optional inet dummynet netpfil/ipfw/dn_heap.c optional inet dummynet netpfil/ipfw/dn_sched_fifo.c optional inet dummynet netpfil/ipfw/dn_sched_fq_codel.c optional inet dummynet netpfil/ipfw/dn_sched_fq_pie.c optional inet dummynet netpfil/ipfw/dn_sched_prio.c optional inet dummynet netpfil/ipfw/dn_sched_qfq.c optional inet dummynet netpfil/ipfw/dn_sched_rr.c optional inet dummynet netpfil/ipfw/dn_sched_wf2q.c optional inet dummynet netpfil/ipfw/ip_dummynet.c optional inet dummynet netpfil/ipfw/ip_dn_io.c optional inet dummynet netpfil/ipfw/ip_dn_glue.c optional inet dummynet netpfil/ipfw/ip_fw2.c optional inet ipfirewall netpfil/ipfw/ip_fw_bpf.c optional inet ipfirewall netpfil/ipfw/ip_fw_dynamic.c optional inet ipfirewall netpfil/ipfw/ip_fw_eaction.c optional inet ipfirewall netpfil/ipfw/ip_fw_log.c optional inet ipfirewall netpfil/ipfw/ip_fw_pfil.c optional inet ipfirewall netpfil/ipfw/ip_fw_sockopt.c optional inet ipfirewall netpfil/ipfw/ip_fw_table.c optional inet ipfirewall netpfil/ipfw/ip_fw_table_algo.c optional inet ipfirewall netpfil/ipfw/ip_fw_table_value.c optional inet ipfirewall netpfil/ipfw/ip_fw_iface.c optional inet ipfirewall netpfil/ipfw/ip_fw_nat.c optional inet ipfirewall_nat netpfil/ipfw/nat64/ip_fw_nat64.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64stl.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64stl_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64_translate.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nptv6/ip_fw_nptv6.c optional inet inet6 ipfirewall \ ipfirewall_nptv6 netpfil/ipfw/nptv6/nptv6.c optional inet inet6 ipfirewall \ ipfirewall_nptv6 netpfil/pf/if_pflog.c optional pflog pf inet netpfil/pf/if_pfsync.c optional pfsync pf inet netpfil/pf/pf.c optional pf inet netpfil/pf/pf_if.c optional pf inet netpfil/pf/pf_ioctl.c optional pf inet netpfil/pf/pf_lb.c optional pf inet netpfil/pf/pf_norm.c optional pf inet netpfil/pf/pf_osfp.c optional pf inet netpfil/pf/pf_ruleset.c optional pf inet netpfil/pf/pf_table.c optional pf inet netpfil/pf/in4_cksum.c optional pf inet netsmb/smb_conn.c optional netsmb netsmb/smb_crypt.c optional netsmb netsmb/smb_dev.c optional netsmb netsmb/smb_iod.c optional netsmb netsmb/smb_rq.c optional netsmb netsmb/smb_smb.c optional netsmb netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb nfs/bootp_subr.c optional bootp nfscl nfs/krpc_subr.c optional bootp nfscl nfs/nfs_diskless.c optional nfscl nfs_root nfs/nfs_fha.c optional nfsd nfs/nfs_lock.c optional nfscl | nfslockd | nfsd nfs/nfs_nfssvc.c optional nfscl | nfsd nlm/nlm_advlock.c optional nfslockd | nfsd nlm/nlm_prot_clnt.c optional nfslockd | nfsd nlm/nlm_prot_impl.c optional nfslockd | nfsd nlm/nlm_prot_server.c optional nfslockd | nfsd nlm/nlm_prot_svc.c optional nfslockd | nfsd nlm/nlm_prot_xdr.c optional nfslockd | nfsd nlm/sm_inter_xdr.c optional nfslockd | nfsd # Linux Kernel Programming Interface compat/linuxkpi/common/src/linux_kmod.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_compat.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_pci.c optional compat_linuxkpi pci \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_idr.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_radix.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_usb.c optional compat_linuxkpi usb \ compile-with "${LINUXKPI_C}" # OpenFabrics Enterprise Distribution (Infiniband) ofed/drivers/infiniband/core/addr.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/agent.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/cache.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" # XXX Mad.c must be ordered before cm.c for sysinit sets to occur in # the correct order. ofed/drivers/infiniband/core/mad.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/cm.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/ -Wno-unused-function" ofed/drivers/infiniband/core/cma.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/device.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/fmr_pool.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/iwcm.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/mad_rmpp.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/multicast.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/packer.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/peer_mem.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/sa_query.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/smi.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/sysfs.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ucm.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ucma.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ud_header.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/umem.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/user_mad.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_cmd.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_main.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_marshall.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/verbs.c optional ofed \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c optional ipoib \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c optional ipoib \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_main.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_rx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_exp.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_sys_tune.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_flow_table.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fw.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_health.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mad.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_main.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mcg.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mr.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pagealloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_port.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_qp.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_srq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_transobj.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_uar.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_vport.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_ethtool.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_main.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_tx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_flow_table.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_rx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_txrx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_allocator.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_av.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_catas.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_cmd.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_cq.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_eq.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mad.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_main.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mcg.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_memfree.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mr.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_pd.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_profile.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_provider.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_qp.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_reset.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_srq.c optional mthca \ compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_uar.c optional mthca \ compile-with "${OFED_C}" # crypto support opencrypto/cast.c optional crypto | ipsec opencrypto/criov.c optional crypto | ipsec opencrypto/crypto.c optional crypto | ipsec opencrypto/cryptodev.c optional cryptodev opencrypto/cryptodev_if.m optional crypto | ipsec opencrypto/cryptosoft.c optional crypto | ipsec opencrypto/cryptodeflate.c optional crypto | ipsec opencrypto/gmac.c optional crypto | ipsec opencrypto/gfmult.c optional crypto | ipsec opencrypto/rmd160.c optional crypto | ipsec opencrypto/skipjack.c optional crypto | ipsec opencrypto/xform.c optional crypto | ipsec rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_bck.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_dg.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_rc.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_vc.c optional krpc | nfslockd | nfscl | nfsd rpc/getnetconfig.c optional krpc | nfslockd | nfscl | nfsd rpc/replay.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_callmsg.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_generic.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcb_clnt.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcb_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/svc.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_auth.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_dg.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_generic.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_vc.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcsec_gss/rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_conf.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_misc.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_prot.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/svc_rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi security/audit/audit.c optional audit security/audit/audit_arg.c optional audit security/audit/audit_bsm.c optional audit security/audit/audit_bsm_klib.c optional audit security/audit/audit_pipe.c optional audit security/audit/audit_syscalls.c standard security/audit/audit_trigger.c optional audit security/audit/audit_worker.c optional audit security/audit/bsm_domain.c optional audit security/audit/bsm_errno.c optional audit security/audit/bsm_fcntl.c optional audit security/audit/bsm_socket_type.c optional audit security/audit/bsm_token.c optional audit security/mac/mac_audit.c optional mac audit security/mac/mac_cred.c optional mac security/mac/mac_framework.c optional mac security/mac/mac_inet.c optional mac inet | mac inet6 security/mac/mac_inet6.c optional mac inet6 security/mac/mac_label.c optional mac security/mac/mac_net.c optional mac security/mac/mac_pipe.c optional mac security/mac/mac_posix_sem.c optional mac security/mac/mac_posix_shm.c optional mac security/mac/mac_priv.c optional mac security/mac/mac_process.c optional mac security/mac/mac_socket.c optional mac security/mac/mac_syscalls.c standard security/mac/mac_system.c optional mac security/mac/mac_sysv_msg.c optional mac security/mac/mac_sysv_sem.c optional mac security/mac/mac_sysv_shm.c optional mac security/mac/mac_vfs.c optional mac security/mac_biba/mac_biba.c optional mac_biba security/mac_bsdextended/mac_bsdextended.c optional mac_bsdextended security/mac_bsdextended/ugidfw_system.c optional mac_bsdextended security/mac_bsdextended/ugidfw_vnode.c optional mac_bsdextended security/mac_ifoff/mac_ifoff.c optional mac_ifoff security/mac_lomac/mac_lomac.c optional mac_lomac security/mac_mls/mac_mls.c optional mac_mls security/mac_none/mac_none.c optional mac_none security/mac_partition/mac_partition.c optional mac_partition security/mac_portacl/mac_portacl.c optional mac_portacl security/mac_seeotheruids/mac_seeotheruids.c optional mac_seeotheruids security/mac_stub/mac_stub.c optional mac_stub security/mac_test/mac_test.c optional mac_test teken/teken.c optional sc | vt ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs ufs/ffs/ffs_inode.c optional ffs ufs/ffs/ffs_snapshot.c optional ffs ufs/ffs/ffs_softdep.c optional ffs ufs/ffs/ffs_subr.c optional ffs ufs/ffs/ffs_tables.c optional ffs ufs/ffs/ffs_vfsops.c optional ffs ufs/ffs/ffs_vnops.c optional ffs ufs/ffs/ffs_rawread.c optional ffs directio ufs/ffs/ffs_suspend.c optional ffs ufs/ufs/ufs_acl.c optional ffs ufs/ufs/ufs_bmap.c optional ffs ufs/ufs/ufs_dirhash.c optional ffs ufs/ufs/ufs_extattr.c optional ffs ufs/ufs/ufs_gjournal.c optional ffs UFS_GJOURNAL ufs/ufs/ufs_inode.c optional ffs ufs/ufs/ufs_lookup.c optional ffs ufs/ufs/ufs_quota.c optional ffs ufs/ufs/ufs_vfsops.c optional ffs ufs/ufs/ufs_vnops.c optional ffs vm/default_pager.c standard vm/device_pager.c standard vm/phys_pager.c standard vm/redzone.c optional DEBUG_REDZONE vm/sg_pager.c standard vm/swap_pager.c standard vm/uma_core.c standard vm/uma_dbg.c standard vm/memguard.c optional DEBUG_MEMGUARD vm/vm_fault.c standard vm/vm_glue.c standard vm/vm_init.c standard vm/vm_kern.c standard vm/vm_map.c standard vm/vm_meter.c standard vm/vm_mmap.c standard vm/vm_object.c standard vm/vm_page.c standard vm/vm_pageout.c standard vm/vm_pager.c standard vm/vm_phys.c standard vm/vm_radix.c standard vm/vm_reserv.c standard vm/vm_domain.c standard vm/vm_unix.c standard vm/vnode_pager.c standard xen/features.c optional xenhvm xen/xenbus/xenbus_if.m optional xenhvm xen/xenbus/xenbus.c optional xenhvm xen/xenbus/xenbusb_if.m optional xenhvm xen/xenbus/xenbusb.c optional xenhvm xen/xenbus/xenbusb_front.c optional xenhvm xen/xenbus/xenbusb_back.c optional xenhvm xen/xenmem/xenmem_if.m optional xenhvm xdr/xdr.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_array.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_mbuf.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_mem.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_reference.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_sizeof.c optional krpc | nfslockd | nfscl | nfsd Index: head/sys/dev/al_eth/al_eth.c =================================================================== --- head/sys/dev/al_eth/al_eth.c (nonexistent) +++ head/sys/dev/al_eth/al_eth.c (revision 307670) @@ -0,0 +1,3584 @@ +/*- + * Copyright (c) 2015,2016 Annapurna Labs Ltd. and affiliates + * All rights reserved. + * + * Developed by Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "opt_inet.h" +#include "opt_inet6.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef INET +#include +#include +#include +#include +#endif + +#ifdef INET6 +#include +#endif + +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "al_eth.h" +#include "al_init_eth_lm.h" +#include "arm/annapurna/alpine/alpine_serdes.h" + +#include "miibus_if.h" + +#define device_printf_dbg(fmt, ...) do { \ + if (AL_DBG_LEVEL >= AL_DBG_LEVEL_DBG) { AL_DBG_LOCK(); \ + device_printf(fmt, __VA_ARGS__); AL_DBG_UNLOCK();} \ + } while (0) + +MALLOC_DEFINE(M_IFAL, "if_al_malloc", "All allocated data for AL ETH driver"); + +/* move out to some pci header file */ +#define PCI_VENDOR_ID_ANNAPURNA_LABS 0x1c36 +#define PCI_DEVICE_ID_AL_ETH 0x0001 +#define PCI_DEVICE_ID_AL_ETH_ADVANCED 0x0002 +#define PCI_DEVICE_ID_AL_ETH_NIC 0x0003 +#define PCI_DEVICE_ID_AL_ETH_FPGA_NIC 0x0030 +#define PCI_DEVICE_ID_AL_CRYPTO 0x0011 +#define PCI_DEVICE_ID_AL_CRYPTO_VF 0x8011 +#define PCI_DEVICE_ID_AL_RAID_DMA 0x0021 +#define PCI_DEVICE_ID_AL_RAID_DMA_VF 0x8021 +#define PCI_DEVICE_ID_AL_USB 0x0041 + +#define MAC_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x" +#define MAC_ADDR(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5] + +#define AL_ETH_MAC_TABLE_UNICAST_IDX_BASE 0 +#define AL_ETH_MAC_TABLE_UNICAST_MAX_COUNT 4 +#define AL_ETH_MAC_TABLE_ALL_MULTICAST_IDX (AL_ETH_MAC_TABLE_UNICAST_IDX_BASE + \ + AL_ETH_MAC_TABLE_UNICAST_MAX_COUNT) + +#define AL_ETH_MAC_TABLE_DROP_IDX (AL_ETH_FWD_MAC_NUM - 1) +#define AL_ETH_MAC_TABLE_BROADCAST_IDX (AL_ETH_MAC_TABLE_DROP_IDX - 1) + +#define AL_ETH_THASH_UDMA_SHIFT 0 +#define AL_ETH_THASH_UDMA_MASK (0xF << AL_ETH_THASH_UDMA_SHIFT) + +#define AL_ETH_THASH_Q_SHIFT 4 +#define AL_ETH_THASH_Q_MASK (0x3 << AL_ETH_THASH_Q_SHIFT) + +/* the following defines should be moved to hal */ +#define AL_ETH_FSM_ENTRY_IPV4_TCP 0 +#define AL_ETH_FSM_ENTRY_IPV4_UDP 1 +#define AL_ETH_FSM_ENTRY_IPV6_TCP 2 +#define AL_ETH_FSM_ENTRY_IPV6_UDP 3 +#define AL_ETH_FSM_ENTRY_IPV6_NO_UDP_TCP 4 +#define AL_ETH_FSM_ENTRY_IPV4_NO_UDP_TCP 5 + +/* FSM DATA format */ +#define AL_ETH_FSM_DATA_OUTER_2_TUPLE 0 +#define AL_ETH_FSM_DATA_OUTER_4_TUPLE 1 +#define AL_ETH_FSM_DATA_INNER_2_TUPLE 2 +#define AL_ETH_FSM_DATA_INNER_4_TUPLE 3 + +#define AL_ETH_FSM_DATA_HASH_SEL (1 << 2) + +#define AL_ETH_FSM_DATA_DEFAULT_Q 0 +#define AL_ETH_FSM_DATA_DEFAULT_UDMA 0 + +#define AL_BR_SIZE 512 +#define AL_TSO_SIZE 65500 +#define AL_DEFAULT_MTU 1500 + +#define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) + +#define AL_IP_ALIGNMENT_OFFSET 2 + +#define SFP_I2C_ADDR 0x50 + +#define AL_MASK_GROUP_A_INT 0x7 +#define AL_MASK_GROUP_B_INT 0xF +#define AL_MASK_GROUP_C_INT 0xF +#define AL_MASK_GROUP_D_INT 0xFFFFFFFF + +#define AL_REG_OFFSET_FORWARD_INTR (0x1800000 + 0x1210) +#define AL_EN_FORWARD_INTR 0x1FFFF +#define AL_DIS_FORWARD_INTR 0 + +#define AL_M2S_MASK_INIT 0x480 +#define AL_S2M_MASK_INIT 0x1E0 +#define AL_M2S_S2M_MASK_NOT_INT (0x3f << 25) + +#define AL_10BASE_T_SPEED 10 +#define AL_100BASE_TX_SPEED 100 +#define AL_1000BASE_T_SPEED 1000 + +static devclass_t al_devclass; + +#define AL_RX_LOCK_INIT(_sc) mtx_init(&((_sc)->if_rx_lock), "ALRXL", "ALRXL", MTX_DEF) +#define AL_RX_LOCK(_sc) mtx_lock(&((_sc)->if_rx_lock)) +#define AL_RX_UNLOCK(_sc) mtx_unlock(&((_sc)->if_rx_lock)) + +/* helper functions */ +static int al_is_device_supported(device_t); + +static void al_eth_init_rings(struct al_eth_adapter *); +static void al_eth_flow_ctrl_disable(struct al_eth_adapter *); +int al_eth_fpga_read_pci_config(void *, int, uint32_t *); +int al_eth_fpga_write_pci_config(void *, int, uint32_t); +int al_eth_read_pci_config(void *, int, uint32_t *); +int al_eth_write_pci_config(void *, int, uint32_t); +void al_eth_irq_config(uint32_t *, uint32_t); +void al_eth_forward_int_config(uint32_t *, uint32_t); +static void al_eth_start_xmit(void *, int); +static void al_eth_rx_recv_work(void *, int); +static int al_eth_up(struct al_eth_adapter *); +static void al_eth_down(struct al_eth_adapter *); +static void al_eth_interrupts_unmask(struct al_eth_adapter *); +static void al_eth_interrupts_mask(struct al_eth_adapter *); +static int al_eth_check_mtu(struct al_eth_adapter *, int); +static uint64_t al_get_counter(struct ifnet *, ift_counter); +static void al_eth_req_rx_buff_size(struct al_eth_adapter *, int); +static int al_eth_board_params_init(struct al_eth_adapter *); +static int al_media_update(struct ifnet *); +static void al_media_status(struct ifnet *, struct ifmediareq *); +static int al_eth_function_reset(struct al_eth_adapter *); +static int al_eth_hw_init_adapter(struct al_eth_adapter *); +static void al_eth_serdes_init(struct al_eth_adapter *); +static void al_eth_lm_config(struct al_eth_adapter *); +static int al_eth_hw_init(struct al_eth_adapter *); + +static void al_tick_stats(void *); + +/* ifnet entry points */ +static void al_init(void *); +static int al_mq_start(struct ifnet *, struct mbuf *); +static void al_qflush(struct ifnet *); +static int al_ioctl(struct ifnet * ifp, u_long, caddr_t); + +/* bus entry points */ +static int al_probe(device_t); +static int al_attach(device_t); +static int al_detach(device_t); +static int al_shutdown(device_t); + +/* mii bus support routines */ +static int al_miibus_readreg(device_t, int, int); +static int al_miibus_writereg(device_t, int, int, int); +static void al_miibus_statchg(device_t); +static void al_miibus_linkchg(device_t); + +struct al_eth_adapter* g_adapters[16]; +uint32_t g_adapters_count; + +/* flag for napi-like mbuf processing, controlled from sysctl */ +static int napi = 0; + +static device_method_t al_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, al_probe), + DEVMETHOD(device_attach, al_attach), + DEVMETHOD(device_detach, al_detach), + DEVMETHOD(device_shutdown, al_shutdown), + + DEVMETHOD(miibus_readreg, al_miibus_readreg), + DEVMETHOD(miibus_writereg, al_miibus_writereg), + DEVMETHOD(miibus_statchg, al_miibus_statchg), + DEVMETHOD(miibus_linkchg, al_miibus_linkchg), + { 0, 0 } +}; + +static driver_t al_driver = { + "al", + al_methods, + sizeof(struct al_eth_adapter), +}; + +DRIVER_MODULE(al, pci, al_driver, al_devclass, 0, 0); +DRIVER_MODULE(miibus, al, miibus_driver, miibus_devclass, 0, 0); + +static int +al_probe(device_t dev) +{ + if ((al_is_device_supported(dev)) != 0) { + device_set_desc(dev, "al"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +al_attach(device_t dev) +{ + struct al_eth_lm_context *lm_context; + struct al_eth_adapter *adapter; + struct sysctl_oid_list *child; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + struct ifnet *ifp; + uint32_t dev_id; + uint32_t rev_id; + int bar_udma; + int bar_mac; + int bar_ec; + int err; + + err = 0; + ifp = NULL; + dev_id = rev_id = 0; + ctx = device_get_sysctl_ctx(dev); + tree = SYSCTL_PARENT(device_get_sysctl_tree(dev)); + child = SYSCTL_CHILDREN(tree); + + if (g_adapters_count == 0) { + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "napi", + CTLFLAG_RW, &napi, 0, "Use pseudo-napi mechanism"); + } + adapter = device_get_softc(dev); + adapter->dev = dev; + adapter->board_type = ALPINE_INTEGRATED; + snprintf(adapter->name, AL_ETH_NAME_MAX_LEN, "%s", + device_get_nameunit(dev)); + AL_RX_LOCK_INIT(adapter); + + g_adapters[g_adapters_count] = adapter; + + lm_context = &adapter->lm_context; + + bar_udma = PCIR_BAR(AL_ETH_UDMA_BAR); + adapter->udma_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &bar_udma, RF_ACTIVE); + if (adapter->udma_res == NULL) { + device_printf(adapter->dev, + "could not allocate memory resources for DMA.\n"); + err = ENOMEM; + goto err_res_dma; + } + adapter->udma_base = al_bus_dma_to_va(rman_get_bustag(adapter->udma_res), + rman_get_bushandle(adapter->udma_res)); + bar_mac = PCIR_BAR(AL_ETH_MAC_BAR); + adapter->mac_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &bar_mac, RF_ACTIVE); + if (adapter->mac_res == NULL) { + device_printf(adapter->dev, + "could not allocate memory resources for MAC.\n"); + err = ENOMEM; + goto err_res_mac; + } + adapter->mac_base = al_bus_dma_to_va(rman_get_bustag(adapter->mac_res), + rman_get_bushandle(adapter->mac_res)); + + bar_ec = PCIR_BAR(AL_ETH_EC_BAR); + adapter->ec_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &bar_ec, + RF_ACTIVE); + if (adapter->ec_res == NULL) { + device_printf(adapter->dev, + "could not allocate memory resources for EC.\n"); + err = ENOMEM; + goto err_res_ec; + } + adapter->ec_base = al_bus_dma_to_va(rman_get_bustag(adapter->ec_res), + rman_get_bushandle(adapter->ec_res)); + + adapter->netdev = ifp = if_alloc(IFT_ETHER); + + adapter->netdev->if_link_state = LINK_STATE_DOWN; + + ifp->if_softc = adapter; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + ifp->if_flags = ifp->if_drv_flags; + ifp->if_flags |= IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | IFF_ALLMULTI; + ifp->if_transmit = al_mq_start; + ifp->if_qflush = al_qflush; + ifp->if_ioctl = al_ioctl; + ifp->if_init = al_init; + ifp->if_get_counter = al_get_counter; + ifp->if_mtu = AL_DEFAULT_MTU; + + adapter->if_flags = ifp->if_flags; + + ifp->if_capabilities = ifp->if_capenable = 0; + + ifp->if_capabilities |= IFCAP_HWCSUM | + IFCAP_HWCSUM_IPV6 | IFCAP_TSO | + IFCAP_LRO | IFCAP_JUMBO_MTU; + + ifp->if_capenable = ifp->if_capabilities; + + adapter->id_number = g_adapters_count; + + if (adapter->board_type == ALPINE_INTEGRATED) { + dev_id = pci_get_device(adapter->dev); + rev_id = pci_get_revid(adapter->dev); + } else { + al_eth_fpga_read_pci_config(adapter->internal_pcie_base, + PCIR_DEVICE, &dev_id); + al_eth_fpga_read_pci_config(adapter->internal_pcie_base, + PCIR_REVID, &rev_id); + } + + adapter->dev_id = dev_id; + adapter->rev_id = rev_id; + + /* set default ring sizes */ + adapter->tx_ring_count = AL_ETH_DEFAULT_TX_SW_DESCS; + adapter->tx_descs_count = AL_ETH_DEFAULT_TX_HW_DESCS; + adapter->rx_ring_count = AL_ETH_DEFAULT_RX_DESCS; + adapter->rx_descs_count = AL_ETH_DEFAULT_RX_DESCS; + + adapter->num_tx_queues = AL_ETH_NUM_QUEUES; + adapter->num_rx_queues = AL_ETH_NUM_QUEUES; + + adapter->small_copy_len = AL_ETH_DEFAULT_SMALL_PACKET_LEN; + adapter->link_poll_interval = AL_ETH_DEFAULT_LINK_POLL_INTERVAL; + adapter->max_rx_buff_alloc_size = AL_ETH_DEFAULT_MAX_RX_BUFF_ALLOC_SIZE; + + al_eth_req_rx_buff_size(adapter, adapter->netdev->if_mtu); + + adapter->link_config.force_1000_base_x = AL_ETH_DEFAULT_FORCE_1000_BASEX; + + err = al_eth_board_params_init(adapter); + if (err != 0) + goto err; + + if (adapter->mac_mode == AL_ETH_MAC_MODE_10GbE_Serial) { + ifmedia_init(&adapter->media, IFM_IMASK, + al_media_update, al_media_status); + ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_LX, 0, NULL); + ifmedia_add(&adapter->media, IFM_ETHER | IFM_10G_LR, 0, NULL); + ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); + } + + al_eth_function_reset(adapter); + + err = al_eth_hw_init_adapter(adapter); + if (err != 0) + goto err; + + al_eth_init_rings(adapter); + g_adapters_count++; + + al_eth_lm_config(adapter); + mtx_init(&adapter->stats_mtx, "AlStatsMtx", NULL, MTX_DEF); + mtx_init(&adapter->wd_mtx, "AlWdMtx", NULL, MTX_DEF); + callout_init_mtx(&adapter->stats_callout, &adapter->stats_mtx, 0); + callout_init_mtx(&adapter->wd_callout, &adapter->wd_mtx, 0); + + ether_ifattach(ifp, adapter->mac_addr); + ifp->if_mtu = AL_DEFAULT_MTU; + + if (adapter->mac_mode == AL_ETH_MAC_MODE_RGMII) { + al_eth_hw_init(adapter); + + /* Attach PHY(s) */ + err = mii_attach(adapter->dev, &adapter->miibus, adapter->netdev, + al_media_update, al_media_status, BMSR_DEFCAPMASK, 0, + MII_OFFSET_ANY, 0); + if (err != 0) { + device_printf(adapter->dev, "attaching PHYs failed\n"); + return (err); + } + + adapter->mii = device_get_softc(adapter->miibus); + } + + return (err); + +err: + bus_release_resource(dev, SYS_RES_MEMORY, bar_ec, adapter->ec_res); +err_res_ec: + bus_release_resource(dev, SYS_RES_MEMORY, bar_mac, adapter->mac_res); +err_res_mac: + bus_release_resource(dev, SYS_RES_MEMORY, bar_udma, adapter->udma_res); +err_res_dma: + return (err); +} + +static int +al_detach(device_t dev) +{ + struct al_eth_adapter *adapter; + + adapter = device_get_softc(dev); + ether_ifdetach(adapter->netdev); + + mtx_destroy(&adapter->stats_mtx); + mtx_destroy(&adapter->wd_mtx); + + al_eth_down(adapter); + + bus_release_resource(dev, SYS_RES_IRQ, 0, adapter->irq_res); + bus_release_resource(dev, SYS_RES_MEMORY, 0, adapter->ec_res); + bus_release_resource(dev, SYS_RES_MEMORY, 0, adapter->mac_res); + bus_release_resource(dev, SYS_RES_MEMORY, 0, adapter->udma_res); + + return (0); +} + +int +al_eth_fpga_read_pci_config(void *handle, int where, uint32_t *val) +{ + + /* handle is the base address of the adapter */ + *val = al_reg_read32((void*)((u_long)handle + where)); + + return (0); +} + +int +al_eth_fpga_write_pci_config(void *handle, int where, uint32_t val) +{ + + /* handle is the base address of the adapter */ + al_reg_write32((void*)((u_long)handle + where), val); + return (0); +} + +int +al_eth_read_pci_config(void *handle, int where, uint32_t *val) +{ + + /* handle is a pci_dev */ + *val = pci_read_config((device_t)handle, where, sizeof(*val)); + return (0); +} + +int +al_eth_write_pci_config(void *handle, int where, uint32_t val) +{ + + /* handle is a pci_dev */ + pci_write_config((device_t)handle, where, val, sizeof(val)); + return (0); +} + +void +al_eth_irq_config(uint32_t *offset, uint32_t value) +{ + + al_reg_write32_relaxed(offset, value); +} + +void +al_eth_forward_int_config(uint32_t *offset, uint32_t value) +{ + + al_reg_write32(offset, value); +} + +static void +al_eth_serdes_init(struct al_eth_adapter *adapter) +{ + void __iomem *serdes_base; + + adapter->serdes_init = false; + + serdes_base = alpine_serdes_resource_get(adapter->serdes_grp); + if (serdes_base == NULL) { + device_printf(adapter->dev, "serdes_base get failed!\n"); + return; + } + + serdes_base = al_bus_dma_to_va(serdes_tag, serdes_base); + + al_serdes_handle_grp_init(serdes_base, adapter->serdes_grp, + &adapter->serdes_obj); + + adapter->serdes_init = true; +} + +static void +al_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) +{ + bus_addr_t *paddr; + + paddr = arg; + *paddr = segs->ds_addr; +} + +static int +al_dma_alloc_coherent(struct device *dev, bus_dma_tag_t *tag, bus_dmamap_t *map, + bus_addr_t *baddr, void **vaddr, uint32_t size) +{ + int ret; + uint32_t maxsize = ((size - 1)/PAGE_SIZE + 1) * PAGE_SIZE; + + ret = bus_dma_tag_create(bus_get_dma_tag(dev), 8, 0, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, + maxsize, 1, maxsize, BUS_DMA_COHERENT, NULL, NULL, tag); + if (ret != 0) { + device_printf(dev, + "failed to create bus tag, ret = %d\n", ret); + return (ret); + } + + ret = bus_dmamem_alloc(*tag, vaddr, + BUS_DMA_COHERENT | BUS_DMA_ZERO, map); + if (ret != 0) { + device_printf(dev, + "failed to allocate dmamem, ret = %d\n", ret); + return (ret); + } + + ret = bus_dmamap_load(*tag, *map, *vaddr, + size, al_dma_map_addr, baddr, 0); + if (ret != 0) { + device_printf(dev, + "failed to allocate bus_dmamap_load, ret = %d\n", ret); + return (ret); + } + + return (0); +} + +static void +al_dma_free_coherent(bus_dma_tag_t tag, bus_dmamap_t map, void *vaddr) +{ + + bus_dmamap_unload(tag, map); + bus_dmamem_free(tag, vaddr, map); + bus_dma_tag_destroy(tag); +} + +static void +al_eth_mac_table_unicast_add(struct al_eth_adapter *adapter, + uint8_t idx, uint8_t *addr, uint8_t udma_mask) +{ + struct al_eth_fwd_mac_table_entry entry = { { 0 } }; + + memcpy(entry.addr, adapter->mac_addr, sizeof(adapter->mac_addr)); + + memset(entry.mask, 0xff, sizeof(entry.mask)); + entry.rx_valid = true; + entry.tx_valid = false; + entry.udma_mask = udma_mask; + entry.filter = false; + + device_printf_dbg(adapter->dev, + "%s: [%d]: addr "MAC_ADDR_STR" mask "MAC_ADDR_STR"\n", + __func__, idx, MAC_ADDR(entry.addr), MAC_ADDR(entry.mask)); + + al_eth_fwd_mac_table_set(&adapter->hal_adapter, idx, &entry); +} + +static void +al_eth_mac_table_all_multicast_add(struct al_eth_adapter *adapter, uint8_t idx, + uint8_t udma_mask) +{ + struct al_eth_fwd_mac_table_entry entry = { { 0 } }; + + memset(entry.addr, 0x00, sizeof(entry.addr)); + memset(entry.mask, 0x00, sizeof(entry.mask)); + entry.mask[0] |= 1; + entry.addr[0] |= 1; + + entry.rx_valid = true; + entry.tx_valid = false; + entry.udma_mask = udma_mask; + entry.filter = false; + + device_printf_dbg(adapter->dev, + "%s: [%d]: addr "MAC_ADDR_STR" mask "MAC_ADDR_STR"\n", + __func__, idx, MAC_ADDR(entry.addr), MAC_ADDR(entry.mask)); + + al_eth_fwd_mac_table_set(&adapter->hal_adapter, idx, &entry); +} + +static void +al_eth_mac_table_broadcast_add(struct al_eth_adapter *adapter, + uint8_t idx, uint8_t udma_mask) +{ + struct al_eth_fwd_mac_table_entry entry = { { 0 } }; + + memset(entry.addr, 0xff, sizeof(entry.addr)); + memset(entry.mask, 0xff, sizeof(entry.mask)); + + entry.rx_valid = true; + entry.tx_valid = false; + entry.udma_mask = udma_mask; + entry.filter = false; + + device_printf_dbg(adapter->dev, + "%s: [%d]: addr "MAC_ADDR_STR" mask "MAC_ADDR_STR"\n", + __func__, idx, MAC_ADDR(entry.addr), MAC_ADDR(entry.mask)); + + al_eth_fwd_mac_table_set(&adapter->hal_adapter, idx, &entry); +} + +static void +al_eth_mac_table_promiscuous_set(struct al_eth_adapter *adapter, + boolean_t promiscuous) +{ + struct al_eth_fwd_mac_table_entry entry = { { 0 } }; + + memset(entry.addr, 0x00, sizeof(entry.addr)); + memset(entry.mask, 0x00, sizeof(entry.mask)); + + entry.rx_valid = true; + entry.tx_valid = false; + entry.udma_mask = (promiscuous) ? 1 : 0; + entry.filter = (promiscuous) ? false : true; + + device_printf_dbg(adapter->dev, "%s: %s promiscuous mode\n", + __func__, (promiscuous) ? "enter" : "exit"); + + al_eth_fwd_mac_table_set(&adapter->hal_adapter, + AL_ETH_MAC_TABLE_DROP_IDX, &entry); +} + +static void +al_eth_set_thash_table_entry(struct al_eth_adapter *adapter, uint8_t idx, + uint8_t udma, uint32_t queue) +{ + + if (udma != 0) + panic("only UDMA0 is supporter"); + + if (queue >= AL_ETH_NUM_QUEUES) + panic("invalid queue number"); + + al_eth_thash_table_set(&adapter->hal_adapter, idx, udma, queue); +} + +/* init FSM, no tunneling supported yet, if packet is tcp/udp over ipv4/ipv6, use 4 tuple hash */ +static void +al_eth_fsm_table_init(struct al_eth_adapter *adapter) +{ + uint32_t val; + int i; + + for (i = 0; i < AL_ETH_RX_FSM_TABLE_SIZE; i++) { + uint8_t outer_type = AL_ETH_FSM_ENTRY_OUTER(i); + switch (outer_type) { + case AL_ETH_FSM_ENTRY_IPV4_TCP: + case AL_ETH_FSM_ENTRY_IPV4_UDP: + case AL_ETH_FSM_ENTRY_IPV6_TCP: + case AL_ETH_FSM_ENTRY_IPV6_UDP: + val = AL_ETH_FSM_DATA_OUTER_4_TUPLE | + AL_ETH_FSM_DATA_HASH_SEL; + break; + case AL_ETH_FSM_ENTRY_IPV6_NO_UDP_TCP: + case AL_ETH_FSM_ENTRY_IPV4_NO_UDP_TCP: + val = AL_ETH_FSM_DATA_OUTER_2_TUPLE | + AL_ETH_FSM_DATA_HASH_SEL; + break; + default: + val = AL_ETH_FSM_DATA_DEFAULT_Q | + AL_ETH_FSM_DATA_DEFAULT_UDMA; + } + al_eth_fsm_table_set(&adapter->hal_adapter, i, val); + } +} + +static void +al_eth_mac_table_entry_clear(struct al_eth_adapter *adapter, + uint8_t idx) +{ + struct al_eth_fwd_mac_table_entry entry = { { 0 } }; + + device_printf_dbg(adapter->dev, "%s: clear entry %d\n", __func__, idx); + + al_eth_fwd_mac_table_set(&adapter->hal_adapter, idx, &entry); +} + +static int +al_eth_hw_init_adapter(struct al_eth_adapter *adapter) +{ + struct al_eth_adapter_params *params = &adapter->eth_hal_params; + int rc; + + /* params->dev_id = adapter->dev_id; */ + params->rev_id = adapter->rev_id; + params->udma_id = 0; + params->enable_rx_parser = 1; /* enable rx epe parser*/ + params->udma_regs_base = adapter->udma_base; /* UDMA register base address */ + params->ec_regs_base = adapter->ec_base; /* Ethernet controller registers base address */ + params->mac_regs_base = adapter->mac_base; /* Ethernet MAC registers base address */ + params->name = adapter->name; + params->serdes_lane = adapter->serdes_lane; + + rc = al_eth_adapter_init(&adapter->hal_adapter, params); + if (rc != 0) + device_printf(adapter->dev, "%s failed at hal init!\n", + __func__); + + if ((adapter->board_type == ALPINE_NIC) || + (adapter->board_type == ALPINE_FPGA_NIC)) { + /* in pcie NIC mode, force eth UDMA to access PCIE0 using the vmid */ + struct al_udma_gen_tgtid_conf conf; + int i; + for (i = 0; i < DMA_MAX_Q; i++) { + conf.tx_q_conf[i].queue_en = AL_TRUE; + conf.tx_q_conf[i].desc_en = AL_FALSE; + conf.tx_q_conf[i].tgtid = 0x100; /* for access from PCIE0 */ + conf.rx_q_conf[i].queue_en = AL_TRUE; + conf.rx_q_conf[i].desc_en = AL_FALSE; + conf.rx_q_conf[i].tgtid = 0x100; /* for access from PCIE0 */ + } + al_udma_gen_tgtid_conf_set(adapter->udma_base, &conf); + } + + return (rc); +} + +static void +al_eth_lm_config(struct al_eth_adapter *adapter) +{ + struct al_eth_lm_init_params params = {0}; + + params.adapter = &adapter->hal_adapter; + params.serdes_obj = &adapter->serdes_obj; + params.lane = adapter->serdes_lane; + params.sfp_detection = adapter->sfp_detection_needed; + if (adapter->sfp_detection_needed == true) { + params.sfp_bus_id = adapter->i2c_adapter_id; + params.sfp_i2c_addr = SFP_I2C_ADDR; + } + + if (adapter->sfp_detection_needed == false) { + switch (adapter->mac_mode) { + case AL_ETH_MAC_MODE_10GbE_Serial: + if ((adapter->lt_en != 0) && (adapter->an_en != 0)) + params.default_mode = AL_ETH_LM_MODE_10G_DA; + else + params.default_mode = AL_ETH_LM_MODE_10G_OPTIC; + break; + case AL_ETH_MAC_MODE_SGMII: + params.default_mode = AL_ETH_LM_MODE_1G; + break; + default: + params.default_mode = AL_ETH_LM_MODE_10G_DA; + } + } else + params.default_mode = AL_ETH_LM_MODE_10G_DA; + + params.link_training = adapter->lt_en; + params.rx_equal = true; + params.static_values = !adapter->dont_override_serdes; + params.i2c_context = adapter; + params.kr_fec_enable = false; + + params.retimer_exist = adapter->retimer.exist; + params.retimer_bus_id = adapter->retimer.bus_id; + params.retimer_i2c_addr = adapter->retimer.i2c_addr; + params.retimer_channel = adapter->retimer.channel; + + al_eth_lm_init(&adapter->lm_context, ¶ms); +} + +static int +al_eth_board_params_init(struct al_eth_adapter *adapter) +{ + + if (adapter->board_type == ALPINE_NIC) { + adapter->mac_mode = AL_ETH_MAC_MODE_10GbE_Serial; + adapter->sfp_detection_needed = false; + adapter->phy_exist = false; + adapter->an_en = false; + adapter->lt_en = false; + adapter->ref_clk_freq = AL_ETH_REF_FREQ_375_MHZ; + adapter->mdio_freq = AL_ETH_DEFAULT_MDIO_FREQ_KHZ; + } else if (adapter->board_type == ALPINE_FPGA_NIC) { + adapter->mac_mode = AL_ETH_MAC_MODE_SGMII; + adapter->sfp_detection_needed = false; + adapter->phy_exist = false; + adapter->an_en = false; + adapter->lt_en = false; + adapter->ref_clk_freq = AL_ETH_REF_FREQ_375_MHZ; + adapter->mdio_freq = AL_ETH_DEFAULT_MDIO_FREQ_KHZ; + } else { + struct al_eth_board_params params; + int rc; + + adapter->auto_speed = false; + + rc = al_eth_board_params_get(adapter->mac_base, ¶ms); + if (rc != 0) { + device_printf(adapter->dev, + "board info not available\n"); + return (-1); + } + + adapter->phy_exist = params.phy_exist == TRUE; + adapter->phy_addr = params.phy_mdio_addr; + adapter->an_en = params.autoneg_enable; + adapter->lt_en = params.kr_lt_enable; + adapter->serdes_grp = params.serdes_grp; + adapter->serdes_lane = params.serdes_lane; + adapter->sfp_detection_needed = params.sfp_plus_module_exist; + adapter->i2c_adapter_id = params.i2c_adapter_id; + adapter->ref_clk_freq = params.ref_clk_freq; + adapter->dont_override_serdes = params.dont_override_serdes; + adapter->link_config.active_duplex = !params.half_duplex; + adapter->link_config.autoneg = !params.an_disable; + adapter->link_config.force_1000_base_x = params.force_1000_base_x; + adapter->retimer.exist = params.retimer_exist; + adapter->retimer.bus_id = params.retimer_bus_id; + adapter->retimer.i2c_addr = params.retimer_i2c_addr; + adapter->retimer.channel = params.retimer_channel; + + switch (params.speed) { + default: + device_printf(adapter->dev, + "%s: invalid speed (%d)\n", __func__, params.speed); + case AL_ETH_BOARD_1G_SPEED_1000M: + adapter->link_config.active_speed = 1000; + break; + case AL_ETH_BOARD_1G_SPEED_100M: + adapter->link_config.active_speed = 100; + break; + case AL_ETH_BOARD_1G_SPEED_10M: + adapter->link_config.active_speed = 10; + break; + } + + switch (params.mdio_freq) { + default: + device_printf(adapter->dev, + "%s: invalid mdio freq (%d)\n", __func__, + params.mdio_freq); + case AL_ETH_BOARD_MDIO_FREQ_2_5_MHZ: + adapter->mdio_freq = AL_ETH_DEFAULT_MDIO_FREQ_KHZ; + break; + case AL_ETH_BOARD_MDIO_FREQ_1_MHZ: + adapter->mdio_freq = AL_ETH_MDIO_FREQ_1000_KHZ; + break; + } + + switch (params.media_type) { + case AL_ETH_BOARD_MEDIA_TYPE_RGMII: + if (params.sfp_plus_module_exist == TRUE) + /* Backward compatibility */ + adapter->mac_mode = AL_ETH_MAC_MODE_SGMII; + else + adapter->mac_mode = AL_ETH_MAC_MODE_RGMII; + + adapter->use_lm = false; + break; + case AL_ETH_BOARD_MEDIA_TYPE_SGMII: + adapter->mac_mode = AL_ETH_MAC_MODE_SGMII; + adapter->use_lm = true; + break; + case AL_ETH_BOARD_MEDIA_TYPE_10GBASE_SR: + adapter->mac_mode = AL_ETH_MAC_MODE_10GbE_Serial; + adapter->use_lm = true; + break; + case AL_ETH_BOARD_MEDIA_TYPE_AUTO_DETECT: + adapter->sfp_detection_needed = TRUE; + adapter->auto_speed = false; + adapter->use_lm = true; + break; + case AL_ETH_BOARD_MEDIA_TYPE_AUTO_DETECT_AUTO_SPEED: + adapter->sfp_detection_needed = TRUE; + adapter->auto_speed = true; + adapter->mac_mode_set = false; + adapter->use_lm = true; + + adapter->mac_mode = AL_ETH_MAC_MODE_10GbE_Serial; + break; + default: + device_printf(adapter->dev, + "%s: unsupported media type %d\n", + __func__, params.media_type); + return (-1); + } + + device_printf(adapter->dev, + "Board info: phy exist %s. phy addr %d. mdio freq %u Khz. " + "SFP connected %s. media %d\n", + params.phy_exist == TRUE ? "Yes" : "No", + params.phy_mdio_addr, adapter->mdio_freq, + params.sfp_plus_module_exist == TRUE ? "Yes" : "No", + params.media_type); + } + + al_eth_mac_addr_read(adapter->ec_base, 0, adapter->mac_addr); + + return (0); +} + +static int +al_eth_function_reset(struct al_eth_adapter *adapter) +{ + struct al_eth_board_params params; + int rc; + + /* save board params so we restore it after reset */ + al_eth_board_params_get(adapter->mac_base, ¶ms); + al_eth_mac_addr_read(adapter->ec_base, 0, adapter->mac_addr); + if (adapter->board_type == ALPINE_INTEGRATED) + rc = al_eth_flr_rmn(&al_eth_read_pci_config, + &al_eth_write_pci_config, + adapter->dev, adapter->mac_base); + else + rc = al_eth_flr_rmn(&al_eth_fpga_read_pci_config, + &al_eth_fpga_write_pci_config, + adapter->internal_pcie_base, adapter->mac_base); + + /* restore params */ + al_eth_board_params_set(adapter->mac_base, ¶ms); + al_eth_mac_addr_store(adapter->ec_base, 0, adapter->mac_addr); + + return (rc); +} + +static void +al_eth_init_rings(struct al_eth_adapter *adapter) +{ + int i; + + for (i = 0; i < adapter->num_tx_queues; i++) { + struct al_eth_ring *ring = &adapter->tx_ring[i]; + + ring->ring_id = i; + ring->dev = adapter->dev; + ring->adapter = adapter; + ring->netdev = adapter->netdev; + al_udma_q_handle_get(&adapter->hal_adapter.tx_udma, i, + &ring->dma_q); + ring->sw_count = adapter->tx_ring_count; + ring->hw_count = adapter->tx_descs_count; + ring->unmask_reg_offset = al_udma_iofic_unmask_offset_get((struct unit_regs *)adapter->udma_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, AL_INT_GROUP_C); + ring->unmask_val = ~(1 << i); + } + + for (i = 0; i < adapter->num_rx_queues; i++) { + struct al_eth_ring *ring = &adapter->rx_ring[i]; + + ring->ring_id = i; + ring->dev = adapter->dev; + ring->adapter = adapter; + ring->netdev = adapter->netdev; + al_udma_q_handle_get(&adapter->hal_adapter.rx_udma, i, &ring->dma_q); + ring->sw_count = adapter->rx_ring_count; + ring->hw_count = adapter->rx_descs_count; + ring->unmask_reg_offset = al_udma_iofic_unmask_offset_get( + (struct unit_regs *)adapter->udma_base, + AL_UDMA_IOFIC_LEVEL_PRIMARY, AL_INT_GROUP_B); + ring->unmask_val = ~(1 << i); + } +} + +static void +al_init_locked(void *arg) +{ + struct al_eth_adapter *adapter = arg; + if_t ifp = adapter->netdev; + int rc = 0; + + al_eth_down(adapter); + rc = al_eth_up(adapter); + + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + if (rc == 0) + ifp->if_drv_flags |= IFF_DRV_RUNNING; +} + +static void +al_init(void *arg) +{ + struct al_eth_adapter *adapter = arg; + + al_init_locked(adapter); +} + +static inline int +al_eth_alloc_rx_buf(struct al_eth_adapter *adapter, + struct al_eth_ring *rx_ring, + struct al_eth_rx_buffer *rx_info) +{ + struct al_buf *al_buf; + bus_dma_segment_t segs[2]; + int error; + int nsegs; + + if (rx_info->m != NULL) + return (0); + + rx_info->data_size = adapter->rx_mbuf_sz; + + AL_RX_LOCK(adapter); + + /* Get mbuf using UMA allocator */ + rx_info->m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, + rx_info->data_size); + AL_RX_UNLOCK(adapter); + + if (rx_info->m == NULL) + return (ENOMEM); + + rx_info->m->m_pkthdr.len = rx_info->m->m_len = adapter->rx_mbuf_sz; + + /* Map packets for DMA */ + error = bus_dmamap_load_mbuf_sg(rx_ring->dma_buf_tag, rx_info->dma_map, + rx_info->m, segs, &nsegs, BUS_DMA_NOWAIT); + if (__predict_false(error)) { + device_printf(rx_ring->dev, "failed to map mbuf, error = %d\n", + error); + m_freem(rx_info->m); + rx_info->m = NULL; + return (EFAULT); + } + + al_buf = &rx_info->al_buf; + al_buf->addr = segs[0].ds_addr + AL_IP_ALIGNMENT_OFFSET; + al_buf->len = rx_info->data_size - AL_IP_ALIGNMENT_OFFSET; + + return (0); +} + +static int +al_eth_refill_rx_bufs(struct al_eth_adapter *adapter, unsigned int qid, + unsigned int num) +{ + struct al_eth_ring *rx_ring = &adapter->rx_ring[qid]; + uint16_t next_to_use; + unsigned int i; + + next_to_use = rx_ring->next_to_use; + + for (i = 0; i < num; i++) { + int rc; + struct al_eth_rx_buffer *rx_info = + &rx_ring->rx_buffer_info[next_to_use]; + + if (__predict_false(al_eth_alloc_rx_buf(adapter, + rx_ring, rx_info) < 0)) { + device_printf(adapter->dev, + "failed to alloc buffer for rx queue %d\n", qid); + break; + } + + rc = al_eth_rx_buffer_add(rx_ring->dma_q, + &rx_info->al_buf, AL_ETH_RX_FLAGS_INT, NULL); + if (__predict_false(rc)) { + device_printf(adapter->dev, + "failed to add buffer for rx queue %d\n", qid); + break; + } + + next_to_use = AL_ETH_RX_RING_IDX_NEXT(rx_ring, next_to_use); + } + + if (__predict_false(i < num)) + device_printf(adapter->dev, + "refilled rx queue %d with %d pages only - available %d\n", + qid, i, al_udma_available_get(rx_ring->dma_q)); + + if (__predict_true(i)) + al_eth_rx_buffer_action(rx_ring->dma_q, i); + + rx_ring->next_to_use = next_to_use; + + return (i); +} + +/* + * al_eth_refill_all_rx_bufs - allocate all queues Rx buffers + * @adapter: board private structure + */ +static void +al_eth_refill_all_rx_bufs(struct al_eth_adapter *adapter) +{ + int i; + + for (i = 0; i < adapter->num_rx_queues; i++) + al_eth_refill_rx_bufs(adapter, i, AL_ETH_DEFAULT_RX_DESCS - 1); +} + +static void +al_eth_tx_do_cleanup(struct al_eth_ring *tx_ring) +{ + unsigned int total_done; + uint16_t next_to_clean; + int qid = tx_ring->ring_id; + + total_done = al_eth_comp_tx_get(tx_ring->dma_q); + device_printf_dbg(tx_ring->dev, + "tx_poll: q %d total completed descs %x\n", qid, total_done); + next_to_clean = tx_ring->next_to_clean; + + while (total_done != 0) { + struct al_eth_tx_buffer *tx_info; + struct mbuf *mbuf; + + tx_info = &tx_ring->tx_buffer_info[next_to_clean]; + /* stop if not all descriptors of the packet are completed */ + if (tx_info->tx_descs > total_done) + break; + + mbuf = tx_info->m; + + tx_info->m = NULL; + + device_printf_dbg(tx_ring->dev, + "tx_poll: q %d mbuf %p completed\n", qid, mbuf); + + /* map is no longer required */ + bus_dmamap_unload(tx_ring->dma_buf_tag, tx_info->dma_map); + + m_freem(mbuf); + total_done -= tx_info->tx_descs; + next_to_clean = AL_ETH_TX_RING_IDX_NEXT(tx_ring, next_to_clean); + } + + tx_ring->next_to_clean = next_to_clean; + + device_printf_dbg(tx_ring->dev, "tx_poll: q %d done next to clean %x\n", + qid, next_to_clean); + + /* + * need to make the rings circular update visible to + * al_eth_start_xmit() before checking for netif_queue_stopped(). + */ + al_smp_data_memory_barrier(); +} + +static void +al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_eth_tx_buffer *tx_info, + struct al_eth_pkt *hal_pkt, struct mbuf *m) +{ + uint32_t mss = m->m_pkthdr.tso_segsz; + struct ether_vlan_header *eh; + uint16_t etype; + struct ip *ip; + struct ip6_hdr *ip6; + struct tcphdr *th = NULL; + int ehdrlen, ip_hlen = 0; + uint8_t ipproto = 0; + uint32_t offload = 0; + + if (mss != 0) + offload = 1; + + if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) + offload = 1; + + if ((m->m_pkthdr.csum_flags & CSUM_OFFLOAD) != 0) + offload = 1; + + if (offload != 0) { + struct al_eth_meta_data *meta = &tx_ring->hal_meta; + + if (mss != 0) + hal_pkt->flags |= (AL_ETH_TX_FLAGS_TSO | + AL_ETH_TX_FLAGS_L4_CSUM); + else + hal_pkt->flags |= (AL_ETH_TX_FLAGS_L4_CSUM | + AL_ETH_TX_FLAGS_L4_PARTIAL_CSUM); + + /* + * Determine where frame payload starts. + * Jump over vlan headers if already present, + * helpful for QinQ too. + */ + eh = mtod(m, struct ether_vlan_header *); + if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + etype = ntohs(eh->evl_proto); + ehdrlen = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; + } else { + etype = ntohs(eh->evl_encap_proto); + ehdrlen = ETHER_HDR_LEN; + } + + switch (etype) { + case ETHERTYPE_IP: + ip = (struct ip *)(m->m_data + ehdrlen); + ip_hlen = ip->ip_hl << 2; + ipproto = ip->ip_p; + hal_pkt->l3_proto_idx = AL_ETH_PROTO_ID_IPv4; + th = (struct tcphdr *)((caddr_t)ip + ip_hlen); + if (mss != 0) + hal_pkt->flags |= AL_ETH_TX_FLAGS_IPV4_L3_CSUM; + if (ipproto == IPPROTO_TCP) + hal_pkt->l4_proto_idx = AL_ETH_PROTO_ID_TCP; + else + hal_pkt->l4_proto_idx = AL_ETH_PROTO_ID_UDP; + break; + case ETHERTYPE_IPV6: + ip6 = (struct ip6_hdr *)(m->m_data + ehdrlen); + hal_pkt->l3_proto_idx = AL_ETH_PROTO_ID_IPv6; + ip_hlen = sizeof(struct ip6_hdr); + th = (struct tcphdr *)((caddr_t)ip6 + ip_hlen); + ipproto = ip6->ip6_nxt; + if (ipproto == IPPROTO_TCP) + hal_pkt->l4_proto_idx = AL_ETH_PROTO_ID_TCP; + else + hal_pkt->l4_proto_idx = AL_ETH_PROTO_ID_UDP; + break; + default: + break; + } + + meta->words_valid = 4; + meta->l3_header_len = ip_hlen; + meta->l3_header_offset = ehdrlen; + if (th != NULL) + meta->l4_header_len = th->th_off; /* this param needed only for TSO */ + meta->mss_idx_sel = 0; /* check how to select MSS */ + meta->mss_val = mss; + hal_pkt->meta = meta; + } else + hal_pkt->meta = NULL; +} + +#define XMIT_QUEUE_TIMEOUT 100 + +static void +al_eth_xmit_mbuf(struct al_eth_ring *tx_ring, struct mbuf *m) +{ + struct al_eth_tx_buffer *tx_info; + int error; + int nsegs, a; + uint16_t next_to_use; + bus_dma_segment_t segs[AL_ETH_PKT_MAX_BUFS + 1]; + struct al_eth_pkt *hal_pkt; + struct al_buf *al_buf; + boolean_t remap; + + /* Check if queue is ready */ + if (unlikely(tx_ring->stall) != 0) { + for (a = 0; a < XMIT_QUEUE_TIMEOUT; a++) { + if (al_udma_available_get(tx_ring->dma_q) >= + (AL_ETH_DEFAULT_TX_HW_DESCS - + AL_ETH_TX_WAKEUP_THRESH)) { + tx_ring->stall = 0; + break; + } + pause("stall", 1); + } + if (a == XMIT_QUEUE_TIMEOUT) { + device_printf(tx_ring->dev, + "timeout waiting for queue %d ready!\n", + tx_ring->ring_id); + return; + } else { + device_printf_dbg(tx_ring->dev, + "queue %d is ready!\n", tx_ring->ring_id); + } + } + + next_to_use = tx_ring->next_to_use; + tx_info = &tx_ring->tx_buffer_info[next_to_use]; + tx_info->m = m; + hal_pkt = &tx_info->hal_pkt; + + if (m == NULL) { + device_printf(tx_ring->dev, "mbuf is NULL\n"); + return; + } + + remap = TRUE; + /* Map packets for DMA */ +retry: + error = bus_dmamap_load_mbuf_sg(tx_ring->dma_buf_tag, tx_info->dma_map, + m, segs, &nsegs, BUS_DMA_NOWAIT); + if (__predict_false(error)) { + struct mbuf *m_new; + + if (error == EFBIG) { + /* Try it again? - one try */ + if (remap == TRUE) { + remap = FALSE; + m_new = m_defrag(m, M_NOWAIT); + if (m_new == NULL) { + device_printf(tx_ring->dev, + "failed to defrag mbuf\n"); + goto exit; + } + m = m_new; + goto retry; + } else { + device_printf(tx_ring->dev, + "failed to map mbuf, error %d\n", error); + goto exit; + } + } else { + device_printf(tx_ring->dev, + "failed to map mbuf, error %d\n", error); + goto exit; + } + } + + /* set flags and meta data */ + hal_pkt->flags = AL_ETH_TX_FLAGS_INT; + al_eth_tx_csum(tx_ring, tx_info, hal_pkt, m); + + al_buf = hal_pkt->bufs; + for (a = 0; a < nsegs; a++) { + al_buf->addr = segs[a].ds_addr; + al_buf->len = segs[a].ds_len; + + al_buf++; + } + + hal_pkt->num_of_bufs = nsegs; + + /* prepare the packet's descriptors to dma engine */ + tx_info->tx_descs = al_eth_tx_pkt_prepare(tx_ring->dma_q, hal_pkt); + + if (tx_info->tx_descs == 0) + goto exit; + + /* + * stop the queue when no more space available, the packet can have up + * to AL_ETH_PKT_MAX_BUFS + 1 buffers and a meta descriptor + */ + if (unlikely(al_udma_available_get(tx_ring->dma_q) < + (AL_ETH_PKT_MAX_BUFS + 2))) { + tx_ring->stall = 1; + device_printf_dbg(tx_ring->dev, "stall, stopping queue %d...\n", + tx_ring->ring_id); + al_data_memory_barrier(); + } + + tx_ring->next_to_use = AL_ETH_TX_RING_IDX_NEXT(tx_ring, next_to_use); + + /* trigger the dma engine */ + al_eth_tx_dma_action(tx_ring->dma_q, tx_info->tx_descs); + return; + +exit: + m_freem(m); +} + +static void +al_eth_tx_cmpl_work(void *arg, int pending) +{ + struct al_eth_ring *tx_ring = arg; + + if (napi != 0) { + tx_ring->cmpl_is_running = 1; + al_data_memory_barrier(); + } + + al_eth_tx_do_cleanup(tx_ring); + + if (napi != 0) { + tx_ring->cmpl_is_running = 0; + al_data_memory_barrier(); + } + /* all work done, enable IRQs */ + al_eth_irq_config(tx_ring->unmask_reg_offset, tx_ring->unmask_val); +} + +static int +al_eth_tx_cmlp_irq_filter(void *arg) +{ + struct al_eth_ring *tx_ring = arg; + + /* Interrupt should be auto-masked upon arrival */ + + device_printf_dbg(tx_ring->dev, "%s for ring ID = %d\n", __func__, + tx_ring->ring_id); + + /* + * For napi, if work is not running, schedule it. Always schedule + * for casual (non-napi) packet handling. + */ + if ((napi == 0) || (napi && tx_ring->cmpl_is_running == 0)) + taskqueue_enqueue(tx_ring->cmpl_tq, &tx_ring->cmpl_task); + + /* Do not run bottom half */ + return (FILTER_HANDLED); +} + +static int +al_eth_rx_recv_irq_filter(void *arg) +{ + struct al_eth_ring *rx_ring = arg; + + /* Interrupt should be auto-masked upon arrival */ + + device_printf_dbg(rx_ring->dev, "%s for ring ID = %d\n", __func__, + rx_ring->ring_id); + + /* + * For napi, if work is not running, schedule it. Always schedule + * for casual (non-napi) packet handling. + */ + if ((napi == 0) || (napi && rx_ring->enqueue_is_running == 0)) + taskqueue_enqueue(rx_ring->enqueue_tq, &rx_ring->enqueue_task); + + /* Do not run bottom half */ + return (FILTER_HANDLED); +} + +/* + * al_eth_rx_checksum - indicate in mbuf if hw indicated a good cksum + * @adapter: structure containing adapter specific data + * @hal_pkt: HAL structure for the packet + * @mbuf: mbuf currently being received and modified + */ +static inline void +al_eth_rx_checksum(struct al_eth_adapter *adapter, + struct al_eth_pkt *hal_pkt, struct mbuf *mbuf) +{ + + /* if IPv4 and error */ + if (unlikely((adapter->netdev->if_capenable & IFCAP_RXCSUM) && + (hal_pkt->l3_proto_idx == AL_ETH_PROTO_ID_IPv4) && + (hal_pkt->flags & AL_ETH_RX_FLAGS_L3_CSUM_ERR))) { + device_printf(adapter->dev,"rx ipv4 header checksum error\n"); + return; + } + + /* if IPv6 and error */ + if (unlikely((adapter->netdev->if_capenable & IFCAP_RXCSUM_IPV6) && + (hal_pkt->l3_proto_idx == AL_ETH_PROTO_ID_IPv6) && + (hal_pkt->flags & AL_ETH_RX_FLAGS_L3_CSUM_ERR))) { + device_printf(adapter->dev,"rx ipv6 header checksum error\n"); + return; + } + + /* if TCP/UDP */ + if (likely((hal_pkt->l4_proto_idx == AL_ETH_PROTO_ID_TCP) || + (hal_pkt->l4_proto_idx == AL_ETH_PROTO_ID_UDP))) { + if (unlikely(hal_pkt->flags & AL_ETH_RX_FLAGS_L4_CSUM_ERR)) { + device_printf_dbg(adapter->dev, "rx L4 checksum error\n"); + + /* TCP/UDP checksum error */ + mbuf->m_pkthdr.csum_flags = 0; + } else { + device_printf_dbg(adapter->dev, "rx checksum correct\n"); + + /* IP Checksum Good */ + mbuf->m_pkthdr.csum_flags = CSUM_IP_CHECKED; + mbuf->m_pkthdr.csum_flags |= CSUM_IP_VALID; + } + } +} + +static struct mbuf* +al_eth_rx_mbuf(struct al_eth_adapter *adapter, + struct al_eth_ring *rx_ring, struct al_eth_pkt *hal_pkt, + unsigned int descs, uint16_t *next_to_clean) +{ + struct mbuf *mbuf; + struct al_eth_rx_buffer *rx_info = + &rx_ring->rx_buffer_info[*next_to_clean]; + unsigned int len; + + len = hal_pkt->bufs[0].len; + device_printf_dbg(adapter->dev, "rx_info %p data %p\n", rx_info, + rx_info->m); + + if (rx_info->m == NULL) { + *next_to_clean = AL_ETH_RX_RING_IDX_NEXT(rx_ring, + *next_to_clean); + return (NULL); + } + + mbuf = rx_info->m; + mbuf->m_pkthdr.len = len; + mbuf->m_len = len; + mbuf->m_pkthdr.rcvif = rx_ring->netdev; + mbuf->m_flags |= M_PKTHDR; + + if (len <= adapter->small_copy_len) { + struct mbuf *smbuf; + device_printf_dbg(adapter->dev, "rx small packet. len %d\n", len); + + AL_RX_LOCK(adapter); + smbuf = m_gethdr(M_NOWAIT, MT_DATA); + AL_RX_UNLOCK(adapter); + if (__predict_false(smbuf == NULL)) { + device_printf(adapter->dev, "smbuf is NULL\n"); + return (NULL); + } + + smbuf->m_data = smbuf->m_data + AL_IP_ALIGNMENT_OFFSET; + memcpy(smbuf->m_data, mbuf->m_data + AL_IP_ALIGNMENT_OFFSET, len); + + smbuf->m_len = len; + smbuf->m_pkthdr.rcvif = rx_ring->netdev; + + /* first desc of a non-ps chain */ + smbuf->m_flags |= M_PKTHDR; + smbuf->m_pkthdr.len = smbuf->m_len; + + *next_to_clean = AL_ETH_RX_RING_IDX_NEXT(rx_ring, + *next_to_clean); + + return (smbuf); + } + mbuf->m_data = mbuf->m_data + AL_IP_ALIGNMENT_OFFSET; + + /* Unmap the buffer */ + bus_dmamap_unload(rx_ring->dma_buf_tag, rx_info->dma_map); + + rx_info->m = NULL; + *next_to_clean = AL_ETH_RX_RING_IDX_NEXT(rx_ring, *next_to_clean); + + return (mbuf); +} + +static void +al_eth_rx_recv_work(void *arg, int pending) +{ + struct al_eth_ring *rx_ring = arg; + struct mbuf *mbuf; + struct lro_entry *queued; + unsigned int qid = rx_ring->ring_id; + struct al_eth_pkt *hal_pkt = &rx_ring->hal_pkt; + uint16_t next_to_clean = rx_ring->next_to_clean; + uint32_t refill_required; + uint32_t refill_actual; + uint32_t do_if_input; + + if (napi != 0) { + rx_ring->enqueue_is_running = 1; + al_data_memory_barrier(); + } + + do { + unsigned int descs; + + descs = al_eth_pkt_rx(rx_ring->dma_q, hal_pkt); + if (unlikely(descs == 0)) + break; + + device_printf_dbg(rx_ring->dev, "rx_poll: q %d got packet " + "from hal. descs %d\n", qid, descs); + device_printf_dbg(rx_ring->dev, "rx_poll: q %d flags %x. " + "l3 proto %d l4 proto %d\n", qid, hal_pkt->flags, + hal_pkt->l3_proto_idx, hal_pkt->l4_proto_idx); + + /* ignore if detected dma or eth controller errors */ + if ((hal_pkt->flags & (AL_ETH_RX_ERROR | + AL_UDMA_CDESC_ERROR)) != 0) { + device_printf(rx_ring->dev, "receive packet with error. " + "flags = 0x%x\n", hal_pkt->flags); + next_to_clean = AL_ETH_RX_RING_IDX_ADD(rx_ring, + next_to_clean, descs); + continue; + } + + /* allocate mbuf and fill it */ + mbuf = al_eth_rx_mbuf(rx_ring->adapter, rx_ring, hal_pkt, descs, + &next_to_clean); + + /* exit if we failed to retrieve a buffer */ + if (unlikely(mbuf == NULL)) { + next_to_clean = AL_ETH_RX_RING_IDX_ADD(rx_ring, + next_to_clean, descs); + break; + } + + if (__predict_true(rx_ring->netdev->if_capenable & IFCAP_RXCSUM || + rx_ring->netdev->if_capenable & IFCAP_RXCSUM_IPV6)) { + al_eth_rx_checksum(rx_ring->adapter, hal_pkt, mbuf); + } + +#if __FreeBSD_version >= 800000 + mbuf->m_pkthdr.flowid = qid; + M_HASHTYPE_SET(mbuf, M_HASHTYPE_OPAQUE); +#endif + + /* + * LRO is only for IP/TCP packets and TCP checksum of the packet + * should be computed by hardware. + */ + do_if_input = 1; + if ((rx_ring->lro_enabled != 0) && + ((mbuf->m_pkthdr.csum_flags & CSUM_IP_VALID) != 0) && + hal_pkt->l4_proto_idx == AL_ETH_PROTO_ID_TCP) { + /* + * Send to the stack if: + * - LRO not enabled, or + * - no LRO resources, or + * - lro enqueue fails + */ + if (rx_ring->lro.lro_cnt != 0) { + if (tcp_lro_rx(&rx_ring->lro, mbuf, 0) == 0) + do_if_input = 0; + } + } + + if (do_if_input) + (*rx_ring->netdev->if_input)(rx_ring->netdev, mbuf); + + } while (1); + + rx_ring->next_to_clean = next_to_clean; + + refill_required = al_udma_available_get(rx_ring->dma_q); + refill_actual = al_eth_refill_rx_bufs(rx_ring->adapter, qid, + refill_required); + + if (unlikely(refill_actual < refill_required)) { + device_printf_dbg(rx_ring->dev, + "%s: not filling rx queue %d\n", __func__, qid); + } + + while (((queued = LIST_FIRST(&rx_ring->lro.lro_active)) != NULL)) { + LIST_REMOVE(queued, next); + tcp_lro_flush(&rx_ring->lro, queued); + } + + if (napi != 0) { + rx_ring->enqueue_is_running = 0; + al_data_memory_barrier(); + } + /* unmask irq */ + al_eth_irq_config(rx_ring->unmask_reg_offset, rx_ring->unmask_val); +} + +static void +al_eth_start_xmit(void *arg, int pending) +{ + struct al_eth_ring *tx_ring = arg; + struct mbuf *mbuf; + + if (napi != 0) { + tx_ring->enqueue_is_running = 1; + al_data_memory_barrier(); + } + + while (1) { + mtx_lock(&tx_ring->br_mtx); + mbuf = drbr_dequeue(NULL, tx_ring->br); + mtx_unlock(&tx_ring->br_mtx); + + if (mbuf == NULL) + break; + + al_eth_xmit_mbuf(tx_ring, mbuf); + } + + if (napi != 0) { + tx_ring->enqueue_is_running = 0; + al_data_memory_barrier(); + while (1) { + mtx_lock(&tx_ring->br_mtx); + mbuf = drbr_dequeue(NULL, tx_ring->br); + mtx_unlock(&tx_ring->br_mtx); + if (mbuf == NULL) + break; + al_eth_xmit_mbuf(tx_ring, mbuf); + } + } +} + +static int +al_mq_start(struct ifnet *ifp, struct mbuf *m) +{ + struct al_eth_adapter *adapter = ifp->if_softc; + struct al_eth_ring *tx_ring; + int i; + int ret; + + /* Which queue to use */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) + i = m->m_pkthdr.flowid % adapter->num_tx_queues; + else + i = curcpu % adapter->num_tx_queues; + + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) { + return (EFAULT); + } + + tx_ring = &adapter->tx_ring[i]; + + device_printf_dbg(adapter->dev, "dgb start() - assuming link is active, " + "sending packet to queue %d\n", i); + + ret = drbr_enqueue(ifp, tx_ring->br, m); + + /* + * For napi, if work is not running, schedule it. Always schedule + * for casual (non-napi) packet handling. + */ + if ((napi == 0) || ((napi != 0) && (tx_ring->enqueue_is_running == 0))) + taskqueue_enqueue(tx_ring->enqueue_tq, &tx_ring->enqueue_task); + + return (ret); +} + +static void +al_qflush(struct ifnet * ifp) +{ + + /* unused */ +} + +static inline void +al_eth_flow_ctrl_init(struct al_eth_adapter *adapter) +{ + uint8_t default_flow_ctrl; + + default_flow_ctrl = AL_ETH_FLOW_CTRL_TX_PAUSE; + default_flow_ctrl |= AL_ETH_FLOW_CTRL_RX_PAUSE; + + adapter->link_config.flow_ctrl_supported = default_flow_ctrl; +} + +static int +al_eth_flow_ctrl_config(struct al_eth_adapter *adapter) +{ + struct al_eth_flow_control_params *flow_ctrl_params; + uint8_t active = adapter->link_config.flow_ctrl_active; + int i; + + flow_ctrl_params = &adapter->flow_ctrl_params; + + flow_ctrl_params->type = AL_ETH_FLOW_CONTROL_TYPE_LINK_PAUSE; + flow_ctrl_params->obay_enable = + ((active & AL_ETH_FLOW_CTRL_RX_PAUSE) != 0); + flow_ctrl_params->gen_enable = + ((active & AL_ETH_FLOW_CTRL_TX_PAUSE) != 0); + + flow_ctrl_params->rx_fifo_th_high = AL_ETH_FLOW_CTRL_RX_FIFO_TH_HIGH; + flow_ctrl_params->rx_fifo_th_low = AL_ETH_FLOW_CTRL_RX_FIFO_TH_LOW; + flow_ctrl_params->quanta = AL_ETH_FLOW_CTRL_QUANTA; + flow_ctrl_params->quanta_th = AL_ETH_FLOW_CTRL_QUANTA_TH; + + /* map priority to queue index, queue id = priority/2 */ + for (i = 0; i < AL_ETH_FWD_PRIO_TABLE_NUM; i++) + flow_ctrl_params->prio_q_map[0][i] = 1 << (i >> 1); + + al_eth_flow_control_config(&adapter->hal_adapter, flow_ctrl_params); + + return (0); +} + +static void +al_eth_flow_ctrl_enable(struct al_eth_adapter *adapter) +{ + + /* + * change the active configuration to the default / force by ethtool + * and call to configure + */ + adapter->link_config.flow_ctrl_active = + adapter->link_config.flow_ctrl_supported; + + al_eth_flow_ctrl_config(adapter); +} + +static void +al_eth_flow_ctrl_disable(struct al_eth_adapter *adapter) +{ + + adapter->link_config.flow_ctrl_active = 0; + al_eth_flow_ctrl_config(adapter); +} + +static int +al_eth_hw_init(struct al_eth_adapter *adapter) +{ + int rc; + + rc = al_eth_hw_init_adapter(adapter); + if (rc != 0) + return (rc); + + rc = al_eth_mac_config(&adapter->hal_adapter, adapter->mac_mode); + if (rc < 0) { + device_printf(adapter->dev, "%s failed to configure mac!\n", + __func__); + return (rc); + } + + if ((adapter->mac_mode == AL_ETH_MAC_MODE_SGMII) || + (adapter->mac_mode == AL_ETH_MAC_MODE_RGMII && + adapter->phy_exist == FALSE)) { + rc = al_eth_mac_link_config(&adapter->hal_adapter, + adapter->link_config.force_1000_base_x, + adapter->link_config.autoneg, + adapter->link_config.active_speed, + adapter->link_config.active_duplex); + if (rc != 0) { + device_printf(adapter->dev, + "%s failed to configure link parameters!\n", + __func__); + return (rc); + } + } + + rc = al_eth_mdio_config(&adapter->hal_adapter, + AL_ETH_MDIO_TYPE_CLAUSE_22, TRUE /* shared_mdio_if */, + adapter->ref_clk_freq, adapter->mdio_freq); + if (rc != 0) { + device_printf(adapter->dev, "%s failed at mdio config!\n", + __func__); + return (rc); + } + + al_eth_flow_ctrl_init(adapter); + + return (rc); +} + +static int +al_eth_hw_stop(struct al_eth_adapter *adapter) +{ + + al_eth_mac_stop(&adapter->hal_adapter); + + /* + * wait till pending rx packets written and UDMA becomes idle, + * the MAC has ~10KB fifo, 10us should be enought time for the + * UDMA to write to the memory + */ + DELAY(10); + + al_eth_adapter_stop(&adapter->hal_adapter); + + adapter->flags |= AL_ETH_FLAG_RESET_REQUESTED; + + /* disable flow ctrl to avoid pause packets*/ + al_eth_flow_ctrl_disable(adapter); + + return (0); +} + +/* + * al_eth_intr_intx_all - Legacy Interrupt Handler for all interrupts + * @irq: interrupt number + * @data: pointer to a network interface device structure + */ +static int +al_eth_intr_intx_all(void *data) +{ + struct al_eth_adapter *adapter = data; + + struct unit_regs __iomem *regs_base = + (struct unit_regs __iomem *)adapter->udma_base; + uint32_t reg; + + reg = al_udma_iofic_read_cause(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_A); + if (likely(reg)) + device_printf_dbg(adapter->dev, "%s group A cause %x\n", + __func__, reg); + + if (unlikely(reg & AL_INT_GROUP_A_GROUP_D_SUM)) { + struct al_iofic_grp_ctrl __iomem *sec_ints_base; + uint32_t cause_d = al_udma_iofic_read_cause(regs_base, + AL_UDMA_IOFIC_LEVEL_PRIMARY, AL_INT_GROUP_D); + + sec_ints_base = + ®s_base->gen.interrupt_regs.secondary_iofic_ctrl[0]; + if (cause_d != 0) { + device_printf_dbg(adapter->dev, + "got interrupt from group D. cause %x\n", cause_d); + + cause_d = al_iofic_read_cause(sec_ints_base, + AL_INT_GROUP_A); + device_printf(adapter->dev, + "secondary A cause %x\n", cause_d); + + cause_d = al_iofic_read_cause(sec_ints_base, + AL_INT_GROUP_B); + + device_printf_dbg(adapter->dev, + "secondary B cause %x\n", cause_d); + } + } + if ((reg & AL_INT_GROUP_A_GROUP_B_SUM) != 0 ) { + uint32_t cause_b = al_udma_iofic_read_cause(regs_base, + AL_UDMA_IOFIC_LEVEL_PRIMARY, AL_INT_GROUP_B); + int qid; + device_printf_dbg(adapter->dev, "secondary B cause %x\n", + cause_b); + for (qid = 0; qid < adapter->num_rx_queues; qid++) { + if (cause_b & (1 << qid)) { + /* mask */ + al_udma_iofic_mask( + (struct unit_regs __iomem *)adapter->udma_base, + AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_B, 1 << qid); + } + } + } + if ((reg & AL_INT_GROUP_A_GROUP_C_SUM) != 0) { + uint32_t cause_c = al_udma_iofic_read_cause(regs_base, + AL_UDMA_IOFIC_LEVEL_PRIMARY, AL_INT_GROUP_C); + int qid; + device_printf_dbg(adapter->dev, "secondary C cause %x\n", cause_c); + for (qid = 0; qid < adapter->num_tx_queues; qid++) { + if ((cause_c & (1 << qid)) != 0) { + al_udma_iofic_mask( + (struct unit_regs __iomem *)adapter->udma_base, + AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_C, 1 << qid); + } + } + } + + al_eth_tx_cmlp_irq_filter(adapter->tx_ring); + + return (0); +} + +static int +al_eth_intr_msix_all(void *data) +{ + struct al_eth_adapter *adapter = data; + + device_printf_dbg(adapter->dev, "%s\n", __func__); + return (0); +} + +static int +al_eth_intr_msix_mgmt(void *data) +{ + struct al_eth_adapter *adapter = data; + + device_printf_dbg(adapter->dev, "%s\n", __func__); + return (0); +} + +static int +al_eth_enable_msix(struct al_eth_adapter *adapter) +{ + int i, msix_vecs, rc, count; + + device_printf_dbg(adapter->dev, "%s\n", __func__); + msix_vecs = 1 + adapter->num_rx_queues + adapter->num_tx_queues; + + device_printf_dbg(adapter->dev, + "Try to enable MSIX, vector numbers = %d\n", msix_vecs); + + adapter->msix_entries = malloc(msix_vecs*sizeof(*adapter->msix_entries), + M_IFAL, M_ZERO | M_WAITOK); + + if (adapter->msix_entries == 0) { + device_printf_dbg(adapter->dev, "failed to allocate" + " msix_entries %d\n", msix_vecs); + rc = ENOMEM; + goto exit; + } + + /* management vector (GROUP_A) @2*/ + adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].entry = 2; + adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].vector = 0; + + /* rx queues start @3 */ + for (i = 0; i < adapter->num_rx_queues; i++) { + int irq_idx = AL_ETH_RXQ_IRQ_IDX(adapter, i); + + adapter->msix_entries[irq_idx].entry = 3 + i; + adapter->msix_entries[irq_idx].vector = 0; + } + /* tx queues start @7 */ + for (i = 0; i < adapter->num_tx_queues; i++) { + int irq_idx = AL_ETH_TXQ_IRQ_IDX(adapter, i); + + adapter->msix_entries[irq_idx].entry = 3 + + AL_ETH_MAX_HW_QUEUES + i; + adapter->msix_entries[irq_idx].vector = 0; + } + + count = msix_vecs + 2; /* entries start from 2 */ + rc = pci_alloc_msix(adapter->dev, &count); + + if (rc != 0) { + device_printf_dbg(adapter->dev, "failed to allocate MSIX " + "vectors %d\n", msix_vecs+2); + device_printf_dbg(adapter->dev, "ret = %d\n", rc); + goto msix_entries_exit; + } + + if (count != msix_vecs + 2) { + device_printf_dbg(adapter->dev, "failed to allocate all MSIX " + "vectors %d, allocated %d\n", msix_vecs+2, count); + rc = ENOSPC; + goto msix_entries_exit; + } + + for (i = 0; i < msix_vecs; i++) + adapter->msix_entries[i].vector = 2 + 1 + i; + + device_printf_dbg(adapter->dev, "successfully enabled MSIX," + " vectors %d\n", msix_vecs); + + adapter->msix_vecs = msix_vecs; + adapter->flags |= AL_ETH_FLAG_MSIX_ENABLED; + goto exit; + +msix_entries_exit: + adapter->msix_vecs = 0; + free(adapter->msix_entries, M_IFAL); + adapter->msix_entries = NULL; + +exit: + return (rc); +} + +static int +al_eth_setup_int_mode(struct al_eth_adapter *adapter) +{ + int i, rc; + + rc = al_eth_enable_msix(adapter); + if (rc != 0) { + device_printf(adapter->dev, "Failed to enable MSIX mode.\n"); + return (rc); + } + + adapter->irq_vecs = max(1, adapter->msix_vecs); + /* single INTX mode */ + if (adapter->msix_vecs == 0) { + snprintf(adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].name, + AL_ETH_IRQNAME_SIZE, "al-eth-intx-all@pci:%s", + device_get_name(adapter->dev)); + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].handler = + al_eth_intr_intx_all; + /* IRQ vector will be resolved from device resources */ + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].vector = 0; + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].data = adapter; + + device_printf(adapter->dev, "%s and vector %d \n", __func__, + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].vector); + + return (0); + } + /* single MSI-X mode */ + if (adapter->msix_vecs == 1) { + snprintf(adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].name, + AL_ETH_IRQNAME_SIZE, "al-eth-msix-all@pci:%s", + device_get_name(adapter->dev)); + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].handler = + al_eth_intr_msix_all; + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].vector = + adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].vector; + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].data = adapter; + + return (0); + } + /* MSI-X per queue */ + snprintf(adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].name, AL_ETH_IRQNAME_SIZE, + "al-eth-msix-mgmt@pci:%s", device_get_name(adapter->dev)); + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].handler = al_eth_intr_msix_mgmt; + + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].data = adapter; + adapter->irq_tbl[AL_ETH_MGMT_IRQ_IDX].vector = + adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].vector; + + for (i = 0; i < adapter->num_rx_queues; i++) { + int irq_idx = AL_ETH_RXQ_IRQ_IDX(adapter, i); + + snprintf(adapter->irq_tbl[irq_idx].name, AL_ETH_IRQNAME_SIZE, + "al-eth-rx-comp-%d@pci:%s", i, + device_get_name(adapter->dev)); + adapter->irq_tbl[irq_idx].handler = al_eth_rx_recv_irq_filter; + adapter->irq_tbl[irq_idx].data = &adapter->rx_ring[i]; + adapter->irq_tbl[irq_idx].vector = + adapter->msix_entries[irq_idx].vector; + } + + for (i = 0; i < adapter->num_tx_queues; i++) { + int irq_idx = AL_ETH_TXQ_IRQ_IDX(adapter, i); + + snprintf(adapter->irq_tbl[irq_idx].name, + AL_ETH_IRQNAME_SIZE, "al-eth-tx-comp-%d@pci:%s", i, + device_get_name(adapter->dev)); + adapter->irq_tbl[irq_idx].handler = al_eth_tx_cmlp_irq_filter; + adapter->irq_tbl[irq_idx].data = &adapter->tx_ring[i]; + adapter->irq_tbl[irq_idx].vector = + adapter->msix_entries[irq_idx].vector; + } + + return (0); +} + +static void +__al_eth_free_irq(struct al_eth_adapter *adapter) +{ + struct al_eth_irq *irq; + int i, rc; + + for (i = 0; i < adapter->irq_vecs; i++) { + irq = &adapter->irq_tbl[i]; + if (irq->requested != 0) { + device_printf_dbg(adapter->dev, "tear down irq: %d\n", + irq->vector); + rc = bus_teardown_intr(adapter->dev, irq->res, + irq->cookie); + if (rc != 0) + device_printf(adapter->dev, "failed to tear " + "down irq: %d\n", irq->vector); + + } + irq->requested = 0; + } +} + +static void +al_eth_free_irq(struct al_eth_adapter *adapter) +{ + struct al_eth_irq *irq; + int i, rc; +#ifdef CONFIG_RFS_ACCEL + if (adapter->msix_vecs >= 1) { + free_irq_cpu_rmap(adapter->netdev->rx_cpu_rmap); + adapter->netdev->rx_cpu_rmap = NULL; + } +#endif + + __al_eth_free_irq(adapter); + + for (i = 0; i < adapter->irq_vecs; i++) { + irq = &adapter->irq_tbl[i]; + if (irq->res == NULL) + continue; + device_printf_dbg(adapter->dev, "release resource irq: %d\n", + irq->vector); + rc = bus_release_resource(adapter->dev, SYS_RES_IRQ, irq->vector, + irq->res); + irq->res = NULL; + if (rc != 0) + device_printf(adapter->dev, "dev has no parent while " + "releasing res for irq: %d\n", irq->vector); + } + + pci_release_msi(adapter->dev); + + adapter->flags &= ~AL_ETH_FLAG_MSIX_ENABLED; + + adapter->msix_vecs = 0; + free(adapter->msix_entries, M_IFAL); + adapter->msix_entries = NULL; +} + +static int +al_eth_request_irq(struct al_eth_adapter *adapter) +{ + unsigned long flags; + struct al_eth_irq *irq; + int rc = 0, i, v; + + if ((adapter->flags & AL_ETH_FLAG_MSIX_ENABLED) != 0) + flags = RF_ACTIVE; + else + flags = RF_ACTIVE | RF_SHAREABLE; + + for (i = 0; i < adapter->irq_vecs; i++) { + irq = &adapter->irq_tbl[i]; + + if (irq->requested != 0) + continue; + + irq->res = bus_alloc_resource_any(adapter->dev, SYS_RES_IRQ, + &irq->vector, flags); + if (irq->res == NULL) { + device_printf(adapter->dev, "could not allocate " + "irq vector=%d\n", irq->vector); + rc = ENXIO; + goto exit_res; + } + + if ((rc = bus_setup_intr(adapter->dev, irq->res, + INTR_TYPE_NET | INTR_MPSAFE, irq->handler, + NULL, irq->data, &irq->cookie)) != 0) { + device_printf(adapter->dev, "failed to register " + "interrupt handler for irq %ju: %d\n", + (uintmax_t)rman_get_start(irq->res), rc); + goto exit_intr; + } + irq->requested = 1; + } + goto exit; + +exit_intr: + v = i - 1; /* -1 because we omit the operation that failed */ + while (v-- >= 0) { + int bti; + irq = &adapter->irq_tbl[v]; + bti = bus_teardown_intr(adapter->dev, irq->res, irq->cookie); + if (bti != 0) { + device_printf(adapter->dev, "failed to tear " + "down irq: %d\n", irq->vector); + } + + irq->requested = 0; + device_printf_dbg(adapter->dev, "exit_intr: releasing irq %d\n", + irq->vector); + } + +exit_res: + v = i - 1; /* -1 because we omit the operation that failed */ + while (v-- >= 0) { + int brr; + irq = &adapter->irq_tbl[v]; + device_printf_dbg(adapter->dev, "exit_res: releasing resource" + " for irq %d\n", irq->vector); + brr = bus_release_resource(adapter->dev, SYS_RES_IRQ, + irq->vector, irq->res); + if (brr != 0) + device_printf(adapter->dev, "dev has no parent while " + "releasing res for irq: %d\n", irq->vector); + irq->res = NULL; + } + +exit: + return (rc); +} + +/** + * al_eth_setup_tx_resources - allocate Tx resources (Descriptors) + * @adapter: network interface device structure + * @qid: queue index + * + * Return 0 on success, negative on failure + **/ +static int +al_eth_setup_tx_resources(struct al_eth_adapter *adapter, int qid) +{ + struct al_eth_ring *tx_ring = &adapter->tx_ring[qid]; + struct device *dev = tx_ring->dev; + struct al_udma_q_params *q_params = &tx_ring->q_params; + int size; + int ret; + + if (adapter->up) + return (0); + + size = sizeof(struct al_eth_tx_buffer) * tx_ring->sw_count; + + tx_ring->tx_buffer_info = malloc(size, M_IFAL, M_ZERO | M_WAITOK); + if (tx_ring->tx_buffer_info == NULL) + return (ENOMEM); + + tx_ring->descs_size = tx_ring->hw_count * sizeof(union al_udma_desc); + q_params->size = tx_ring->hw_count; + + ret = al_dma_alloc_coherent(dev, &q_params->desc_phy_base_tag, + (bus_dmamap_t *)&q_params->desc_phy_base_map, + (bus_addr_t *)&q_params->desc_phy_base, + (void**)&q_params->desc_base, tx_ring->descs_size); + if (ret != 0) { + device_printf(dev, "failed to al_dma_alloc_coherent," + " ret = %d\n", ret); + return (ENOMEM); + } + + if (q_params->desc_base == NULL) + return (ENOMEM); + + device_printf_dbg(dev, "Initializing ring queues %d\n", qid); + + /* Allocate Ring Queue */ + mtx_init(&tx_ring->br_mtx, "AlRingMtx", NULL, MTX_DEF); + tx_ring->br = buf_ring_alloc(AL_BR_SIZE, M_DEVBUF, M_WAITOK, + &tx_ring->br_mtx); + if (tx_ring->br == NULL) { + device_printf(dev, "Critical Failure setting up buf ring\n"); + return (ENOMEM); + } + + /* Allocate taskqueues */ + TASK_INIT(&tx_ring->enqueue_task, 0, al_eth_start_xmit, tx_ring); + tx_ring->enqueue_tq = taskqueue_create_fast("al_tx_enque", M_NOWAIT, + taskqueue_thread_enqueue, &tx_ring->enqueue_tq); + taskqueue_start_threads(&tx_ring->enqueue_tq, 1, PI_NET, "%s txeq", + device_get_nameunit(adapter->dev)); + TASK_INIT(&tx_ring->cmpl_task, 0, al_eth_tx_cmpl_work, tx_ring); + tx_ring->cmpl_tq = taskqueue_create_fast("al_tx_cmpl", M_NOWAIT, + taskqueue_thread_enqueue, &tx_ring->cmpl_tq); + taskqueue_start_threads(&tx_ring->cmpl_tq, 1, PI_REALTIME, "%s txcq", + device_get_nameunit(adapter->dev)); + + /* Setup DMA descriptor areas. */ + ret = bus_dma_tag_create(bus_get_dma_tag(dev), + 1, 0, /* alignment, bounds */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + AL_TSO_SIZE, /* maxsize */ + AL_ETH_PKT_MAX_BUFS, /* nsegments */ + PAGE_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockfuncarg */ + &tx_ring->dma_buf_tag); + + if (ret != 0) { + device_printf(dev,"Unable to allocate dma_buf_tag, ret = %d\n", + ret); + return (ret); + } + + for (size = 0; size < tx_ring->sw_count; size++) { + ret = bus_dmamap_create(tx_ring->dma_buf_tag, 0, + &tx_ring->tx_buffer_info[size].dma_map); + if (ret != 0) { + device_printf(dev, "Unable to map DMA TX " + "buffer memory [iter=%d]\n", size); + return (ret); + } + } + + /* completion queue not used for tx */ + q_params->cdesc_base = NULL; + /* size in bytes of the udma completion ring descriptor */ + q_params->cdesc_size = 8; + tx_ring->next_to_use = 0; + tx_ring->next_to_clean = 0; + + return (0); +} + +/* + * al_eth_free_tx_resources - Free Tx Resources per Queue + * @adapter: network interface device structure + * @qid: queue index + * + * Free all transmit software resources + */ +static void +al_eth_free_tx_resources(struct al_eth_adapter *adapter, int qid) +{ + struct al_eth_ring *tx_ring = &adapter->tx_ring[qid]; + struct al_udma_q_params *q_params = &tx_ring->q_params; + int size; + + /* At this point interrupts' handlers must be deactivated */ + while (taskqueue_cancel(tx_ring->cmpl_tq, &tx_ring->cmpl_task, NULL)) + taskqueue_drain(tx_ring->cmpl_tq, &tx_ring->cmpl_task); + + taskqueue_free(tx_ring->cmpl_tq); + while (taskqueue_cancel(tx_ring->enqueue_tq, + &tx_ring->enqueue_task, NULL)) { + taskqueue_drain(tx_ring->enqueue_tq, &tx_ring->enqueue_task); + } + + taskqueue_free(tx_ring->enqueue_tq); + + if (tx_ring->br != NULL) { + drbr_flush(adapter->netdev, tx_ring->br); + buf_ring_free(tx_ring->br, M_DEVBUF); + } + + for (size = 0; size < tx_ring->sw_count; size++) { + m_freem(tx_ring->tx_buffer_info[size].m); + tx_ring->tx_buffer_info[size].m = NULL; + + bus_dmamap_unload(tx_ring->dma_buf_tag, + tx_ring->tx_buffer_info[size].dma_map); + bus_dmamap_destroy(tx_ring->dma_buf_tag, + tx_ring->tx_buffer_info[size].dma_map); + } + bus_dma_tag_destroy(tx_ring->dma_buf_tag); + + free(tx_ring->tx_buffer_info, M_IFAL); + tx_ring->tx_buffer_info = NULL; + + mtx_destroy(&tx_ring->br_mtx); + + /* if not set, then don't free */ + if (q_params->desc_base == NULL) + return; + + al_dma_free_coherent(q_params->desc_phy_base_tag, + q_params->desc_phy_base_map, q_params->desc_base); + + q_params->desc_base = NULL; +} + +/* + * al_eth_free_all_tx_resources - Free Tx Resources for All Queues + * @adapter: board private structure + * + * Free all transmit software resources + */ +static void +al_eth_free_all_tx_resources(struct al_eth_adapter *adapter) +{ + int i; + + for (i = 0; i < adapter->num_tx_queues; i++) + if (adapter->tx_ring[i].q_params.desc_base) + al_eth_free_tx_resources(adapter, i); +} + +/* + * al_eth_setup_rx_resources - allocate Rx resources (Descriptors) + * @adapter: network interface device structure + * @qid: queue index + * + * Returns 0 on success, negative on failure + */ +static int +al_eth_setup_rx_resources(struct al_eth_adapter *adapter, unsigned int qid) +{ + struct al_eth_ring *rx_ring = &adapter->rx_ring[qid]; + struct device *dev = rx_ring->dev; + struct al_udma_q_params *q_params = &rx_ring->q_params; + int size; + int ret; + + size = sizeof(struct al_eth_rx_buffer) * rx_ring->sw_count; + + /* alloc extra element so in rx path we can always prefetch rx_info + 1 */ + size += 1; + + rx_ring->rx_buffer_info = malloc(size, M_IFAL, M_ZERO | M_WAITOK); + if (rx_ring->rx_buffer_info == NULL) + return (ENOMEM); + + rx_ring->descs_size = rx_ring->hw_count * sizeof(union al_udma_desc); + q_params->size = rx_ring->hw_count; + + ret = al_dma_alloc_coherent(dev, &q_params->desc_phy_base_tag, + &q_params->desc_phy_base_map, + (bus_addr_t *)&q_params->desc_phy_base, + (void**)&q_params->desc_base, rx_ring->descs_size); + + if ((q_params->desc_base == NULL) || (ret != 0)) + return (ENOMEM); + + /* size in bytes of the udma completion ring descriptor */ + q_params->cdesc_size = 16; + rx_ring->cdescs_size = rx_ring->hw_count * q_params->cdesc_size; + ret = al_dma_alloc_coherent(dev, &q_params->cdesc_phy_base_tag, + &q_params->cdesc_phy_base_map, + (bus_addr_t *)&q_params->cdesc_phy_base, + (void**)&q_params->cdesc_base, rx_ring->cdescs_size); + + if ((q_params->cdesc_base == NULL) || (ret != 0)) + return (ENOMEM); + + /* Allocate taskqueues */ + TASK_INIT(&rx_ring->enqueue_task, 0, al_eth_rx_recv_work, rx_ring); + rx_ring->enqueue_tq = taskqueue_create_fast("al_rx_enque", M_NOWAIT, + taskqueue_thread_enqueue, &rx_ring->enqueue_tq); + taskqueue_start_threads(&rx_ring->enqueue_tq, 1, PI_NET, "%s rxeq", + device_get_nameunit(adapter->dev)); + + /* Setup DMA descriptor areas. */ + ret = bus_dma_tag_create(bus_get_dma_tag(dev), + 1, 0, /* alignment, bounds */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + AL_TSO_SIZE, /* maxsize */ + 1, /* nsegments */ + AL_TSO_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockfuncarg */ + &rx_ring->dma_buf_tag); + + if (ret != 0) { + device_printf(dev,"Unable to allocate RX dma_buf_tag\n"); + return (ret); + } + + for (size = 0; size < rx_ring->sw_count; size++) { + ret = bus_dmamap_create(rx_ring->dma_buf_tag, 0, + &rx_ring->rx_buffer_info[size].dma_map); + if (ret != 0) { + device_printf(dev,"Unable to map DMA RX buffer memory\n"); + return (ret); + } + } + + /* Zero out the descriptor ring */ + memset(q_params->cdesc_base, 0, rx_ring->cdescs_size); + + /* Create LRO for the ring */ + if ((adapter->netdev->if_capenable & IFCAP_LRO) != 0) { + int err = tcp_lro_init(&rx_ring->lro); + if (err != 0) { + device_printf(adapter->dev, + "LRO[%d] Initialization failed!\n", qid); + } else { + device_printf_dbg(adapter->dev, + "RX Soft LRO[%d] Initialized\n", qid); + rx_ring->lro_enabled = TRUE; + rx_ring->lro.ifp = adapter->netdev; + } + } + + rx_ring->next_to_clean = 0; + rx_ring->next_to_use = 0; + + return (0); +} + +/* + * al_eth_free_rx_resources - Free Rx Resources + * @adapter: network interface device structure + * @qid: queue index + * + * Free all receive software resources + */ +static void +al_eth_free_rx_resources(struct al_eth_adapter *adapter, unsigned int qid) +{ + struct al_eth_ring *rx_ring = &adapter->rx_ring[qid]; + struct al_udma_q_params *q_params = &rx_ring->q_params; + int size; + + /* At this point interrupts' handlers must be deactivated */ + while (taskqueue_cancel(rx_ring->enqueue_tq, + &rx_ring->enqueue_task, NULL)) { + taskqueue_drain(rx_ring->enqueue_tq, &rx_ring->enqueue_task); + } + + taskqueue_free(rx_ring->enqueue_tq); + + for (size = 0; size < rx_ring->sw_count; size++) { + m_freem(rx_ring->rx_buffer_info[size].m); + rx_ring->rx_buffer_info[size].m = NULL; + bus_dmamap_unload(rx_ring->dma_buf_tag, + rx_ring->rx_buffer_info[size].dma_map); + bus_dmamap_destroy(rx_ring->dma_buf_tag, + rx_ring->rx_buffer_info[size].dma_map); + } + bus_dma_tag_destroy(rx_ring->dma_buf_tag); + + free(rx_ring->rx_buffer_info, M_IFAL); + rx_ring->rx_buffer_info = NULL; + + /* if not set, then don't free */ + if (q_params->desc_base == NULL) + return; + + al_dma_free_coherent(q_params->desc_phy_base_tag, + q_params->desc_phy_base_map, q_params->desc_base); + + q_params->desc_base = NULL; + + /* if not set, then don't free */ + if (q_params->cdesc_base == NULL) + return; + + al_dma_free_coherent(q_params->cdesc_phy_base_tag, + q_params->cdesc_phy_base_map, q_params->cdesc_base); + + q_params->cdesc_phy_base = 0; + + /* Free LRO resources */ + tcp_lro_free(&rx_ring->lro); +} + +/* + * al_eth_free_all_rx_resources - Free Rx Resources for All Queues + * @adapter: board private structure + * + * Free all receive software resources + */ +static void +al_eth_free_all_rx_resources(struct al_eth_adapter *adapter) +{ + int i; + + for (i = 0; i < adapter->num_rx_queues; i++) + if (adapter->rx_ring[i].q_params.desc_base != 0) + al_eth_free_rx_resources(adapter, i); +} + +/* + * al_eth_setup_all_rx_resources - allocate all queues Rx resources + * @adapter: board private structure + * + * Return 0 on success, negative on failure + */ +static int +al_eth_setup_all_rx_resources(struct al_eth_adapter *adapter) +{ + int i, rc = 0; + + for (i = 0; i < adapter->num_rx_queues; i++) { + rc = al_eth_setup_rx_resources(adapter, i); + if (rc == 0) + continue; + + device_printf(adapter->dev, "Allocation for Rx Queue %u failed\n", i); + goto err_setup_rx; + } + return (0); + +err_setup_rx: + /* rewind the index freeing the rings as we go */ + while (i--) + al_eth_free_rx_resources(adapter, i); + return (rc); +} + +/* + * al_eth_setup_all_tx_resources - allocate all queues Tx resources + * @adapter: private structure + * + * Return 0 on success, negative on failure + */ +static int +al_eth_setup_all_tx_resources(struct al_eth_adapter *adapter) +{ + int i, rc = 0; + + for (i = 0; i < adapter->num_tx_queues; i++) { + rc = al_eth_setup_tx_resources(adapter, i); + if (rc == 0) + continue; + + device_printf(adapter->dev, + "Allocation for Tx Queue %u failed\n", i); + goto err_setup_tx; + } + + return (0); + +err_setup_tx: + /* rewind the index freeing the rings as we go */ + while (i--) + al_eth_free_tx_resources(adapter, i); + + return (rc); +} + +static void +al_eth_disable_int_sync(struct al_eth_adapter *adapter) +{ + + /* disable forwarding interrupts from eth through pci end point */ + if ((adapter->board_type == ALPINE_FPGA_NIC) || + (adapter->board_type == ALPINE_NIC)) { + al_eth_forward_int_config((uint32_t*)adapter->internal_pcie_base + + AL_REG_OFFSET_FORWARD_INTR, AL_DIS_FORWARD_INTR); + } + + /* mask hw interrupts */ + al_eth_interrupts_mask(adapter); +} + +static void +al_eth_interrupts_unmask(struct al_eth_adapter *adapter) +{ + uint32_t group_a_mask = AL_INT_GROUP_A_GROUP_D_SUM; /* enable group D summery */ + uint32_t group_b_mask = (1 << adapter->num_rx_queues) - 1;/* bit per Rx q*/ + uint32_t group_c_mask = (1 << adapter->num_tx_queues) - 1;/* bit per Tx q*/ + uint32_t group_d_mask = 3 << 8; + struct unit_regs __iomem *regs_base = + (struct unit_regs __iomem *)adapter->udma_base; + + if (adapter->int_mode == AL_IOFIC_MODE_LEGACY) + group_a_mask |= AL_INT_GROUP_A_GROUP_B_SUM | + AL_INT_GROUP_A_GROUP_C_SUM | + AL_INT_GROUP_A_GROUP_D_SUM; + + al_udma_iofic_unmask(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_A, group_a_mask); + al_udma_iofic_unmask(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_B, group_b_mask); + al_udma_iofic_unmask(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_C, group_c_mask); + al_udma_iofic_unmask(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_D, group_d_mask); +} + +static void +al_eth_interrupts_mask(struct al_eth_adapter *adapter) +{ + struct unit_regs __iomem *regs_base = + (struct unit_regs __iomem *)adapter->udma_base; + + /* mask all interrupts */ + al_udma_iofic_mask(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_A, AL_MASK_GROUP_A_INT); + al_udma_iofic_mask(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_B, AL_MASK_GROUP_B_INT); + al_udma_iofic_mask(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_C, AL_MASK_GROUP_C_INT); + al_udma_iofic_mask(regs_base, AL_UDMA_IOFIC_LEVEL_PRIMARY, + AL_INT_GROUP_D, AL_MASK_GROUP_D_INT); +} + +static int +al_eth_configure_int_mode(struct al_eth_adapter *adapter) +{ + enum al_iofic_mode int_mode; + uint32_t m2s_errors_disable = AL_M2S_MASK_INIT; + uint32_t m2s_aborts_disable = AL_M2S_MASK_INIT; + uint32_t s2m_errors_disable = AL_S2M_MASK_INIT; + uint32_t s2m_aborts_disable = AL_S2M_MASK_INIT; + + /* single INTX mode */ + if (adapter->msix_vecs == 0) + int_mode = AL_IOFIC_MODE_LEGACY; + else if (adapter->msix_vecs > 1) + int_mode = AL_IOFIC_MODE_MSIX_PER_Q; + else { + device_printf(adapter->dev, + "udma doesn't support single MSI-X mode yet.\n"); + return (EIO); + } + + if (adapter->board_type != ALPINE_INTEGRATED) { + m2s_errors_disable |= AL_M2S_S2M_MASK_NOT_INT; + m2s_errors_disable |= AL_M2S_S2M_MASK_NOT_INT; + s2m_aborts_disable |= AL_M2S_S2M_MASK_NOT_INT; + s2m_aborts_disable |= AL_M2S_S2M_MASK_NOT_INT; + } + + if (al_udma_iofic_config((struct unit_regs __iomem *)adapter->udma_base, + int_mode, m2s_errors_disable, m2s_aborts_disable, + s2m_errors_disable, s2m_aborts_disable)) { + device_printf(adapter->dev, + "al_udma_unit_int_config failed!.\n"); + return (EIO); + } + adapter->int_mode = int_mode; + device_printf_dbg(adapter->dev, "using %s interrupt mode\n", + int_mode == AL_IOFIC_MODE_LEGACY ? "INTx" : + int_mode == AL_IOFIC_MODE_MSIX_PER_Q ? "MSI-X per Queue" : "Unknown"); + /* set interrupt moderation resolution to 15us */ + al_iofic_moder_res_config(&((struct unit_regs *)(adapter->udma_base))->gen.interrupt_regs.main_iofic, AL_INT_GROUP_B, 15); + al_iofic_moder_res_config(&((struct unit_regs *)(adapter->udma_base))->gen.interrupt_regs.main_iofic, AL_INT_GROUP_C, 15); + /* by default interrupt coalescing is disabled */ + adapter->tx_usecs = 0; + adapter->rx_usecs = 0; + + return (0); +} + +/* + * ethtool_rxfh_indir_default - get default value for RX flow hash indirection + * @index: Index in RX flow hash indirection table + * @n_rx_rings: Number of RX rings to use + * + * This function provides the default policy for RX flow hash indirection. + */ +static inline uint32_t +ethtool_rxfh_indir_default(uint32_t index, uint32_t n_rx_rings) +{ + + return (index % n_rx_rings); +} + +static void* +al_eth_update_stats(struct al_eth_adapter *adapter) +{ + struct al_eth_mac_stats *mac_stats = &adapter->mac_stats; + + if (adapter->up == 0) + return (NULL); + + al_eth_mac_stats_get(&adapter->hal_adapter, mac_stats); + + return (NULL); +} + +static uint64_t +al_get_counter(struct ifnet *ifp, ift_counter cnt) +{ + struct al_eth_adapter *adapter; + struct al_eth_mac_stats *mac_stats; + uint64_t rv; + + adapter = if_getsoftc(ifp); + mac_stats = &adapter->mac_stats; + + switch (cnt) { + case IFCOUNTER_IPACKETS: + return (mac_stats->aFramesReceivedOK); /* including pause frames */ + case IFCOUNTER_OPACKETS: + return (mac_stats->aFramesTransmittedOK); + case IFCOUNTER_IBYTES: + return (mac_stats->aOctetsReceivedOK); + case IFCOUNTER_OBYTES: + return (mac_stats->aOctetsTransmittedOK); + case IFCOUNTER_IMCASTS: + return (mac_stats->ifInMulticastPkts); + case IFCOUNTER_OMCASTS: + return (mac_stats->ifOutMulticastPkts); + case IFCOUNTER_COLLISIONS: + return (0); + case IFCOUNTER_IQDROPS: + return (mac_stats->etherStatsDropEvents); + case IFCOUNTER_IERRORS: + rv = mac_stats->ifInErrors + + mac_stats->etherStatsUndersizePkts + /* good but short */ + mac_stats->etherStatsFragments + /* short and bad*/ + mac_stats->etherStatsJabbers + /* with crc errors */ + mac_stats->etherStatsOversizePkts + + mac_stats->aFrameCheckSequenceErrors + + mac_stats->aAlignmentErrors; + return (rv); + case IFCOUNTER_OERRORS: + return (mac_stats->ifOutErrors); + default: + return (if_get_counter_default(ifp, cnt)); + } +} + +/* + * Unicast, Multicast and Promiscuous mode set + * + * The set_rx_mode entry point is called whenever the unicast or multicast + * address lists or the network interface flags are updated. This routine is + * responsible for configuring the hardware for proper unicast, multicast, + * promiscuous mode, and all-multi behavior. + */ +#define MAX_NUM_MULTICAST_ADDRESSES 32 +#define MAX_NUM_ADDRESSES 32 + +static void +al_eth_set_rx_mode(struct al_eth_adapter *adapter) +{ + struct ifnet *ifp = adapter->netdev; + struct ifmultiaddr *ifma; /* multicast addresses configured */ + struct ifaddr *ifua; /* unicast address */ + int mc = 0; + int uc = 0; + uint8_t i; + unsigned char *mac; + + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mc == MAX_NUM_MULTICAST_ADDRESSES) + break; + + mac = LLADDR((struct sockaddr_dl *) ifma->ifma_addr); + /* default mc address inside mac address */ + if (mac[3] != 0 && mac[4] != 0 && mac[5] != 1) + mc++; + } + if_maddr_runlock(ifp); + + if_addr_rlock(ifp); + TAILQ_FOREACH(ifua, &ifp->if_addrhead, ifa_link) { + if (ifua->ifa_addr->sa_family != AF_LINK) + continue; + if (uc == MAX_NUM_ADDRESSES) + break; + uc++; + } + if_addr_runlock(ifp); + + if ((ifp->if_flags & IFF_PROMISC) != 0) { + al_eth_mac_table_promiscuous_set(adapter, true); + } else { + if ((ifp->if_flags & IFF_ALLMULTI) != 0) { + /* This interface is in all-multicasts mode (used by multicast routers). */ + al_eth_mac_table_all_multicast_add(adapter, + AL_ETH_MAC_TABLE_ALL_MULTICAST_IDX, 1); + } else { + if (mc == 0) { + al_eth_mac_table_entry_clear(adapter, + AL_ETH_MAC_TABLE_ALL_MULTICAST_IDX); + } else { + al_eth_mac_table_all_multicast_add(adapter, + AL_ETH_MAC_TABLE_ALL_MULTICAST_IDX, 1); + } + } + if (uc != 0) { + i = AL_ETH_MAC_TABLE_UNICAST_IDX_BASE + 1; + if (uc > AL_ETH_MAC_TABLE_UNICAST_MAX_COUNT) { + /* + * In this case there are more addresses then + * entries in the mac table - set promiscuous + */ + al_eth_mac_table_promiscuous_set(adapter, true); + return; + } + + /* clear the last configuration */ + while (i < (AL_ETH_MAC_TABLE_UNICAST_IDX_BASE + + AL_ETH_MAC_TABLE_UNICAST_MAX_COUNT)) { + al_eth_mac_table_entry_clear(adapter, i); + i++; + } + + /* set new addresses */ + i = AL_ETH_MAC_TABLE_UNICAST_IDX_BASE + 1; + if_addr_rlock(ifp); + TAILQ_FOREACH(ifua, &ifp->if_addrhead, ifa_link) { + if (ifua->ifa_addr->sa_family != AF_LINK) { + continue; + } + al_eth_mac_table_unicast_add(adapter, i, + (unsigned char *)ifua->ifa_addr, 1); + i++; + } + if_addr_runlock(ifp); + + } + al_eth_mac_table_promiscuous_set(adapter, false); + } +} + +static void +al_eth_config_rx_fwd(struct al_eth_adapter *adapter) +{ + struct al_eth_fwd_ctrl_table_entry entry; + int i; + + /* let priority be equal to pbits */ + for (i = 0; i < AL_ETH_FWD_PBITS_TABLE_NUM; i++) + al_eth_fwd_pbits_table_set(&adapter->hal_adapter, i, i); + + /* map priority to queue index, queue id = priority/2 */ + for (i = 0; i < AL_ETH_FWD_PRIO_TABLE_NUM; i++) + al_eth_fwd_priority_table_set(&adapter->hal_adapter, i, i >> 1); + + entry.prio_sel = AL_ETH_CTRL_TABLE_PRIO_SEL_VAL_0; + entry.queue_sel_1 = AL_ETH_CTRL_TABLE_QUEUE_SEL_1_THASH_TABLE; + entry.queue_sel_2 = AL_ETH_CTRL_TABLE_QUEUE_SEL_2_NO_PRIO; + entry.udma_sel = AL_ETH_CTRL_TABLE_UDMA_SEL_MAC_TABLE; + entry.filter = FALSE; + + al_eth_ctrl_table_def_set(&adapter->hal_adapter, FALSE, &entry); + + /* + * By default set the mac table to forward all unicast packets to our + * MAC address and all broadcast. all the rest will be dropped. + */ + al_eth_mac_table_unicast_add(adapter, AL_ETH_MAC_TABLE_UNICAST_IDX_BASE, + adapter->mac_addr, 1); + al_eth_mac_table_broadcast_add(adapter, AL_ETH_MAC_TABLE_BROADCAST_IDX, 1); + al_eth_mac_table_promiscuous_set(adapter, false); + + /* set toeplitz hash keys */ + for (i = 0; i < sizeof(adapter->toeplitz_hash_key); i++) + *((uint8_t*)adapter->toeplitz_hash_key + i) = (uint8_t)random(); + + for (i = 0; i < AL_ETH_RX_HASH_KEY_NUM; i++) + al_eth_hash_key_set(&adapter->hal_adapter, i, + htonl(adapter->toeplitz_hash_key[i])); + + for (i = 0; i < AL_ETH_RX_RSS_TABLE_SIZE; i++) { + adapter->rss_ind_tbl[i] = ethtool_rxfh_indir_default(i, + AL_ETH_NUM_QUEUES); + al_eth_set_thash_table_entry(adapter, i, 0, + adapter->rss_ind_tbl[i]); + } + + al_eth_fsm_table_init(adapter); +} + +static void +al_eth_req_rx_buff_size(struct al_eth_adapter *adapter, int size) +{ + + /* + * Determine the correct mbuf pool + * for doing jumbo frames + * Try from the smallest up to maximum supported + */ + adapter->rx_mbuf_sz = MCLBYTES; + if (size > 2048) { + if (adapter->max_rx_buff_alloc_size > 2048) + adapter->rx_mbuf_sz = MJUMPAGESIZE; + else + return; + } + if (size > 4096) { + if (adapter->max_rx_buff_alloc_size > 4096) + adapter->rx_mbuf_sz = MJUM9BYTES; + else + return; + } + if (size > 9216) { + if (adapter->max_rx_buff_alloc_size > 9216) + adapter->rx_mbuf_sz = MJUM16BYTES; + else + return; + } +} + +static int +al_eth_change_mtu(struct al_eth_adapter *adapter, int new_mtu) +{ + int max_frame = new_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + + ETHER_VLAN_ENCAP_LEN; + + al_eth_req_rx_buff_size(adapter, new_mtu); + + device_printf_dbg(adapter->dev, "set MTU to %d\n", new_mtu); + al_eth_rx_pkt_limit_config(&adapter->hal_adapter, + AL_ETH_MIN_FRAME_LEN, max_frame); + + al_eth_tso_mss_config(&adapter->hal_adapter, 0, new_mtu - 100); + + return (0); +} + +static int +al_eth_check_mtu(struct al_eth_adapter *adapter, int new_mtu) +{ + int max_frame = new_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN; + + if ((new_mtu < AL_ETH_MIN_FRAME_LEN) || + (max_frame > AL_ETH_MAX_FRAME_LEN)) { + return (EINVAL); + } + + return (0); +} + +static int +al_eth_udma_queue_enable(struct al_eth_adapter *adapter, enum al_udma_type type, + int qid) +{ + int rc = 0; + char *name = (type == UDMA_TX) ? "Tx" : "Rx"; + struct al_udma_q_params *q_params; + + if (type == UDMA_TX) + q_params = &adapter->tx_ring[qid].q_params; + else + q_params = &adapter->rx_ring[qid].q_params; + + rc = al_eth_queue_config(&adapter->hal_adapter, type, qid, q_params); + if (rc < 0) { + device_printf(adapter->dev, "config %s queue %u failed\n", name, + qid); + return (rc); + } + return (rc); +} + +static int +al_eth_udma_queues_enable_all(struct al_eth_adapter *adapter) +{ + int i; + + for (i = 0; i < adapter->num_tx_queues; i++) + al_eth_udma_queue_enable(adapter, UDMA_TX, i); + + for (i = 0; i < adapter->num_rx_queues; i++) + al_eth_udma_queue_enable(adapter, UDMA_RX, i); + + return (0); +} + +static void +al_eth_up_complete(struct al_eth_adapter *adapter) +{ + + al_eth_configure_int_mode(adapter); + al_eth_config_rx_fwd(adapter); + al_eth_change_mtu(adapter, adapter->netdev->if_mtu); + al_eth_udma_queues_enable_all(adapter); + al_eth_refill_all_rx_bufs(adapter); + al_eth_interrupts_unmask(adapter); + + /* enable forwarding interrupts from eth through pci end point */ + if ((adapter->board_type == ALPINE_FPGA_NIC) || + (adapter->board_type == ALPINE_NIC)) { + al_eth_forward_int_config((uint32_t*)adapter->internal_pcie_base + + AL_REG_OFFSET_FORWARD_INTR, AL_EN_FORWARD_INTR); + } + + al_eth_flow_ctrl_enable(adapter); + + mtx_lock(&adapter->stats_mtx); + callout_reset(&adapter->stats_callout, hz, al_tick_stats, (void*)adapter); + mtx_unlock(&adapter->stats_mtx); + + al_eth_mac_start(&adapter->hal_adapter); +} + +static int +al_media_update(struct ifnet *ifp) +{ + struct al_eth_adapter *adapter = ifp->if_softc; + + if ((ifp->if_flags & IFF_UP) != 0) + mii_mediachg(adapter->mii); + + return (0); +} + +static void +al_media_status(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + struct al_eth_adapter *sc = ifp->if_softc; + struct mii_data *mii; + + if (sc->mii == NULL) { + ifmr->ifm_active = IFM_ETHER | IFM_NONE; + ifmr->ifm_status = 0; + + return; + } + + mii = sc->mii; + mii_pollstat(mii); + + ifmr->ifm_active = mii->mii_media_active; + ifmr->ifm_status = mii->mii_media_status; +} + +static void +al_tick(void *arg) +{ + struct al_eth_adapter *adapter = arg; + + mii_tick(adapter->mii); + + /* Schedule another timeout one second from now */ + callout_schedule(&adapter->wd_callout, hz); +} + +static void +al_tick_stats(void *arg) +{ + struct al_eth_adapter *adapter = arg; + + al_eth_update_stats(adapter); + + callout_schedule(&adapter->stats_callout, hz); +} + +static int +al_eth_up(struct al_eth_adapter *adapter) +{ + struct ifnet *ifp = adapter->netdev; + int rc; + + if (adapter->up) + return (0); + + if ((adapter->flags & AL_ETH_FLAG_RESET_REQUESTED) != 0) { + al_eth_function_reset(adapter); + adapter->flags &= ~AL_ETH_FLAG_RESET_REQUESTED; + } + + ifp->if_hwassist = 0; + if ((ifp->if_capenable & IFCAP_TSO) != 0) + ifp->if_hwassist |= CSUM_TSO; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); + if ((ifp->if_capenable & IFCAP_TXCSUM_IPV6) != 0) + ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); + + al_eth_serdes_init(adapter); + + rc = al_eth_hw_init(adapter); + if (rc != 0) + goto err_hw_init_open; + + rc = al_eth_setup_int_mode(adapter); + if (rc != 0) { + device_printf(adapter->dev, + "%s failed at setup interrupt mode!\n", __func__); + goto err_setup_int; + } + + /* allocate transmit descriptors */ + rc = al_eth_setup_all_tx_resources(adapter); + if (rc != 0) + goto err_setup_tx; + + /* allocate receive descriptors */ + rc = al_eth_setup_all_rx_resources(adapter); + if (rc != 0) + goto err_setup_rx; + + rc = al_eth_request_irq(adapter); + if (rc != 0) + goto err_req_irq; + + al_eth_up_complete(adapter); + + adapter->up = true; + + if (adapter->mac_mode == AL_ETH_MAC_MODE_10GbE_Serial) + adapter->netdev->if_link_state = LINK_STATE_UP; + + if (adapter->mac_mode == AL_ETH_MAC_MODE_RGMII) { + mii_mediachg(adapter->mii); + + /* Schedule watchdog timeout */ + mtx_lock(&adapter->wd_mtx); + callout_reset(&adapter->wd_callout, hz, al_tick, adapter); + mtx_unlock(&adapter->wd_mtx); + + mii_pollstat(adapter->mii); + } + + return (rc); + +err_req_irq: + al_eth_free_all_rx_resources(adapter); +err_setup_rx: + al_eth_free_all_tx_resources(adapter); +err_setup_tx: + al_eth_free_irq(adapter); +err_setup_int: + al_eth_hw_stop(adapter); +err_hw_init_open: + al_eth_function_reset(adapter); + + return (rc); +} + +static int +al_shutdown(device_t dev) +{ + struct al_eth_adapter *adapter = device_get_softc(dev); + + al_eth_down(adapter); + + return (0); +} + +static void +al_eth_down(struct al_eth_adapter *adapter) +{ + + device_printf_dbg(adapter->dev, "al_eth_down: begin\n"); + + adapter->up = false; + + mtx_lock(&adapter->wd_mtx); + callout_stop(&adapter->wd_callout); + mtx_unlock(&adapter->wd_mtx); + + al_eth_disable_int_sync(adapter); + + mtx_lock(&adapter->stats_mtx); + callout_stop(&adapter->stats_callout); + mtx_unlock(&adapter->stats_mtx); + + al_eth_free_irq(adapter); + al_eth_hw_stop(adapter); + + al_eth_free_all_tx_resources(adapter); + al_eth_free_all_rx_resources(adapter); +} + +static int +al_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +{ + struct al_eth_adapter *adapter = ifp->if_softc; + struct ifreq *ifr = (struct ifreq *)data; + int error = 0; + + switch (command) { + case SIOCSIFMTU: + { + error = al_eth_check_mtu(adapter, ifr->ifr_mtu); + if (error != 0) { + device_printf(adapter->dev, "ioctl wrong mtu %u\n", + adapter->netdev->if_mtu); + break; + } + + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + adapter->netdev->if_mtu = ifr->ifr_mtu; + al_init(adapter); + break; + } + case SIOCSIFFLAGS: + if ((ifp->if_flags & IFF_UP) != 0) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + if (((ifp->if_flags ^ adapter->if_flags) & + (IFF_PROMISC | IFF_ALLMULTI)) != 0) { + device_printf_dbg(adapter->dev, + "ioctl promisc/allmulti\n"); + al_eth_set_rx_mode(adapter); + } + } else { + error = al_eth_up(adapter); + if (error == 0) + ifp->if_drv_flags |= IFF_DRV_RUNNING; + } + } else { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + al_eth_down(adapter); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + } + } + + adapter->if_flags = ifp->if_flags; + break; + + case SIOCADDMULTI: + case SIOCDELMULTI: + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + device_printf_dbg(adapter->dev, + "ioctl add/del multi before\n"); + al_eth_set_rx_mode(adapter); +#ifdef DEVICE_POLLING + if ((ifp->if_capenable & IFCAP_POLLING) == 0) +#endif + } + break; + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + if (adapter->mii != NULL) + error = ifmedia_ioctl(ifp, ifr, + &adapter->mii->mii_media, command); + else + error = ifmedia_ioctl(ifp, ifr, + &adapter->media, command); + break; + case SIOCSIFCAP: + { + int mask, reinit; + + reinit = 0; + mask = ifr->ifr_reqcap ^ ifp->if_capenable; +#ifdef DEVICE_POLLING + if ((mask & IFCAP_POLLING) != 0) { + if ((ifr->ifr_reqcap & IFCAP_POLLING) != 0) { + if (error != 0) + return (error); + ifp->if_capenable |= IFCAP_POLLING; + } else { + error = ether_poll_deregister(ifp); + /* Enable interrupt even in error case */ + ifp->if_capenable &= ~IFCAP_POLLING; + } + } +#endif + if ((mask & IFCAP_HWCSUM) != 0) { + /* apply to both rx and tx */ + ifp->if_capenable ^= IFCAP_HWCSUM; + reinit = 1; + } + if ((mask & IFCAP_HWCSUM_IPV6) != 0) { + ifp->if_capenable ^= IFCAP_HWCSUM_IPV6; + reinit = 1; + } + if ((mask & IFCAP_TSO) != 0) { + ifp->if_capenable ^= IFCAP_TSO; + reinit = 1; + } + if ((mask & IFCAP_LRO) != 0) { + ifp->if_capenable ^= IFCAP_LRO; + } + if ((mask & IFCAP_VLAN_HWTAGGING) != 0) { + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + reinit = 1; + } + if ((mask & IFCAP_VLAN_HWFILTER) != 0) { + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + reinit = 1; + } + if ((mask & IFCAP_VLAN_HWTSO) != 0) { + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; + reinit = 1; + } + if ((reinit != 0) && + ((ifp->if_drv_flags & IFF_DRV_RUNNING)) != 0) + { + al_init(adapter); + } + break; + } + + default: + error = ether_ioctl(ifp, command, data); + break; + } + + return (error); +} + +static int +al_is_device_supported(device_t dev) +{ + uint16_t pci_vendor_id = pci_get_vendor(dev); + uint16_t pci_device_id = pci_get_device(dev); + + return (pci_vendor_id == PCI_VENDOR_ID_ANNAPURNA_LABS && + (pci_device_id == PCI_DEVICE_ID_AL_ETH || + pci_device_id == PCI_DEVICE_ID_AL_ETH_ADVANCED || + pci_device_id == PCI_DEVICE_ID_AL_ETH_NIC || + pci_device_id == PCI_DEVICE_ID_AL_ETH_FPGA_NIC)); +} + +/* Time in mSec to keep trying to read / write from MDIO in case of error */ +#define MDIO_TIMEOUT_MSEC 100 +#define MDIO_PAUSE_MSEC 10 + +static int +al_miibus_readreg(device_t dev, int phy, int reg) +{ + struct al_eth_adapter *adapter = device_get_softc(dev); + uint16_t value = 0; + int rc; + int timeout = MDIO_TIMEOUT_MSEC; + + while (timeout > 0) { + rc = al_eth_mdio_read(&adapter->hal_adapter, adapter->phy_addr, + -1, reg, &value); + + if (rc == 0) + return (value); + + device_printf_dbg(adapter->dev, + "mdio read failed. try again in 10 msec\n"); + + timeout -= MDIO_PAUSE_MSEC; + pause("readred pause", MDIO_PAUSE_MSEC); + } + + if (rc != 0) + device_printf(adapter->dev, "MDIO read failed on timeout\n"); + + return (value); +} + +static int +al_miibus_writereg(device_t dev, int phy, int reg, int value) +{ + struct al_eth_adapter *adapter = device_get_softc(dev); + int rc; + int timeout = MDIO_TIMEOUT_MSEC; + + while (timeout > 0) { + rc = al_eth_mdio_write(&adapter->hal_adapter, adapter->phy_addr, + -1, reg, value); + + if (rc == 0) + return (0); + + device_printf(adapter->dev, + "mdio write failed. try again in 10 msec\n"); + + timeout -= MDIO_PAUSE_MSEC; + pause("miibus writereg", MDIO_PAUSE_MSEC); + } + + if (rc != 0) + device_printf(adapter->dev, "MDIO write failed on timeout\n"); + + return (rc); +} + +static void +al_miibus_statchg(device_t dev) +{ + struct al_eth_adapter *adapter = device_get_softc(dev); + + device_printf_dbg(adapter->dev, + "al_miibus_statchg: state has changed!\n"); + device_printf_dbg(adapter->dev, + "al_miibus_statchg: active = 0x%x status = 0x%x\n", + adapter->mii->mii_media_active, adapter->mii->mii_media_status); + + if (adapter->up == 0) + return; + + if ((adapter->mii->mii_media_status & IFM_AVALID) != 0) { + if (adapter->mii->mii_media_status & IFM_ACTIVE) { + device_printf(adapter->dev, "link is UP\n"); + adapter->netdev->if_link_state = LINK_STATE_UP; + } else { + device_printf(adapter->dev, "link is DOWN\n"); + adapter->netdev->if_link_state = LINK_STATE_DOWN; + } + } +} + +static void +al_miibus_linkchg(device_t dev) +{ + struct al_eth_adapter *adapter = device_get_softc(dev); + uint8_t duplex = 0; + uint8_t speed = 0; + + if (adapter->mii == 0) + return; + + if ((adapter->netdev->if_flags & IFF_UP) == 0) + return; + + /* Ignore link changes when link is not ready */ + if ((adapter->mii->mii_media_status & (IFM_AVALID | IFM_ACTIVE)) != + (IFM_AVALID | IFM_ACTIVE)) { + return; + } + + if ((adapter->mii->mii_media_active & IFM_FDX) != 0) + duplex = 1; + + speed = IFM_SUBTYPE(adapter->mii->mii_media_active); + + if (speed == IFM_10_T) { + al_eth_mac_link_config(&adapter->hal_adapter, 0, 1, + AL_10BASE_T_SPEED, duplex); + return; + } + + if (speed == IFM_100_TX) { + al_eth_mac_link_config(&adapter->hal_adapter, 0, 1, + AL_100BASE_TX_SPEED, duplex); + return; + } + + if (speed == IFM_1000_T) { + al_eth_mac_link_config(&adapter->hal_adapter, 0, 1, + AL_1000BASE_T_SPEED, duplex); + return; + } + + device_printf(adapter->dev, "ERROR: unknown MII media active 0x%08x\n", + adapter->mii->mii_media_active); +} Property changes on: head/sys/dev/al_eth/al_eth.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/dev/al_eth/al_eth.h =================================================================== --- head/sys/dev/al_eth/al_eth.h (nonexistent) +++ head/sys/dev/al_eth/al_eth.h (revision 307670) @@ -0,0 +1,366 @@ +/*- + * Copyright (c) 2015,2016 Annapurna Labs Ltd. and affiliates + * All rights reserved. + * + * Developed by Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __AL_ETH_H__ +#define __AL_ETH_H__ + +#include "al_init_eth_lm.h" +#include "al_hal_eth.h" +#include "al_hal_udma_iofic.h" +#include "al_hal_udma_debug.h" +#include "al_serdes.h" + +enum board_t { + ALPINE_INTEGRATED = 0, + ALPINE_NIC = 1, + ALPINE_FPGA_NIC = 2, +}; + +#define AL_ETH_MAX_HW_QUEUES 4 +#define AL_ETH_NUM_QUEUES 4 +#define AL_ETH_MAX_MSIX_VEC (1 + 2 * AL_ETH_MAX_HW_QUEUES) + +#define AL_ETH_DEFAULT_TX_SW_DESCS (512) +#define AL_ETH_DEFAULT_TX_HW_DESCS (512) +#define AL_ETH_DEFAULT_RX_DESCS (512) + +#if ((AL_ETH_DEFAULT_TX_SW_DESCS / 4) < (AL_ETH_PKT_MAX_BUFS + 2)) +#define AL_ETH_TX_WAKEUP_THRESH (AL_ETH_DEFAULT_TX_SW_DESCS / 4) +#else +#define AL_ETH_TX_WAKEUP_THRESH (AL_ETH_PKT_MAX_BUFS + 2) +#endif + +#define NET_IP_ALIGN 2 +#define AL_ETH_DEFAULT_SMALL_PACKET_LEN (128 - NET_IP_ALIGN) +#define AL_ETH_HEADER_COPY_SIZE (128 - NET_IP_ALIGN) + +#define AL_ETH_DEFAULT_MAX_RX_BUFF_ALLOC_SIZE 9216 +/* + * Minimum the buffer size to 600 to avoid situation the mtu will be changed + * from too little buffer to very big one and then the number of buffer per + * packet could reach the maximum AL_ETH_PKT_MAX_BUFS + */ +#define AL_ETH_DEFAULT_MIN_RX_BUFF_ALLOC_SIZE 600 +#define AL_ETH_DEFAULT_FORCE_1000_BASEX FALSE + +#define AL_ETH_DEFAULT_LINK_POLL_INTERVAL 100 +#define AL_ETH_FIRST_LINK_POLL_INTERVAL 1 + +#define AL_ETH_NAME_MAX_LEN 20 +#define AL_ETH_IRQNAME_SIZE 40 + +#define AL_ETH_DEFAULT_MDIO_FREQ_KHZ 2500 +#define AL_ETH_MDIO_FREQ_1000_KHZ 1000 + +struct al_eth_irq { + driver_filter_t *handler; + void *data; + unsigned int vector; + uint8_t requested; + char name[AL_ETH_IRQNAME_SIZE]; + struct resource *res; + void *cookie; +}; + +struct al_eth_tx_buffer { + struct mbuf *m; + struct al_eth_pkt hal_pkt; + bus_dmamap_t dma_map; + unsigned int tx_descs; +}; + +struct al_eth_rx_buffer { + struct mbuf *m; + unsigned int data_size; + bus_dmamap_t dma_map; + struct al_buf al_buf; +}; + +struct al_eth_ring { + device_t dev; + struct al_eth_adapter *adapter; + /* Used to get rx packets from hal */ + struct al_eth_pkt hal_pkt; + /* Udma queue handler */ + struct al_udma_q *dma_q; + uint32_t ring_id; + uint16_t next_to_use; + uint16_t next_to_clean; + /* The offset of the interrupt unmask register */ + uint32_t *unmask_reg_offset; + /* + * The value to write to the above register to + * unmask the interrupt of this ring + */ + uint32_t unmask_val; + struct al_eth_meta_data hal_meta; + /* Contex of tx packet */ + struct al_eth_tx_buffer *tx_buffer_info; + /* Contex of rx packet */ + struct al_eth_rx_buffer *rx_buffer_info; + /* Number of tx/rx_buffer_info's entries */ + int sw_count; + /* Number of hw descriptors */ + int hw_count; + /* Size (in bytes) of hw descriptors */ + size_t descs_size; + /* Size (in bytes) of hw completion descriptors, used for rx */ + size_t cdescs_size; + struct ifnet *netdev; + struct al_udma_q_params q_params; + struct buf_ring *br; + struct mtx br_mtx; + struct task enqueue_task; + struct taskqueue *enqueue_tq; + volatile uint32_t enqueue_is_running; + struct task cmpl_task; + struct taskqueue *cmpl_tq; + volatile uint32_t cmpl_is_running; + uint32_t lro_enabled; + struct lro_ctrl lro; + bus_dma_tag_t dma_buf_tag; + volatile uint32_t stall; +}; + +#define AL_ETH_TX_RING_IDX_NEXT(tx_ring, idx) (((idx) + 1) & (AL_ETH_DEFAULT_TX_SW_DESCS - 1)) + +#define AL_ETH_RX_RING_IDX_NEXT(rx_ring, idx) (((idx) + 1) & (AL_ETH_DEFAULT_RX_DESCS - 1)) +#define AL_ETH_RX_RING_IDX_ADD(rx_ring, idx, n) (((idx) + (n)) & (AL_ETH_DEFAULT_RX_DESCS - 1)) + +/* flow control configuration */ +#define AL_ETH_FLOW_CTRL_RX_FIFO_TH_HIGH 0x160 +#define AL_ETH_FLOW_CTRL_RX_FIFO_TH_LOW 0x90 +#define AL_ETH_FLOW_CTRL_QUANTA 0xffff +#define AL_ETH_FLOW_CTRL_QUANTA_TH 0x8000 + +#define AL_ETH_FLOW_CTRL_AUTONEG 1 +#define AL_ETH_FLOW_CTRL_RX_PAUSE 2 +#define AL_ETH_FLOW_CTRL_TX_PAUSE 4 + +/* link configuration for 1G port */ +struct al_eth_link_config { + int old_link; + /* Describes what we actually have. */ + int active_duplex; + int active_speed; + + /* current flow control status */ + uint8_t flow_ctrl_active; + /* supported configuration (can be changed from ethtool) */ + uint8_t flow_ctrl_supported; + + /* the following are not relevant to RGMII */ + boolean_t force_1000_base_x; + boolean_t autoneg; +}; + +/* SFP detection event */ +enum al_eth_sfp_detect_evt { + /* No change (no connect, disconnect, or new SFP module */ + AL_ETH_SFP_DETECT_EVT_NO_CHANGE, + /* SFP module connected */ + AL_ETH_SFP_DETECT_EVT_CONNECTED, + /* SFP module disconnected */ + AL_ETH_SFP_DETECT_EVT_DISCONNECTED, + /* SFP module replaced */ + AL_ETH_SFP_DETECT_EVT_CHANGED, +}; + +/* SFP detection status */ +struct al_eth_sfp_detect_stat { + /* Status is valid (i.e. rest of fields are valid) */ + boolean_t valid; + boolean_t connected; + uint8_t sfp_10g; + uint8_t sfp_1g; + uint8_t sfp_cable_tech; + boolean_t lt_en; + boolean_t an_en; + enum al_eth_mac_mode mac_mode; +}; + +struct al_eth_retimer_params { + boolean_t exist; + uint8_t bus_id; + uint8_t i2c_addr; + enum al_eth_retimer_channel channel; +}; + +struct msix_entry { + int entry; + int vector; +}; + +/* board specific private data structure */ +struct al_eth_adapter { + enum board_t board_type; + device_t miibus; + struct mii_data *mii; + uint16_t dev_id; + uint8_t rev_id; + + device_t dev; + struct ifnet *netdev; + struct ifmedia media; + struct resource *udma_res; + struct resource *mac_res; + struct resource *ec_res; + int if_flags; + struct callout wd_callout; + struct mtx wd_mtx; + struct callout stats_callout; + struct mtx stats_mtx; + + /* this is for intx mode */ + void *irq_cookie; + struct resource *irq_res; + + /* + * Some features need tri-state capability, + * thus the additional *_CAPABLE flags. + */ + uint32_t flags; +#define AL_ETH_FLAG_MSIX_CAPABLE (uint32_t)(1 << 1) +#define AL_ETH_FLAG_MSIX_ENABLED (uint32_t)(1 << 2) +#define AL_ETH_FLAG_IN_NETPOLL (uint32_t)(1 << 3) +#define AL_ETH_FLAG_MQ_CAPABLE (uint32_t)(1 << 4) +#define AL_ETH_FLAG_SRIOV_CAPABLE (uint32_t)(1 << 5) +#define AL_ETH_FLAG_SRIOV_ENABLED (uint32_t)(1 << 6) +#define AL_ETH_FLAG_RESET_REQUESTED (uint32_t)(1 << 7) + + struct al_hal_eth_adapter hal_adapter; + + /* + * Rx packets that shorter that this len will be copied to the mbuf + */ + unsigned int small_copy_len; + + /* Maximum size for rx buffer */ + unsigned int max_rx_buff_alloc_size; + uint32_t rx_mbuf_sz; + + /* Tx fast path data */ + int num_tx_queues; + + /* Rx fast path data */ + int num_rx_queues; + + /* TX */ + struct al_eth_ring tx_ring[AL_ETH_NUM_QUEUES]; + + /* RX */ + struct al_eth_ring rx_ring[AL_ETH_NUM_QUEUES]; + + enum al_iofic_mode int_mode; + +#define AL_ETH_MGMT_IRQ_IDX 0 +#define AL_ETH_RXQ_IRQ_IDX(adapter, q) (1 + (q)) +#define AL_ETH_TXQ_IRQ_IDX(adapter, q) (1 + (adapter)->num_rx_queues + (q)) + struct al_eth_irq irq_tbl[AL_ETH_MAX_MSIX_VEC]; + struct msix_entry *msix_entries; + int msix_vecs; + int irq_vecs; + + unsigned int tx_usecs, rx_usecs; /* interrupt coalescing */ + + unsigned int tx_ring_count; + unsigned int tx_descs_count; + unsigned int rx_ring_count; + unsigned int rx_descs_count; + + /* RSS */ + uint32_t toeplitz_hash_key[AL_ETH_RX_HASH_KEY_NUM]; +#define AL_ETH_RX_RSS_TABLE_SIZE AL_ETH_RX_THASH_TABLE_SIZE + uint8_t rss_ind_tbl[AL_ETH_RX_RSS_TABLE_SIZE]; + + uint32_t msg_enable; + struct al_eth_mac_stats mac_stats; + + enum al_eth_mac_mode mac_mode; + boolean_t mac_mode_set; /* Relevant only when 'auto_speed' is set */ + uint8_t mac_addr[ETHER_ADDR_LEN]; + /* mdio and phy*/ + boolean_t phy_exist; + struct mii_bus *mdio_bus; + struct phy_device *phydev; + uint8_t phy_addr; + struct al_eth_link_config link_config; + + /* HAL layer data */ + int id_number; + char name[AL_ETH_NAME_MAX_LEN]; + void *internal_pcie_base; /* use for ALPINE_NIC devices */ + void *udma_base; + void *ec_base; + void *mac_base; + + struct al_eth_flow_control_params flow_ctrl_params; + + struct al_eth_adapter_params eth_hal_params; + + struct task link_status_task; + uint32_t link_poll_interval; /* task interval in mSec */ + + boolean_t serdes_init; + struct al_serdes_grp_obj serdes_obj; + uint8_t serdes_grp; + uint8_t serdes_lane; + + boolean_t an_en; /* run kr auto-negotiation */ + boolean_t lt_en; /* run kr link-training */ + + boolean_t sfp_detection_needed; /* true if need to run sfp detection */ + boolean_t auto_speed; /* true if allowed to change SerDes speed configuration */ + uint8_t i2c_adapter_id; /* identifier for the i2c adapter to use to access SFP+ module */ + enum al_eth_ref_clk_freq ref_clk_freq; /* reference clock frequency */ + unsigned int mdio_freq; /* MDIO frequency [Khz] */ + + boolean_t up; + + boolean_t last_link; + boolean_t last_establish_failed; + struct al_eth_lm_context lm_context; + boolean_t use_lm; + + boolean_t dont_override_serdes; /* avoid overriding serdes parameters + to preset static values */ + struct mtx serdes_config_lock; + struct mtx if_rx_lock; + + uint32_t wol; + + struct al_eth_retimer_params retimer; + + bool phy_fixup_needed; + + enum al_eth_lm_max_speed max_speed; +}; + +#endif /* !(AL_ETH_H) */ Property changes on: head/sys/dev/al_eth/al_eth.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/dev/al_eth/al_init_eth_kr.c =================================================================== --- head/sys/dev/al_eth/al_init_eth_kr.c (nonexistent) +++ head/sys/dev/al_eth/al_init_eth_kr.c (revision 307670) @@ -0,0 +1,841 @@ +/*- + * Copyright (c) 2015,2016 Annapurna Labs Ltd. and affiliates + * All rights reserved. + * + * Developed by Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "al_init_eth_kr.h" +#include "al_serdes.h" + +/** + * Ethernet + * @{ + * @file al_init_eth_kr.c + * + * @brief auto-negotiation and link training algorithms and state machines + * + * The link training algorithm implemented in this file going over the + * coefficients and looking for the best eye measurement possible for every one + * of them. it's using state machine to move between the different states. + * the state machine has 3 parts: + * - preparation - waiting till the link partner (lp) will be ready and + * change his state to preset. + * - measurement (per coefficient) - issue decrement for the coefficient + * under control till the eye measurement not increasing + * and remains in the optimum. + * - completion - indicate the receiver is ready and wait for the lp to + * finish his work. + */ + +/* TODO: fix with more reasonable numbers */ +/* timeout in mSec before auto-negotiation will be terminated */ +#define AL_ETH_KR_AN_TIMEOUT (500) +#define AL_ETH_KR_EYE_MEASURE_TIMEOUT (100) +/* timeout in uSec before the process will be terminated */ +#define AL_ETH_KR_FRAME_LOCK_TIMEOUT (500 * 1000) +#define AL_ETH_KR_LT_DONE_TIMEOUT (500 * 1000) +/* number of times the receiver and transmitter tasks will be called before the + * algorithm will be terminated */ +#define AL_ETH_KR_LT_MAX_ROUNDS (50000) + +/* mac algorithm state machine */ +enum al_eth_kr_mac_lt_state { + TX_INIT = 0, /* start of all */ + WAIT_BEGIN, /* wait for initial training lock */ + DO_PRESET, /* issue PRESET to link partner */ + DO_HOLD, /* issue HOLD to link partner */ + /* preparation is done, start testing the coefficient. */ + QMEASURE, /* EyeQ measurement. */ + QCHECK, /* Check if measurement shows best value. */ + DO_NEXT_TRY, /* issue DEC command to coeff for next measurement. */ + END_STEPS, /* perform last steps to go back to optimum. */ + END_STEPS_HOLD, /* perform last steps HOLD command. */ + COEFF_DONE, /* done with the current coefficient updates. + * Check if another should be done. */ + /* end of training to all coefficients */ + SET_READY, /* indicate local receiver ready */ + TX_DONE /* transmit process completed, training can end. */ +}; + +static const char * const al_eth_kr_mac_sm_name[] = { + "TX_INIT", "WAIT_BEGIN", "DO_PRESET", + "DO_HOLD", "QMEASURE", "QCHECK", + "DO_NEXT_TRY", "END_STEPS", "END_STEPS_HOLD", + "COEFF_DONE", "SET_READY", "TX_DONE" +}; + +/* Constants used for the measurement. */ +enum al_eth_kr_coef { + AL_ETH_KR_COEF_C_MINUS, + AL_ETH_KR_COEF_C_ZERO, + AL_ETH_KR_COEF_C_PLUS, +}; + +/* + * test coefficients from COEFF_TO_MANIPULATE to COEFF_TO_MANIPULATE_LAST. + */ +#define COEFF_TO_MANIPULATE AL_ETH_KR_COEF_C_MINUS +#define COEFF_TO_MANIPULATE_LAST AL_ETH_KR_COEF_C_MINUS +#define QARRAY_SIZE 3 /**< how many entries we want in our history array. */ + +struct al_eth_kr_data { + struct al_hal_eth_adapter *adapter; + struct al_serdes_grp_obj *serdes_obj; + enum al_serdes_lane lane; + + /* Receiver side data */ + struct al_eth_kr_status_report_data status_report; /* report to response */ + struct al_eth_kr_coef_up_data last_lpcoeff; /* last coeff received */ + + /* Transmitter side data */ + enum al_eth_kr_mac_lt_state algo_state; /* Statemachine. */ + unsigned int qarray[QARRAY_SIZE]; /* EyeQ measurements history */ + /* How many entries in the array are valid for compares yet. */ + unsigned int qarray_cnt; + enum al_eth_kr_coef curr_coeff; + /* + * Status of coefficient during the last + * DEC/INC command (before issuing HOLD again). + */ + unsigned int coeff_status_step; + unsigned int end_steps_cnt; /* Number of end steps needed */ +}; + +static int +al_eth_kr_an_run(struct al_eth_kr_data *kr_data, struct al_eth_an_adv *an_adv, + struct al_eth_an_adv *an_partner_adv) +{ + int rc; + boolean_t page_received = FALSE; + boolean_t an_completed = FALSE; + boolean_t error = FALSE; + int timeout = AL_ETH_KR_AN_TIMEOUT; + + rc = al_eth_kr_an_init(kr_data->adapter, an_adv); + if (rc != 0) { + al_err("%s %s autonegotiation init failed\n", + kr_data->adapter->name, __func__); + return (rc); + } + + rc = al_eth_kr_an_start(kr_data->adapter, AL_ETH_AN__LT_LANE_0, + FALSE, TRUE); + if (rc != 0) { + al_err("%s %s autonegotiation enable failed\n", + kr_data->adapter->name, __func__); + return (rc); + } + + do { + DELAY(10000); + timeout -= 10; + if (timeout <= 0) { + al_info("%s %s autonegotiation failed on timeout\n", + kr_data->adapter->name, __func__); + + return (ETIMEDOUT); + } + + al_eth_kr_an_status_check(kr_data->adapter, &page_received, + &an_completed, &error); + } while (page_received == FALSE); + + if (error != 0) { + al_info("%s %s autonegotiation failed (status error)\n", + kr_data->adapter->name, __func__); + + return (EIO); + } + + al_eth_kr_an_read_adv(kr_data->adapter, an_partner_adv); + + al_dbg("%s %s autonegotiation completed. error = %d\n", + kr_data->adapter->name, __func__, error); + + return (0); +} + +/***************************** receiver side *********************************/ +static enum al_eth_kr_cl72_cstate +al_eth_lt_coeff_set(struct al_eth_kr_data *kr_data, + enum al_serdes_tx_deemph_param param, uint32_t op) +{ + enum al_eth_kr_cl72_cstate status = 0; + + switch (op) { + case AL_PHY_KR_COEF_UP_HOLD: + /* no need to update the serdes - return not updated*/ + status = C72_CSTATE_NOT_UPDATED; + break; + case AL_PHY_KR_COEF_UP_INC: + status = C72_CSTATE_UPDATED; + + if (kr_data->serdes_obj->tx_deemph_inc( + kr_data->serdes_obj, + kr_data->lane, + param) == 0) + status = C72_CSTATE_MAX; + break; + case AL_PHY_KR_COEF_UP_DEC: + status = C72_CSTATE_UPDATED; + + if (kr_data->serdes_obj->tx_deemph_dec( + kr_data->serdes_obj, + kr_data->lane, + param) == 0) + status = C72_CSTATE_MIN; + break; + default: /* 3=reserved */ + break; + } + + return (status); +} + +/* + * Inspect the received coefficient update request and update all coefficients + * in the serdes accordingly. + */ +static void +al_eth_coeff_req_handle(struct al_eth_kr_data *kr_data, + struct al_eth_kr_coef_up_data *lpcoeff) +{ + struct al_eth_kr_status_report_data *report = &kr_data->status_report; + + /* First check for Init and Preset commands. */ + if ((lpcoeff->preset != 0) || (lpcoeff->initialize) != 0) { + kr_data->serdes_obj->tx_deemph_preset( + kr_data->serdes_obj, + kr_data->lane); + + /* + * in case of preset c(0) should be set to maximum and both c(1) + * and c(-1) should be updated + */ + report->c_minus = C72_CSTATE_UPDATED; + + report->c_plus = C72_CSTATE_UPDATED; + + report->c_zero = C72_CSTATE_MAX; + + return; + } + + /* + * in case preset and initialize are false need to perform per + * coefficient action. + */ + report->c_minus = al_eth_lt_coeff_set(kr_data, + AL_SERDES_TX_DEEMP_C_MINUS, lpcoeff->c_minus); + + report->c_zero = al_eth_lt_coeff_set(kr_data, + AL_SERDES_TX_DEEMP_C_ZERO, lpcoeff->c_zero); + + report->c_plus = al_eth_lt_coeff_set(kr_data, + AL_SERDES_TX_DEEMP_C_PLUS, lpcoeff->c_plus); + + al_dbg("%s: c(0) = 0x%x c(-1) = 0x%x c(1) = 0x%x\n", + __func__, report->c_zero, report->c_plus, report->c_minus); +} + +static void +al_eth_kr_lt_receiver_task_init(struct al_eth_kr_data *kr_data) +{ + + al_memset(&kr_data->last_lpcoeff, 0, + sizeof(struct al_eth_kr_coef_up_data)); + al_memset(&kr_data->status_report, 0, + sizeof(struct al_eth_kr_status_report_data)); +} + +static boolean_t +al_eth_lp_coeff_up_change(struct al_eth_kr_data *kr_data, + struct al_eth_kr_coef_up_data *lpcoeff) +{ + struct al_eth_kr_coef_up_data *last_lpcoeff = &kr_data->last_lpcoeff; + + if (al_memcmp(last_lpcoeff, lpcoeff, + sizeof(struct al_eth_kr_coef_up_data)) == 0) { + return (FALSE); + } + + al_memcpy(last_lpcoeff, lpcoeff, sizeof(struct al_eth_kr_coef_up_data)); + + return (TRUE); +} + +/* + * Run the receiver task for one cycle. + * The receiver task continuously inspects the received coefficient update + * requests and acts upon. + * + * @return <0 if error occur + */ +static int +al_eth_kr_lt_receiver_task_run(struct al_eth_kr_data *kr_data) +{ + struct al_eth_kr_coef_up_data new_lpcoeff; + + /* + * First inspect status of the link. It may have dropped frame lock as + * the remote did some reconfiguration of its serdes. + * Then we simply have nothing to do and return immediately as caller + * will call us continuously until lock comes back. + */ + + if (al_eth_kr_receiver_frame_lock_get(kr_data->adapter, + AL_ETH_AN__LT_LANE_0) != 0) { + return (0); + } + + /* check if a new update command was received */ + al_eth_lp_coeff_up_get(kr_data->adapter, + AL_ETH_AN__LT_LANE_0, &new_lpcoeff); + + if (al_eth_lp_coeff_up_change(kr_data, &new_lpcoeff) != 0) { + /* got some new coefficient update request. */ + al_eth_coeff_req_handle(kr_data, &new_lpcoeff); + } + + return (0); +} + +/******************************** transmitter side ***************************/ +static int +al_eth_kr_lt_transmitter_task_init(struct al_eth_kr_data *kr_data) +{ + int i; + int rc; + unsigned int temp_val; + + for (i = 0; i < QARRAY_SIZE; i++) + kr_data->qarray[i] = 0; + + kr_data->qarray_cnt = 0; + kr_data->algo_state = TX_INIT; + kr_data->curr_coeff = COEFF_TO_MANIPULATE; /* first coeff to test. */ + kr_data->coeff_status_step = C72_CSTATE_NOT_UPDATED; + kr_data->end_steps_cnt = QARRAY_SIZE-1; /* go back to first entry */ + + /* + * Perform measure eye here to run the rx equalizer + * for the first time to get init values + */ + rc = kr_data->serdes_obj->eye_measure_run( + kr_data->serdes_obj, + kr_data->lane, + AL_ETH_KR_EYE_MEASURE_TIMEOUT, + &temp_val); + if (rc != 0) { + al_warn("%s: Failed to run Rx equalizer (rc = 0x%x)\n", + __func__, rc); + + return (rc); + } + + return (0); +} + +static boolean_t +al_eth_kr_lt_all_not_updated(struct al_eth_kr_status_report_data *report) +{ + + if ((report->c_zero == C72_CSTATE_NOT_UPDATED) && + (report->c_minus == C72_CSTATE_NOT_UPDATED) && + (report->c_plus == C72_CSTATE_NOT_UPDATED)) { + return (TRUE); + } + + return (FALSE); +} + +static void +al_eth_kr_lt_coef_set(struct al_eth_kr_coef_up_data *ldcoeff, + enum al_eth_kr_coef coef, enum al_eth_kr_cl72_coef_op op) +{ + + switch (coef) { + case AL_ETH_KR_COEF_C_MINUS: + ldcoeff->c_minus = op; + break; + case AL_ETH_KR_COEF_C_PLUS: + ldcoeff->c_plus = op; + break; + case AL_ETH_KR_COEF_C_ZERO: + ldcoeff->c_zero = op; + break; + } +} + +static enum al_eth_kr_cl72_cstate +al_eth_kr_lt_coef_report_get(struct al_eth_kr_status_report_data *report, + enum al_eth_kr_coef coef) +{ + + switch (coef) { + case AL_ETH_KR_COEF_C_MINUS: + return (report->c_minus); + case AL_ETH_KR_COEF_C_PLUS: + return (report->c_plus); + case AL_ETH_KR_COEF_C_ZERO: + return (report->c_zero); + } + + return (0); +} + +/* + * Run the transmitter_task for one cycle. + * + * @return <0 if error occurs + */ +static int +al_eth_kr_lt_transmitter_task_run(struct al_eth_kr_data *kr_data) +{ + struct al_eth_kr_status_report_data report; + unsigned int coeff_status_cur; + struct al_eth_kr_coef_up_data ldcoeff = { 0, 0, 0, 0, 0 }; + unsigned int val; + int i; + enum al_eth_kr_mac_lt_state nextstate; + int rc = 0; + + /* + * do nothing if currently there is no frame lock (which may happen + * when remote updates its analogs). + */ + if (al_eth_kr_receiver_frame_lock_get(kr_data->adapter, + AL_ETH_AN__LT_LANE_0) == 0) { + return (0); + } + + al_eth_lp_status_report_get(kr_data->adapter, + AL_ETH_AN__LT_LANE_0, &report); + + /* extract curr status of the coefficient in use */ + coeff_status_cur = al_eth_kr_lt_coef_report_get(&report, + kr_data->curr_coeff); + + nextstate = kr_data->algo_state; /* default we stay in curr state; */ + + switch (kr_data->algo_state) { + case TX_INIT: + /* waiting for start */ + if (al_eth_kr_startup_proto_prog_get(kr_data->adapter, + AL_ETH_AN__LT_LANE_0) != 0) { + /* training is on and frame lock */ + nextstate = WAIT_BEGIN; + } + break; + case WAIT_BEGIN: + kr_data->qarray_cnt = 0; + kr_data->curr_coeff = COEFF_TO_MANIPULATE; + kr_data->coeff_status_step = C72_CSTATE_NOT_UPDATED; + coeff_status_cur = C72_CSTATE_NOT_UPDATED; + kr_data->end_steps_cnt = QARRAY_SIZE-1; + + /* Wait for not_updated for all coefficients from remote */ + if (al_eth_kr_lt_all_not_updated(&report) != 0) { + ldcoeff.preset = TRUE; + nextstate = DO_PRESET; + } + break; + case DO_PRESET: + /* + * Send PRESET and wait for for updated for all + * coefficients from remote + */ + if (al_eth_kr_lt_all_not_updated(&report) == 0) + nextstate = DO_HOLD; + else /* as long as the lp didn't response to the preset + * we should continue sending it */ + ldcoeff.preset = TRUE; + break; + case DO_HOLD: + /* + * clear the PRESET, issue HOLD command and wait for + * hold handshake + */ + if (al_eth_kr_lt_all_not_updated(&report) != 0) + nextstate = QMEASURE; + break; + + case QMEASURE: + /* makes a measurement and fills the new value into the array */ + rc = kr_data->serdes_obj->eye_measure_run( + kr_data->serdes_obj, + kr_data->lane, + AL_ETH_KR_EYE_MEASURE_TIMEOUT, + &val); + if (rc != 0) { + al_warn("%s: Rx eye measurement failed\n", __func__); + + return (rc); + } + + al_dbg("%s: Rx Measure eye returned 0x%x\n", __func__, val); + + /* put the new value into the array at the top. */ + for (i = 0; i < QARRAY_SIZE-1; i++) + kr_data->qarray[i] = kr_data->qarray[i+1]; + + kr_data->qarray[QARRAY_SIZE-1] = val; + + if (kr_data->qarray_cnt < QARRAY_SIZE) + kr_data->qarray_cnt++; + + nextstate = QCHECK; + break; + case QCHECK: + /* check if we reached the best link quality yet. */ + if (kr_data->qarray_cnt < QARRAY_SIZE) { + /* keep going until at least the history is + * filled. check that we can keep going or if + * coefficient has already reached minimum. + */ + + if (kr_data->coeff_status_step == C72_CSTATE_MIN) + nextstate = COEFF_DONE; + else { + /* + * request a DECREMENT of the + * coefficient under control + */ + al_eth_kr_lt_coef_set(&ldcoeff, + kr_data->curr_coeff, AL_PHY_KR_COEF_UP_DEC); + + nextstate = DO_NEXT_TRY; + } + } else { + /* + * check if current value and last both are worse than + * the 2nd last. This we take as an ending condition + * assuming the minimum was reached two tries before + * so we will now go back to that point. + */ + if ((kr_data->qarray[0] < kr_data->qarray[1]) && + (kr_data->qarray[0] < kr_data->qarray[2])) { + /* + * request a INCREMENT of the + * coefficient under control + */ + al_eth_kr_lt_coef_set(&ldcoeff, + kr_data->curr_coeff, AL_PHY_KR_COEF_UP_INC); + + /* start going back to the maximum */ + nextstate = END_STEPS; + if (kr_data->end_steps_cnt > 0) + kr_data->end_steps_cnt--; + } else { + if (kr_data->coeff_status_step == + C72_CSTATE_MIN) { + nextstate = COEFF_DONE; + } else { + /* + * request a DECREMENT of the + * coefficient under control + */ + al_eth_kr_lt_coef_set(&ldcoeff, + kr_data->curr_coeff, + AL_PHY_KR_COEF_UP_DEC); + + nextstate = DO_NEXT_TRY; + } + } + } + break; + case DO_NEXT_TRY: + /* + * save the status when we issue the DEC step to the remote, + * before the HOLD is done again. + */ + kr_data->coeff_status_step = coeff_status_cur; + + if (coeff_status_cur != C72_CSTATE_NOT_UPDATED) + nextstate = DO_HOLD; /* go to next measurement round */ + else + al_eth_kr_lt_coef_set(&ldcoeff, + kr_data->curr_coeff, AL_PHY_KR_COEF_UP_DEC); + break; + /* + * Coefficient iteration completed, go back to the optimum step + * In this algorithm we assume 2 before curr was best hence need to do + * two INC runs. + */ + case END_STEPS: + if (coeff_status_cur != C72_CSTATE_NOT_UPDATED) + nextstate = END_STEPS_HOLD; + else + al_eth_kr_lt_coef_set(&ldcoeff, + kr_data->curr_coeff, AL_PHY_KR_COEF_UP_INC); + break; + case END_STEPS_HOLD: + if (coeff_status_cur == C72_CSTATE_NOT_UPDATED) { + if (kr_data->end_steps_cnt != 0) { + /* + * request a INCREMENT of the + * coefficient under control + */ + al_eth_kr_lt_coef_set(&ldcoeff, + kr_data->curr_coeff, AL_PHY_KR_COEF_UP_INC); + + /* go 2nd time - dec the end step count */ + nextstate = END_STEPS; + + if (kr_data->end_steps_cnt > 0) + kr_data->end_steps_cnt--; + + } else { + nextstate = COEFF_DONE; + } + } + break; + case COEFF_DONE: + /* + * now this coefficient is done. + * We can now either choose to finish here, + * or keep going with another coefficient. + */ + if ((int)kr_data->curr_coeff < COEFF_TO_MANIPULATE_LAST) { + int i; + + for (i = 0; i < QARRAY_SIZE; i++) + kr_data->qarray[i] = 0; + + kr_data->qarray_cnt = 0; + kr_data->end_steps_cnt = QARRAY_SIZE-1; + kr_data->coeff_status_step = C72_CSTATE_NOT_UPDATED; + kr_data->curr_coeff++; + + al_dbg("[%s]: doing next coefficient: %d ---\n\n", + kr_data->adapter->name, kr_data->curr_coeff); + + nextstate = QMEASURE; + } else { + nextstate = SET_READY; + } + break; + case SET_READY: + /* + * our receiver is ready for data. + * no training will occur any more. + */ + kr_data->status_report.receiver_ready = TRUE; + /* + * in addition to the status we transmit, we also must tell our + * local hardware state-machine that we are done, so the + * training can eventually complete when the remote indicates + * it is ready also. The hardware will then automatically + * give control to the PCS layer completing training. + */ + al_eth_receiver_ready_set(kr_data->adapter, + AL_ETH_AN__LT_LANE_0); + + nextstate = TX_DONE; + break; + case TX_DONE: + break; /* nothing else to do */ + default: + nextstate = kr_data->algo_state; + break; + } + + /* + * The status we want to transmit to remote. + * Note that the status combines the receiver status of all coefficients + * with the transmitter's rx ready status. + */ + if (kr_data->algo_state != nextstate) { + al_dbg("[%s] [al_eth_kr_lt_transmit_run] STM changes %s -> %s: " + " Qarray=%d/%d/%d\n", kr_data->adapter->name, + al_eth_kr_mac_sm_name[kr_data->algo_state], + al_eth_kr_mac_sm_name[nextstate], + kr_data->qarray[0], kr_data->qarray[1], kr_data->qarray[2]); + } + + kr_data->algo_state = nextstate; + + /* + * write fields for transmission into hardware. + * Important: this must be done always, as the receiver may have + * received update commands and wants to return its status. + */ + al_eth_ld_coeff_up_set(kr_data->adapter, AL_ETH_AN__LT_LANE_0, &ldcoeff); + al_eth_ld_status_report_set(kr_data->adapter, AL_ETH_AN__LT_LANE_0, + &kr_data->status_report); + + return (0); +} + +/*****************************************************************************/ +static int +al_eth_kr_run_lt(struct al_eth_kr_data *kr_data) +{ + unsigned int cnt; + int ret = 0; + boolean_t page_received = FALSE; + boolean_t an_completed = FALSE; + boolean_t error = FALSE; + boolean_t training_failure = FALSE; + + al_eth_kr_lt_initialize(kr_data->adapter, AL_ETH_AN__LT_LANE_0); + + if (al_eth_kr_lt_frame_lock_wait(kr_data->adapter, AL_ETH_AN__LT_LANE_0, + AL_ETH_KR_FRAME_LOCK_TIMEOUT) == TRUE) { + + /* + * when locked, for the first time initialize the receiver and + * transmitter tasks to prepare it for detecting coefficient + * update requests. + */ + al_eth_kr_lt_receiver_task_init(kr_data); + ret = al_eth_kr_lt_transmitter_task_init(kr_data); + if (ret != 0) + goto error; + + cnt = 0; + do { + ret = al_eth_kr_lt_receiver_task_run(kr_data); + if (ret != 0) + break; /* stop the link training */ + + ret = al_eth_kr_lt_transmitter_task_run(kr_data); + if (ret != 0) + break; /* stop the link training */ + + cnt++; + DELAY(100); + + } while ((al_eth_kr_startup_proto_prog_get(kr_data->adapter, + AL_ETH_AN__LT_LANE_0)) && (cnt <= AL_ETH_KR_LT_MAX_ROUNDS)); + + training_failure = + al_eth_kr_training_status_fail_get(kr_data->adapter, + AL_ETH_AN__LT_LANE_0); + al_dbg("[%s] training ended after %d rounds, failed = %s\n", + kr_data->adapter->name, cnt, + (training_failure) ? "Yes" : "No"); + if (training_failure || cnt > AL_ETH_KR_LT_MAX_ROUNDS) { + al_warn("[%s] Training Fail: status: %s, timeout: %s\n", + kr_data->adapter->name, + (training_failure) ? "Failed" : "OK", + (cnt > AL_ETH_KR_LT_MAX_ROUNDS) ? "Yes" : "No"); + + /* + * note: link is now disabled, + * until training becomes disabled (see below). + */ + ret = EIO; + goto error; + } + + } else { + + al_info("[%s] FAILED: did not achieve initial frame lock...\n", + kr_data->adapter->name); + + ret = EIO; + goto error; + } + + /* + * ensure to stop link training at the end to allow normal PCS + * datapath to operate in case of training failure. + */ + al_eth_kr_lt_stop(kr_data->adapter, AL_ETH_AN__LT_LANE_0); + + cnt = AL_ETH_KR_LT_DONE_TIMEOUT; + while (an_completed == FALSE) { + al_eth_kr_an_status_check(kr_data->adapter, &page_received, + &an_completed, &error); + DELAY(1); + if ((cnt--) == 0) { + al_info("%s: wait for an complete timeout!\n", __func__); + ret = ETIMEDOUT; + goto error; + } + } + +error: + al_eth_kr_an_stop(kr_data->adapter); + + return (ret); +} + +/* execute Autonegotiation process */ +int al_eth_an_lt_execute(struct al_hal_eth_adapter *adapter, + struct al_serdes_grp_obj *serdes_obj, + enum al_serdes_lane lane, + struct al_eth_an_adv *an_adv, + struct al_eth_an_adv *partner_adv) +{ + struct al_eth_kr_data kr_data; + int rc; + struct al_serdes_adv_rx_params rx_params; + + al_memset(&kr_data, 0, sizeof(struct al_eth_kr_data)); + + kr_data.adapter = adapter; + kr_data.serdes_obj = serdes_obj; + kr_data.lane = lane; + + /* + * the link training progress will run rx equalization so need to make + * sure rx parameters is not been override + */ + rx_params.override = FALSE; + kr_data.serdes_obj->rx_advanced_params_set( + kr_data.serdes_obj, + kr_data.lane, + &rx_params); + + rc = al_eth_kr_an_run(&kr_data, an_adv, partner_adv); + if (rc != 0) { + al_eth_kr_lt_stop(adapter, AL_ETH_AN__LT_LANE_0); + al_eth_kr_an_stop(adapter); + al_dbg("%s: auto-negotiation failed!\n", __func__); + return (rc); + } + + if (partner_adv->technology != AL_ETH_AN_TECH_10GBASE_KR) { + al_eth_kr_lt_stop(adapter, AL_ETH_AN__LT_LANE_0); + al_eth_kr_an_stop(adapter); + al_dbg("%s: link partner isn't 10GBASE_KR.\n", __func__); + return (rc); + } + + rc = al_eth_kr_run_lt(&kr_data); + if (rc != 0) { + al_eth_kr_lt_stop(adapter, AL_ETH_AN__LT_LANE_0); + al_eth_kr_an_stop(adapter); + al_dbg("%s: Link-training failed!\n", __func__); + return (rc); + } + + return (0); +} Property changes on: head/sys/dev/al_eth/al_init_eth_kr.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/dev/al_eth/al_init_eth_kr.h =================================================================== --- head/sys/dev/al_eth/al_init_eth_kr.h (nonexistent) +++ head/sys/dev/al_eth/al_init_eth_kr.h (revision 307670) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2015,2016 Annapurna Labs Ltd. and affiliates + * All rights reserved. + * + * Developed by Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/** + * Ethernet + * @{ + * @file al_init_eth_kr.h + * + * @brief auto-negotiation and link training activation sequence + * + * + */ + +#ifndef __AL_INIT_ETH_KR_H__ +#define __AL_INIT_ETH_KR_H__ + +#include +#include + +/** + * execute Auto-negotiation process + * + * @param adapter pointer to the private structure + * @param serdes_obj pointer to serdes private structure + * @param grp serdes's group + * @param lane serdes's lane + * @param an_adv pointer to the AN Advertisement Registers structure + * when NULL, the registers will not be updated. + * @param partner_adv pointer to the AN Advertisement received from the lp + * + * @return 0 on success. otherwise on failure. + */ +int al_eth_an_lt_execute(struct al_hal_eth_adapter *adapter, + struct al_serdes_grp_obj *serdes_obj, + enum al_serdes_lane lane, + struct al_eth_an_adv *an_adv, + struct al_eth_an_adv *partner_adv); + +#endif /*__AL_INIT_ETH_KR_H__*/ Property changes on: head/sys/dev/al_eth/al_init_eth_kr.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/dev/al_eth/al_init_eth_lm.c =================================================================== --- head/sys/dev/al_eth/al_init_eth_lm.c (nonexistent) +++ head/sys/dev/al_eth/al_init_eth_lm.c (revision 307670) @@ -0,0 +1,1537 @@ +/*- + * Copyright (c) 2015,2016 Annapurna Labs Ltd. and affiliates + * All rights reserved. + * + * Developed by Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "al_init_eth_lm.h" +#include "al_serdes.h" +#include "al_hal_eth.h" +#include "al_init_eth_kr.h" + +/** + * @{ + * @file al_init_eth_lm.c + * + * @brief ethernet link management common utilities + * + */ + +/* delay before checking link status with new serdes parameters (uSec) */ +#define AL_ETH_LM_LINK_STATUS_DELAY 1000 +/* delay before checking link status after reconfiguring the retimer (uSec) */ +#define AL_ETH_LM_RETIMER_LINK_STATUS_DELAY 50000 + +#define AL_ETH_LM_EQ_ITERATIONS 15 +#define AL_ETH_LM_MAX_DCGAIN 8 + +/* num of link training failures till serdes reset */ +#define AL_ETH_LT_FAILURES_TO_RESET 10 + +#define MODULE_IDENTIFIER_IDX 0 +#define MODULE_IDENTIFIER_SFP 0x3 +#define MODULE_IDENTIFIER_QSFP 0xd + +#define SFP_PRESENT 0 +#define SFP_NOT_PRESENT 1 + +/* SFP+ module */ +#define SFP_I2C_HEADER_10G_IDX 3 +#define SFP_I2C_HEADER_10G_DA_IDX 8 +#define SFP_I2C_HEADER_10G_DA_LEN_IDX 18 +#define SFP_I2C_HEADER_1G_IDX 6 +#define SFP_I2C_HEADER_SIGNAL_RATE 12 /* Nominal signaling rate, units of 100MBd. */ + +#define SFP_MIN_SIGNAL_RATE_25G 250 +#define SFP_MIN_SIGNAL_RATE_10G 100 + +/* QSFP+ module */ +#define QSFP_COMPLIANCE_CODE_IDX 131 +/* 40GBASE-LR4 and 40GBASE-SR4 are optic modules */ +#define QSFP_COMPLIANCE_CODE_OPTIC ((1 << 1) | (1 << 2)) +#define QSFP_COMPLIANCE_CODE_DAC (1 << 3) +#define QSFP_CABLE_LEN_IDX 146 + +/* TODO: need to check the necessary delay */ +#define AL_ETH_LM_RETIMER_WAIT_FOR_LOCK 500 /* delay after retimer reset to lock (mSec) */ +#define AL_ETH_LM_SERDES_WAIT_FOR_LOCK 50 /* delay after signal detect to lock (mSec) */ + +#define AL_ETH_LM_GEARBOX_RESET_DELAY 1000 /* (uSec) */ + +static const uint32_t +al_eth_retimer_boost_addr[AL_ETH_RETIMER_CHANNEL_MAX][AL_ETH_RETIMER_TYPE_MAX] = { + /* BR_210 | BR_410 */ + /* AL_ETH_RETIMER_CHANNEL_A */ {0xf, 0x1a}, + /* AL_ETH_RETIMER_CHANNEL_B */ {0x16, 0x18}, + /* AL_ETH_RETIMER_CHANNEL_C */ {0x0, 0x16}, + /* AL_ETH_RETIMER_CHANNEL_D */ {0x0, 0x14}, +}; + +#define RETIMER_LENS_MAX 5 +static const uint32_t +al_eth_retimer_boost_lens[RETIMER_LENS_MAX] = {0, 1, 2, 3, 5}; + +static const uint32_t +al_eth_retimer_boost_value[RETIMER_LENS_MAX + 1][AL_ETH_RETIMER_TYPE_MAX] = { + /* BR_210 | BR_410 */ + /* 0 */ {0x0, 0x0}, + /* 1 */ {0x1, 0x1}, + /* 2 */ {0x2, 0x1}, + /* 3 */ {0x3, 0x3}, + /* 5 */ {0x7, 0x3}, + /* 5+ */{0xb, 0x7}, +}; + +struct retimer_config_reg { + uint8_t addr; + uint8_t value; + uint8_t mask; +}; + +static struct retimer_config_reg retimer_ds25_25g_mode_tx_ch[] = { + {.addr = 0x0A, .value = 0x0C, .mask = 0xff }, + {.addr = 0x2F, .value = 0x54, .mask = 0xff }, + {.addr = 0x31, .value = 0x20, .mask = 0xff }, + {.addr = 0x1E, .value = 0xE9, .mask = 0xff }, + {.addr = 0x1F, .value = 0x0B, .mask = 0xff }, + {.addr = 0xA6, .value = 0x43, .mask = 0xff }, + {.addr = 0x2A, .value = 0x5A, .mask = 0xff }, + {.addr = 0x2B, .value = 0x0A, .mask = 0xff }, + {.addr = 0x2C, .value = 0xF6, .mask = 0xff }, + {.addr = 0x70, .value = 0x05, .mask = 0xff }, + {.addr = 0x6A, .value = 0x21, .mask = 0xff }, + {.addr = 0x35, .value = 0x0F, .mask = 0xff }, + {.addr = 0x12, .value = 0x83, .mask = 0xff }, + {.addr = 0x9C, .value = 0x24, .mask = 0xff }, + {.addr = 0x98, .value = 0x00, .mask = 0xff }, + {.addr = 0x42, .value = 0x50, .mask = 0xff }, + {.addr = 0x44, .value = 0x90, .mask = 0xff }, + {.addr = 0x45, .value = 0xC0, .mask = 0xff }, + {.addr = 0x46, .value = 0xD0, .mask = 0xff }, + {.addr = 0x47, .value = 0xD1, .mask = 0xff }, + {.addr = 0x48, .value = 0xD5, .mask = 0xff }, + {.addr = 0x49, .value = 0xD8, .mask = 0xff }, + {.addr = 0x4A, .value = 0xEA, .mask = 0xff }, + {.addr = 0x4B, .value = 0xF7, .mask = 0xff }, + {.addr = 0x4C, .value = 0xFD, .mask = 0xff }, + {.addr = 0x8E, .value = 0x00, .mask = 0xff }, + {.addr = 0x3D, .value = 0x94, .mask = 0xff }, + {.addr = 0x3F, .value = 0x40, .mask = 0xff }, + {.addr = 0x3E, .value = 0x43, .mask = 0xff }, + {.addr = 0x0A, .value = 0x00, .mask = 0xff }, +}; + +static struct retimer_config_reg retimer_ds25_25g_mode_rx_ch[] = { + {.addr = 0x0A, .value = 0x0C, .mask = 0xff}, + {.addr = 0x2F, .value = 0x54, .mask = 0xff}, + {.addr = 0x31, .value = 0x40, .mask = 0xff}, + {.addr = 0x1E, .value = 0xE3, .mask = 0xff}, + {.addr = 0x1F, .value = 0x0B, .mask = 0xff}, + {.addr = 0xA6, .value = 0x43, .mask = 0xff}, + {.addr = 0x2A, .value = 0x5A, .mask = 0xff}, + {.addr = 0x2B, .value = 0x0A, .mask = 0xff}, + {.addr = 0x2C, .value = 0xF6, .mask = 0xff}, + {.addr = 0x70, .value = 0x05, .mask = 0xff}, + {.addr = 0x6A, .value = 0x21, .mask = 0xff}, + {.addr = 0x35, .value = 0x0F, .mask = 0xff}, + {.addr = 0x12, .value = 0x83, .mask = 0xff}, + {.addr = 0x9C, .value = 0x24, .mask = 0xff}, + {.addr = 0x98, .value = 0x00, .mask = 0xff}, + {.addr = 0x42, .value = 0x50, .mask = 0xff}, + {.addr = 0x44, .value = 0x90, .mask = 0xff}, + {.addr = 0x45, .value = 0xC0, .mask = 0xff}, + {.addr = 0x46, .value = 0xD0, .mask = 0xff}, + {.addr = 0x47, .value = 0xD1, .mask = 0xff}, + {.addr = 0x48, .value = 0xD5, .mask = 0xff}, + {.addr = 0x49, .value = 0xD8, .mask = 0xff}, + {.addr = 0x4A, .value = 0xEA, .mask = 0xff}, + {.addr = 0x4B, .value = 0xF7, .mask = 0xff}, + {.addr = 0x4C, .value = 0xFD, .mask = 0xff}, + {.addr = 0x8E, .value = 0x00, .mask = 0xff}, + {.addr = 0x3D, .value = 0x94, .mask = 0xff}, + {.addr = 0x3F, .value = 0x40, .mask = 0xff}, + {.addr = 0x3E, .value = 0x43, .mask = 0xff}, + {.addr = 0x0A, .value = 0x00, .mask = 0xff}, +}; + +static struct retimer_config_reg retimer_ds25_10g_mode[] = { + /* Assert CDR reset (6.3) */ + {.addr = 0x0A, .value = 0x0C, .mask = 0x0C}, + /* Select 10.3125Gbps standard rate mode (6.6) */ + {.addr = 0x2F, .value = 0x00, .mask = 0xF0}, + /* Enable loop filter auto-adjust */ + {.addr = 0x1F, .value = 0x08, .mask = 0x08}, + /* Set Adapt Mode 1 (6.13) */ + {.addr = 0x31, .value = 0x20, .mask = 0x60}, + /* Disable the DFE since most applications do not need it (6.18) */ + {.addr = 0x1E, .value = 0x08, .mask = 0x08}, + /* Release CDR reset (6.4) */ + {.addr = 0x0A, .value = 0x00, .mask = 0x0C}, + /* Enable FIR (6.12) */ + {.addr = 0x3D, .value = 0x80, .mask = 0x80}, + /* Set Main-cursor tap sign to positive (6.12) */ + {.addr = 0x3D, .value = 0x00, .mask = 0x40}, + /* Set Post-cursor tap sign to negative (6.12) */ + {.addr = 0x3F, .value = 0x40, .mask = 0x40}, + /* Set Pre-cursor tap sign to negative (6.12) */ + {.addr = 0x3E, .value = 0x40, .mask = 0x40}, + /* Set Main-cursor tap magnitude to 13 (6.12) */ + {.addr = 0x3D, .value = 0x0D, .mask = 0x1F}, +}; + +static int al_eth_lm_retimer_boost_config(struct al_eth_lm_context *lm_context); +static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_context); +static al_bool al_eth_lm_retimer_ds25_signal_detect( + struct al_eth_lm_context *lm_context, uint32_t channel); +static int al_eth_lm_retimer_ds25_cdr_reset(struct al_eth_lm_context *lm_context, uint32_t channel); +static al_bool al_eth_lm_retimer_ds25_cdr_lock( + struct al_eth_lm_context *lm_context, uint32_t channel); +static int al_eth_lm_retimer_25g_rx_adaptation(struct al_eth_lm_context *lm_context); + +struct al_eth_lm_retimer { + int (*config)(struct al_eth_lm_context *lm_context); + int (*reset)(struct al_eth_lm_context *lm_context, uint32_t channel); + int (*signal_detect)(struct al_eth_lm_context *lm_context, uint32_t channel); + int (*cdr_lock)(struct al_eth_lm_context *lm_context, uint32_t channel); + int (*rx_adaptation)(struct al_eth_lm_context *lm_context); +}; + +static struct al_eth_lm_retimer retimer[] = { + {.config = al_eth_lm_retimer_boost_config, .signal_detect = NULL, + .reset = NULL, .cdr_lock = NULL, .rx_adaptation = NULL}, + {.config = al_eth_lm_retimer_boost_config, .signal_detect = NULL, + .reset = NULL, .cdr_lock = NULL, .rx_adaptation = NULL}, + {.config = al_eth_lm_retimer_ds25_full_config, + .signal_detect = al_eth_lm_retimer_ds25_signal_detect, + .reset = al_eth_lm_retimer_ds25_cdr_reset, + .cdr_lock = al_eth_lm_retimer_ds25_cdr_lock, + .rx_adaptation = al_eth_lm_retimer_25g_rx_adaptation}, +}; + +#define SFP_10G_DA_ACTIVE 0x8 +#define SFP_10G_DA_PASSIVE 0x4 + +#define lm_debug(...) \ + do { \ + if (lm_context->debug) \ + al_warn(__VA_ARGS__); \ + else \ + al_dbg(__VA_ARGS__); \ + } while (0) + +static int +al_eth_sfp_detect(struct al_eth_lm_context *lm_context, + enum al_eth_lm_link_mode *new_mode) +{ + int rc = 0; + uint8_t sfp_10g; + uint8_t sfp_1g; + uint8_t sfp_cable_tech; + uint8_t sfp_da_len; + uint8_t signal_rate; + + do { + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->sfp_bus_id, lm_context->sfp_i2c_addr, + SFP_I2C_HEADER_10G_IDX, &sfp_10g); + if (rc != 0) + break; + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->sfp_bus_id, lm_context->sfp_i2c_addr, + SFP_I2C_HEADER_1G_IDX, &sfp_1g); + if (rc != 0) + break; + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->sfp_bus_id, lm_context->sfp_i2c_addr, + SFP_I2C_HEADER_10G_DA_IDX, &sfp_cable_tech); + if (rc != 0) + break; + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->sfp_bus_id, lm_context->sfp_i2c_addr, + SFP_I2C_HEADER_10G_DA_LEN_IDX, &sfp_da_len); + if (rc != 0) + break; + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->sfp_bus_id, + lm_context->sfp_i2c_addr, + SFP_I2C_HEADER_SIGNAL_RATE, + &signal_rate); + } while (0); + + if (rc != 0) { + if (rc == ETIMEDOUT) { + /* ETIMEDOUT is returned when no SFP is connected */ + if (lm_context->mode != AL_ETH_LM_MODE_DISCONNECTED) + lm_debug("%s: SFP Disconnected\n", __func__); + *new_mode = AL_ETH_LM_MODE_DISCONNECTED; + } else { + return (rc); + } + } else if ((sfp_cable_tech & (SFP_10G_DA_PASSIVE | SFP_10G_DA_ACTIVE)) != 0) { + if ((signal_rate >= SFP_MIN_SIGNAL_RATE_25G) && + ((lm_context->max_speed == AL_ETH_LM_MAX_SPEED_25G) || + (lm_context->max_speed == AL_ETH_LM_MAX_SPEED_MAX))) + *new_mode = AL_ETH_LM_MODE_25G; + else if ((signal_rate >= SFP_MIN_SIGNAL_RATE_10G) && + ((lm_context->max_speed == AL_ETH_LM_MAX_SPEED_10G) || + (lm_context->max_speed == AL_ETH_LM_MAX_SPEED_MAX))) + *new_mode = AL_ETH_LM_MODE_10G_DA; + else + *new_mode = AL_ETH_LM_MODE_1G; + + lm_debug("%s: %s DAC (%d M) detected (max signal rate %d)\n", + __func__, + (sfp_cable_tech & SFP_10G_DA_PASSIVE) ? "Passive" : "Active", + sfp_da_len, + signal_rate); + + /* for active direct attached need to use len 0 in the retimer configuration */ + lm_context->da_len = (sfp_cable_tech & SFP_10G_DA_PASSIVE) ? sfp_da_len : 0; + } else if (sfp_10g != 0) { + lm_debug("%s: 10 SFP detected\n", __func__); + *new_mode = AL_ETH_LM_MODE_10G_OPTIC; + } else if (sfp_1g != 0) { + lm_debug("%s: 1G SFP detected\n", __func__); + *new_mode = AL_ETH_LM_MODE_1G; + } else { + al_warn("%s: unknown SFP inserted. eeprom content: 10G compliance 0x%x," + " 1G compliance 0x%x, sfp+cable 0x%x. default to %s\n", + __func__, sfp_10g, sfp_1g, sfp_cable_tech, + al_eth_lm_mode_convert_to_str(lm_context->default_mode)); + *new_mode = lm_context->default_mode; + lm_context->da_len = lm_context->default_dac_len; + } + + if ((lm_context->sfp_detect_force_mode) && (*new_mode != AL_ETH_LM_MODE_DISCONNECTED) && + (*new_mode != lm_context->default_mode)) { + al_warn("%s: Force mode to default (%s). mode based of the SFP EEPROM %s\n", + __func__, al_eth_lm_mode_convert_to_str(lm_context->default_mode), + al_eth_lm_mode_convert_to_str(*new_mode)); + + *new_mode = lm_context->default_mode; + } + + lm_context->mode = *new_mode; + + return (0); +} + +static int +al_eth_qsfp_detect(struct al_eth_lm_context *lm_context, + enum al_eth_lm_link_mode *new_mode) +{ + int rc = 0; + uint8_t qsfp_comp_code; + uint8_t qsfp_da_len; + + do { + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->sfp_bus_id, lm_context->sfp_i2c_addr, + QSFP_COMPLIANCE_CODE_IDX, &qsfp_comp_code); + if (rc != 0) + break; + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->sfp_bus_id, lm_context->sfp_i2c_addr, + QSFP_CABLE_LEN_IDX, &qsfp_da_len); + if (rc != 0) + break; + } while (0); + + if (rc != 0) { + if (rc == ETIMEDOUT) { + /* ETIMEDOUT is returned when no SFP is connected */ + lm_debug("%s: SFP Disconnected\n", __func__); + *new_mode = AL_ETH_LM_MODE_DISCONNECTED; + } else { + return (rc); + } + } else if ((qsfp_comp_code & QSFP_COMPLIANCE_CODE_DAC) != 0) { + lm_debug("%s: 10G passive DAC (%d M) detected\n", + __func__, qsfp_da_len); + *new_mode = AL_ETH_LM_MODE_10G_DA; + lm_context->da_len = qsfp_da_len; + } else if ((qsfp_comp_code & QSFP_COMPLIANCE_CODE_OPTIC) != 0) { + lm_debug("%s: 10G optic module detected\n", __func__); + *new_mode = AL_ETH_LM_MODE_10G_OPTIC; + } else { + al_warn("%s: unknown QSFP inserted. eeprom content: 10G " + "compliance 0x%x default to %s\n", __func__, qsfp_comp_code, + al_eth_lm_mode_convert_to_str(lm_context->default_mode)); + *new_mode = lm_context->default_mode; + lm_context->da_len = lm_context->default_dac_len; + } + + lm_context->mode = *new_mode; + + return (0); +} + +static int +al_eth_module_detect(struct al_eth_lm_context *lm_context, + enum al_eth_lm_link_mode *new_mode) +{ + int rc = 0; + uint8_t module_idx; + int sfp_present = SFP_PRESENT; + + if ((lm_context->gpio_get) && (lm_context->gpio_present != 0)) + sfp_present = lm_context->gpio_get(lm_context->gpio_present); + + if (sfp_present == SFP_NOT_PRESENT) { + lm_debug("%s: SFP not exist\n", __func__); + *new_mode = AL_ETH_LM_MODE_DISCONNECTED; + + return 0; + } + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->sfp_bus_id, lm_context->sfp_i2c_addr, + MODULE_IDENTIFIER_IDX, &module_idx); + if (rc != 0) { + if (rc == ETIMEDOUT) { + /* ETIMEDOUT is returned when no SFP is connected */ + if (lm_context->mode != AL_ETH_LM_MODE_DISCONNECTED) + lm_debug("%s: SFP Disconnected\n", __func__); + *new_mode = AL_ETH_LM_MODE_DISCONNECTED; + return (0); + } else { + return (rc); + } + } + + if (module_idx == MODULE_IDENTIFIER_QSFP) + return (al_eth_qsfp_detect(lm_context, new_mode)); + else + return (al_eth_sfp_detect(lm_context, new_mode)); + + return (0); +} + +static struct al_serdes_adv_tx_params da_tx_params = { + .override = TRUE, + .amp = 0x1, + .total_driver_units = 0x13, + .c_plus_1 = 0x2, + .c_plus_2 = 0, + .c_minus_1 = 0x2, + .slew_rate = 0, +}; + +static struct al_serdes_adv_rx_params da_rx_params = { + .override = TRUE, + .dcgain = 0x4, + .dfe_3db_freq = 0x4, + .dfe_gain = 0x3, + .dfe_first_tap_ctrl = 0x5, + .dfe_secound_tap_ctrl = 0x1, + .dfe_third_tap_ctrl = 0x8, + .dfe_fourth_tap_ctrl = 0x1, + .low_freq_agc_gain = 0x7, + .precal_code_sel = 0, + .high_freq_agc_boost = 0x1d, +}; + +static struct al_serdes_adv_tx_params optic_tx_params = { + .override = TRUE, + .amp = 0x1, + .total_driver_units = 0x13, + .c_plus_1 = 0x2, + .c_plus_2 = 0, + .c_minus_1 = 0, + .slew_rate = 0, +}; + +static struct al_serdes_adv_rx_params optic_rx_params = { + .override = TRUE, + .dcgain = 0x0, + .dfe_3db_freq = 0x7, + .dfe_gain = 0x0, + .dfe_first_tap_ctrl = 0x0, + .dfe_secound_tap_ctrl = 0x8, + .dfe_third_tap_ctrl = 0x0, + .dfe_fourth_tap_ctrl = 0x8, + .low_freq_agc_gain = 0x7, + .precal_code_sel = 0, + .high_freq_agc_boost = 0x4, +}; + +static void +al_eth_serdes_static_tx_params_set(struct al_eth_lm_context *lm_context) +{ + + if (lm_context->tx_param_dirty == 0) + return; + + if (lm_context->serdes_tx_params_valid != 0) { + lm_context->tx_param_dirty = 0; + + lm_context->tx_params_override.override = TRUE; + + if ((lm_context->serdes_obj->tx_advanced_params_set) == 0) { + al_err("tx_advanced_params_set is not supported for this serdes group\n"); + return; + } + + lm_context->serdes_obj->tx_advanced_params_set( + lm_context->serdes_obj, + lm_context->lane, + &lm_context->tx_params_override); + + } else if (lm_context->static_values != 0) { + lm_context->tx_param_dirty = 0; + + if ((lm_context->serdes_obj->tx_advanced_params_set) == 0) { + al_err("tx_advanced_params_set is not supported for this serdes group\n"); + return; + } + + if ((lm_context->retimer_exist == 0) && + (lm_context->mode == AL_ETH_LM_MODE_10G_DA)) + lm_context->serdes_obj->tx_advanced_params_set( + lm_context->serdes_obj, + lm_context->lane, + &da_tx_params); + else + lm_context->serdes_obj->tx_advanced_params_set( + lm_context->serdes_obj, + lm_context->lane, + &optic_tx_params); + } +} + +static void +al_eth_serdes_static_rx_params_set(struct al_eth_lm_context *lm_context) +{ + + if (lm_context->rx_param_dirty == 0) + return; + + if (lm_context->serdes_rx_params_valid != 0) { + lm_context->rx_param_dirty = 0; + + lm_context->rx_params_override.override = TRUE; + + if ((lm_context->serdes_obj->rx_advanced_params_set) == 0) { + al_err("rx_advanced_params_set is not supported for this serdes group\n"); + return; + } + + lm_context->serdes_obj->rx_advanced_params_set( + lm_context->serdes_obj, + lm_context->lane, + &lm_context->rx_params_override); + + + } else if (lm_context->static_values != 0) { + lm_context->rx_param_dirty = 0; + + if ((lm_context->serdes_obj->rx_advanced_params_set) == 0) { + al_err("rx_advanced_params_set is not supported for this serdes group\n"); + return; + } + + if ((lm_context->retimer_exist == 0) && + (lm_context->mode == AL_ETH_LM_MODE_10G_DA)) + lm_context->serdes_obj->rx_advanced_params_set( + lm_context->serdes_obj, + lm_context->lane, + &da_rx_params); + else + lm_context->serdes_obj->rx_advanced_params_set( + lm_context->serdes_obj, + lm_context->lane, + &optic_rx_params); + } +} + +static int +al_eth_rx_equal_run(struct al_eth_lm_context *lm_context) +{ + struct al_serdes_adv_rx_params rx_params; + int dcgain; + int best_dcgain = -1; + int i; + int best_score = -1; + int test_score = -1; + + rx_params.override = FALSE; + lm_context->serdes_obj->rx_advanced_params_set(lm_context->serdes_obj, + lm_context->lane, &rx_params); + + lm_debug("score | dcgain | dfe3db | dfegain | tap1 | tap2 | tap3 | " + "tap4 | low freq | high freq\n"); + + for (dcgain = 0; dcgain < AL_ETH_LM_MAX_DCGAIN; dcgain++) { + lm_context->serdes_obj->dcgain_set( + lm_context->serdes_obj, + dcgain); + + test_score = lm_context->serdes_obj->rx_equalization( + lm_context->serdes_obj, + lm_context->lane); + + if (test_score < 0) { + al_warn("serdes rx equalization failed on error\n"); + return (test_score); + } + + if (test_score > best_score) { + best_score = test_score; + best_dcgain = dcgain; + } + + lm_context->serdes_obj->rx_advanced_params_get( + lm_context->serdes_obj, + lm_context->lane, + &rx_params); + + lm_debug("%6d|%8x|%8x|%9x|%6x|%6x|%6x|%6x|%10x|%10x|\n", + test_score, rx_params.dcgain, rx_params.dfe_3db_freq, + rx_params.dfe_gain, rx_params.dfe_first_tap_ctrl, + rx_params.dfe_secound_tap_ctrl, rx_params.dfe_third_tap_ctrl, + rx_params.dfe_fourth_tap_ctrl, rx_params.low_freq_agc_gain, + rx_params.high_freq_agc_boost); + } + + lm_context->serdes_obj->dcgain_set( + lm_context->serdes_obj, + best_dcgain); + + best_score = -1; + for(i = 0; i < AL_ETH_LM_EQ_ITERATIONS; i++) { + test_score = lm_context->serdes_obj->rx_equalization( + lm_context->serdes_obj, + lm_context->lane); + + if (test_score < 0) { + al_warn("serdes rx equalization failed on error\n"); + return (test_score); + } + + if (test_score > best_score) { + best_score = test_score; + lm_context->serdes_obj->rx_advanced_params_get( + lm_context->serdes_obj, + lm_context->lane, + &rx_params); + } + } + + rx_params.precal_code_sel = 0; + rx_params.override = TRUE; + lm_context->serdes_obj->rx_advanced_params_set( + lm_context->serdes_obj, + lm_context->lane, + &rx_params); + + lm_debug("-------------------- best dcgain %d ------------------------------------\n", best_dcgain); + lm_debug("%6d|%8x|%8x|%9x|%6x|%6x|%6x|%6x|%10x|%10x|\n", + best_score, rx_params.dcgain, rx_params.dfe_3db_freq, + rx_params.dfe_gain, rx_params.dfe_first_tap_ctrl, + rx_params.dfe_secound_tap_ctrl, rx_params.dfe_third_tap_ctrl, + rx_params.dfe_fourth_tap_ctrl, rx_params.low_freq_agc_gain, + rx_params.high_freq_agc_boost); + + return (0); +} + +static int al_eth_lm_retimer_boost_config(struct al_eth_lm_context *lm_context) +{ + int i; + int rc = 0; + uint8_t boost = 0; + uint32_t boost_addr = + al_eth_retimer_boost_addr[lm_context->retimer_channel][lm_context->retimer_type]; + + if (lm_context->mode != AL_ETH_LM_MODE_10G_DA) { + boost = al_eth_retimer_boost_value[0][lm_context->retimer_type]; + } else { + for (i = 0; i < RETIMER_LENS_MAX; i++) { + if (lm_context->da_len <= al_eth_retimer_boost_lens[i]) { + boost = al_eth_retimer_boost_value[i][lm_context->retimer_type]; + break; + } + } + + if (i == RETIMER_LENS_MAX) + boost = al_eth_retimer_boost_value[RETIMER_LENS_MAX][lm_context->retimer_type]; + } + + lm_debug("config retimer boost in channel %d (addr %x) to 0x%x\n", + lm_context->retimer_channel, boost_addr, boost); + + rc = lm_context->i2c_write(lm_context->i2c_context, + lm_context->retimer_bus_id, lm_context->retimer_i2c_addr, + boost_addr, boost); + + if (rc != 0) { + al_err("%s: Error occurred (%d) while writing retimer " + "configuration (bus-id %x i2c-addr %x)\n", + __func__, rc, lm_context->retimer_bus_id, + lm_context->retimer_i2c_addr); + return (rc); + } + + return (0); +} + +/******************************************************************************* + ************************** retimer DS25 *************************************** + ******************************************************************************/ +#define LM_DS25_CHANNEL_EN_REG 0xff +#define LM_DS25_CHANNEL_EN_MASK 0x03 +#define LM_DS25_CHANNEL_EN_VAL 0x01 + +#define LM_DS25_CHANNEL_SEL_REG 0xfc +#define LM_DS25_CHANNEL_SEL_MASK 0xff + +#define LM_DS25_CDR_RESET_REG 0x0a +#define LM_DS25_CDR_RESET_MASK 0x0c +#define LM_DS25_CDR_RESET_ASSERT 0x0c +#define LM_DS25_CDR_RESET_RELEASE 0x00 + +#define LM_DS25_SIGNAL_DETECT_REG 0x78 +#define LM_DS25_SIGNAL_DETECT_MASK 0x20 + +#define LM_DS25_CDR_LOCK_REG 0x78 +#define LM_DS25_CDR_LOCK_MASK 0x10 + +#define LM_DS25_DRV_PD_REG 0x15 +#define LM_DS25_DRV_PD_MASK 0x08 + +static int al_eth_lm_retimer_ds25_write_reg(struct al_eth_lm_context *lm_context, + uint8_t reg_addr, + uint8_t reg_mask, + uint8_t reg_value) +{ + uint8_t reg; + int rc; + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->retimer_bus_id, + lm_context->retimer_i2c_addr, + reg_addr, + ®); + + if (rc != 0) + return (EIO); + + reg &= ~(reg_mask); + reg |= reg_value; + + rc = lm_context->i2c_write(lm_context->i2c_context, + lm_context->retimer_bus_id, + lm_context->retimer_i2c_addr, + reg_addr, + reg); + + if (rc != 0) + return (EIO); + + return (0); +} + +static int al_eth_lm_retimer_ds25_channel_select(struct al_eth_lm_context *lm_context, + uint8_t channel) +{ + int rc = 0; + + /* Write to specific channel */ + rc = al_eth_lm_retimer_ds25_write_reg(lm_context, + LM_DS25_CHANNEL_EN_REG, + LM_DS25_CHANNEL_EN_MASK, + LM_DS25_CHANNEL_EN_VAL); + + if (rc != 0) + return (rc); + + rc = al_eth_lm_retimer_ds25_write_reg(lm_context, + LM_DS25_CHANNEL_SEL_REG, + LM_DS25_CHANNEL_SEL_MASK, + (1 << channel)); + + return (rc); +} + +static int al_eth_lm_retimer_ds25_channel_config(struct al_eth_lm_context *lm_context, + uint8_t channel, + struct retimer_config_reg *config, + uint8_t config_size) +{ + uint8_t i; + int rc; + + rc = al_eth_lm_retimer_ds25_channel_select(lm_context, channel); + if (rc != 0) + goto config_error; + + for (i = 0; i < config_size; i++) { + rc = al_eth_lm_retimer_ds25_write_reg(lm_context, + config[i].addr, + config[i].mask, + config[i].value); + + if (rc != 0) + goto config_error; + } + + lm_debug("%s: retimer channel config done for channel %d\n", __func__, channel); + + return (0); + +config_error: + al_err("%s: failed to access to the retimer\n", __func__); + + return (rc); +} + +static int al_eth_lm_retimer_ds25_cdr_reset(struct al_eth_lm_context *lm_context, uint32_t channel) +{ + int rc; + + lm_debug("Perform CDR reset to channel %d\n", channel); + + rc = al_eth_lm_retimer_ds25_channel_select(lm_context, channel); + if (rc) + goto config_error; + + rc = al_eth_lm_retimer_ds25_write_reg(lm_context, + LM_DS25_CDR_RESET_REG, + LM_DS25_CDR_RESET_MASK, + LM_DS25_CDR_RESET_ASSERT); + + if (rc) + goto config_error; + + rc = al_eth_lm_retimer_ds25_write_reg(lm_context, + LM_DS25_CDR_RESET_REG, + LM_DS25_CDR_RESET_MASK, + LM_DS25_CDR_RESET_RELEASE); + + if (rc) + goto config_error; + + return 0; + +config_error: + al_err("%s: failed to access to the retimer\n", __func__); + + return rc; +} + +static boolean_t al_eth_lm_retimer_ds25_signal_detect(struct al_eth_lm_context *lm_context, + uint32_t channel) +{ + int rc = 0; + uint8_t reg; + + rc = al_eth_lm_retimer_ds25_channel_select(lm_context, channel); + if (rc) + goto config_error; + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->retimer_bus_id, + lm_context->retimer_i2c_addr, + LM_DS25_SIGNAL_DETECT_REG, + ®); + + if (rc) + goto config_error; + + if (reg & LM_DS25_SIGNAL_DETECT_MASK) + return TRUE; + + return FALSE; + +config_error: + al_err("%s: failed to access to the retimer\n", __func__); + + return FALSE; +} + +static boolean_t al_eth_lm_retimer_ds25_cdr_lock(struct al_eth_lm_context *lm_context, + uint32_t channel) +{ + int rc = 0; + uint8_t reg; + + rc = al_eth_lm_retimer_ds25_channel_select(lm_context, channel); + if (rc) + goto config_error; + + rc = lm_context->i2c_read(lm_context->i2c_context, + lm_context->retimer_bus_id, + lm_context->retimer_i2c_addr, + LM_DS25_CDR_LOCK_REG, + ®); + + if (rc) + goto config_error; + + if (reg & LM_DS25_CDR_LOCK_MASK) + return TRUE; + + return FALSE; + +config_error: + al_err("%s: failed to access to the retimer\n", __func__); + + return FALSE; +} + +static boolean_t al_eth_lm_wait_for_lock(struct al_eth_lm_context *lm_context, + uint32_t channel) +{ + uint32_t timeout = AL_ETH_LM_RETIMER_WAIT_FOR_LOCK; + al_bool lock = AL_FALSE; + + while ((timeout > 0) && (lock == FALSE)) { + al_msleep(10); + timeout -= 10; + + lock = retimer[lm_context->retimer_type].cdr_lock(lm_context, channel); + } + + lm_debug("%s: %s to achieve CDR lock in %d msec\n", + __func__, (lock) ? "succeed" : "FAILED", + (AL_ETH_LM_RETIMER_WAIT_FOR_LOCK - timeout)); + + return lock; +} + +static void al_eth_lm_retimer_signal_lock_check(struct al_eth_lm_context *lm_context, + uint32_t channel, + boolean_t *ready) +{ + al_bool signal_detect = TRUE; + al_bool cdr_lock = TRUE; + + if (retimer[lm_context->retimer_type].signal_detect) { + if (!retimer[lm_context->retimer_type].signal_detect(lm_context, channel)) { + lm_debug("no signal detected on retimer channel %d\n", channel); + + signal_detect = AL_FALSE; + } else { + if (retimer[lm_context->retimer_type].cdr_lock) { + cdr_lock = retimer[lm_context->retimer_type].cdr_lock( + lm_context, + channel); + if (!cdr_lock) { + if (retimer[lm_context->retimer_type].reset) { + retimer[lm_context->retimer_type].reset(lm_context, + channel); + + cdr_lock = al_eth_lm_wait_for_lock(lm_context, + channel); + } + } + } + } + } + + al_info("%s: (channel %d) signal %d cdr lock %d\n", + __func__, channel, signal_detect, (signal_detect) ? cdr_lock : 0); + + *ready = ((cdr_lock == TRUE) && (signal_detect == TRUE)); +} + +static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_context) +{ + int rc = 0; + al_bool ready; + struct retimer_config_reg *config_tx; + uint32_t config_tx_size; + struct retimer_config_reg *config_rx; + uint32_t config_rx_size; + + if (lm_context->mode == AL_ETH_LM_MODE_25G) { + config_tx = retimer_ds25_25g_mode_tx_ch; + config_tx_size = AL_ARR_SIZE(retimer_ds25_25g_mode_tx_ch); + + config_rx = retimer_ds25_25g_mode_rx_ch; + config_rx_size = AL_ARR_SIZE(retimer_ds25_25g_mode_rx_ch); + + } else { + config_tx = retimer_ds25_10g_mode; + config_tx_size = AL_ARR_SIZE(retimer_ds25_10g_mode); + + config_rx = retimer_ds25_10g_mode; + config_rx_size = AL_ARR_SIZE(retimer_ds25_10g_mode); + } + + + rc = al_eth_lm_retimer_ds25_channel_config(lm_context, + lm_context->retimer_channel, + config_rx, + config_rx_size); + + if (rc) + return rc; + + rc = al_eth_lm_retimer_ds25_channel_config(lm_context, + lm_context->retimer_tx_channel, + config_tx, + config_tx_size); + + if (rc) + return rc; + + if (lm_context->serdes_obj->type_get() == AL_SRDS_TYPE_25G) { + lm_debug("%s: serdes 25G - perform tx and rx gearbox reset\n", __func__); + al_eth_gearbox_reset(lm_context->adapter, TRUE, TRUE); + DELAY(AL_ETH_LM_GEARBOX_RESET_DELAY); + } + + al_eth_lm_retimer_signal_lock_check(lm_context, lm_context->retimer_tx_channel, &ready); + + if (!ready) { + lm_debug("%s: Failed to lock tx channel!\n", __func__); + return (1); + } + + lm_debug("%s: retimer full configuration done\n", __func__); + + return rc; +} + +static int al_eth_lm_retimer_25g_rx_adaptation(struct al_eth_lm_context *lm_context) +{ + int rc = 0; + al_bool ready; + + al_eth_lm_retimer_signal_lock_check(lm_context, lm_context->retimer_channel, &ready); + + if (!ready) { + lm_debug("%s: no signal detected on retimer Rx channel (%d)\n", + __func__, lm_context->retimer_channel); + + return rc; + } + + al_msleep(AL_ETH_LM_SERDES_WAIT_FOR_LOCK); + + return 0; +} + +static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, boolean_t *link_up) +{ + struct al_eth_link_status status; + int ret = 0; + + al_eth_link_status_clear(lm_context->adapter); + al_eth_link_status_get(lm_context->adapter, &status); + + if (status.link_up == AL_TRUE) { + lm_debug("%s: >>>> Link state DOWN ==> UP\n", __func__); + al_eth_led_set(lm_context->adapter, AL_TRUE); + lm_context->link_state = AL_ETH_LM_LINK_UP; + *link_up = AL_TRUE; + + return 0; + } else if (status.local_fault) { + lm_context->link_state = AL_ETH_LM_LINK_DOWN; + al_eth_led_set(lm_context->adapter, AL_FALSE); + + al_err("%s: Failed to establish link\n", __func__); + ret = 1; + } else { + lm_debug("%s: >>>> Link state DOWN ==> DOWN_RF\n", __func__); + lm_context->link_state = AL_ETH_LM_LINK_DOWN_RF; + al_eth_led_set(lm_context->adapter, AL_FALSE); + + ret = 0; + } + + *link_up = AL_FALSE; + return ret; +} + +/*****************************************************************************/ +/***************************** API functions *********************************/ +/*****************************************************************************/ +int +al_eth_lm_init(struct al_eth_lm_context *lm_context, + struct al_eth_lm_init_params *params) +{ + + lm_context->adapter = params->adapter; + lm_context->serdes_obj = params->serdes_obj; + lm_context->lane = params->lane; + lm_context->sfp_detection = params->sfp_detection; + lm_context->sfp_bus_id = params->sfp_bus_id; + lm_context->sfp_i2c_addr = params->sfp_i2c_addr; + + lm_context->retimer_exist = params->retimer_exist; + lm_context->retimer_type = params->retimer_type; + lm_context->retimer_bus_id = params->retimer_bus_id; + lm_context->retimer_i2c_addr = params->retimer_i2c_addr; + lm_context->retimer_channel = params->retimer_channel; + lm_context->retimer_tx_channel = params->retimer_tx_channel; + + lm_context->default_mode = params->default_mode; + lm_context->default_dac_len = params->default_dac_len; + lm_context->link_training = params->link_training; + lm_context->rx_equal = params->rx_equal; + lm_context->static_values = params->static_values; + lm_context->i2c_read = params->i2c_read; + lm_context->i2c_write = params->i2c_write; + lm_context->i2c_context = params->i2c_context; + lm_context->get_random_byte = params->get_random_byte; + + /* eeprom_read must be provided if sfp_detection is true */ + al_assert((lm_context->sfp_detection == FALSE) || + (lm_context->i2c_read != NULL)); + + al_assert((lm_context->retimer_exist == FALSE) || + (lm_context->i2c_write != NULL)); + + lm_context->local_adv.selector_field = 1; + lm_context->local_adv.capability = 0; + lm_context->local_adv.remote_fault = 0; + lm_context->local_adv.acknowledge = 0; + lm_context->local_adv.next_page = 0; + lm_context->local_adv.technology = AL_ETH_AN_TECH_10GBASE_KR; + lm_context->local_adv.fec_capability = params->kr_fec_enable; + + lm_context->mode = AL_ETH_LM_MODE_DISCONNECTED; + lm_context->serdes_tx_params_valid = FALSE; + lm_context->serdes_rx_params_valid = FALSE; + + lm_context->rx_param_dirty = 1; + lm_context->tx_param_dirty = 1; + + lm_context->gpio_get = params->gpio_get; + lm_context->gpio_present = params->gpio_present; + + lm_context->max_speed = params->max_speed; + lm_context->sfp_detect_force_mode = params->sfp_detect_force_mode; + + lm_context->lm_pause = params->lm_pause; + + lm_context->led_config = params->led_config; + + lm_context->retimer_configured = FALSE; + + lm_context->link_state = AL_ETH_LM_LINK_DOWN; + + return (0); +} + +int +al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, + boolean_t *link_fault, enum al_eth_lm_link_mode *old_mode, + enum al_eth_lm_link_mode *new_mode) +{ + int err; + struct al_eth_link_status status; + + al_assert(lm_context != NULL); + al_assert(old_mode != NULL); + al_assert(new_mode != NULL); + + /** + * if Link management is disabled, report no link fault in case the link was up + * before and set new mode to disconnected to avoid calling to link establish + * if the link wasn't up. + */ + if (lm_context->lm_pause != NULL) { + boolean_t lm_pause = lm_context->lm_pause(lm_context->i2c_context); + if (lm_pause == TRUE) { + *new_mode = AL_ETH_LM_MODE_DISCONNECTED; + if (link_fault != 0) { + if (lm_context->link_state == AL_ETH_LM_LINK_UP) + *link_fault = FALSE; + else + *link_fault = TRUE; + } + + return 0; + } + } + + *old_mode = lm_context->mode; + *new_mode = lm_context->mode; + + if (link_fault != NULL) + *link_fault = TRUE; + + switch (lm_context->link_state) { + case AL_ETH_LM_LINK_UP: + al_eth_link_status_get(lm_context->adapter, &status); + + if (status.link_up) { + if (link_fault != NULL) + *link_fault = FALSE; + + al_eth_led_set(lm_context->adapter, TRUE); + + return (0); + } else if (status.local_fault) { + lm_debug("%s: >>>> Link state UP ==> DOWN\n", __func__); + lm_context->link_state = AL_ETH_LM_LINK_DOWN; + } else { + lm_debug("%s: >>>> Link state UP ==> DOWN_RF\n", __func__); + lm_context->link_state = AL_ETH_LM_LINK_DOWN_RF; + } + + break; + case AL_ETH_LM_LINK_DOWN_RF: + al_eth_link_status_get(lm_context->adapter, &status); + + if (status.local_fault) { + lm_debug("%s: >>>> Link state DOWN_RF ==> DOWN\n", __func__); + lm_context->link_state = AL_ETH_LM_LINK_DOWN; + + break; + } else if (status.remote_fault == FALSE) { + lm_debug("%s: >>>> Link state DOWN_RF ==> UP\n", __func__); + lm_context->link_state = AL_ETH_LM_LINK_UP; + } + /* in case of remote fault only no need to check SFP again */ + return (0); + case AL_ETH_LM_LINK_DOWN: + break; + }; + + al_eth_led_set(lm_context->adapter, FALSE); + + if (lm_context->sfp_detection) { + err = al_eth_module_detect(lm_context, new_mode); + if (err != 0) { + al_err("module_detection failed!\n"); + return (err); + } + + lm_context->mode = *new_mode; + } else { + lm_context->mode = lm_context->default_mode; + *new_mode = lm_context->mode; + } + + if (*old_mode != *new_mode) { + al_info("%s: New SFP mode detected %s -> %s\n", + __func__, al_eth_lm_mode_convert_to_str(*old_mode), + al_eth_lm_mode_convert_to_str(*new_mode)); + + lm_context->rx_param_dirty = 1; + lm_context->tx_param_dirty = 1; + + lm_context->new_port = TRUE; + + if ((*new_mode != AL_ETH_LM_MODE_DISCONNECTED) && (lm_context->led_config)) { + struct al_eth_lm_led_config_data data = {0}; + + switch (*new_mode) { + case AL_ETH_LM_MODE_10G_OPTIC: + case AL_ETH_LM_MODE_10G_DA: + data.speed = AL_ETH_LM_LED_CONFIG_10G; + break; + case AL_ETH_LM_MODE_1G: + data.speed = AL_ETH_LM_LED_CONFIG_1G; + break; + case AL_ETH_LM_MODE_25G: + data.speed = AL_ETH_LM_LED_CONFIG_25G; + break; + default: + al_err("%s: unknown LM mode!\n", __func__); + }; + + lm_context->led_config(lm_context->i2c_context, &data); + } + } + + return (0); +} + +int +al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_up) +{ + boolean_t signal_detected; + int ret = 0; + + switch (lm_context->link_state) { + case AL_ETH_LM_LINK_UP: + *link_up = TRUE; + lm_debug("%s: return link up\n", __func__); + + return (0); + case AL_ETH_LM_LINK_DOWN_RF: + *link_up = FALSE; + lm_debug("%s: return link down (DOWN_RF)\n", __func__); + + return (0); + case AL_ETH_LM_LINK_DOWN: + break; + }; + + /** + * At this point we will get LM disable only if changed to disable after link detection + * finished. in this case link will not be established until LM will be enable again. + */ + if (lm_context->lm_pause) { + boolean_t lm_pause = lm_context->lm_pause(lm_context->i2c_context); + if (lm_pause == TRUE) { + *link_up = FALSE; + + return (0); + } + } + + if ((lm_context->new_port) && (lm_context->retimer_exist)) { + al_eth_serdes_static_rx_params_set(lm_context); + al_eth_serdes_static_tx_params_set(lm_context); +#if 0 + al_eth_lm_retimer_config(lm_context); + DELAY(AL_ETH_LM_RETIMER_LINK_STATUS_DELAY); +#endif + + if (retimer[lm_context->retimer_type].config(lm_context)) { + al_info("%s: failed to configure the retimer\n", __func__); + + *link_up = FALSE; + return (1); + } + + lm_context->new_port = FALSE; + + DELAY(1000); + } + + if (lm_context->retimer_exist) { + if (retimer[lm_context->retimer_type].rx_adaptation) { + ret = retimer[lm_context->retimer_type].rx_adaptation(lm_context); + + if (ret != 0) { + lm_debug("retimer rx is not ready\n"); + *link_up = FALSE; + + return (0); + } + } + } + + signal_detected = lm_context->serdes_obj->signal_is_detected( + lm_context->serdes_obj, + lm_context->lane); + + if (signal_detected == FALSE) { + /* if no signal detected there is nothing to do */ + lm_debug("serdes signal is down\n"); + *link_up = AL_FALSE; + return 0; + } + + if (lm_context->serdes_obj->type_get() == AL_SRDS_TYPE_25G) { + lm_debug("%s: serdes 25G - perform rx gearbox reset\n", __func__); + al_eth_gearbox_reset(lm_context->adapter, FALSE, TRUE); + DELAY(AL_ETH_LM_GEARBOX_RESET_DELAY); + } + + + if (lm_context->retimer_exist) { + DELAY(AL_ETH_LM_RETIMER_LINK_STATUS_DELAY); + + ret = al_eth_lm_check_for_link(lm_context, link_up); + + if (ret == 0) { + lm_debug("%s: link is up with retimer\n", __func__); + return 0; + } + + return ret; + } + + if ((lm_context->mode == AL_ETH_LM_MODE_10G_DA) && (lm_context->link_training)) { + lm_context->local_adv.transmitted_nonce = lm_context->get_random_byte(); + lm_context->local_adv.transmitted_nonce &= 0x1f; + + ret = al_eth_an_lt_execute(lm_context->adapter, + lm_context->serdes_obj, + lm_context->lane, + &lm_context->local_adv, + &lm_context->partner_adv); + + lm_context->rx_param_dirty = 1; + lm_context->tx_param_dirty = 1; + + if (ret == 0) { + al_info("%s: link training finished successfully\n", __func__); + lm_context->link_training_failures = 0; + ret = al_eth_lm_check_for_link(lm_context, link_up); + + if (ret == 0) { + lm_debug("%s: link is up with LT\n", __func__); + return (0); + } + + } + + lm_context->link_training_failures++; + if (lm_context->link_training_failures > AL_ETH_LT_FAILURES_TO_RESET) { + lm_debug("%s: failed to establish LT %d times. reset serdes\n", + __func__, AL_ETH_LT_FAILURES_TO_RESET); + + lm_context->serdes_obj->pma_hard_reset_lane( + lm_context->serdes_obj, + lm_context->lane, + TRUE); + lm_context->serdes_obj->pma_hard_reset_lane( + lm_context->serdes_obj, + lm_context->lane, + FALSE); + lm_context->link_training_failures = 0; + } + } + + al_eth_serdes_static_tx_params_set(lm_context); + + if ((lm_context->mode == AL_ETH_LM_MODE_10G_DA) && + (lm_context->rx_equal)) { + ret = al_eth_rx_equal_run(lm_context); + + if (ret == 0) { + DELAY(AL_ETH_LM_LINK_STATUS_DELAY); + ret = al_eth_lm_check_for_link(lm_context, link_up); + + if (ret == 0) { + lm_debug("%s: link is up with Rx Equalization\n", __func__); + return (0); + } + } + } + + al_eth_serdes_static_rx_params_set(lm_context); + + DELAY(AL_ETH_LM_LINK_STATUS_DELAY); + + ret = al_eth_lm_check_for_link(lm_context, link_up); + + if (ret == 0) { + lm_debug("%s: link is up with static parameters\n", __func__); + return (0); + } + + *link_up = FALSE; + return (1); +} + +int +al_eth_lm_static_parameters_override(struct al_eth_lm_context *lm_context, + struct al_serdes_adv_tx_params *tx_params, + struct al_serdes_adv_rx_params *rx_params) +{ + + if (tx_params != NULL) { + lm_context->tx_params_override = *tx_params; + lm_context->tx_param_dirty = 1; + lm_context->serdes_tx_params_valid = TRUE; + } + + if (rx_params != NULL) { + lm_context->rx_params_override = *rx_params; + lm_context->rx_param_dirty = 1; + lm_context->serdes_rx_params_valid = TRUE; + } + + return (0); +} + +int +al_eth_lm_static_parameters_override_disable(struct al_eth_lm_context *lm_context, + boolean_t tx_params, boolean_t rx_params) +{ + + if (tx_params != 0) + lm_context->serdes_tx_params_valid = FALSE; + if (rx_params != 0) + lm_context->serdes_tx_params_valid = FALSE; + + return (0); +} + +int +al_eth_lm_static_parameters_get(struct al_eth_lm_context *lm_context, + struct al_serdes_adv_tx_params *tx_params, + struct al_serdes_adv_rx_params *rx_params) +{ + + if (tx_params != NULL) { + if (lm_context->serdes_tx_params_valid) + *tx_params = lm_context->tx_params_override; + else + lm_context->serdes_obj->tx_advanced_params_get( + lm_context->serdes_obj, + lm_context->lane, + tx_params); + } + + if (rx_params != NULL) { + if (lm_context->serdes_rx_params_valid) + *rx_params = lm_context->rx_params_override; + else + lm_context->serdes_obj->rx_advanced_params_get( + lm_context->serdes_obj, + lm_context->lane, + rx_params); + } + + return (0); +} + +const char * +al_eth_lm_mode_convert_to_str(enum al_eth_lm_link_mode val) +{ + + switch (val) { + case AL_ETH_LM_MODE_DISCONNECTED: + return ("AL_ETH_LM_MODE_DISCONNECTED"); + case AL_ETH_LM_MODE_10G_OPTIC: + return ("AL_ETH_LM_MODE_10G_OPTIC"); + case AL_ETH_LM_MODE_10G_DA: + return ("AL_ETH_LM_MODE_10G_DA"); + case AL_ETH_LM_MODE_1G: + return ("AL_ETH_LM_MODE_1G"); + case AL_ETH_LM_MODE_25G: + return ("AL_ETH_LM_MODE_25G"); + } + + return ("N/A"); +} + +void +al_eth_lm_debug_mode_set(struct al_eth_lm_context *lm_context, + boolean_t enable) +{ + + lm_context->debug = enable; +} Property changes on: head/sys/dev/al_eth/al_init_eth_lm.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/dev/al_eth/al_init_eth_lm.h =================================================================== --- head/sys/dev/al_eth/al_init_eth_lm.h (nonexistent) +++ head/sys/dev/al_eth/al_init_eth_lm.h (revision 307670) @@ -0,0 +1,376 @@ +/*- + * Copyright (c) 2015,2016 Annapurna Labs Ltd. and affiliates + * All rights reserved. + * + * Developed by Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/** + * Ethernet + * @{ + * @file al_init_eth_lm.h + * + * @brief ethernet link management common utilities + * + * Common operation example: + * @code + * int main() + * { + * struct al_eth_lm_context lm_context; + * struct al_eth_lm_init_params lm_params; + * enum al_eth_lm_link_mode old_mode; + * enum al_eth_lm_link_mode new_mode; + * al_bool fault; + * al_bool link_up; + * int rc = 0; + * + * lm_params.adapter = hal_adapter; + * lm_params.serdes_obj = serdes; + * lm_params.grp = grp; + * lm_params.lane = lane; + * lm_params.sfp_detection = true; + * lm_params.link_training = true; + * lm_params.rx_equal = true + * lm_params.static_values = true; + * lm_params.kr_fec_enable = false; + * lm_params.eeprom_read = &my_eeprom_read; + * lm_params.eeprom_context = context; + * lm_params.get_random_byte = &my_rand_byte; + * lm_params.default_mode = AL_ETH_LM_MODE_10G_DA; + * + * al_eth_lm_init(&lm_context, &lm_params); + * + * rc = al_eth_lm_link_detection(&lm_context, &fault, &old_mode, &new_mode); + * if (fault == false) + * return; // in this case the link is still up + * + * if (rc) { + * printf("link detection failed on error\n"); + * return; + * } + * + * if (old_mode != new_mode) { + * // perform serdes configuration if needed + * + * // mac stop / start / config if needed + * } + * + * spin_lock(lock); + * rc = al_eth_lm_link_establish($lm_context, &link_up); + * spin_unlock(lock); + * if (rc) { + * printf("establish link failed\n"); + * return; + * } + * + * if (link_up) + * printf("Link established successfully\n"); + * else + * printf("No signal found. probably the link partner is disconnected\n"); + * } + * @endcode + * + */ + +#ifndef __AL_INIT_ETH_LM_H__ +#define __AL_INIT_ETH_LM_H__ + +#include +#include +#include "al_init_eth_kr.h" + +enum al_eth_lm_link_mode { + AL_ETH_LM_MODE_DISCONNECTED, + AL_ETH_LM_MODE_10G_OPTIC, + AL_ETH_LM_MODE_10G_DA, + AL_ETH_LM_MODE_1G, + AL_ETH_LM_MODE_25G, +}; + +enum al_eth_lm_max_speed { + AL_ETH_LM_MAX_SPEED_MAX, + AL_ETH_LM_MAX_SPEED_25G, + AL_ETH_LM_MAX_SPEED_10G, + AL_ETH_LM_MAX_SPEED_1G, +}; + +enum al_eth_lm_link_state { + AL_ETH_LM_LINK_DOWN, + AL_ETH_LM_LINK_DOWN_RF, + AL_ETH_LM_LINK_UP, +}; + +enum al_eth_lm_led_config_speed { + AL_ETH_LM_LED_CONFIG_1G, + AL_ETH_LM_LED_CONFIG_10G, + AL_ETH_LM_LED_CONFIG_25G, +}; + +struct al_eth_lm_led_config_data { + enum al_eth_lm_led_config_speed speed; +}; + + +struct al_eth_lm_context { + struct al_hal_eth_adapter *adapter; + struct al_serdes_grp_obj *serdes_obj; + enum al_serdes_lane lane; + + uint32_t link_training_failures; + + boolean_t tx_param_dirty; + boolean_t serdes_tx_params_valid; + struct al_serdes_adv_tx_params tx_params_override; + boolean_t rx_param_dirty; + boolean_t serdes_rx_params_valid; + struct al_serdes_adv_rx_params rx_params_override; + + struct al_eth_an_adv local_adv; + struct al_eth_an_adv partner_adv; + + enum al_eth_lm_link_mode mode; + uint8_t da_len; + boolean_t debug; + + /* configurations */ + boolean_t sfp_detection; + uint8_t sfp_bus_id; + uint8_t sfp_i2c_addr; + + enum al_eth_lm_link_mode default_mode; + uint8_t default_dac_len; + boolean_t link_training; + boolean_t rx_equal; + boolean_t static_values; + + boolean_t retimer_exist; + enum al_eth_retimer_type retimer_type; + uint8_t retimer_bus_id; + uint8_t retimer_i2c_addr; + enum al_eth_retimer_channel retimer_channel; + + /* services */ + int (*i2c_read)(void *handle, uint8_t bus_id, uint8_t i2c_addr, + uint8_t reg_addr, uint8_t *val); + int (*i2c_write)(void *handle, uint8_t bus_id, uint8_t i2c_addr, + uint8_t reg_addr, uint8_t val); + void *i2c_context; + uint8_t (*get_random_byte)(void); + + int (*gpio_get)(unsigned int gpio); + uint32_t gpio_present; + + enum al_eth_retimer_channel retimer_tx_channel; + boolean_t retimer_configured; + + enum al_eth_lm_max_speed max_speed; + + boolean_t sfp_detect_force_mode; + + enum al_eth_lm_link_state link_state; + boolean_t new_port; + + boolean_t (*lm_pause)(void *handle); + + void (*led_config)(void *handle, struct al_eth_lm_led_config_data *data); +}; + +struct al_eth_lm_init_params { + /* pointer to HAL context */ + struct al_hal_eth_adapter *adapter; + /* pointer to serdes object */ + struct al_serdes_grp_obj *serdes_obj; + /* serdes lane for this port */ + enum al_serdes_lane lane; + + /* + * set to true to perform sfp detection if the link is down. + * when set to true, eeprom_read below should NOT be NULL. + */ + boolean_t sfp_detection; + /* i2c bus id of the SFP for this port */ + uint8_t sfp_bus_id; + /* i2c addr of the SFP for this port */ + uint8_t sfp_i2c_addr; + /* + * default mode, and dac length will be used in case sfp_detection + * is not set or in case the detection failed. + */ + enum al_eth_lm_link_mode default_mode; + uint8_t default_dac_len; + + /* the i2c bus id and addr of the retimer in case it exist */ + uint8_t retimer_bus_id; + uint8_t retimer_i2c_addr; + /* retimer channel connected to this port */ + enum al_eth_retimer_channel retimer_channel; + enum al_eth_retimer_channel retimer_tx_channel; + /* retimer type if exist */ + enum al_eth_retimer_type retimer_type; + + /* + * the following parameters control what mechanisms to run + * on link_establish with the following steps: + * - if retimer_exist is set, the retimer will be configured based on DA len. + * - if link_training is set and DA detected run link training. if succeed return 0 + * - if rx_equal is set serdes equalization will be run to configure the rx parameters. + * - if static_values is set, tx and rx values will be set based on static values. + */ + boolean_t retimer_exist; + boolean_t link_training; + boolean_t rx_equal; + boolean_t static_values; + + /* enable / disable fec capabilities in AN */ + boolean_t kr_fec_enable; + + /* + * pointer to function that's read 1 byte from eeprom + * in case no eeprom is connected should return -ETIMEDOUT + */ + int (*i2c_read)(void *handle, uint8_t bus_id, uint8_t i2c_addr, + uint8_t reg_addr, uint8_t *val); + int (*i2c_write)(void *handle, uint8_t bus_id, uint8_t i2c_addr, + uint8_t reg_addr, uint8_t val); + void *i2c_context; + /* pointer to function that return 1 rand byte */ + uint8_t (*get_random_byte)(void); + + /* pointer to function that gets GPIO value - if NULL gpio present won't be used */ + int (*gpio_get)(unsigned int gpio); + /* gpio number connected to the SFP present pin */ + uint32_t gpio_present; + + enum al_eth_lm_max_speed max_speed; + + /* in case force mode is true - the default mode will be set regardless to + * the SFP EEPROM content */ + boolean_t sfp_detect_force_mode; + + /* lm pause callback - in case it return true the LM will try to preserve + * the current link status and will not try to establish new link (and will not + * access to i2c bus) */ + boolean_t (*lm_pause)(void *handle); + + /* config ethernet LEDs according to data. can be NULL if no configuration needed */ + void (*led_config)(void *handle, struct al_eth_lm_led_config_data *data); +}; + +/** + * initialize link management context and set configuration + * + * @param lm_context pointer to link management context + * @param params parameters passed from upper layer + * + * @return 0 in case of success. otherwise on failure. + */ +int al_eth_lm_init(struct al_eth_lm_context *lm_context, + struct al_eth_lm_init_params *params); + +/** + * perform link status check. in case link is down perform sfp detection + * + * @param lm_context pointer to link management context + * @param link_fault indicate if the link is down + * @param old_mode the last working mode + * @param new_mode the new mode detected in this call + * + * @return 0 in case of success. otherwise on failure. + */ +int al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, + boolean_t *link_fault, enum al_eth_lm_link_mode *old_mode, + enum al_eth_lm_link_mode *new_mode); + +/** + * run LT, rx equalization and static values override according to configuration + * This function MUST be called inside a lock as it using common serdes registers + * + * @param lm_context pointer to link management context + * @param link_up set to true in case link is establish successfully + * + * @return < 0 in case link was failed to be established + */ +int al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, + boolean_t *link_up); + +/** + * override the default static parameters + * + * @param lm_context pointer to link management context + * @param tx_params pointer to new tx params + * @param rx_params pointer to new rx params + * + * @return 0 in case of success. otherwise on failure. + **/ +int al_eth_lm_static_parameters_override(struct al_eth_lm_context *lm_context, + struct al_serdes_adv_tx_params *tx_params, + struct al_serdes_adv_rx_params *rx_params); + +/** + * disable serdes parameters override + * + * @param lm_context pointer to link management context + * @param tx_params set to true to disable override of tx params + * @param rx_params set to true to disable override of rx params + * + * @return 0 in case of success. otherwise on failure. + **/ +int al_eth_lm_static_parameters_override_disable(struct al_eth_lm_context *lm_context, + boolean_t tx_params, boolean_t rx_params); + +/** + * get the static parameters that are being used + * if the parameters was override - return the override values + * else return the current values of the parameters + * + * @param lm_context pointer to link management context + * @param tx_params pointer to new tx params + * @param rx_params pointer to new rx params + * + * @return 0 in case of success. otherwise on failure. + */ +int al_eth_lm_static_parameters_get(struct al_eth_lm_context *lm_context, + struct al_serdes_adv_tx_params *tx_params, + struct al_serdes_adv_rx_params *rx_params); + +/** + * convert link management mode to string + * + * @param val link management mode + * + * @return string of the mode + */ +const char *al_eth_lm_mode_convert_to_str(enum al_eth_lm_link_mode val); + +/** + * print all debug messages + * + * @param lm_context pointer to link management context + * @param enable set to true to enable debug mode + */ +void al_eth_lm_debug_mode_set(struct al_eth_lm_context *lm_context, + boolean_t enable); +#endif Property changes on: head/sys/dev/al_eth/al_init_eth_lm.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property