Browse Source

Use shared symbols

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
ee15c47cb5
1 changed files with 10 additions and 9 deletions
  1. 10
    9
      src/drivers/net/via-rhine.c

+ 10
- 9
src/drivers/net/via-rhine.c View File

546
 
546
 
547
 };
547
 };
548
 
548
 
549
+struct {
550
+	char txbuf[TX_RING_SIZE * PKT_BUF_SZ + 32];
551
+	char rxbuf[RX_RING_SIZE * PKT_BUF_SZ + 32];
552
+	char txdesc[TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32];
553
+	char rxdesc[RX_RING_SIZE * sizeof (struct rhine_rx_desc) + 32];
554
+} rhine_buffers __shared;
549
 
555
 
550
 /* The I/O extent. */
556
 /* The I/O extent. */
551
 #define rhine_TOTAL_SIZE 0x80
557
 #define rhine_TOTAL_SIZE 0x80
1188
     int rx_bufs_tmp, rx_bufs_tmp1;
1194
     int rx_bufs_tmp, rx_bufs_tmp1;
1189
     int tx_bufs_tmp, tx_bufs_tmp1;
1195
     int tx_bufs_tmp, tx_bufs_tmp1;
1190
 
1196
 
1191
-    static char buf1[TX_RING_SIZE * PKT_BUF_SZ + 32];
1192
-    static char buf2[RX_RING_SIZE * PKT_BUF_SZ + 32];
1193
-    static char desc1[TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32];
1194
-    static char desc2[RX_RING_SIZE * sizeof (struct rhine_rx_desc) + 32];
1195
-
1196
     /* printf ("rhine_reset\n"); */
1197
     /* printf ("rhine_reset\n"); */
1197
     /* Soft reset the chip. */
1198
     /* Soft reset the chip. */
1198
     /*outb(CmdReset, ioaddr + ChipCmd); */
1199
     /*outb(CmdReset, ioaddr + ChipCmd); */
1199
 
1200
 
1200
-    tx_bufs_tmp = (int) buf1;
1201
-    tx_ring_tmp = (int) desc1;
1202
-    rx_bufs_tmp = (int) buf2;
1203
-    rx_ring_tmp = (int) desc2;
1201
+    tx_bufs_tmp = (int) rhine_buffers.txbuf;
1202
+    tx_ring_tmp = (int) rhine_buffers.txdesc;
1203
+    rx_bufs_tmp = (int) rhine_buffers.rxbuf;
1204
+    rx_ring_tmp = (int) rhine_buffers.rxdesc;
1204
 
1205
 
1205
     /* tune RD TD 32 byte alignment */
1206
     /* tune RD TD 32 byte alignment */
1206
     rx_ring_tmp1 = (int) virt_to_bus ((char *) rx_ring_tmp);
1207
     rx_ring_tmp1 = (int) virt_to_bus ((char *) rx_ring_tmp);

Loading…
Cancel
Save