diff options
| author | Michael Brown | 2025-06-24 14:17:19 +0200 |
|---|---|---|
| committer | Michael Brown | 2025-06-24 14:41:51 +0200 |
| commit | d3e10ebd354928d56ba660cd2ea14af1663702a2 (patch) | |
| tree | e9265e1ecdfb1b9bad6453f00d5c04c38a33728f /src/drivers/net/amd8111e.c | |
| parent | [legacy] Rename the global legacy NIC to "legacy_nic" (diff) | |
| download | ipxe-d3e10ebd354928d56ba660cd2ea14af1663702a2.tar.gz ipxe-d3e10ebd354928d56ba660cd2ea14af1663702a2.tar.xz ipxe-d3e10ebd354928d56ba660cd2ea14af1663702a2.zip | |
[legacy] Allocate legacy driver .bss-like segments at probe time
Some legacy drivers use large static allocations for transmit and
receive buffers. To avoid bloating the .bss segment, we currently
implement these as a single common symbol named "_shared_bss" (which
is permissible since only one legacy driver may be active at any one
time).
Switch to dynamic allocation of these .bss-like segments, to avoid the
requirement for using common symbols.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/amd8111e.c')
| -rw-r--r-- | src/drivers/net/amd8111e.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drivers/net/amd8111e.c b/src/drivers/net/amd8111e.c index 213c4f44b..c21c11835 100644 --- a/src/drivers/net/amd8111e.c +++ b/src/drivers/net/amd8111e.c @@ -105,8 +105,7 @@ struct amd8111e_priv { struct nic *nic; void *mmio; }; - -static struct amd8111e_priv amd8111e; +#define amd8111e NIC_FAKE_BSS ( struct amd8111e_priv ) /******************************************************** @@ -683,7 +682,7 @@ static struct pci_device_id amd8111e_nics[] = { PCI_DRIVER ( amd8111e_driver, amd8111e_nics, PCI_NO_CLASS ); DRIVER ( "AMD8111E", nic_driver, pci_driver, amd8111e_driver, - amd8111e_probe, amd8111e_disable ); + amd8111e_probe, amd8111e_disable, amd8111e ); /* * Local variables: |
