summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorSimon Rettberg2026-01-28 12:53:53 +0100
committerSimon Rettberg2026-01-28 12:53:53 +0100
commit8e82785c584dc13e20f9229decb95bd17bbe9cd1 (patch)
treea8b359e59196be5b2e3862bed189107f4bc9975f /src/drivers/net/bnx2.c
parentMerge branch 'master' into openslx (diff)
parent[prefix] Make unlzma.S compatible with 386 class CPUs (diff)
downloadipxe-openslx.tar.gz
ipxe-openslx.tar.xz
ipxe-openslx.zip
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/drivers/net/bnx2.c')
-rw-r--r--src/drivers/net/bnx2.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/drivers/net/bnx2.c b/src/drivers/net/bnx2.c
index d5783ff99..ae94c9bed 100644
--- a/src/drivers/net/bnx2.c
+++ b/src/drivers/net/bnx2.c
@@ -36,13 +36,14 @@ FILE_LICENCE ( GPL_ANY );
/* The bnx2 seems to be picky about the alignment of the receive buffers
* and possibly the status block.
*/
-static struct bss {
+struct bss {
struct tx_bd tx_desc_ring[TX_DESC_CNT];
struct rx_bd rx_desc_ring[RX_DESC_CNT];
unsigned char rx_buf[RX_BUF_CNT][RX_BUF_SIZE];
struct status_block status_blk;
struct statistics_block stats_blk;
-} bnx2_bss;
+};
+#define bnx2_bss NIC_FAKE_BSS ( struct bss )
static struct bnx2 bnx2;
@@ -2671,6 +2672,12 @@ err_out_disable:
return 0;
}
+static void
+bnx2_remove(struct nic *nic, void *hwdev __unused)
+{
+ bnx2_disable(nic);
+}
+
static struct pci_device_id bnx2_nics[] = {
PCI_ROM(0x14e4, 0x164a, "bnx2-5706", "Broadcom NetXtreme II BCM5706", 0),
PCI_ROM(0x14e4, 0x164c, "bnx2-5708", "Broadcom NetXtreme II BCM5708", 0),
@@ -2680,7 +2687,8 @@ static struct pci_device_id bnx2_nics[] = {
PCI_DRIVER ( bnx2_driver, bnx2_nics, PCI_NO_CLASS );
-DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_disable );
+DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver,
+ bnx2_probe, bnx2_remove, bnx2_bss );
/*
static struct pci_driver bnx2_driver __pci_driver = {