X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fmvme147.c;h=56a82d8ee8f52c4a88c4f8bfa257b2f7122d5cb2;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=5995658b18fba777778b801d3974d22685355484;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/net/mvme147.c b/drivers/net/mvme147.c index 5995658b1..56a82d8ee 100644 --- a/drivers/net/mvme147.c +++ b/drivers/net/mvme147.c @@ -18,7 +18,6 @@ /* Used for the temporal inet entries and routing */ #include #include -#include #include #include #include @@ -40,7 +39,6 @@ /* Our private data structure */ struct m147lance_private { struct lance_private lance; - void *base; unsigned long ram; }; @@ -51,9 +49,9 @@ struct m147lance_private { */ static int m147lance_open(struct net_device *dev); static int m147lance_close(struct net_device *dev); -static void m147lance_writerap(struct m147lance_private *lp, unsigned short value); -static void m147lance_writerdp(struct m147lance_private *lp, unsigned short value); -static unsigned short m147lance_readrdp(struct m147lance_private *lp); +static void m147lance_writerap(struct lance_private *lp, unsigned short value); +static void m147lance_writerdp(struct lance_private *lp, unsigned short value); +static unsigned short m147lance_readrdp(struct lance_private *lp); typedef void (*writerap_t)(void *, unsigned short); typedef void (*writerdp_t)(void *, unsigned short); @@ -122,7 +120,7 @@ struct net_device * __init mvme147lance_probe(int unit) } lp->lance.name = (char*)name; /* discards const, shut up gcc */ - lp->lance.ll = (struct lance_regs *)(dev->base_addr); + lp->lance.base = dev->base_addr; lp->lance.init_block = (struct lance_init_block *)(lp->ram); /* CPU addr */ lp->lance.lance_init_block = (struct lance_init_block *)(lp->ram); /* LANCE addr of same RAM */ lp->lance.busmaster_regval = LE_C3_BSWP; /* we're bigendian */ @@ -145,19 +143,19 @@ struct net_device * __init mvme147lance_probe(int unit) return dev; } -static void m147lance_writerap(struct m147lance_private *lp, unsigned short value) +static void m147lance_writerap(struct lance_private *lp, unsigned short value) { - lp->lance.ll->rap = value; + out_be16(lp->base + LANCE_RAP, value); } -static void m147lance_writerdp(struct m147lance_private *lp, unsigned short value) +static void m147lance_writerdp(struct lance_private *lp, unsigned short value) { - lp->lance.ll->rdp = value; + out_be16(lp->base + LANCE_RDP, value); } -static unsigned short m147lance_readrdp(struct m147lance_private *lp) +static unsigned short m147lance_readrdp(struct lance_private *lp) { - return lp->lance.ll->rdp; + return in_be16(lp->base + LANCE_RDP); } static int m147lance_open(struct net_device *dev)