14 #include <linux/netdevice.h>
29 u32 current_write, last_write;
53 current_write = sc->
ether.tx_ring_current_write;
54 for (skb2 = skb; skb2 !=
NULL; skb2 =
NULL) {
56 if ((sc->
ether.tx_ring[current_write].tdes1 &
64 if (current_write == sc->
ether.tx_ring_current_read)
69 netif_stop_queue(sc->
dev);
70 sc->
ether.tx_full = 1;
71 dev_dbg(&sc->
pdev->dev,
"SBE 2T3E3: out of descriptors\n");
72 spin_unlock_irqrestore(&sc->
ether.tx_lock, flags);
76 current_write = last_write = sc->
ether.tx_ring_current_write;
77 dev_dbg(&sc->
pdev->dev,
"sending mbuf (current_write = %d)\n",
80 for (skb2 = skb; skb2 !=
NULL; skb2 =
NULL) {
83 "sending mbuf (len = %d, next = %p)\n",
86 sc->
ether.tx_free_cnt--;
87 sc->
ether.tx_ring[current_write].tdes0 = 0;
88 sc->
ether.tx_ring[current_write].tdes1 &=
92 sc->
ether.tx_ring[current_write].tdes1 |=
95 if (current_write == sc->
ether.tx_ring_current_write) {
96 sc->
ether.tx_ring[current_write].tdes1 |=
99 sc->
ether.tx_ring[current_write].tdes0 =
106 last_write = current_write;
111 sc->
ether.tx_data[last_write] =
skb;
112 sc->
ether.tx_ring[last_write].tdes1 |=
115 sc->
ether.tx_ring[sc->
ether.tx_ring_current_write].tdes0 |=
117 sc->
ether.tx_ring_current_write = current_write;
119 dev_dbg(&sc->
pdev->dev,
"txput: tdes0 = %08X tdes1 = %08X\n",
120 sc->
ether.tx_ring[last_write].tdes0,
121 sc->
ether.tx_ring[last_write].tdes1);
126 spin_unlock_irqrestore(&sc->
ether.tx_lock, flags);
135 for (i = 0; i < 3; i++)
139 sc->
ether.card_serial_number[0], sc->
ether.card_serial_number[1],
140 sc->
ether.card_serial_number[2]);
164 else if ((blinker & 1) && sc->
rcv_count) {