Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to upgrade the bnx2 network card driver in a Dell Power Edge R410. I downloaded the latest driver version from the broadcom website. If I want to compile the driver it fails with the following errors:

make
make -C bnx2/src  KVER=2.6.32-5-amd64 PREFIX=
make[1]: Entering directory `/tmp/netxtreme2-6.2.23/bnx2-2.0.23b/src'
make -C /lib/modules/2.6.32-5-amd64/build SUBDIRS=/tmp/netxtreme2-6.2.23/bnx2-2.0.23b/src modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  Building modules, stage 2.
  MODPOST 2 modules
make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make[1]: Leaving directory `/tmp/netxtreme2-6.2.23/bnx2-2.0.23b/src'
make -C bnx2x/src KVER=2.6.32-5-amd64 PREFIX=
make[1]: Entering directory `/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src'
make -C /lib/modules/2.6.32-5-amd64/build M=`pwd` modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  CC [M]  /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.o
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x.h:68,
                 from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:80:
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1009:1: error: "PCI_VPD_LRDT_ID_STRING" redefined
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:34:
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1327:1: error: this is the location of the previous definition
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x.h:68,
                 from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:80:
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1011:1: error: "PCI_VPD_LRDT_RO_DATA" redefined
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:34:
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1328:1: error: this is the location of the previous definition
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x.h:68,
                 from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:80:
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1013:1: error: "PCI_VPD_LRDT_RW_DATA" redefined
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:34:
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1329:1: error: this is the location of the previous definition
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x.h:68,
                 from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:80:
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1019:1: error: "PCI_VPD_SRDT_END" redefined
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:34:
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1334:1: error: this is the location of the previous definition
In file included from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x.h:68,
                 from /tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.c:80:
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1032: error: conflicting types for ‘pci_vpd_lrdt_size’
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1355: error: previous definition of ‘pci_vpd_lrdt_size’ was here
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1037: error: conflicting types for ‘pci_vpd_srdt_size’
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1366: error: previous definition of ‘pci_vpd_srdt_size’ was here
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1042: error: conflicting types for ‘pci_vpd_find_tag’
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1391: error: previous declaration of ‘pci_vpd_find_tag’ was here
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1077: error: conflicting types for ‘pci_vpd_info_field_size’
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1377: error: previous definition of ‘pci_vpd_info_field_size’ was here
/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_compat.h:1082: error: conflicting types for ‘pci_vpd_find_info_keyword’
/usr/src/linux-headers-2.6.32-5-common/include/linux/pci.h:1403: error: previous declaration of ‘pci_vpd_find_info_keyword’ was here
make[5]: *** [/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src/bnx2x_main.o] Fehler 1
make[4]: *** [_module_/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src] Fehler 2
make[3]: *** [sub-make] Fehler 2
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make[1]: *** [bnx2x.o] Fehler 2
make[1]: Leaving directory `/tmp/netxtreme2-6.2.23/bnx2x-1.62.15/src'
make: *** [l2build] Fehler 2
share|improve this question

2 Answers 2

I had the same issue - try:

# cd bnx2/src

first and then do

# make && make install
share|improve this answer

The solution to this problem is a minor change to bnx2x_compat.h.

around line 1178, add an "#ifndef:"

}
#endif

#ifndef PCI_VPD_LRDT
#if ((!defined RHEL_RELEASE_CODE) && (LINUX_VERSION_CODE ...etc...

And then close out the ifdef around line 1283:

}
#endif
#endif // !PCI_VPD_LRDT
#ifndef PCI_MSIX_FLAGS_QSIZE
#define PCI_MSIX_FLAGS_QSIZE 0x7FF
#endif

These two changes will allow the latest driver to build properly. I did it today with 1.72.18. A couple more minor changes are needed for a successful build on the v2.6 preemptive realtime kernel, changing __netif_tx_lock() to omit the smp_processor_id() second argument, but that's not required on the non-realtime kernel or realtime 3.0 and up.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.