Skip to content

Commit a2bc221

Browse files
manishc88kuba-moo
authored andcommitted
netxen_nic: fix MSI/MSI-x interrupts
For all PCI functions on the netxen_nic adapter, interrupt mode (INTx or MSI) configuration is dependent on what has been configured by the PCI function zero in the shared interrupt register, as these adapters do not support mixed mode interrupts among the functions of a given adapter. Logic for setting MSI/MSI-x interrupt mode in the shared interrupt register based on PCI function id zero check is not appropriate for all family of netxen adapters, as for some of the netxen family adapters PCI function zero is not really meant to be probed/loaded in the host but rather just act as a management function on the device, which caused all the other PCI functions on the adapter to always use legacy interrupt (INTx) mode instead of choosing MSI/MSI-x interrupt mode. This patch replaces that check with port number so that for all type of adapters driver attempts for MSI/MSI-x interrupt modes. Fixes: b37eb21 ("netxen_nic: Avoid mixed mode interrupts") Signed-off-by: Manish Chopra <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c49243e commit a2bc221

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,6 @@ static const struct net_device_ops netxen_netdev_ops = {
564564
.ndo_set_features = netxen_set_features,
565565
};
566566

567-
static inline bool netxen_function_zero(struct pci_dev *pdev)
568-
{
569-
return (PCI_FUNC(pdev->devfn) == 0) ? true : false;
570-
}
571-
572567
static inline void netxen_set_interrupt_mode(struct netxen_adapter *adapter,
573568
u32 mode)
574569
{
@@ -664,7 +659,7 @@ static int netxen_setup_intr(struct netxen_adapter *adapter)
664659
netxen_initialize_interrupt_registers(adapter);
665660
netxen_set_msix_bit(pdev, 0);
666661

667-
if (netxen_function_zero(pdev)) {
662+
if (adapter->portnum == 0) {
668663
if (!netxen_setup_msi_interrupts(adapter, num_msix))
669664
netxen_set_interrupt_mode(adapter, NETXEN_MSI_MODE);
670665
else

0 commit comments

Comments
 (0)