tag | line | file | source code |
zn | 132 | drivers/net/znet.c | static struct znet_private zn; |
zn | 244 | drivers/net/znet.c | dev->priv = (void *) &zn; |
zn | 245 | drivers/net/znet.c | zn.rx_dma = netinfo->dma1; |
zn | 246 | drivers/net/znet.c | zn.tx_dma = netinfo->dma2; |
zn | 250 | drivers/net/znet.c | || request_dma(zn.rx_dma,"ZNet rx") |
zn | 251 | drivers/net/znet.c | || request_dma(zn.tx_dma,"ZNet tx")) { |
zn | 260 | drivers/net/znet.c | zn.rx_start = dma_buffer1; |
zn | 262 | drivers/net/znet.c | zn.rx_start = dma_buffer2; |
zn | 265 | drivers/net/znet.c | zn.tx_start = dma_buffer3; |
zn | 267 | drivers/net/znet.c | zn.tx_start = dma_buffer2; |
zn | 268 | drivers/net/znet.c | zn.rx_end = zn.rx_start + RX_BUF_SIZE/2; |
zn | 269 | drivers/net/znet.c | zn.tx_buf_len = TX_BUF_SIZE/2; |
zn | 270 | drivers/net/znet.c | zn.tx_end = zn.tx_start + zn.tx_buf_len; |
zn | 362 | drivers/net/znet.c | ushort *tx_link = zn.tx_cur - 1; |
zn | 366 | drivers/net/znet.c | short dma_port = ((zn.tx_dma&3)<<2) + IO_DMA2_BASE; |
zn | 370 | drivers/net/znet.c | if (((int)zn.tx_cur & 0x1ffff) != addr) |
zn | 372 | drivers/net/znet.c | (int)zn.tx_cur & 0xffff, addr); |
zn | 373 | drivers/net/znet.c | zn.tx_cur = (ushort *)(((int)zn.tx_cur & 0xfe0000) | addr); |
zn | 376 | drivers/net/znet.c | if (zn.tx_cur >= zn.tx_end) |
zn | 377 | drivers/net/znet.c | zn.tx_cur = zn.tx_start; |
zn | 378 | drivers/net/znet.c | *zn.tx_cur++ = length; |
zn | 379 | drivers/net/znet.c | if (zn.tx_cur + rnd_len + 1 > zn.tx_end) { |
zn | 380 | drivers/net/znet.c | int semi_cnt = (zn.tx_end - zn.tx_cur)<<1; /* Cvrt to byte cnt. */ |
zn | 381 | drivers/net/znet.c | memcpy(zn.tx_cur, buf, semi_cnt); |
zn | 383 | drivers/net/znet.c | memcpy(zn.tx_start, buf + semi_cnt, length - semi_cnt); |
zn | 384 | drivers/net/znet.c | zn.tx_cur = zn.tx_start + rnd_len; |
zn | 386 | drivers/net/znet.c | memcpy(zn.tx_cur, buf, skb->len); |
zn | 387 | drivers/net/znet.c | zn.tx_cur += rnd_len; |
zn | 389 | drivers/net/znet.c | *zn.tx_cur++ = 0; |
zn | 482 | drivers/net/znet.c | if (cur_frame_end_offset == zn.rx_cur - zn.rx_start) { |
zn | 492 | drivers/net/znet.c | while (zn.rx_start + cur_frame_end_offset != zn.rx_cur |
zn | 501 | drivers/net/znet.c | memcpy(zn.rx_end, zn.rx_start, 8); |
zn | 504 | drivers/net/znet.c | cur_frame_end = zn.rx_start + cur_frame_end_offset - 4; |
zn | 529 | drivers/net/znet.c | ushort *this_rfp_ptr = zn.rx_start + next_frame_end_offset; |
zn | 560 | drivers/net/znet.c | if (&zn.rx_cur[(pkt_len+1)>>1] > zn.rx_end) { |
zn | 561 | drivers/net/znet.c | int semi_cnt = (zn.rx_end - zn.rx_cur)<<1; |
zn | 562 | drivers/net/znet.c | memcpy(skb_put(skb,semi_cnt), zn.rx_cur, semi_cnt); |
zn | 563 | drivers/net/znet.c | memcpy(skb_put(skb,pkt_len-semi_cnt), zn.rx_start, |
zn | 566 | drivers/net/znet.c | memcpy(skb_put(skb,pkt_len), zn.rx_cur, pkt_len); |
zn | 577 | drivers/net/znet.c | zn.rx_cur = this_rfp_ptr; |
zn | 578 | drivers/net/znet.c | if (zn.rx_cur >= zn.rx_end) |
zn | 579 | drivers/net/znet.c | zn.rx_cur -= RX_BUF_SIZE/2; |
zn | 580 | drivers/net/znet.c | update_stop_hit(ioaddr, (zn.rx_cur - zn.rx_start)<<1); |
zn | 584 | drivers/net/znet.c | this_rfp_ptr = zn.rx_start + next_frame_end_offset; |
zn | 603 | drivers/net/znet.c | disable_dma(zn.rx_dma); |
zn | 604 | drivers/net/znet.c | disable_dma(zn.tx_dma); |
zn | 655 | drivers/net/znet.c | *zn.tx_cur++ = sizeof(i593_init); |
zn | 656 | drivers/net/znet.c | memcpy(zn.tx_cur, i593_init, sizeof(i593_init)); |
zn | 657 | drivers/net/znet.c | zn.tx_cur += sizeof(i593_init)/2; |
zn | 662 | drivers/net/znet.c | *zn.tx_cur++ = addrs_len; |
zn | 663 | drivers/net/znet.c | memcpy(zn.tx_cur, addrs, addrs_len); |
zn | 665 | drivers/net/znet.c | zn.tx_cur += addrs_len>>1; |
zn | 673 | drivers/net/znet.c | short dma_port = ((zn.tx_dma&3)<<2) + IO_DMA2_BASE; |
zn | 676 | drivers/net/znet.c | printk("Addr: %04x cnt:%3x...", addr<<1, get_dma_residue(zn.tx_dma)); |
zn | 685 | drivers/net/znet.c | zn.rx_cur = zn.rx_start; |
zn | 686 | drivers/net/znet.c | zn.tx_cur = zn.tx_start; |
zn | 692 | drivers/net/znet.c | disable_dma(zn.rx_dma); /* reset by an interrupting task. */ |
zn | 693 | drivers/net/znet.c | clear_dma_ff(zn.rx_dma); |
zn | 694 | drivers/net/znet.c | set_dma_mode(zn.rx_dma, DMA_RX_MODE); |
zn | 695 | drivers/net/znet.c | set_dma_addr(zn.rx_dma, (unsigned int) zn.rx_start); |
zn | 696 | drivers/net/znet.c | set_dma_count(zn.rx_dma, RX_BUF_SIZE); |
zn | 697 | drivers/net/znet.c | enable_dma(zn.rx_dma); |
zn | 699 | drivers/net/znet.c | disable_dma(zn.tx_dma); |
zn | 700 | drivers/net/znet.c | clear_dma_ff(zn.tx_dma); |
zn | 701 | drivers/net/znet.c | set_dma_mode(zn.tx_dma, DMA_TX_MODE); |
zn | 702 | drivers/net/znet.c | set_dma_addr(zn.tx_dma, (unsigned int) zn.tx_start); |
zn | 703 | drivers/net/znet.c | set_dma_count(zn.tx_dma, zn.tx_buf_len<<1); |
zn | 704 | drivers/net/znet.c | enable_dma(zn.tx_dma); |
zn | 709 | drivers/net/znet.c | zn.tx_start); |
zn | 712 | drivers/net/znet.c | *zn.tx_cur++ = 0; |
zn | 713 | drivers/net/znet.c | *zn.tx_cur++ = 0; |
zn | 716 | drivers/net/znet.c | *zn.tx_cur++ = sizeof(i593_init); |
zn | 717 | drivers/net/znet.c | memcpy(zn.tx_cur, i593_init, sizeof(i593_init)); |
zn | 718 | drivers/net/znet.c | zn.tx_cur += sizeof(i593_init)/2; |
zn | 721 | drivers/net/znet.c | *zn.tx_cur++ = 6; |
zn | 722 | drivers/net/znet.c | memcpy(zn.tx_cur, dev->dev_addr, 6); |
zn | 723 | drivers/net/znet.c | zn.tx_cur += 3; |