Commit d03e0944 authored by Ethan Nelson-Moore's avatar Ethan Nelson-Moore Committed by Jakub Kicinski
Browse files

net: intel: fix PCI device ID conflict between i40e and ipw2200



The ID 8086:104f is matched by both i40e and ipw2200. The same device
ID should not be in more than one driver, because in that case, which
driver is used is unpredictable. Fix this by taking advantage of the
fact that i40e devices use PCI_CLASS_NETWORK_ETHERNET and ipw2200
devices use PCI_CLASS_NETWORK_OTHER to differentiate the devices.

Fixes: 2e45d3f4 ("i40e: Add support for X710 B/P & SFP+ cards")
Cc: stable@vger.kernel.org
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarEthan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
Link: https://patch.msgid.link/20260210021235.16315-1-enelsonmoore@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ed6788c5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -75,7 +75,13 @@ static const struct pci_device_id i40e_pci_tbl[] = {
	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T4), 0},
	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_BC), 0},
	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_SFP), 0},
	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_B), 0},
	/*
	 * This ID conflicts with ipw2200, but the devices can be differentiated
	 * because i40e devices use PCI_CLASS_NETWORK_ETHERNET and ipw2200
	 * devices use PCI_CLASS_NETWORK_OTHER.
	 */
	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_B),
		PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, 0},
	{PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_X722), 0},
	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_X722), 0},
	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X722), 0},
+7 −1
Original line number Diff line number Diff line
@@ -11387,7 +11387,13 @@ static const struct pci_device_id card_ids[] = {
	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2754, 0, 0, 0},
	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2761, 0, 0, 0},
	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2762, 0, 0, 0},
	{PCI_VDEVICE(INTEL, 0x104f), 0},
	/*
	 * This ID conflicts with i40e, but the devices can be differentiated
	 * because i40e devices use PCI_CLASS_NETWORK_ETHERNET and ipw2200
	 * devices use PCI_CLASS_NETWORK_OTHER.
	 */
	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x104f),
		PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, 0},
	{PCI_VDEVICE(INTEL, 0x4220), 0},	/* BG */
	{PCI_VDEVICE(INTEL, 0x4221), 0},	/* BG */
	{PCI_VDEVICE(INTEL, 0x4223), 0},	/* ABG */