Rework pci_device_id initialisation
Subsystems (43)
v3 cover Rework pci_device_id initialisation
Hello,
the previous iteration of this series (v2) is available at
https://lore.kernel.org/netdev/[email protected]
Changes since v2:
- swap patch order as Jakub Kicinski reported a build failure (that I couldn't reproduce though)
- drop the change to drivers/net/can/m_can/m_can_pci.c on Markus Schneider-Pargmann's (non-public) request as this patch conflicts with a cleanup he has in his queue that will prepare this driver for my quest to add a union to pci_device_id in a differnt way.
- drop a recipent from Cc: that bounced before ([email protected]).
Best regards
Uwe
Uwe Kleine-König (The Capable Hub) (2):
net: nfp: Drop PCI class entries with .class_mask = 0
net: Consistently define pci_device_ids using named initializers
drivers/net/arcnet/com20020-pci.c | 242 +++------ drivers/net/can/sja1000/plx_pci.c | 167 +++---- drivers/net/ethernet/3com/3c59x.c | 80 +-- drivers/net/ethernet/3com/typhoon.c | 75 ++- drivers/net/ethernet/8390/ne2k-pci.c | 24 +- drivers/net/ethernet/adaptec/starfire.c | 4 +- drivers/net/ethernet/agere/et131x.c | 6 +- drivers/net/ethernet/broadcom/bnx2.c | 62 ++- .../net/ethernet/broadcom/bnx2x/bnx2x_main.c | 50 +- .../net/ethernet/cavium/liquidio/lio_main.c | 10 +- .../ethernet/cavium/liquidio/lio_vf_main.c | 7 +- drivers/net/ethernet/chelsio/cxgb/common.h | 2 +- drivers/net/ethernet/chelsio/cxgb/subr.c | 2 +- .../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 4 +- .../net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +- .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 4 +- drivers/net/ethernet/dec/tulip/de2104x.c | 6 +- drivers/net/ethernet/dec/tulip/dmfe.c | 12 +- drivers/net/ethernet/dec/tulip/tulip_core.c | 78 +-- drivers/net/ethernet/dec/tulip/uli526x.c | 6 +- drivers/net/ethernet/dec/tulip/winbond-840.c | 13 +- drivers/net/ethernet/dlink/dl2k.h | 12 +- drivers/net/ethernet/dlink/sundance.c | 14 +- drivers/net/ethernet/fealnx.c | 8 +- .../net/ethernet/hisilicon/hibmcge/hbg_main.c | 2 +- .../net/ethernet/hisilicon/hns3/hns3_enet.c | 50 +- .../hisilicon/hns3/hns3pf/hclge_main.c | 18 +- .../hisilicon/hns3/hns3vf/hclgevf_main.c | 12 +- .../net/ethernet/huawei/hinic/hinic_main.c | 12 +- .../net/ethernet/huawei/hinic3/hinic3_lld.c | 7 +- drivers/net/ethernet/intel/e100.c | 9 +- drivers/net/ethernet/intel/e1000e/netdev.c | 471 +++++++++++++----- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 10 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 59 +-- drivers/net/ethernet/intel/iavf/iavf_main.c | 10 +- drivers/net/ethernet/intel/igb/igb_main.c | 66 +-- drivers/net/ethernet/intel/igbvf/netdev.c | 4 +- drivers/net/ethernet/intel/igc/igc_main.c | 34 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 106 ++-- .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 49 +- drivers/net/ethernet/mellanox/mlx4/main.c | 6 +- .../net/ethernet/mellanox/mlx5/core/main.c | 26 +- .../net/ethernet/mellanox/mlxsw/spectrum.c | 16 +- drivers/net/ethernet/micrel/ksz884x.c | 8 +- .../net/ethernet/mucse/rnpgbe/rnpgbe_main.c | 10 +- drivers/net/ethernet/natsemi/natsemi.c | 4 +- drivers/net/ethernet/netronome/nfp/nfp_main.c | 65 +-- .../ethernet/netronome/nfp/nfp_netvf_main.c | 33 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 20 +- drivers/net/ethernet/realtek/8139too.c | 52 +- drivers/net/ethernet/realtek/r8169_main.c | 8 +- drivers/net/ethernet/rocker/rocker_main.c | 4 +- drivers/net/ethernet/sis/sis190.c | 6 +- drivers/net/ethernet/sis/sis900.c | 10 +- drivers/net/ethernet/smsc/epic100.c | 18 +- drivers/net/ethernet/sun/cassini.c | 8 +- drivers/net/ethernet/sun/sungem.c | 26 +- drivers/net/ethernet/ti/tlan.c | 41 +- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 26 +- .../net/ethernet/wangxun/ngbevf/ngbevf_main.c | 26 +- .../net/ethernet/wangxun/txgbe/txgbe_main.c | 18 +- .../ethernet/wangxun/txgbevf/txgbevf_main.c | 18 +- drivers/net/wan/farsync.c | 24 +- drivers/net/wan/pc300too.c | 14 +- drivers/net/wan/pci200syn.c | 6 +- drivers/net/wan/wanxl.c | 11 +- .../broadcom/brcm80211/brcmfmac/pcie.c | 17 +- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 52 +- 68 files changed, 1285 insertions(+), 1099 deletions(-)
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
Signature · 1 line
2.47.3
PATCH v3 1/2 net: nfp: Drop PCI class entries with .class_mask = 0
With .class_mask being zero the value of .class doesn't matter because to check if a pci_device_id entry matches a given device the expression
(id->class ^ dev->class) & id->class_mask
is checked for being zero (see pci_match_one_device()). So drop the useless and irritating assignment for .class to match what (I think) all other drivers are doing that don't need to match on .class, i.e. set both members to zero.
---
Hello,
the equivalent of this patch got a Reviewed-by tag from Aleksandr Loktionov. As the patch changed how it looks considerably due to reordering the patches I didn't add it here.
Best regards
Uwe
drivers/net/ethernet/netronome/nfp/nfp_main.c | 16 ++++++++-------- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-)
drivers/net/ethernet/netronome/nfp/nfp_main.c +8 -8
@@ -35,35 +35,35 @@ static const char nfp_driver_name[] = "nfp";static const struct pci_device_id nfp_pci_device_ids[] = { {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP3800 ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP3800 , +0 ,0 ,NFP_DEV_NFP3800 , }, {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP4000 ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP5000 ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP6000 ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP3800 ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP3800 , +0 ,0 ,NFP_DEV_NFP3800 , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP4000 ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP5000 ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP6000 ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {0 , }/* Required last entry. */ };
drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c +4 -4
@@ -40,19 +40,19 @@ static const char nfp_net_driver_name[] = "nfp_netvf";static const struct pci_device_id nfp_netvf_pci_device_ids[] = { {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP3800_VF ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP3800_VF , +0 ,0 ,NFP_DEV_NFP3800_VF , }, {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP6000_VF ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000_VF , +0 ,0 ,NFP_DEV_NFP6000_VF , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP3800_VF ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP3800_VF , +0 ,0 ,NFP_DEV_NFP3800_VF , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP6000_VF ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000_VF , +0 ,0 ,NFP_DEV_NFP6000_VF , }, {0 , }/* Required last entry. */ };
Signature · 1 line
2.47.3
RE: [PATCH net-next v3 1/2] net: nfp: Drop PCI class entries with .class_mask = 0
Quoted 127 lines
-----Original Message-----
From: Uwe Kleine-König (The Capable Hub) <u.kleine- [email protected]>
Sent: Monday, May 11, 2026 11:00 AM
To: Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Paolo Abeni <[email protected]>
Cc: Loktionov, Aleksandr <[email protected]>; Petr Machata <[email protected]>; Johannes Berg <[email protected]>; Arend van Spriel <[email protected]>; Marco Crivellari <[email protected]>; Kees Cook <[email protected]>; Jakub Kicinski <[email protected]>; Simon Horman <[email protected]>; oss- [email protected]; [email protected]; linux- [email protected]; Markus Schneider-Pargmann <[email protected]>
Subject: [PATCH net-next v3 1/2] net: nfp: Drop PCI class entries with .class_mask = 0With .class_mask being zero the value of .class doesn't matter because to check if a
pci_device_identry matches a given device the expression(id->class ^ dev->class) & id->class_maskis checked for being zero (see
pci_match_one_device()). So drop the useless and irritating assignment for .class to match what (I think) all other drivers are doing that don't need to match on .class, i.e. set both members to zero.Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine- [email protected]>
---
Hello,the equivalent of this patch got a Reviewed-by tag from Aleksandr Loktionov. As the patch changed how it looks considerably due to reordering the patches I didn't add it here.
Best regards
Uwedrivers/net/ethernet/netronome/nfp/nfp_main.c | 16 ++++++++-------(quoted diff) +0
-1- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-)drivers/net/ethernet/netronome/nfp/nfp_main.c +8
-8@@ -35,35 +35,35 @@ static const char nfp_driver_name[] = "nfp";static const struct pci_device_id nfp_pci_device_ids[] = { {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP3800 ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP3800 , +0 ,0 ,NFP_DEV_NFP3800 , }, {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP4000 ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP5000 ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP6000 ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP3800 ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP3800 , +0 ,0 ,NFP_DEV_NFP3800 , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP4000 ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP5000 ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP6000 ,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000 , +0 ,0 ,NFP_DEV_NFP6000 , }, {0 , }/* Required last entry. */ };drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c +0
-0@@ -40,19 +40,19 @@ static const char nfp_net_driver_name[] ="
nfp_netvf"; static const structpci_device_id
nfp_netvf_pci_device_ids[] = {drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c +4
-5{PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP3800_VF ,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP3800_VF , +0 ,0 ,NFP_DEV_NFP3800_VF , }, { PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NFP6000_VF,PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000_VF , +0 ,0 ,NFP_DEV_NFP6000_VF , }, { PCI_VENDOR_ID_CORIGINE, PCI_DEVICE_ID_NFP3800_VF,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP3800_VF , +0 ,0 ,NFP_DEV_NFP3800_VF , }, { PCI_VENDOR_ID_CORIGINE, PCI_DEVICE_ID_NFP6000_VF,PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,NFP_DEV_NFP6000_VF , +0 ,0 ,NFP_DEV_NFP6000_VF , }, { 0, } /* Required last entry. */ }; --
Quoted 1 line
2.47.3
PATCH v3 2/2 net: Consistently define pci_device_ids using named initializers
In reply to Uwe Kleine-König (The Capable Hub)... and PCI device helpers.
The various struct pci_device_id arrays were initialized mostly by one the PCI_DEVICE macros and then list expressions. The latter isn't easily readable if you're not into PCI. Using named initializers is more explicit and thus easier to parse.
Also use PCI_DEVICE* helper macros to assign .vendor, .device, .subvendor and .subdevice where appropriate and skip explicit assignments of 0 (which the compiler takes care of).
The secret plan is to make struct pci_device_id::driver_data an anonymous union (similar to
https://lore.kernel.org/all/[email protected]/)
and that requires named initializers. But it's also a nice cleanup on its own.
This change doesn't introduce changes to the compiled pci_device_id arrays. Tested on x86 and arm64.
Forwarded: id:76da4f44d48bdde84580963862bf9616bee5c9e9.1778149923.git.u.kleine-koenig@baylibre.com (v2)
--- drivers/net/arcnet/com20020-pci.c | 242 +++------ drivers/net/can/sja1000/plx_pci.c | 167 +++---- drivers/net/ethernet/3com/3c59x.c | 80 +-- drivers/net/ethernet/3com/typhoon.c | 75 ++- drivers/net/ethernet/8390/ne2k-pci.c | 24 +- drivers/net/ethernet/adaptec/starfire.c | 4 +- drivers/net/ethernet/agere/et131x.c | 6 +- drivers/net/ethernet/broadcom/bnx2.c | 62 ++- .../net/ethernet/broadcom/bnx2x/bnx2x_main.c | 50 +- .../net/ethernet/cavium/liquidio/lio_main.c | 10 +- .../ethernet/cavium/liquidio/lio_vf_main.c | 7 +- drivers/net/ethernet/chelsio/cxgb/common.h | 2 +- drivers/net/ethernet/chelsio/cxgb/subr.c | 2 +- .../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 4 +- .../net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +- .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 4 +- drivers/net/ethernet/dec/tulip/de2104x.c | 6 +- drivers/net/ethernet/dec/tulip/dmfe.c | 12 +- drivers/net/ethernet/dec/tulip/tulip_core.c | 78 +-- drivers/net/ethernet/dec/tulip/uli526x.c | 6 +- drivers/net/ethernet/dec/tulip/winbond-840.c | 13 +- drivers/net/ethernet/dlink/dl2k.h | 12 +- drivers/net/ethernet/dlink/sundance.c | 14 +- drivers/net/ethernet/fealnx.c | 8 +- .../net/ethernet/hisilicon/hibmcge/hbg_main.c | 2 +- .../net/ethernet/hisilicon/hns3/hns3_enet.c | 50 +- .../hisilicon/hns3/hns3pf/hclge_main.c | 18 +- .../hisilicon/hns3/hns3vf/hclgevf_main.c | 12 +- .../net/ethernet/huawei/hinic/hinic_main.c | 12 +- .../net/ethernet/huawei/hinic3/hinic3_lld.c | 7 +- drivers/net/ethernet/intel/e100.c | 9 +- drivers/net/ethernet/intel/e1000e/netdev.c | 471 +++++++++++++----- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 10 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 59 +-- drivers/net/ethernet/intel/iavf/iavf_main.c | 10 +- drivers/net/ethernet/intel/igb/igb_main.c | 66 +-- drivers/net/ethernet/intel/igbvf/netdev.c | 4 +- drivers/net/ethernet/intel/igc/igc_main.c | 34 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 106 ++-- .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 49 +- drivers/net/ethernet/mellanox/mlx4/main.c | 6 +- .../net/ethernet/mellanox/mlx5/core/main.c | 26 +- .../net/ethernet/mellanox/mlxsw/spectrum.c | 16 +- drivers/net/ethernet/micrel/ksz884x.c | 8 +- .../net/ethernet/mucse/rnpgbe/rnpgbe_main.c | 10 +- drivers/net/ethernet/natsemi/natsemi.c | 4 +- drivers/net/ethernet/netronome/nfp/nfp_main.c | 65 +-- .../ethernet/netronome/nfp/nfp_netvf_main.c | 33 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 20 +- drivers/net/ethernet/realtek/8139too.c | 52 +- drivers/net/ethernet/realtek/r8169_main.c | 8 +- drivers/net/ethernet/rocker/rocker_main.c | 4 +- drivers/net/ethernet/sis/sis190.c | 6 +- drivers/net/ethernet/sis/sis900.c | 10 +- drivers/net/ethernet/smsc/epic100.c | 18 +- drivers/net/ethernet/sun/cassini.c | 8 +- drivers/net/ethernet/sun/sungem.c | 26 +- drivers/net/ethernet/ti/tlan.c | 41 +- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 26 +- .../net/ethernet/wangxun/ngbevf/ngbevf_main.c | 26 +- .../net/ethernet/wangxun/txgbe/txgbe_main.c | 18 +- .../ethernet/wangxun/txgbevf/txgbevf_main.c | 18 +- drivers/net/wan/farsync.c | 24 +- drivers/net/wan/pc300too.c | 14 +- drivers/net/wan/pci200syn.c | 6 +- drivers/net/wan/wanxl.c | 11 +- .../broadcom/brcm80211/brcmfmac/pcie.c | 17 +- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 52 +- 68 files changed, 1285 insertions(+), 1099 deletions(-)
drivers/net/arcnet/com20020-pci.c +81 -161
@@ -459,168 +459,88 @@ static struct com20020_pci_card_info card_info_eae_fb2 = {static const struct pci_device_id com20020pci_id_table[] = { { -0x1571 ,0xa001 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 , +PCI_DEVICE (0x1571 ,0xa001 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa002 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa003 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa004 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa005 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa006 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa007 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa008 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa009 ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00a ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00b ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00c ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00d ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00e ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa201 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa202 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa203 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa204 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa205 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa206 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9030 ,0x10B5 ,0x2978 ), + .driver_data = (kernel_ulong_t)&card_info_sohard, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9050 ,0x10B5 ,0x2273 ), + .driver_data = (kernel_ulong_t)&card_info_sohard, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9050 ,0x10B5 ,0x3263 ), + .driver_data = (kernel_ulong_t)&card_info_eae_arc1, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9050 ,0x10B5 ,0x3292 ), + .driver_data = (kernel_ulong_t)&card_info_eae_ma1, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9050 ,0x10B5 ,0x3294 ), + .driver_data = (kernel_ulong_t)&card_info_eae_fb2, + }, { +PCI_DEVICE (0x14BA ,0x6000 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x10B5 ,0x2200 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, }, - { -0x1571 ,0xa002 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 , - }, - { -0x1571 ,0xa003 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa004 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 , - }, - { -0x1571 ,0xa005 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa006 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa007 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa008 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa009 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00a , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00b , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00c , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00d , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00e , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa201 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa202 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa203 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa204 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa205 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa206 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x10B5 ,0x9030 , -0x10B5 ,0x2978 , -0 ,0 , - (kernel_ulong_t)&card_info_sohard - }, - { -0x10B5 ,0x9050 , -0x10B5 ,0x2273 , -0 ,0 , - (kernel_ulong_t)&card_info_sohard - }, - { -0x10B5 ,0x9050 , -0x10B5 ,0x3263 , -0 ,0 , - (kernel_ulong_t)&card_info_eae_arc1 - }, - { -0x10B5 ,0x9050 , -0x10B5 ,0x3292 , -0 ,0 , - (kernel_ulong_t)&card_info_eae_ma1 - }, - { -0x10B5 ,0x9050 , -0x10B5 ,0x3294 , -0 ,0 , - (kernel_ulong_t)&card_info_eae_fb2 - }, - { -0x14BA ,0x6000 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x10B5 ,0x2200 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - {0 , } + { } };MODULE_DEVICE_TABLE (pci, com20020pci_id_table);
drivers/net/can/sja1000/plx_pci.c +66 -101
190 lines not on this page · raw message
drivers/net/ethernet/3com/3c59x.c +40 -40
94 lines not on this page · raw message
drivers/net/ethernet/3com/typhoon.c +48 -27
81 lines not on this page · raw message
drivers/net/ethernet/8390/ne2k-pci.c +12 -12
@@ -143,18 +143,18 @@ static struct {static const struct pci_device_id ne2k_pci_tbl[] = { - {0x10ec ,0x8029 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_RealTek_RTL_8029 }, - {0x1050 ,0x0940 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_Winbond_89C940 }, - {0x11f6 ,0x1401 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_Compex_RL2000 }, - {0x8e2e ,0x3000 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,CH_KTI_ET32P2 }, - {0x4a14 ,0x5000 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_NetVin_NV5000SC }, - {0x1106 ,0x0926 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_Via_86C926 }, - {0x10bd ,0x0e34 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_SureCom_NE34 }, - {0x1050 ,0x5a5a ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_Winbond_W89C940F }, - {0x12c3 ,0x0058 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_Holtek_HT80232 }, - {0x12c3 ,0x5598 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_Holtek_HT80229 }, - {0x8c4a ,0x1980 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , CH_Winbond_89C940_8c4a }, - {0 , } + {PCI_DEVICE (0x10ec ,0x8029 ), .driver_data = CH_RealTek_RTL_8029 }, + {PCI_DEVICE (0x1050 ,0x0940 ), .driver_data = CH_Winbond_89C940 }, + {PCI_DEVICE (0x11f6 ,0x1401 ), .driver_data = CH_Compex_RL2000 }, + {PCI_DEVICE (0x8e2e ,0x3000 ), .driver_data =CH_KTI_ET32P2 }, + {PCI_DEVICE (0x4a14 ,0x5000 ), .driver_data = CH_NetVin_NV5000SC }, + {PCI_DEVICE (0x1106 ,0x0926 ), .driver_data = CH_Via_86C926 }, + {PCI_DEVICE (0x10bd ,0x0e34 ), .driver_data = CH_SureCom_NE34 }, + {PCI_DEVICE (0x1050 ,0x5a5a ), .driver_data = CH_Winbond_W89C940F }, + {PCI_DEVICE (0x12c3 ,0x0058 ), .driver_data = CH_Holtek_HT80232 }, + {PCI_DEVICE (0x12c3 ,0x5598 ), .driver_data = CH_Holtek_HT80229 }, + {PCI_DEVICE (0x8c4a ,0x1980 ), .driver_data = CH_Winbond_89C940_8c4a }, + { } };MODULE_DEVICE_TABLE (pci, ne2k_pci_tbl);
drivers/net/ethernet/adaptec/starfire.c +2 -2
@@ -278,8 +278,8 @@ enum chipset { };static const struct pci_device_id starfire_pci_tbl[] = { - {PCI_VDEVICE (ADAPTEC ,0x6915 ),CH_6915 }, - {0 , } + {PCI_VDEVICE (ADAPTEC ,0x6915 ), .driver_data =CH_6915 }, + { } };MODULE_DEVICE_TABLE (pci, starfire_pci_tbl);
drivers/net/ethernet/agere/et131x.c +3 -3
@@ -4084,9 +4084,9 @@ static int et131x_pci_setup(struct pci_dev *pdev, }static const struct pci_device_id et131x_pci_table[] = { - {PCI_VDEVICE (ATT ,ET131X_PCI_DEVICE_ID_GIG ),0UL }, - {PCI_VDEVICE (ATT ,ET131X_PCI_DEVICE_ID_FAST ),0UL }, - {0 ,} + {PCI_VDEVICE (ATT ,ET131X_PCI_DEVICE_ID_GIG ) }, + {PCI_VDEVICE (ATT ,ET131X_PCI_DEVICE_ID_FAST ) }, + { } };MODULE_DEVICE_TABLE (pci, et131x_pci_table);
drivers/net/ethernet/broadcom/bnx2.c +39 -23
68 lines not on this page · raw message
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +25 -25
56 lines not on this page · raw message
drivers/net/ethernet/cavium/liquidio/lio_main.c +4 -6
@@ -404,17 +404,15 @@ static const struct pci_error_handlers liquidio_err_handler = {static const struct pci_device_id liquidio_pci_tbl[] = { {/* 68xx */ -PCI_VENDOR_ID_CAVIUM ,0x91 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 +PCI_VDEVICE (CAVIUM ,0x0091 ) }, {/* 66xx */ -PCI_VENDOR_ID_CAVIUM ,0x92 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 +PCI_VDEVICE (CAVIUM ,0x0092 ) }, {/* 23xx pf */ -PCI_VENDOR_ID_CAVIUM ,0x9702 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 +PCI_VDEVICE (CAVIUM ,0x9702 ) }, - { -0 ,0 ,0 ,0 ,0 ,0 ,0 - } + { } };MODULE_DEVICE_TABLE (pci, liquidio_pci_tbl);
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +2 -5
@@ -237,12 +237,9 @@ static const struct pci_error_handlers liquidio_vf_err_handler = {static const struct pci_device_id liquidio_vf_pci_tbl[] = { { -PCI_VENDOR_ID_CAVIUM ,OCTEON_CN23XX_VF_VID , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 +PCI_VDEVICE (CAVIUM ,OCTEON_CN23XX_VF_VID ), }, - { -0 ,0 ,0 ,0 ,0 ,0 ,0 - } + { } };MODULE_DEVICE_TABLE (pci, liquidio_vf_pci_tbl);
drivers/net/ethernet/chelsio/cxgb/common.h +1 -1
@@ -48,7 +48,7 @@#define DRV_NAME "cxgb"#define CH_DEVICE (devid, ssid, idx) \ - { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx } + { PCI_VDEVICE_SUB(CHELSIO, devid, PCI_ANY_ID, ssid), .driver_data = idx }#define SUPPORTED_PAUSE (1 << 13)#define SUPPORTED_LOOPBACK (1 << 15)
drivers/net/ethernet/chelsio/cxgb/subr.c +1 -1
@@ -533,7 +533,7 @@ const struct pci_device_id t1_pci_tbl[] = {CH_DEVICE (11 ,1 ,CH_BRD_T210_1F ),CH_DEVICE (14 ,1 ,CH_BRD_T210_1CU ),CH_DEVICE (16 ,1 ,CH_BRD_N204_4CU ), - { 0 } + { } };MODULE_DEVICE_TABLE (pci, t1_pci_tbl);
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +2 -2
@@ -83,7 +83,7 @@ enum {#define EEPROM_MAGIC 0x38E2F10C#define CH_DEVICE (devid, idx) \ - { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, PCI_ANY_ID, 0, 0, idx } + { PCI_VDEVICE(CHELSIO, devid), .driver_data = idx }static const struct pci_device_id cxgb3_pci_tbl[] = {CH_DEVICE (0x20 ,0 ),/* PE9000 */
@@ -99,7 +99,7 @@ static const struct pci_device_id cxgb3_pci_tbl[] = {CH_DEVICE (0x35 ,6 ),/* T3C20-derived T3C10 */ CH_DEVICE (0x36 ,3 ),/* S320E-CR */ CH_DEVICE (0x37 ,7 ),/* N320E-G2 */ - {0,} + { } };MODULE_DESCRIPTION (DRV_DESC );
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +2 -2
@@ -112,10 +112,10 @@ char cxgb4_driver_name[] = KBUILD_MODNAME;#define CH_PCI_DEVICE_ID_FUNCTION2 0x0#define CH_PCI_ID_TABLE_ENTRY (devid) \ - {PCI_VDEVICE(CHELSIO, (devid)), CXGB4_UNIFIED_PF} + { PCI_VDEVICE(CHELSIO, (devid)), .driver_data = CXGB4_UNIFIED_PF }#define CH_PCI_DEVICE_ID_TABLE_DEFINE_END \ - { 0, } \ + { } \ }#include "t4_pci_id_tbl.h"
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +2 -2
@@ -3388,9 +3388,9 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev)#define CH_PCI_DEVICE_ID_FUNCTION 0x8#define CH_PCI_ID_TABLE_ENTRY (devid) \ - { PCI_VDEVICE(CHELSIO, (devid)), 0 } + { PCI_VDEVICE(CHELSIO, (devid)) } -#define CH_PCI_DEVICE_ID_TABLE_DEFINE_END { 0, } } +#define CH_PCI_DEVICE_ID_TABLE_DEFINE_END { } }#include "../cxgb4/t4_pci_id_tbl.h"
drivers/net/ethernet/dec/tulip/de2104x.c +2 -4
@@ -333,10 +333,8 @@ static unsigned int de_ok_to_advertise (struct de_private *de, u32 new_media);static const struct pci_device_id de_pci_tbl[] = { - {PCI_VENDOR_ID_DEC ,PCI_DEVICE_ID_DEC_TULIP , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {PCI_VENDOR_ID_DEC ,PCI_DEVICE_ID_DEC_TULIP_PLUS , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,1 }, + {PCI_VDEVICE (DEC ,PCI_DEVICE_ID_DEC_TULIP ), .driver_data =0 }, + {PCI_VDEVICE (DEC ,PCI_DEVICE_ID_DEC_TULIP_PLUS ), .driver_data =1 }, { }, };MODULE_DEVICE_TABLE (pci, de_pci_tbl);
drivers/net/ethernet/dec/tulip/dmfe.c +6 -6
@@ -2076,11 +2076,11 @@ static void dmfe_HPNA_remote_cmd_chk(struct dmfe_board_info * db)static const struct pci_device_id dmfe_pci_tbl[] = { - {0x1282 ,0x9132 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,PCI_DM9132_ID }, - {0x1282 ,0x9102 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,PCI_DM9102_ID }, - {0x1282 ,0x9100 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,PCI_DM9100_ID }, - {0x1282 ,0x9009 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,PCI_DM9009_ID }, - {0 , } + {PCI_DEVICE (0x1282 ,0x9132 ), .driver_data =PCI_DM9132_ID }, + {PCI_DEVICE (0x1282 ,0x9102 ), .driver_data =PCI_DM9102_ID }, + {PCI_DEVICE (0x1282 ,0x9100 ), .driver_data =PCI_DM9100_ID }, + {PCI_DEVICE (0x1282 ,0x9009 ), .driver_data =PCI_DM9009_ID }, + { } };MODULE_DEVICE_TABLE (pci, dmfe_pci_tbl);
@@ -2101,7 +2101,7 @@ static int __maybe_unused dmfe_suspend(struct device *dev_d)dw32 (DCR7 ,0 );dw32 (DCR5 ,dr32 (DCR5 )); -/* Fre RX buffers */ +/* Free RX buffers */ dmfe_free_rxbuffer (db);/* Enable WOL */
drivers/net/ethernet/dec/tulip/tulip_core.c +39 -39
92 lines not on this page · raw message
drivers/net/ethernet/dec/tulip/uli526x.c +3 -3
@@ -1728,9 +1728,9 @@ static u16 phy_read_1bit(struct uli526x_board_info *db)static const struct pci_device_id uli526x_pci_tbl[] = { - {0x10B9 ,0x5261 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,PCI_ULI5261_ID }, - {0x10B9 ,0x5263 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,PCI_ULI5263_ID }, - {0 , } + {PCI_DEVICE (0x10B9 ,0x5261 ), .driver_data =PCI_ULI5261_ID }, + {PCI_DEVICE (0x10B9 ,0x5263 ), .driver_data =PCI_ULI5263_ID }, + { } };MODULE_DEVICE_TABLE (pci, uli526x_pci_tbl);
drivers/net/ethernet/dec/tulip/winbond-840.c +10 -3
@@ -210,9 +210,16 @@ enum chip_capability_flags { };static const struct pci_device_id w840_pci_tbl[] = { - {0x1050 ,0x0840 ,PCI_ANY_ID ,0x8153 ,0 ,0 ,0 }, - {0x1050 ,0x0840 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,1 }, - {0x11f6 ,0x2011 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,2 }, + { +PCI_DEVICE_SUB (0x1050 ,0x0840 ,PCI_ANY_ID ,0x8153 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1050 ,0x0840 ), + .driver_data =1 , + }, { +PCI_DEVICE (0x11f6 ,0x2011 ), + .driver_data =2 , + }, { } };MODULE_DEVICE_TABLE (pci, w840_pci_tbl);
drivers/net/ethernet/dlink/dl2k.h +6 -6
@@ -418,12 +418,12 @@ struct netdev_private {#define CHIP_IP1000A 1static const struct pci_device_id rio_pci_tbl[] = { - {0x1186 ,0x4000 ,PCI_ANY_ID ,PCI_ANY_ID , }, - {0x13f0 ,0x1021 ,PCI_ANY_ID ,PCI_ANY_ID , }, - {PCI_VDEVICE (SUNDANCE ,0x1023 ),CHIP_IP1000A }, - {PCI_VDEVICE (SUNDANCE ,0x2021 ),CHIP_IP1000A }, - {PCI_VDEVICE (DLINK ,0x9021 ),CHIP_IP1000A }, - {PCI_VDEVICE (DLINK ,0x4020 ),CHIP_IP1000A }, + {PCI_DEVICE (0x1186 ,0x4000 ) }, + {PCI_DEVICE (0x13f0 ,0x1021 ) }, + {PCI_VDEVICE (SUNDANCE ,0x1023 ), .driver_data =CHIP_IP1000A }, + {PCI_VDEVICE (SUNDANCE ,0x2021 ), .driver_data =CHIP_IP1000A }, + {PCI_VDEVICE (DLINK ,0x9021 ), .driver_data =CHIP_IP1000A }, + {PCI_VDEVICE (DLINK ,0x4020 ), .driver_data =CHIP_IP1000A }, { } };MODULE_DEVICE_TABLE (pci, rio_pci_tbl);
drivers/net/ethernet/dlink/sundance.c +7 -7
@@ -192,13 +192,13 @@ IVc. Errata#endif static const struct pci_device_id sundance_pci_tbl[] = { - {0x1186 ,0x1002 ,0x1186 ,0x1002 ,0 ,0 ,0 }, - {0x1186 ,0x1002 ,0x1186 ,0x1003 ,0 ,0 ,1 }, - {0x1186 ,0x1002 ,0x1186 ,0x1012 ,0 ,0 ,2 }, - {0x1186 ,0x1002 ,0x1186 ,0x1040 ,0 ,0 ,3 }, - {0x1186 ,0x1002 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,4 }, - {0x13F0 ,0x0201 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,5 }, - {0x13F0 ,0x0200 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,6 }, + {PCI_DEVICE_SUB (0x1186 ,0x1002 ,0x1186 ,0x1002 ), .driver_data =0 }, + {PCI_DEVICE_SUB (0x1186 ,0x1002 ,0x1186 ,0x1003 ), .driver_data =1 }, + {PCI_DEVICE_SUB (0x1186 ,0x1002 ,0x1186 ,0x1012 ), .driver_data =2 }, + {PCI_DEVICE_SUB (0x1186 ,0x1002 ,0x1186 ,0x1040 ), .driver_data =3 }, + {PCI_DEVICE (0x1186 ,0x1002 ), .driver_data =4 }, + {PCI_DEVICE (0x13F0 ,0x0201 ), .driver_data =5 }, + {PCI_DEVICE (0x13F0 ,0x0200 ), .driver_data =6 }, { } };MODULE_DEVICE_TABLE (pci, sundance_pci_tbl);
drivers/net/ethernet/fealnx.c +4 -4
@@ -1935,10 +1935,10 @@ static int netdev_close(struct net_device *dev) }static const struct pci_device_id fealnx_pci_tbl[] = { - {0x1516 ,0x0800 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {0x1516 ,0x0803 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,1 }, - {0x1516 ,0x0891 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,2 }, - {}/* terminate list */ + {PCI_DEVICE (0x1516 ,0x0800 ), .driver_data =0 }, + {PCI_DEVICE (0x1516 ,0x0803 ), .driver_data =1 }, + {PCI_DEVICE (0x1516 ,0x0891 ), .driver_data =2 }, + { }/* terminate list */ };MODULE_DEVICE_TABLE (pci, fealnx_pci_tbl);
drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c +1 -1
@@ -489,7 +489,7 @@ static void hbg_shutdown(struct pci_dev *pdev) }static const struct pci_device_id hbg_pci_tbl[] = { - {PCI_VDEVICE (HUAWEI ,0x3730 ),0 }, + {PCI_VDEVICE (HUAWEI ,0x3730 ) }, { } };MODULE_DEVICE_TABLE (pci, hbg_pci_tbl);
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +32 -18
57 lines not on this page · raw message
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +9 -9
@@ -72,16 +72,16 @@ static struct hnae3_ae_algo ae_algo;static struct workqueue_struct *hclge_wq;static const struct pci_device_id ae_algo_pci_tbl[] = { - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_GE ),0 }, - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_25GE ),0 }, - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_25GE_RDMA ),0 }, - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_25GE_RDMA_MACSEC ),0 }, - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_50GE_RDMA ),0 }, - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_50GE_RDMA_MACSEC ),0 }, - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_100G_RDMA_MACSEC ),0 }, - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_200G_RDMA ),0 }, + {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_GE ) }, + {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_25GE ) }, + {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_25GE_RDMA ) }, + {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_25GE_RDMA_MACSEC ) }, + {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_50GE_RDMA ) }, + {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_50GE_RDMA_MACSEC ) }, + {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_100G_RDMA_MACSEC ) }, + {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_200G_RDMA ) },/* required last entry */ - {0 , } + { } };MODULE_DEVICE_TABLE (pci, ae_algo_pci_tbl);
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +8 -4
@@ -26,11 +26,15 @@ static struct hnae3_ae_algo ae_algovf;static struct workqueue_struct *hclgevf_wq;static const struct pci_device_id ae_algovf_pci_tbl[] = { - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_VF ),0 }, - {PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_RDMA_DCB_PFC_VF ), -HNAE3_DEV_SUPPORT_ROCE_DCB_BITS }, + { +PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_VF ), + .driver_data =0 , + }, { +PCI_VDEVICE (HUAWEI ,HNAE3_DEV_ID_RDMA_DCB_PFC_VF ), + .driver_data =HNAE3_DEV_SUPPORT_ROCE_DCB_BITS , + },/* required last entry */ - {0 , } + { } };MODULE_DEVICE_TABLE (pci, ae_algovf_pci_tbl);
drivers/net/ethernet/huawei/hinic/hinic_main.c +6 -6
@@ -1467,12 +1467,12 @@ static void hinic_shutdown(struct pci_dev *pdev) }static const struct pci_device_id hinic_pci_table[] = { - {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_QUAD_PORT_25GE ),0 }, - {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_DUAL_PORT_100GE ),0 }, - {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_DUAL_PORT_100GE_MEZZ ),0 }, - {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_QUAD_PORT_25GE_MEZZ ),0 }, - {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_VF ),0 }, - {0 ,0 } + {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_QUAD_PORT_25GE ) }, + {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_DUAL_PORT_100GE ) }, + {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_DUAL_PORT_100GE_MEZZ ) }, + {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_QUAD_PORT_25GE_MEZZ ) }, + {PCI_VDEVICE (HUAWEI ,HINIC_DEV_ID_VF ) }, + { } };MODULE_DEVICE_TABLE (pci, hinic_pci_table);
drivers/net/ethernet/huawei/hinic3/hinic3_lld.c +3 -4
@@ -426,10 +426,9 @@ static void hinic3_remove(struct pci_dev *pdev) }static const struct pci_device_id hinic3_pci_table[] = { - {PCI_VDEVICE (HUAWEI ,PCI_DEV_ID_HINIC3_PF ),0 }, - {PCI_VDEVICE (HUAWEI ,PCI_DEV_ID_HINIC3_VF ),0 }, - {0 ,0 } - + {PCI_VDEVICE (HUAWEI ,PCI_DEV_ID_HINIC3_PF ) }, + {PCI_VDEVICE (HUAWEI ,PCI_DEV_ID_HINIC3_VF ) }, + { } };MODULE_DEVICE_TABLE (pci, hinic3_pci_table);
drivers/net/ethernet/intel/e100.c +6 -3
@@ -176,9 +176,12 @@ MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");MODULE_PARM_DESC (eeprom_bad_csum_allow,"Allow bad eeprom checksums" );MODULE_PARM_DESC (use_io,"Force use of i/o access mode" ); -#define INTEL_8255X_ETHERNET_DEVICE (device_id, ich) {\ - PCI_VENDOR_ID_INTEL, device_id, PCI_ANY_ID, PCI_ANY_ID, \ - PCI_CLASS_NETWORK_ETHERNET << 8, 0xFFFF00, ich } +#define INTEL_8255X_ETHERNET_DEVICE (device_id, ich) { \ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, (device_id)), \ + .class = PCI_CLASS_NETWORK_ETHERNET << 8, \ + .class_mask = 0xFFFF00, \ + .driver_data = (ich) } +static const struct pci_device_id e100_id_table[] = {INTEL_8255X_ETHERNET_DEVICE (0x1029 ,0 ),INTEL_8255X_ETHERNET_DEVICE (0x1030 ,0 ),
drivers/net/ethernet/intel/e1000e/netdev.c +352 -119
489 lines not on this page · raw message
drivers/net/ethernet/intel/fm10k/fm10k_pci.c +5 -5
@@ -21,12 +21,12 @@ static const struct fm10k_info *fm10k_info_tbl[] = {* Class, Class Mask, private data (not used) } */ static const struct pci_device_id fm10k_pci_tbl[] = { - {PCI_VDEVICE (INTEL ,FM10K_DEV_ID_PF ), fm10k_device_pf }, - {PCI_VDEVICE (INTEL ,FM10K_DEV_ID_SDI_FM10420_QDA2 ), fm10k_device_pf }, - {PCI_VDEVICE (INTEL ,FM10K_DEV_ID_SDI_FM10420_DA2 ), fm10k_device_pf }, - {PCI_VDEVICE (INTEL ,FM10K_DEV_ID_VF ), fm10k_device_vf }, + {PCI_VDEVICE (INTEL ,FM10K_DEV_ID_PF ), .driver_data = fm10k_device_pf }, + {PCI_VDEVICE (INTEL ,FM10K_DEV_ID_SDI_FM10420_QDA2 ), .driver_data = fm10k_device_pf }, + {PCI_VDEVICE (INTEL ,FM10K_DEV_ID_SDI_FM10420_DA2 ), .driver_data = fm10k_device_pf }, + {PCI_VDEVICE (INTEL ,FM10K_DEV_ID_VF ), .driver_data = fm10k_device_vf },/* required last entry */ - {0 , } + { } };MODULE_DEVICE_TABLE (pci, fm10k_pci_tbl);
drivers/net/ethernet/intel/i40e/i40e_main.c +31 -28
71 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_main.c +5 -5
@@ -36,12 +36,12 @@ static const char iavf_copyright[] =* Class, Class Mask, private data (not used) } */ static const struct pci_device_id iavf_pci_tbl[] = { - {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_VF ),0 }, - {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_VF_HV ),0 }, - {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_X722_VF ),0 }, - {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_ADAPTIVE_VF ),0 }, + {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_VF ) }, + {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_VF_HV ) }, + {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_X722_VF ) }, + {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_ADAPTIVE_VF ) },/* required last entry */ - {0 , } + { } };MODULE_DEVICE_TABLE (pci, iavf_pci_tbl);
drivers/net/ethernet/intel/igb/igb_main.c +33 -33
73 lines not on this page · raw message
drivers/net/ethernet/intel/igbvf/netdev.c +2 -2
@@ -2937,8 +2937,8 @@ static const struct pci_error_handlers igbvf_err_handler = { };static const struct pci_device_id igbvf_pci_tbl[] = { - {PCI_VDEVICE (INTEL ,E1000_DEV_ID_82576_VF ), board_vf }, - {PCI_VDEVICE (INTEL ,E1000_DEV_ID_I350_VF ), board_i350_vf }, + {PCI_VDEVICE (INTEL ,E1000_DEV_ID_82576_VF ), .driver_data = board_vf }, + {PCI_VDEVICE (INTEL ,E1000_DEV_ID_I350_VF ), .driver_data = board_i350_vf }, { }/* terminate list */ };MODULE_DEVICE_TABLE (pci, igbvf_pci_tbl);
drivers/net/ethernet/intel/igc/igc_main.c +17 -17
@@ -47,24 +47,24 @@ static const struct igc_info *igc_info_tbl[] = { };static const struct pci_device_id igc_pci_tbl[] = { - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_LM ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_V ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_I ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I220_V ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_K ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_K2 ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_K ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_LMVP ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_LMVP ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_IT ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_LM ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_V ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_IT ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I221_V ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_BLANK_NVM ), board_base }, - {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_BLANK_NVM ), board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_LM ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_V ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_I ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I220_V ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_K ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_K2 ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_K ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_LMVP ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_LMVP ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_IT ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_LM ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_V ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_IT ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I221_V ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I226_BLANK_NVM ), .driver_data = board_base }, + {PCI_VDEVICE (INTEL ,IGC_DEV_ID_I225_BLANK_NVM ), .driver_data = board_base },/* required last entry */ - {0 , } + { } };MODULE_DEVICE_TABLE (pci, igc_pci_tbl);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +53 -53
113 lines not on this page · raw message
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +36 -13
56 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx4/main.c +3 -3
@@ -4274,9 +4274,9 @@ int mlx4_restart_one(struct pci_dev *pdev)return mlx4_restart_one_up (pdev, false,NULL ); } -#define MLX_SP (id) { PCI_VDEVICE(MELLANOX, id), MLX4_PCI_DEV_FORCE_SENSE_PORT } -#define MLX_VF (id) { PCI_VDEVICE(MELLANOX, id), MLX4_PCI_DEV_IS_VF } -#define MLX_GN (id) { PCI_VDEVICE(MELLANOX, id), 0 } +#define MLX_SP (id) { PCI_VDEVICE(MELLANOX, id), .driver_data = MLX4_PCI_DEV_FORCE_SENSE_PORT } +#define MLX_VF (id) { PCI_VDEVICE(MELLANOX, id), .driver_data = MLX4_PCI_DEV_IS_VF } +#define MLX_GN (id) { PCI_VDEVICE(MELLANOX, id), .driver_data = 0 }static const struct pci_device_id mlx4_pci_table[] = { #ifdef CONFIG_MLX4_CORE_GEN2
drivers/net/ethernet/mellanox/mlx5/core/main.c +17 -9
@@ -2203,19 +2203,26 @@ static int mlx5_resume(struct pci_dev *pdev)static const struct pci_device_id mlx5_core_pci_table[] = { {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_CONNECTIB ) }, - {PCI_VDEVICE (MELLANOX ,0x1012 ),MLX5_PCI_DEV_IS_VF },/* Connect-IB VF */ + {PCI_VDEVICE (MELLANOX ,0x1012 ), + .driver_data =MLX5_PCI_DEV_IS_VF },/* Connect-IB VF */ {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_CONNECTX4 ) }, - {PCI_VDEVICE (MELLANOX ,0x1014 ),MLX5_PCI_DEV_IS_VF },/* ConnectX-4 VF */ + {PCI_VDEVICE (MELLANOX ,0x1014 ), + .driver_data =MLX5_PCI_DEV_IS_VF },/* ConnectX-4 VF */ {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_CONNECTX4_LX ) }, - {PCI_VDEVICE (MELLANOX ,0x1016 ),MLX5_PCI_DEV_IS_VF },/* ConnectX-4LX VF */ + {PCI_VDEVICE (MELLANOX ,0x1016 ), + .driver_data =MLX5_PCI_DEV_IS_VF },/* ConnectX-4LX VF */ {PCI_VDEVICE (MELLANOX ,0x1017 ) },/* ConnectX-5, PCIe 3.0 */ - {PCI_VDEVICE (MELLANOX ,0x1018 ),MLX5_PCI_DEV_IS_VF },/* ConnectX-5 VF */ + {PCI_VDEVICE (MELLANOX ,0x1018 ), + .driver_data =MLX5_PCI_DEV_IS_VF },/* ConnectX-5 VF */ {PCI_VDEVICE (MELLANOX ,0x1019 ) },/* ConnectX-5 Ex */ - {PCI_VDEVICE (MELLANOX ,0x101a ),MLX5_PCI_DEV_IS_VF },/* ConnectX-5 Ex VF */ + {PCI_VDEVICE (MELLANOX ,0x101a ), + .driver_data =MLX5_PCI_DEV_IS_VF },/* ConnectX-5 Ex VF */ {PCI_VDEVICE (MELLANOX ,0x101b ) },/* ConnectX-6 */ - {PCI_VDEVICE (MELLANOX ,0x101c ),MLX5_PCI_DEV_IS_VF },/* ConnectX-6 VF */ + {PCI_VDEVICE (MELLANOX ,0x101c ), + .driver_data =MLX5_PCI_DEV_IS_VF },/* ConnectX-6 VF */ {PCI_VDEVICE (MELLANOX ,0x101d ) },/* ConnectX-6 Dx */ - {PCI_VDEVICE (MELLANOX ,0x101e ),MLX5_PCI_DEV_IS_VF },/* ConnectX Family mlx5Gen Virtual Function */ + {PCI_VDEVICE (MELLANOX ,0x101e ), + .driver_data =MLX5_PCI_DEV_IS_VF },/* ConnectX Family mlx5Gen Virtual Function */ {PCI_VDEVICE (MELLANOX ,0x101f ) },/* ConnectX-6 LX */ {PCI_VDEVICE (MELLANOX ,0x1021 ) },/* ConnectX-7 */ {PCI_VDEVICE (MELLANOX ,0x1023 ) },/* ConnectX-8 */
@@ -2223,11 +2230,12 @@ static const struct pci_device_id mlx5_core_pci_table[] = { { PCI_VDEVICE(MELLANOX, 0x1027) }, /* ConnectX-10 */ { PCI_VDEVICE(MELLANOX, 0x2101) }, /* ConnectX-10 NVLink-C2C */ { PCI_VDEVICE(MELLANOX, 0xa2d2) }, /* BlueField integrated ConnectX-5 network controller */ - { PCI_VDEVICE(MELLANOX, 0xa2d3), MLX5_PCI_DEV_IS_VF}, /* BlueField integrated ConnectX-5 network controller VF */ + { PCI_VDEVICE(MELLANOX, 0xa2d3), + .driver_data = MLX5_PCI_DEV_IS_VF }, /* BlueField integrated ConnectX-5 network controller VF */ { PCI_VDEVICE(MELLANOX, 0xa2d6) }, /* BlueField-2 integrated ConnectX-6 Dx network controller */ { PCI_VDEVICE(MELLANOX, 0xa2dc) }, /* BlueField-3 integrated ConnectX-7 network controller */ { PCI_VDEVICE(MELLANOX, 0xa2df) }, /* BlueField-4 integrated ConnectX-8 network controller */ - { 0, } + { } };MODULE_DEVICE_TABLE (pci, mlx5_core_pci_table);
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +8 -8
@@ -5277,8 +5277,8 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *nb, }static const struct pci_device_id mlxsw_sp1_pci_id_table[] = { - {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_SPECTRUM ),0 }, - {0 , }, + {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_SPECTRUM ) }, + { }, };static struct pci_driver mlxsw_sp1_pci_driver = {
@@ -5287,8 +5287,8 @@ static struct pci_driver mlxsw_sp1_pci_driver = { };static const struct pci_device_id mlxsw_sp2_pci_id_table[] = { - {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_SPECTRUM2 ),0 }, - {0 , }, + {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_SPECTRUM2 ) }, + { }, };static struct pci_driver mlxsw_sp2_pci_driver = {
@@ -5297,8 +5297,8 @@ static struct pci_driver mlxsw_sp2_pci_driver = { };static const struct pci_device_id mlxsw_sp3_pci_id_table[] = { - {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_SPECTRUM3 ),0 }, - {0 , }, + {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_SPECTRUM3 ) }, + { }, };static struct pci_driver mlxsw_sp3_pci_driver = {
@@ -5307,8 +5307,8 @@ static struct pci_driver mlxsw_sp3_pci_driver = { };static const struct pci_device_id mlxsw_sp4_pci_id_table[] = { - {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_SPECTRUM4 ),0 }, - {0 , }, + {PCI_VDEVICE (MELLANOX ,PCI_DEVICE_ID_MELLANOX_SPECTRUM4 ) }, + { }, };static struct pci_driver mlxsw_sp4_pci_driver = {
drivers/net/ethernet/micrel/ksz884x.c +3 -5
@@ -6839,11 +6839,9 @@ static int __maybe_unused pcidev_suspend(struct device *dev_d)static char pcidev_name[] ="ksz884xp" ;static const struct pci_device_id pcidev_table[] = { - {PCI_VENDOR_ID_MICREL_KS ,0x8841 , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {PCI_VENDOR_ID_MICREL_KS ,0x8842 , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {0 } + {PCI_VDEVICE (MICREL_KS ,0x8841 ) }, + {PCI_VDEVICE (MICREL_KS ,0x8842 ) }, + { } };MODULE_DEVICE_TABLE (pci, pcidev_table);
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c +5 -5
@@ -17,12 +17,12 @@ static const char rnpgbe_driver_name[] = "rnpgbe";* private_data (used for different hw chip) } */ static struct pci_device_id rnpgbe_pci_tbl[] = { - {PCI_VDEVICE (MUCSE ,RNPGBE_DEVICE_ID_N210 ), board_n210 }, - {PCI_VDEVICE (MUCSE ,RNPGBE_DEVICE_ID_N210L ), board_n210 }, - {PCI_VDEVICE (MUCSE ,RNPGBE_DEVICE_ID_N500_DUAL_PORT ), board_n500 }, - {PCI_VDEVICE (MUCSE ,RNPGBE_DEVICE_ID_N500_QUAD_PORT ), board_n500 }, + {PCI_VDEVICE (MUCSE ,RNPGBE_DEVICE_ID_N210 ), .driver_data = board_n210 }, + {PCI_VDEVICE (MUCSE ,RNPGBE_DEVICE_ID_N210L ), .driver_data = board_n210 }, + {PCI_VDEVICE (MUCSE ,RNPGBE_DEVICE_ID_N500_DUAL_PORT ), .driver_data = board_n500 }, + {PCI_VDEVICE (MUCSE ,RNPGBE_DEVICE_ID_N500_QUAD_PORT ), .driver_data = board_n500 },/* required last entry */ - {0 , }, + { }, };/**
drivers/net/ethernet/natsemi/natsemi.c +2 -2
@@ -248,8 +248,8 @@ static struct { };static const struct pci_device_id natsemi_pci_tbl[] = { - {PCI_VENDOR_ID_NS ,0x0020 ,0x12d9 ,0x000c ,0 ,0 ,0 }, - {PCI_VENDOR_ID_NS ,0x0020 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,1 }, + {PCI_VDEVICE_SUB (NS ,0x0020 ,0x12d9 ,0x000c ), .driver_data =0 }, + {PCI_VDEVICE (NS ,0x0020 ), .driver_data =1 }, { }/* terminate list */ };MODULE_DEVICE_TABLE (pci, natsemi_pci_tbl);
drivers/net/ethernet/netronome/nfp/nfp_main.c +33 -32
72 lines not on this page · raw message
drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c +17 -16
@@ -38,23 +38,24 @@ struct nfp_net_vf {static const char nfp_net_driver_name[] ="nfp_netvf" ;static const struct pci_device_id nfp_netvf_pci_device_ids[] = { - {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP3800_VF , -PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -0 ,0 ,NFP_DEV_NFP3800_VF , + { +PCI_VDEVICE_SUB (NETRONOME ,PCI_DEVICE_ID_NFP3800_VF , +PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID ), + .driver_data =NFP_DEV_NFP3800_VF , + }, { +PCI_VDEVICE_SUB (NETRONOME ,PCI_DEVICE_ID_NFP6000_VF , +PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID ), + .driver_data =NFP_DEV_NFP6000_VF , + }, { +PCI_VDEVICE_SUB (CORIGINE ,PCI_DEVICE_ID_NFP3800_VF , +PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID ), + .driver_data =NFP_DEV_NFP3800_VF , + }, { +PCI_VDEVICE_SUB (CORIGINE ,PCI_DEVICE_ID_NFP6000_VF , +PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID ), + .driver_data =NFP_DEV_NFP6000_VF , }, - {PCI_VENDOR_ID_NETRONOME ,PCI_DEVICE_ID_NFP6000_VF , -PCI_VENDOR_ID_NETRONOME ,PCI_ANY_ID , -0 ,0 ,NFP_DEV_NFP6000_VF , - }, - {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP3800_VF , -PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -0 ,0 ,NFP_DEV_NFP3800_VF , - }, - {PCI_VENDOR_ID_CORIGINE ,PCI_DEVICE_ID_NFP6000_VF , -PCI_VENDOR_ID_CORIGINE ,PCI_ANY_ID , -0 ,0 ,NFP_DEV_NFP6000_VF , - }, - {0 , }/* Required last entry. */ + { }/* Required last entry. */ };MODULE_DEVICE_TABLE (pci, nfp_netvf_pci_device_ids);
drivers/net/ethernet/qlogic/qede/qede_main.c +10 -10
@@ -76,20 +76,20 @@ enum qede_pci_private { };static const struct pci_device_id qede_pci_tbl[] = { - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_40 ),QEDE_PRIVATE_PF }, - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_10 ),QEDE_PRIVATE_PF }, - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_MF ),QEDE_PRIVATE_PF }, - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_100 ),QEDE_PRIVATE_PF }, - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_50 ),QEDE_PRIVATE_PF }, - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_25 ),QEDE_PRIVATE_PF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_40 ), .driver_data =QEDE_PRIVATE_PF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_10 ), .driver_data =QEDE_PRIVATE_PF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_MF ), .driver_data =QEDE_PRIVATE_PF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_100 ), .driver_data =QEDE_PRIVATE_PF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_50 ), .driver_data =QEDE_PRIVATE_PF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_25 ), .driver_data =QEDE_PRIVATE_PF }, #ifdef CONFIG_QED_SRIOV - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_IOV ),QEDE_PRIVATE_VF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_57980S_IOV ), .driver_data =QEDE_PRIVATE_VF }, #endif - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_AH ),QEDE_PRIVATE_PF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_AH ), .driver_data =QEDE_PRIVATE_PF }, #ifdef CONFIG_QED_SRIOV - {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_AH_IOV ),QEDE_PRIVATE_VF }, + {PCI_VDEVICE (QLOGIC ,PCI_DEVICE_ID_AH_IOV ), .driver_data =QEDE_PRIVATE_VF }, #endif - {0 } + { } };MODULE_DEVICE_TABLE (pci, qede_pci_tbl);
drivers/net/ethernet/realtek/8139too.c +26 -26
70 lines not on this page · raw message
drivers/net/ethernet/realtek/r8169_main.c +4 -4
@@ -229,7 +229,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = { { PCI_VDEVICE(REALTEK, 0x2502) }, { PCI_VDEVICE(REALTEK, 0x2600) }, { PCI_VDEVICE(REALTEK, 0x8129) }, - { PCI_VDEVICE(REALTEK, 0x8136), RTL_CFG_NO_GBIT }, + { PCI_VDEVICE(REALTEK, 0x8136), .driver_data = RTL_CFG_NO_GBIT }, { PCI_VDEVICE(REALTEK, 0x8161) }, { PCI_VDEVICE(REALTEK, 0x8162) }, { PCI_VDEVICE(REALTEK, 0x8167) },
@@ -240,15 +240,15 @@ static const struct pci_device_id rtl8169_pci_tbl[] = { { PCI_VDEVICE(DLINK, 0x4302) }, { PCI_VDEVICE(AT, 0xc107) }, { PCI_VDEVICE(USR, 0x0116) }, - { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0024 }, - { 0x0001, 0x8168, PCI_ANY_ID, 0x2410 }, + { PCI_VDEVICE_SUB(LINKSYS, 0x1032, PCI_ANY_ID, 0x0024) }, + { PCI_DEVICE_SUB(0x0001, 0x8168, PCI_ANY_ID, 0x2410) }, { PCI_VDEVICE(REALTEK, 0x8125) }, { PCI_VDEVICE(REALTEK, 0x8126) }, { PCI_VDEVICE(REALTEK, 0x8127) }, { PCI_VDEVICE(REALTEK, 0x3000) }, { PCI_VDEVICE(REALTEK, 0x5000) }, { PCI_VDEVICE(REALTEK, 0x0e10) }, - {} + { } };MODULE_DEVICE_TABLE (pci, rtl8169_pci_tbl);
drivers/net/ethernet/rocker/rocker_main.c +2 -2
@@ -40,8 +40,8 @@static const char rocker_driver_name[] ="rocker" ;static const struct pci_device_id rocker_pci_id_table[] = { - {PCI_VDEVICE (REDHAT ,PCI_DEVICE_ID_REDHAT_ROCKER ),0 }, - {0 , } + {PCI_VDEVICE (REDHAT ,PCI_DEVICE_ID_REDHAT_ROCKER ) }, + { } };struct rocker_wait {
drivers/net/ethernet/sis/sis190.c +3 -3
@@ -331,9 +331,9 @@ static const struct { };static const struct pci_device_id sis190_pci_tbl[] = { - {PCI_DEVICE (PCI_VENDOR_ID_SI ,0x0190 ),0 ,0 ,0 }, - {PCI_DEVICE (PCI_VENDOR_ID_SI ,0x0191 ),0 ,0 ,1 }, - {0 , }, + {PCI_VDEVICE (SI ,0x0190 ), .driver_data =0 }, + {PCI_VDEVICE (SI ,0x0191 ), .driver_data =1 }, + { }, };MODULE_DEVICE_TABLE (pci, sis190_pci_tbl);
drivers/net/ethernet/sis/sis900.c +5 -5
@@ -104,11 +104,11 @@ static const char * card_names[] = { };static const struct pci_device_id sis900_pci_tbl[] = { - {PCI_VENDOR_ID_SI ,PCI_DEVICE_ID_SI_900 , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,SIS_900 }, - {PCI_VENDOR_ID_SI ,PCI_DEVICE_ID_SI_7016 , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,SIS_7016 }, - {0 ,} + {PCI_VDEVICE (SI ,PCI_DEVICE_ID_SI_900 ), + .driver_data =SIS_900 }, + {PCI_VDEVICE (SI ,PCI_DEVICE_ID_SI_7016 ), + .driver_data =SIS_7016 }, + { } };MODULE_DEVICE_TABLE (pci, sis900_pci_tbl);
drivers/net/ethernet/smsc/epic100.c +13 -5
@@ -166,11 +166,19 @@ static const struct epic_chip_info pci_id_tbl[] = {static const struct pci_device_id epic_pci_tbl[] = { - {0x10B8 ,0x0005 ,0x1092 ,0x0AB4 ,0 ,0 ,SMSC_83C170_0 }, - {0x10B8 ,0x0005 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,SMSC_83C170 }, - {0x10B8 ,0x0006 ,PCI_ANY_ID ,PCI_ANY_ID , -PCI_CLASS_NETWORK_ETHERNET <<8 ,0xffff00 ,SMSC_83C175 }, - {0 ,} + { +PCI_DEVICE_SUB (0x10B8 ,0x0005 ,0x1092 ,0x0AB4 ), + .driver_data =SMSC_83C170_0 , + }, { +PCI_DEVICE (0x10B8 ,0x0005 ), + .driver_data =SMSC_83C170 , + }, { +PCI_DEVICE (0x10B8 ,0x0006 ), + .class =PCI_CLASS_NETWORK_ETHERNET <<8 , + .class_mask =0xffff00 , + .driver_data =SMSC_83C175 , + }, + { } };MODULE_DEVICE_TABLE (pci, epic_pci_tbl);
drivers/net/ethernet/sun/cassini.c +3 -5
@@ -218,11 +218,9 @@ static u16 link_modes[] = { };static const struct pci_device_id cas_pci_tbl[] = { - {PCI_VENDOR_ID_SUN ,PCI_DEVICE_ID_SUN_CASSINI , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0UL }, - {PCI_VENDOR_ID_NS ,PCI_DEVICE_ID_NS_SATURN , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0UL }, - {0 , } + {PCI_VDEVICE (SUN ,PCI_DEVICE_ID_SUN_CASSINI ) }, + {PCI_VDEVICE (NS ,PCI_DEVICE_ID_NS_SATURN ) }, + { } };MODULE_DEVICE_TABLE (pci, cas_pci_tbl);
drivers/net/ethernet/sun/sungem.c +9 -17
@@ -85,8 +85,7 @@ MODULE_LICENSE("GPL");#define GEM_MODULE_NAME "gem"static const struct pci_device_id gem_pci_tbl[] = { - {PCI_VENDOR_ID_SUN ,PCI_DEVICE_ID_SUN_GEM , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0UL }, + {PCI_VDEVICE (SUN ,PCI_DEVICE_ID_SUN_GEM ) },/* These models only differ from the original GEM in * that their tx/rx fifos are of a different size and
@@ -95,21 +94,14 @@ static const struct pci_device_id gem_pci_tbl[] = {* Apple's GMAC does support gigabit on machines with * the BCM54xx PHYs. -BenH */ - {PCI_VENDOR_ID_SUN ,PCI_DEVICE_ID_SUN_RIO_GEM , - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, - { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, - { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMACP, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, - { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC2, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, - { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_GMAC, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, - { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_SUNGEM, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, - { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_GMAC, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, - {0, } + { PCI_VDEVICE(SUN, PCI_DEVICE_ID_SUN_RIO_GEM) }, + { PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC) }, + { PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMACP) }, + { PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC2) }, + { PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_K2_GMAC) }, + { PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_SH_SUNGEM) }, + { PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_IPID2_GMAC) }, + { } };MODULE_DEVICE_TABLE (pci, gem_pci_tbl);
drivers/net/ethernet/ti/tlan.c +14 -27
47 lines not on this page · raw message
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +13 -13
@@ -30,20 +30,20 @@ char ngbe_driver_name[] = "ngbe";* Class, Class Mask, private data (not used) } */ static const struct pci_device_id ngbe_pci_tbl[] = { - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL_W ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A2 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A2S ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A4 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A4S ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL2 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL2S ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL4 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL4S ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860LC ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A1 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A1L ),0 }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL_W ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A2 ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A2S ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A4 ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A4S ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL2 ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL2S ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL4 ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860AL4S ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860LC ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A1 ) }, + {PCI_VDEVICE (WANGXUN ,NGBE_DEV_ID_EM_WX1860A1L ) },/* required last entry */ - { .device =0 } + { } };/**
drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c +13 -13
@@ -26,20 +26,20 @@* Class, Class Mask, private data (not used) } */ static const struct pci_device_id ngbevf_pci_tbl[] = { - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL_W ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A2 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A2S ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A4 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A4S ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL2 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL2S ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL4 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL4S ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860NCSI ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A1 ),0 }, - {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL1 ),0 }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL_W ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A2 ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A2S ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A4 ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A4S ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL2 ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL2S ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL4 ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL4S ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860NCSI ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860A1 ) }, + {PCI_VDEVICE (WANGXUN ,NGBEVF_DEV_ID_EM_WX1860AL1 ) },/* required last entry */ - { .device =0 } + { } };static const struct net_device_ops ngbevf_netdev_ops = {
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +9 -9
@@ -37,16 +37,16 @@ char txgbe_driver_name[] = "txgbe";* Class, Class Mask, private data (not used) } */ static const struct pci_device_id txgbe_pci_tbl[] = { - {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_SP1000 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_WX1820 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5010 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5110 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5025 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5125 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5040 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5140 ),0 }, + {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_SP1000 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_WX1820 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5010 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5110 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5025 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5125 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5040 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBE_DEV_ID_AML5140 ) },/* required last entry */ - { .device =0 } + { } };#define DEFAULT_DEBUG_LEVEL_SHIFT 3
drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c +9 -9
@@ -26,16 +26,16 @@* Class, Class Mask, private data (not used) } */ static const struct pci_device_id txgbevf_pci_tbl[] = { - {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_SP1000 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_WX1820 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML500F ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML510F ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML5024 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML5124 ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML503F ),0 }, - {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML513F ),0 }, + {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_SP1000 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_WX1820 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML500F ) }, + {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML510F ) }, + {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML5024 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML5124 ) }, + {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML503F ) }, + {PCI_VDEVICE (WANGXUN ,TXGBEVF_DEV_ID_AML513F ) },/* required last entry */ - { .device =0 } + { } };static const struct net_device_ops txgbevf_netdev_ops = {
drivers/net/wan/farsync.c +9 -15
@@ -524,27 +524,21 @@ do { \/* PCI ID lookup table */ static const struct pci_device_id fst_pci_dev_id[] = { - {PCI_VENDOR_ID_FARSITE ,PCI_DEVICE_ID_FARSITE_T2P ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,FST_TYPE_T2P }, + {PCI_VDEVICE (FARSITE ,PCI_DEVICE_ID_FARSITE_T2P ), .driver_data =FST_TYPE_T2P }, - {PCI_VENDOR_ID_FARSITE ,PCI_DEVICE_ID_FARSITE_T4P ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,FST_TYPE_T4P }, + {PCI_VDEVICE (FARSITE ,PCI_DEVICE_ID_FARSITE_T4P ), .driver_data =FST_TYPE_T4P }, - {PCI_VENDOR_ID_FARSITE ,PCI_DEVICE_ID_FARSITE_T1U ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,FST_TYPE_T1U }, + {PCI_VDEVICE (FARSITE ,PCI_DEVICE_ID_FARSITE_T1U ), .driver_data =FST_TYPE_T1U }, - {PCI_VENDOR_ID_FARSITE ,PCI_DEVICE_ID_FARSITE_T2U ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,FST_TYPE_T2U }, + {PCI_VDEVICE (FARSITE ,PCI_DEVICE_ID_FARSITE_T2U ), .driver_data =FST_TYPE_T2U }, - {PCI_VENDOR_ID_FARSITE ,PCI_DEVICE_ID_FARSITE_T4U ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,FST_TYPE_T4U }, + {PCI_VDEVICE (FARSITE ,PCI_DEVICE_ID_FARSITE_T4U ), .driver_data =FST_TYPE_T4U }, - {PCI_VENDOR_ID_FARSITE ,PCI_DEVICE_ID_FARSITE_TE1 ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,FST_TYPE_TE1 }, + {PCI_VDEVICE (FARSITE ,PCI_DEVICE_ID_FARSITE_TE1 ), .driver_data =FST_TYPE_TE1 }, - {PCI_VENDOR_ID_FARSITE ,PCI_DEVICE_ID_FARSITE_TE1C ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,FST_TYPE_TE1 }, - {0 ,}/* End */ + {PCI_VDEVICE (FARSITE ,PCI_DEVICE_ID_FARSITE_TE1C ), .driver_data =FST_TYPE_TE1 }, + + { }/* End */ };MODULE_DEVICE_TABLE (pci, fst_pci_dev_id);
drivers/net/wan/pc300too.c +5 -9
@@ -461,15 +461,11 @@ static int pc300_pci_init_one(struct pci_dev *pdev, }static const struct pci_device_id pc300_pci_tbl[] = { - {PCI_VENDOR_ID_CYCLADES ,PCI_DEVICE_ID_PC300_RX_1 ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,0 }, - {PCI_VENDOR_ID_CYCLADES ,PCI_DEVICE_ID_PC300_RX_2 ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,0 }, - {PCI_VENDOR_ID_CYCLADES ,PCI_DEVICE_ID_PC300_TE_1 ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,0 }, - {PCI_VENDOR_ID_CYCLADES ,PCI_DEVICE_ID_PC300_TE_2 ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,0 }, - {0 , } + {PCI_VDEVICE (CYCLADES ,PCI_DEVICE_ID_PC300_RX_1 ) }, + {PCI_VDEVICE (CYCLADES ,PCI_DEVICE_ID_PC300_RX_2 ) }, + {PCI_VDEVICE (CYCLADES ,PCI_DEVICE_ID_PC300_TE_1 ) }, + {PCI_VDEVICE (CYCLADES ,PCI_DEVICE_ID_PC300_TE_2 ) }, + { } };static struct pci_driver pc300_pci_driver = {
drivers/net/wan/pci200syn.c +3 -3
@@ -397,9 +397,9 @@ static int pci200_pci_init_one(struct pci_dev *pdev, }static const struct pci_device_id pci200_pci_tbl[] = { - {PCI_VENDOR_ID_PLX ,PCI_DEVICE_ID_PLX_9050 ,PCI_VENDOR_ID_PLX , -PCI_DEVICE_ID_PLX_PCI200SYN ,0 ,0 ,0 }, - {0 , } + {PCI_VDEVICE_SUB (PLX ,PCI_DEVICE_ID_PLX_9050 , +PCI_VENDOR_ID_PLX ,PCI_DEVICE_ID_PLX_PCI200SYN ) }, + { } };static struct pci_driver pci200_pci_driver = {
drivers/net/wan/wanxl.c +4 -7
@@ -806,13 +806,10 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, }static const struct pci_device_id wanxl_pci_tbl[] = { - {PCI_VENDOR_ID_SBE ,PCI_DEVICE_ID_SBE_WANXL100 ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,0 }, - {PCI_VENDOR_ID_SBE ,PCI_DEVICE_ID_SBE_WANXL200 ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,0 }, - {PCI_VENDOR_ID_SBE ,PCI_DEVICE_ID_SBE_WANXL400 ,PCI_ANY_ID , -PCI_ANY_ID ,0 ,0 ,0 }, - {0 , } + {PCI_VDEVICE (SBE ,PCI_DEVICE_ID_SBE_WANXL100 ) }, + {PCI_VDEVICE (SBE ,PCI_DEVICE_ID_SBE_WANXL200 ) }, + {PCI_VDEVICE (SBE ,PCI_DEVICE_ID_SBE_WANXL400 ) }, + { } };static struct pci_driver wanxl_pci_driver = {
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +9 -8
@@ -2708,17 +2708,18 @@ static const struct dev_pm_ops brcmf_pciedrvr_pm = {#define BRCMF_PCIE_DEVICE (dev_id, fw_vend) \ { \ - BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \ - PCI_ANY_ID, PCI_ANY_ID, \ - PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \ - BRCMF_DRVDATA_ ## fw_vend \ + PCI_DEVICE(BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id)), \ + .class = PCI_CLASS_NETWORK_OTHER << 8, \ + .class_mask = 0xffff00, \ + .driver_data = BRCMF_DRVDATA_ ## fw_vend, \ }#define BRCMF_PCIE_DEVICE_SUB (dev_id, subvend, subdev, fw_vend) \ { \ - BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \ - (subvend), (subdev), \ - PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \ - BRCMF_DRVDATA_ ## fw_vend \ + PCI_DEVICE_SUB(BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \ + (subvend), (subdev)), \ + .class = PCI_CLASS_NETWORK_OTHER << 8, \ + .class_mask = 0xffff00, \ + .driver_data = BRCMF_DRVDATA_ ## fw_vend, \ }static const struct pci_device_id brcmf_pcie_devid_table[] = {
drivers/net/wireless/intel/ipw2x00/ipw2200.c +28 -24
65 lines not on this page · raw message
Signature · 1 line
2.47.3
Re: [PATCH net-next v3 2/2] net: Consistently define pci_device_ids using named initializers
Quoted 1 line · Uwe Kleine-König (The Capable Hub)
Forwarded: id:76da4f44d48bdde84580963862bf9616bee5c9e9.1778149923.git.u.kleine-koenig@baylibre.com (v2)
This is my internal marker for tracking mainline submissions. If someone applies this revision please drop this line.
Best regards
Uwe
Re: [PATCH net-next v3 2/2] net: Consistently define pci_device_ids using named initializers
In reply to Uwe Kleine-König (The Capable Hub)Quoted 30 lines · Uwe Kleine-König (The Capable Hub)
... and PCI device helpers.
The various struct
pci_device_idarrays were initialized mostly by one thePCI_DEVICEmacros and then list expressions. The latter isn't easily readable if you're not into PCI. Using named initializers is more explicit and thus easier to parse.Also use PCI_DEVICE* helper macros to assign .vendor, .device, .subvendor and .subdevice where appropriate and skip explicit assignments of 0 (which the compiler takes care of).
The secret plan is to make struct
pci_device_id::driver_dataan anonymous union (similar to
https://lore.kernel.org/all/[email protected]/)
and that requires named initializers. But it's also a nice cleanup on its own.This change doesn't introduce changes to the compiled
pci_device_idarrays. Tested on x86 and arm64.Reviewed-by Jijie Shao <[email protected]>Acked-by Arend van Spriel <[email protected]>Reviewed-by Aleksandr Loktionov <[email protected]>Reviewed-by Petr Machata <[email protected]> # for mlxswAcked-by Jacob Keller <[email protected]>Acked-by Johannes Berg <[email protected]>Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>Forwarded: id:76da4f44d48bdde84580963862bf9616bee5c9e9.1778149923.git.u.kleine-koenig@baylibre.com (v2)
--- drivers/net/arcnet/com20020-pci.c | 242 +++------
[...]
Quoted 244 lines
drivers/net/arcnet/com20020-pci.c +80
-155@@ -459,168 +459,88 @@ static struct com20020_pci_card_info card_info_eae_fb2 = {static const struct pci_device_id com20020pci_id_table[] = { { -0x1571 ,0xa001 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 , +PCI_DEVICE (0x1571 ,0xa001 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa002 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa003 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa004 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa005 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa006 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa007 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa008 ), + .driver_data =0 , + }, { +PCI_DEVICE (0x1571 ,0xa009 ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00a ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00b ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00c ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00d ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa00e ), + .driver_data = (kernel_ulong_t)&card_info_5mbit, + }, { +PCI_DEVICE (0x1571 ,0xa201 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa202 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa203 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa204 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa205 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x1571 ,0xa206 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9030 ,0x10B5 ,0x2978 ), + .driver_data = (kernel_ulong_t)&card_info_sohard, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9050 ,0x10B5 ,0x2273 ), + .driver_data = (kernel_ulong_t)&card_info_sohard, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9050 ,0x10B5 ,0x3263 ), + .driver_data = (kernel_ulong_t)&card_info_eae_arc1, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9050 ,0x10B5 ,0x3292 ), + .driver_data = (kernel_ulong_t)&card_info_eae_ma1, + }, { +PCI_DEVICE_SUB (0x10B5 ,0x9050 ,0x10B5 ,0x3294 ), + .driver_data = (kernel_ulong_t)&card_info_eae_fb2, + }, { +PCI_DEVICE (0x14BA ,0x6000 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, + }, { +PCI_DEVICE (0x10B5 ,0x2200 ), + .driver_data = (kernel_ulong_t)&card_info_10mbit, }, - { -0x1571 ,0xa002 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 , - }, - { -0x1571 ,0xa003 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa004 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 , - }, - { -0x1571 ,0xa005 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa006 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa007 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa008 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , -0 - }, - { -0x1571 ,0xa009 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00a , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00b , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00c , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00d , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa00e , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_5mbit - }, - { -0x1571 ,0xa201 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa202 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa203 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa204 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa205 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x1571 ,0xa206 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - { -0x10B5 ,0x9030 , -0x10B5 ,0x2978 , -0 ,0 , - (kernel_ulong_t)&card_info_sohard - }, - { -0x10B5 ,0x9050 , -0x10B5 ,0x2273 , -0 ,0 , - (kernel_ulong_t)&card_info_sohard - }, - { -0x10B5 ,0x9050 , -0x10B5 ,0x3263 , -0 ,0 , - (kernel_ulong_t)&card_info_eae_arc1 - }, - { -0x10B5 ,0x9050 , -0x10B5 ,0x3292 , -0 ,0 , - (kernel_ulong_t)&card_info_eae_ma1 - }, - { -0x10B5 ,0x9050 , -0x10B5 ,0x3294 , -0 ,0 , - (kernel_ulong_t)&card_info_eae_fb2 - }, - { -0x14BA ,0x6000 , -PCI_ANY_ID ,PCI_ANY_ID , -0 ,0 , - (kernel_ulong_t)&card_info_10mbit - }, - {
drivers/net/arcnet/com20020-pci.c static struct com20020_pci_card_info card_info_eae_fb2 = { · line 546
Quoted 10 lines
drivers/net/arcnet/com20020-pci.c +1
-6- 0x10B5, 0x2200, - PCI_ANY_ID, PCI_ANY_ID, - 0, 0, - (kernel_ulong_t)&card_info_10mbit - }, - { 0, } + { } };MODULE_DEVICE_TABLE (pci, com20020pci_id_table);
For the com20020 arcnet driver:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 11 May 2026 11:00:22 +0200 you wrote:
Hello,
the previous iteration of this series (v2) is available at
https://lore.kernel.org/netdev/[email protected]Changes since v2:
[...]
Here is the summary with links:
- [net-next,v3,1/2] net: nfp: Drop PCI class entries with .class_mask = 0
https://git.kernel.org/netdev/net-next/c/0f5b8332b0b2 - [net-next,v3,2/2] net: Consistently define pci_device_ids using named initializers https://git.kernel.org/netdev/net-next/c/733334d6bdaf
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html