linux-mips-fnet
[Top] [All Lists]

Diff for Lance for PMAD card (still doesn't work)

To: linux-mips@fnet.fr
Subject: Diff for Lance for PMAD card (still doesn't work)
From: Dave Airlie <airlied@csn.ul.ie>
Date: Tue, 20 Apr 1999 12:42:33 +0100 (IST)
Hi,
        I've attached a diff that gets the PMAD card in my DS 5000/200 to
avoid crashing, the memory scheme for the PMAD and DS5000/200 use a
contiguous block so memcpy can be used, (netbsd use their bcopy),

This doesn't get the card working properly, but the diff is needed to stop
a null pointer dereference, the card still doesn't put anything on the
wire or get anything from it...

So has anyone any ideas where to go from here, I'm a bit dodgy about the
init_block gap schemes and how necessary it is on the DS5000_200
architecture, I may play around with moving some gaps ..

Dave.

------------ David Airlie, David.Airlie@ul.ie,airlied@skynet --------
Telecommunications Research Centre, ECE Dept, University of Limerick \
http://www.csn.ul.ie/~airlied   -- Telecommunications Researcher      \
--- TEL: +353-61-202695 -----------------------------------------------
339c339,342
<       if (type == PMAX_LANCE) {
---
>       if (type == PMAD_LANCE) {
>         memcpy(to, from, len);
>       } 
>       else if (type == PMAX_LANCE) {
393c396,398
<       if (type == PMAX_LANCE) {
---
>       if (type == PMAD_LANCE) {
>         memcpy(to, from, len);          
>       } else if (type == PMAX_LANCE) {
1089a1095,1116
> 
>               /*
>                * setup the pointer arrays, this sucks [tm] :-(
>                */
>               for (i = 0; i < RX_RING_SIZE; i++) {
>                 lp->rx_buf_ptr_cpu[i] = 
>                   (char *) (dev->mem_start + BUF_OFFSET_CPU
>                             + 2 * i * RX_BUFF_SIZE);
>                 lp->rx_buf_ptr_lnc[i] = 
>                   (char *) (BUF_OFFSET_LNC
>                             + i * RX_BUFF_SIZE);
>               }
>               for (i = 0; i < TX_RING_SIZE; i++) {
>                 lp->tx_buf_ptr_cpu[i] = 
>                   (char *) (dev->mem_start + BUF_OFFSET_CPU
>                             + 2 * RX_RING_SIZE * RX_BUFF_SIZE
>                             + 2 * i * TX_BUFF_SIZE);
>                 lp->tx_buf_ptr_lnc[i] = 
>                   (char *) (BUF_OFFSET_LNC
>                             + RX_RING_SIZE * RX_BUFF_SIZE
>                             + i * TX_BUFF_SIZE);
>               }
<Prev in Thread] Current Thread [Next in Thread>