summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/tulip.c
diff options
context:
space:
mode:
authorMichael Brown2005-05-03 14:29:32 +0200
committerMichael Brown2005-05-03 14:29:32 +0200
commit24c0498cbc4bf3b7a6b11e80b18df75c50c2fb31 (patch)
tree86c3c00cd231e4d46235d541ea2ad997976f2338 /src/drivers/net/tulip.c
parentReduce large symbol warning threshold, now that most of the really (diff)
downloadipxe-24c0498cbc4bf3b7a6b11e80b18df75c50c2fb31.tar.gz
ipxe-24c0498cbc4bf3b7a6b11e80b18df75c50c2fb31.tar.xz
ipxe-24c0498cbc4bf3b7a6b11e80b18df75c50c2fb31.zip
Move tulip_private structure into shared data.
Diffstat (limited to 'src/drivers/net/tulip.c')
-rw-r--r--src/drivers/net/tulip.c39
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;