summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown2018-03-18 14:40:23 +0100
committerMichael Brown2018-03-18 14:41:21 +0100
commit0778418e29ea16fc897fc5b6e497054f5ba86ebd (patch)
tree18b6135053e4478c3bed0246a3a5d44e57d6b395 /src/drivers
parent[librm] Add facility to provide register and stack dump for CPU exceptions (diff)
downloadipxe-0778418e29ea16fc897fc5b6e497054f5ba86ebd.tar.gz
ipxe-0778418e29ea16fc897fc5b6e497054f5ba86ebd.tar.xz
ipxe-0778418e29ea16fc897fc5b6e497054f5ba86ebd.zip
[golan] Do not assume all devices are identical
Remove the global variable shomron_nodnic_supported, since it may have different values for different PCI devices. Originally-fixed-by: Mohammed Taha <mohammedt@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
-rwxr-xr-xsrc/drivers/infiniband/golan.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/drivers/infiniband/golan.c b/src/drivers/infiniband/golan.c
index 61331d4c..1858da7c 100755
--- a/src/drivers/infiniband/golan.c
+++ b/src/drivers/infiniband/golan.c
@@ -2586,8 +2586,6 @@ struct flexboot_nodnic_callbacks shomron_nodnic_callbacks = {
.tx_uar_send_doorbell_fn = shomron_tx_uar_send_db,
};
-static int shomron_nodnic_supported = 0;
-
static int shomron_nodnic_is_supported ( struct pci_device *pci ) {
if ( DEVICE_IS_CIB ( pci->device ) )
return 0;
@@ -2607,8 +2605,7 @@ static int golan_probe ( struct pci_device *pci ) {
goto probe_done;
}
- shomron_nodnic_supported = shomron_nodnic_is_supported ( pci );
- if ( shomron_nodnic_supported ) {
+ if ( shomron_nodnic_is_supported ( pci ) ) {
DBG ( "%s: Using NODNIC driver\n", __FUNCTION__ );
rc = flexboot_nodnic_probe ( pci, &shomron_nodnic_callbacks, NULL );
} else {
@@ -2624,7 +2621,7 @@ probe_done:
static void golan_remove ( struct pci_device *pci ) {
DBG ( "%s: start\n", __FUNCTION__ );
- if ( ! shomron_nodnic_supported ) {
+ if ( ! shomron_nodnic_is_supported ( pci ) ) {
DBG ( "%s: Using normal driver remove\n", __FUNCTION__ );
golan_remove_normal ( pci );
return;