mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
iflib drivers: Constify PCI ID LUTs
Since d49e83eac3
, iflib(9) is ready
for this change.
While at it, make isc_driver_version strings (static) const where
not apparently un-const on purpose, too.
This reduces the size of the amd64 GENERIC by about 10 KiB.
This commit is contained in:
parent
ece58eaf50
commit
51e235148a
|
@ -137,7 +137,7 @@ static struct resource_spec axgbe_pci_mac_spec[] = {
|
||||||
{ -1, 0 }
|
{ -1, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static pci_vendor_info_t axgbe_vendor_info_array[] =
|
static const pci_vendor_info_t axgbe_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
PVID(0x1022, 0x1458, "AMD 10 Gigabit Ethernet Driver"),
|
PVID(0x1022, 0x1458, "AMD 10 Gigabit Ethernet Driver"),
|
||||||
PVID(0x1022, 0x1459, "AMD 10 Gigabit Ethernet Driver"),
|
PVID(0x1022, 0x1459, "AMD 10 Gigabit Ethernet Driver"),
|
||||||
|
|
|
@ -206,7 +206,7 @@
|
||||||
|
|
||||||
#define BNXT_MIN_FRAME_SIZE 52 /* Frames must be padded to this size for some A0 chips */
|
#define BNXT_MIN_FRAME_SIZE 52 /* Frames must be padded to this size for some A0 chips */
|
||||||
|
|
||||||
extern char bnxt_driver_version[];
|
extern const char bnxt_driver_version[];
|
||||||
typedef void (*bnxt_doorbell_tx)(void *, uint16_t idx);
|
typedef void (*bnxt_doorbell_tx)(void *, uint16_t idx);
|
||||||
typedef void (*bnxt_doorbell_rx)(void *, uint16_t idx);
|
typedef void (*bnxt_doorbell_rx)(void *, uint16_t idx);
|
||||||
typedef void (*bnxt_doorbell_rx_cq)(void *, bool);
|
typedef void (*bnxt_doorbell_rx_cq)(void *, bool);
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
* PCI Device ID Table
|
* PCI Device ID Table
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static pci_vendor_info_t bnxt_vendor_info_array[] =
|
static const pci_vendor_info_t bnxt_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
PVID(BROADCOM_VENDOR_ID, BCM57301,
|
PVID(BROADCOM_VENDOR_ID, BCM57301,
|
||||||
"Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller"),
|
"Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller"),
|
||||||
|
@ -300,7 +300,7 @@ static driver_t bnxt_iflib_driver = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BNXT_DRIVER_VERSION "2.20.0.1"
|
#define BNXT_DRIVER_VERSION "2.20.0.1"
|
||||||
char bnxt_driver_version[] = BNXT_DRIVER_VERSION;
|
const char bnxt_driver_version[] = BNXT_DRIVER_VERSION;
|
||||||
extern struct if_txrx bnxt_txrx;
|
extern struct if_txrx bnxt_txrx;
|
||||||
static struct if_shared_ctx bnxt_sctx_init = {
|
static struct if_shared_ctx bnxt_sctx_init = {
|
||||||
.isc_magic = IFLIB_MAGIC,
|
.isc_magic = IFLIB_MAGIC,
|
||||||
|
|
|
@ -36,8 +36,8 @@
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* Driver version:
|
* Driver version:
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
char em_driver_version[] = "7.7.8-fbsd";
|
static const char em_driver_version[] = "7.7.8-fbsd";
|
||||||
char igb_driver_version[] = "2.5.19-fbsd";
|
static const char igb_driver_version[] = "2.5.19-fbsd";
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* PCI Device ID Table
|
* PCI Device ID Table
|
||||||
|
@ -49,7 +49,7 @@ char igb_driver_version[] = "2.5.19-fbsd";
|
||||||
* { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index }
|
* { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index }
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
static pci_vendor_info_t em_vendor_info_array[] =
|
static const pci_vendor_info_t em_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
/* Intel(R) - lem-class legacy devices */
|
/* Intel(R) - lem-class legacy devices */
|
||||||
PVID(0x8086, E1000_DEV_ID_82540EM, "Intel(R) Legacy PRO/1000 MT 82540EM"),
|
PVID(0x8086, E1000_DEV_ID_82540EM, "Intel(R) Legacy PRO/1000 MT 82540EM"),
|
||||||
|
@ -214,7 +214,7 @@ static pci_vendor_info_t em_vendor_info_array[] =
|
||||||
PVID_END
|
PVID_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static pci_vendor_info_t igb_vendor_info_array[] =
|
static const pci_vendor_info_t igb_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
/* Intel(R) - igb-class devices */
|
/* Intel(R) - igb-class devices */
|
||||||
PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, "Intel(R) PRO/1000 82575EB (Copper)"),
|
PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, "Intel(R) PRO/1000 82575EB (Copper)"),
|
||||||
|
|
|
@ -125,7 +125,7 @@ static int enetc_ctrl_send(struct enetc_softc*,
|
||||||
|
|
||||||
static const char enetc_driver_version[] = "1.0.0";
|
static const char enetc_driver_version[] = "1.0.0";
|
||||||
|
|
||||||
static pci_vendor_info_t enetc_vendor_info_array[] = {
|
static const pci_vendor_info_t enetc_vendor_info_array[] = {
|
||||||
PVID(PCI_VENDOR_FREESCALE, ENETC_DEV_ID_PF,
|
PVID(PCI_VENDOR_FREESCALE, ENETC_DEV_ID_PF,
|
||||||
"Freescale ENETC PCIe Gigabit Ethernet Controller"),
|
"Freescale ENETC PCIe Gigabit Ethernet Controller"),
|
||||||
PVID_END
|
PVID_END
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
static SYSCTL_NODE(_hw, OID_AUTO, enic, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
static SYSCTL_NODE(_hw, OID_AUTO, enic, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
"ENIC");
|
"ENIC");
|
||||||
|
|
||||||
static pci_vendor_info_t enic_vendor_info_array[] =
|
static const pci_vendor_info_t enic_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
PVID(CISCO_VENDOR_ID, PCI_DEVICE_ID_CISCO_VIC_ENET,
|
PVID(CISCO_VENDOR_ID, PCI_DEVICE_ID_CISCO_VIC_ENET,
|
||||||
DRV_DESCRIPTION),
|
DRV_DESCRIPTION),
|
||||||
|
|
|
@ -66,7 +66,7 @@ const char iavf_driver_version[] = "3.0.26-k";
|
||||||
* to most-generic entry; e.g. PVIDV_OEM()s for a device ID must come before
|
* to most-generic entry; e.g. PVIDV_OEM()s for a device ID must come before
|
||||||
* the PVIDV() for it.
|
* the PVIDV() for it.
|
||||||
*/
|
*/
|
||||||
static pci_vendor_info_t iavf_vendor_info_array[] = {
|
static const pci_vendor_info_t iavf_vendor_info_array[] = {
|
||||||
PVIDV(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF,
|
PVIDV(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF,
|
||||||
"Intel(R) Ethernet Virtual Function 700 Series"),
|
"Intel(R) Ethernet Virtual Function 700 Series"),
|
||||||
PVIDV(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF,
|
PVIDV(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF,
|
||||||
|
|
|
@ -85,7 +85,7 @@ const uint8_t ice_rc_version = 0;
|
||||||
* to most-generic entry; e.g. PVIDV_OEM()s for a device ID must come before
|
* to most-generic entry; e.g. PVIDV_OEM()s for a device ID must come before
|
||||||
* the PVIDV() for it.
|
* the PVIDV() for it.
|
||||||
*/
|
*/
|
||||||
static pci_vendor_info_t ice_vendor_info_array[] = {
|
static const pci_vendor_info_t ice_vendor_info_array[] = {
|
||||||
PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_BACKPLANE,
|
PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_BACKPLANE,
|
||||||
"Intel(R) Ethernet Controller E810-C for backplane"),
|
"Intel(R) Ethernet Controller E810-C for backplane"),
|
||||||
PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP,
|
PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP,
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
* { Vendor ID, Device ID, String }
|
* { Vendor ID, Device ID, String }
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
static pci_vendor_info_t igc_vendor_info_array[] =
|
static const pci_vendor_info_t igc_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
/* Intel(R) PRO/1000 Network Connection - igc */
|
/* Intel(R) PRO/1000 Network Connection - igc */
|
||||||
PVID(0x8086, IGC_DEV_ID_I225_LM, "Intel(R) Ethernet Controller I225-LM"),
|
PVID(0x8086, IGC_DEV_ID_I225_LM, "Intel(R) Ethernet Controller I225-LM"),
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Driver version
|
* Driver version
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
char ixgbe_driver_version[] = "4.0.1-k";
|
static const char ixgbe_driver_version[] = "4.0.1-k";
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* PCI Device ID Table
|
* PCI Device ID Table
|
||||||
|
@ -56,7 +56,7 @@ char ixgbe_driver_version[] = "4.0.1-k";
|
||||||
*
|
*
|
||||||
* { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index }
|
* { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index }
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static pci_vendor_info_t ixgbe_vendor_info_array[] =
|
static const pci_vendor_info_t ixgbe_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, "Intel(R) 82598EB AF (Dual Fiber)"),
|
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, "Intel(R) 82598EB AF (Dual Fiber)"),
|
||||||
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, "Intel(R) 82598EB AF (Fiber)"),
|
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, "Intel(R) 82598EB AF (Fiber)"),
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Driver version
|
* Driver version
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
char ixv_driver_version[] = "2.0.1-k";
|
static const char ixv_driver_version[] = "2.0.1-k";
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* PCI Device ID Table
|
* PCI Device ID Table
|
||||||
|
@ -56,7 +56,7 @@ char ixv_driver_version[] = "2.0.1-k";
|
||||||
*
|
*
|
||||||
* { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index }
|
* { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index }
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static pci_vendor_info_t ixv_vendor_info_array[] =
|
static const pci_vendor_info_t ixv_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF, "Intel(R) X520 82599 Virtual Function"),
|
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF, "Intel(R) X520 82599 Virtual Function"),
|
||||||
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF, "Intel(R) X540 Virtual Function"),
|
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF, "Intel(R) X540 Virtual Function"),
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
* ( Vendor ID, Device ID, Branding String )
|
* ( Vendor ID, Device ID, Branding String )
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
static pci_vendor_info_t ixl_vendor_info_array[] =
|
static const pci_vendor_info_t ixl_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
PVIDV(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710, "Intel(R) Ethernet Controller X710 for 10GbE SFP+"),
|
PVIDV(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710, "Intel(R) Ethernet Controller X710 for 10GbE SFP+"),
|
||||||
PVIDV(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B, "Intel(R) Ethernet Controller XL710 for 40GbE backplane"),
|
PVIDV(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B, "Intel(R) Ethernet Controller XL710 for 40GbE backplane"),
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
#include "ifdi_if.h"
|
#include "ifdi_if.h"
|
||||||
#include "miibus_if.h"
|
#include "miibus_if.h"
|
||||||
|
|
||||||
static pci_vendor_info_t mgb_vendor_info_array[] = {
|
static const pci_vendor_info_t mgb_vendor_info_array[] = {
|
||||||
PVID(MGB_MICROCHIP_VENDOR_ID, MGB_LAN7430_DEVICE_ID,
|
PVID(MGB_MICROCHIP_VENDOR_ID, MGB_LAN7430_DEVICE_ID,
|
||||||
"Microchip LAN7430 PCIe Gigabit Ethernet Controller"),
|
"Microchip LAN7430 PCIe Gigabit Ethernet Controller"),
|
||||||
PVID(MGB_MICROCHIP_VENDOR_ID, MGB_LAN7431_DEVICE_ID,
|
PVID(MGB_MICROCHIP_VENDOR_ID, MGB_LAN7431_DEVICE_ID,
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
#define VMXNET3_VMWARE_VENDOR_ID 0x15AD
|
#define VMXNET3_VMWARE_VENDOR_ID 0x15AD
|
||||||
#define VMXNET3_VMWARE_DEVICE_ID 0x07B0
|
#define VMXNET3_VMWARE_DEVICE_ID 0x07B0
|
||||||
|
|
||||||
static pci_vendor_info_t vmxnet3_vendor_info_array[] =
|
static const pci_vendor_info_t vmxnet3_vendor_info_array[] =
|
||||||
{
|
{
|
||||||
PVID(VMXNET3_VMWARE_VENDOR_ID, VMXNET3_VMWARE_DEVICE_ID, "VMware VMXNET3 Ethernet Adapter"),
|
PVID(VMXNET3_VMWARE_VENDOR_ID, VMXNET3_VMWARE_DEVICE_ID, "VMware VMXNET3 Ethernet Adapter"),
|
||||||
/* required last entry */
|
/* required last entry */
|
||||||
|
|
Loading…
Reference in a new issue