Lines Matching refs:dp

106 	dp83902a_priv_data_t *dp = &nic;  in dp83902a_init()  local
114 base = dp->base; in dp83902a_init()
126 DP_IN(base, DP_P1_PAR0+i, dp->esa[i]); in dp83902a_init()
131 dp->esa[0], in dp83902a_init()
132 dp->esa[1], in dp83902a_init()
133 dp->esa[2], in dp83902a_init()
134 dp->esa[3], in dp83902a_init()
135 dp->esa[4], in dp83902a_init()
136 dp->esa[5] ); in dp83902a_init()
138 memcpy(enetaddr, dp->esa, 6); /* Use MAC from serial EEPROM */ in dp83902a_init()
146 dp83902a_priv_data_t *dp = &nic; in dp83902a_stop() local
147 u8 *base = dp->base; in dp83902a_stop()
155 dp->running = false; in dp83902a_stop()
167 dp83902a_priv_data_t *dp = &nic; in dp83902a_start() local
168 u8 *base = dp->base; in dp83902a_start()
181 DP_OUT(base, DP_TPSR, dp->tx_buf1); /* Transmitter start page */ in dp83902a_start()
182 dp->tx1 = dp->tx2 = 0; in dp83902a_start()
183 dp->tx_next = dp->tx_buf1; in dp83902a_start()
184 dp->tx_started = false; in dp83902a_start()
185 dp->running = true; in dp83902a_start()
186 DP_OUT(base, DP_PSTART, dp->rx_buf_start); /* Receive ring start page */ in dp83902a_start()
187 DP_OUT(base, DP_BNDRY, dp->rx_buf_end - 1); /* Receive ring boundary */ in dp83902a_start()
188 DP_OUT(base, DP_PSTOP, dp->rx_buf_end); /* Receive ring end page */ in dp83902a_start()
189 dp->rx_next = dp->rx_buf_start - 1; in dp83902a_start()
190 dp->running = true; in dp83902a_start()
194 DP_OUT(base, DP_P1_CURP, dp->rx_buf_start); /* Current page - next free page for Rx */ in dp83902a_start()
195 dp->running = true; in dp83902a_start()
206 dp->running = true; in dp83902a_start()
218 dp83902a_priv_data_t *dp = (dp83902a_priv_data_t *) &nic; in dp83902a_start_xmit() local
219 u8 *base = dp->base; in dp83902a_start_xmit()
225 if (dp->tx_started) in dp83902a_start_xmit()
236 dp->tx_started = true; in dp83902a_start_xmit()
246 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_send() local
247 u8 *base = dp->base; in dp83902a_send()
259 start_page = dp->tx_next; in dp83902a_send()
260 if (dp->tx_next == dp->tx_buf1) { in dp83902a_send()
261 dp->tx1 = start_page; in dp83902a_send()
262 dp->tx1_len = pkt_len; in dp83902a_send()
263 dp->tx1_key = key; in dp83902a_send()
264 dp->tx_next = dp->tx_buf2; in dp83902a_send()
266 dp->tx2 = start_page; in dp83902a_send()
267 dp->tx2_len = pkt_len; in dp83902a_send()
268 dp->tx2_key = key; in dp83902a_send()
269 dp->tx_next = dp->tx_buf1; in dp83902a_send()
292 DP_IN_DATA(dp->data, tmp); in dp83902a_send()
321 DP_OUT_DATA(dp->data, *data++); in dp83902a_send()
334 DP_OUT_DATA(dp->data, 0); in dp83902a_send()
356 if (!dp->tx_started) { in dp83902a_send()
357 if (start_page == dp->tx1) { in dp83902a_send()
358 dp->tx_int = 1; /* Expecting interrupt from BUF1 */ in dp83902a_send()
360 dp->tx_int = 2; /* Expecting interrupt from BUF2 */ in dp83902a_send()
376 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_RxEvent() local
377 u8 *base = dp->base; in dp83902a_RxEvent()
393 if (pkt == dp->rx_buf_end) in dp83902a_RxEvent()
394 pkt = dp->rx_buf_start; in dp83902a_RxEvent()
403 if (dp->rx_next == pkt) { in dp83902a_RxEvent()
404 if (cur == dp->rx_buf_start) in dp83902a_RxEvent()
405 DP_OUT(base, DP_BNDRY, dp->rx_buf_end - 1); in dp83902a_RxEvent()
410 dp->rx_next = pkt; in dp83902a_RxEvent()
419 DP_IN_DATA(dp->data, rcv_hdr[i++]); in dp83902a_RxEvent()
431 if (rcv_hdr[1] == dp->rx_buf_start) in dp83902a_RxEvent()
432 DP_OUT(base, DP_BNDRY, dp->rx_buf_end - 1); in dp83902a_RxEvent()
448 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_recv() local
449 u8 *base = dp->base; in dp83902a_recv()
460 printf("Rx packet %d length %d\n", dp->rx_next, len); in dp83902a_recv()
468 DP_OUT(base, DP_RSAH, dp->rx_next); in dp83902a_recv()
494 DP_IN_DATA(dp->data, tmp); in dp83902a_recv()
513 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_TxEvent() local
514 u8 *base = dp->base; in dp83902a_TxEvent()
521 if (dp->tx_int == 1) { in dp83902a_TxEvent()
522 key = dp->tx1_key; in dp83902a_TxEvent()
523 dp->tx1 = 0; in dp83902a_TxEvent()
525 key = dp->tx2_key; in dp83902a_TxEvent()
526 dp->tx2 = 0; in dp83902a_TxEvent()
529 dp->tx_started = false; in dp83902a_TxEvent()
530 if (dp->tx1) { in dp83902a_TxEvent()
531 dp83902a_start_xmit(dp->tx1, dp->tx1_len); in dp83902a_TxEvent()
532 dp->tx_int = 1; in dp83902a_TxEvent()
533 } else if (dp->tx2) { in dp83902a_TxEvent()
534 dp83902a_start_xmit(dp->tx2, dp->tx2_len); in dp83902a_TxEvent()
535 dp->tx_int = 2; in dp83902a_TxEvent()
537 dp->tx_int = 0; in dp83902a_TxEvent()
550 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_ClearCounters() local
551 u8 *base = dp->base; in dp83902a_ClearCounters()
567 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *)&nic; in dp83902a_Overflow() local
568 u8 *base = dp->base; in dp83902a_Overflow()
600 if (dp->tx_started && !(isr & (DP_ISR_TxP|DP_ISR_TxE))) { in dp83902a_Overflow()
608 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_poll() local
609 u8 *base = dp->base; in dp83902a_poll()
637 if (!dp->running) break; /* Is this necessary? */ in dp83902a_poll()
642 if (isr & (DP_ISR_TxP|DP_ISR_TxE) && dp->tx_started) { in dp83902a_poll()