netxen: fix portnum for hp mezz cards
authorDhananjay Phadke <dhananjay@netxen.com>
Mon, 16 Jun 2008 05:59:43 +0000 (22:59 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 18 Jun 2008 03:06:58 +0000 (23:06 -0400)
This fixes a the issue where logical port number is set incorrectly
for HP blade mezz cards.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/netxen/netxen_nic_main.c

index 7144c255ce54aa3b23856fb9df2f1dfe2f28d48e..5a2fd214fefe68c5cdfa1208be1206874d89dc15 100644 (file)
@@ -530,9 +530,15 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        netxen_initialize_adapter_sw(adapter);  /* initialize the buffers in adapter */
 
        /* Mezz cards have PCI function 0,2,3 enabled */
-       if ((adapter->ahw.boardcfg.board_type == NETXEN_BRDTYPE_P2_SB31_10G_IMEZ)
-               && (pci_func_id >= 2))
+       switch (adapter->ahw.boardcfg.board_type) {
+       case NETXEN_BRDTYPE_P2_SB31_10G_IMEZ:
+       case NETXEN_BRDTYPE_P2_SB31_10G_HMEZ:
+               if (pci_func_id >= 2)
                        adapter->portnum = pci_func_id - 2;
+               break;
+       default:
+               break;
+       }
 
 #ifdef CONFIG_IA64
        if(adapter->portnum == 0) {