diff options
author | Michael Brown <mcb30@etherboot.org> | 2005-05-03 12:29:32 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2005-05-03 12:29:32 +0000 |
commit | 24c0498cbc4bf3b7a6b11e80b18df75c50c2fb31 (patch) | |
tree | 86c3c00cd231e4d46235d541ea2ad997976f2338 /src/drivers/net/tulip.c | |
parent | 7df28572480c7779cafcde90051419467d1add51 (diff) | |
download | ipxe-24c0498cbc4bf3b7a6b11e80b18df75c50c2fb31.tar.gz |
Move tulip_private structure into shared data.
Diffstat (limited to 'src/drivers/net/tulip.c')
-rw-r--r-- | src/drivers/net/tulip.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c index ad075021..d874aed0 100644 --- a/src/drivers/net/tulip.c +++ b/src/drivers/net/tulip.c @@ -396,23 +396,7 @@ struct tulip_tx_desc { static u32 ioaddr; -/* Note: transmit and receive buffers must be longword aligned and - longword divisable */ - -#define TX_RING_SIZE 2 -#define RX_RING_SIZE 4 -struct { - struct tulip_tx_desc tx_ring[TX_RING_SIZE]; - unsigned char txb[BUFLEN]; - struct tulip_rx_desc rx_ring[RX_RING_SIZE]; - unsigned char rxb[RX_RING_SIZE * BUFLEN]; -} tulip_buffers __shared __attribute__ ((aligned(4))); -#define tx_ring tulip_buffers.tx_ring -#define txb tulip_buffers.txb -#define rx_ring tulip_buffers.rx_ring -#define rxb tulip_buffers.rxb - -static struct tulip_private { +struct tulip_private { int cur_rx; int chip_id; /* index into tulip_tbl[] */ int pci_id_idx; /* index into pci_id_tbl[] */ @@ -439,7 +423,24 @@ static struct tulip_private { signed char phys[4], mii_cnt; /* MII device addresses. */ int cur_index; /* Current media index. */ int saved_if_port; -} tpx; +}; + +/* Note: transmit and receive buffers must be longword aligned and + longword divisable */ + +#define TX_RING_SIZE 2 +#define RX_RING_SIZE 4 +struct { + struct tulip_tx_desc tx_ring[TX_RING_SIZE]; + unsigned char txb[BUFLEN]; + struct tulip_rx_desc rx_ring[RX_RING_SIZE]; + unsigned char rxb[RX_RING_SIZE * BUFLEN]; + struct tulip_private tpx; +} tulip_bss __shared __attribute__ ((aligned(4))); +#define tx_ring tulip_bss.tx_ring +#define txb tulip_bss.txb +#define rx_ring tulip_bss.rx_ring +#define rxb tulip_bss.rxb static struct tulip_private *tp; @@ -1248,7 +1249,7 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) { nic->irqno = 0; /* point to private storage */ - tp = &tpx; + tp = &tulip_bss.tpx; tp->vendor_id = pci->vendor_id; tp->dev_id = pci->device_id; |