Commit dc515f2e0b356981ea0c4581ff0e587aea8b624a

Authored by Dhananjay Phadke
Committed by Jeff Garzik
1 parent 8b8091fbf4

netxen: fix portnum for hp mezz cards

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>

Showing 1 changed file with 8 additions and 2 deletions Side-by-side Diff

drivers/net/netxen/netxen_nic_main.c
... ... @@ -530,9 +530,15 @@
530 530 netxen_initialize_adapter_sw(adapter); /* initialize the buffers in adapter */
531 531  
532 532 /* Mezz cards have PCI function 0,2,3 enabled */
533   - if ((adapter->ahw.boardcfg.board_type == NETXEN_BRDTYPE_P2_SB31_10G_IMEZ)
534   - && (pci_func_id >= 2))
  533 + switch (adapter->ahw.boardcfg.board_type) {
  534 + case NETXEN_BRDTYPE_P2_SB31_10G_IMEZ:
  535 + case NETXEN_BRDTYPE_P2_SB31_10G_HMEZ:
  536 + if (pci_func_id >= 2)
535 537 adapter->portnum = pci_func_id - 2;
  538 + break;
  539 + default:
  540 + break;
  541 + }
536 542  
537 543 #ifdef CONFIG_IA64
538 544 if(adapter->portnum == 0) {