pcnet_cs compile fixes
PATCH 1/1 pcnet_cs compile fixes
This patch makes pcnet_cs compile again (removal of dev->rmem_start and dev->rmem_end).
It compiles and works for me as intended, but maybe there is a cleaner fix by someone who understands better the netdevice internals...
===== drivers/net/pcmcia/pcnet_cs.c 1.7 vs edited =====
drivers/net/pcmcia/pcnet_cs.c +8 -7
@@ -1460,7 +1460,8 @@struct e8390_pkt_hdr *hdr, int ring_page) { - void *xfer_start = (void *)(dev->rmem_start + (ring_page << 8) + void *xfer_start = (void *)(dev->mem_start + (TX_PAGES<<8) + + (ring_page <<8 ) - (ei_status.rx_start_page <<8 ));copyin ((void *)hdr, xfer_start,sizeof (struct e8390_pkt_hdr ));
@@ -1473,17 +1474,18 @@static void shmem_block_input (struct net_device *dev,int count,struct sk_buff *skb,int ring_offset) { -void *xfer_start = (void *)(dev->rmem_start + ring_offset +void *xfer_start = (void *)(dev->mem_start + (TX_PAGES <<8 ) + + ring_offset - (ei_status.rx_start_page <<8 ));char *buf = skb->data; -if (xfer_start + count > (void *)dev->rmem_end) { +if (xfer_start + count > (void *)dev->mem_end) {/* We must wrap the input move. */ -int semi_count = (void *)dev->rmem_end - xfer_start; +int semi_count = (void *)dev->mem_end - xfer_start;copyin (buf, xfer_start, semi_count); buf += semi_count; ring_offset = ei_status.rx_start_page <<8 ; - xfer_start = (void *)dev->rmem_start; + xfer_start = (void *)dev->mem_start + (TX_PAGES <<8 ); count -= semi_count; }copyin (buf, xfer_start, count);
@@ -1548,8 +1550,7 @@ } dev->mem_start = (u_long )info->base + offset; - dev->rmem_start = dev->mem_start + (TX_PAGES <<8 ); - dev->mem_end = dev->rmem_end = (u_long )info->base + req.Size; + dev->mem_end = (u_long )info->base + req.Size; ei_status.tx_start_page = start_pg; ei_status.rx_start_page = start_pg +TX_PAGES ;
Signature · 2 lines
Stelian Pop <[email protected]> Alcove - http://www.alcove.com
Quoted 11 lines · Stelian Pop
This patch makes
pcnet_cscompile again (removal ofdev->rmem_startanddev->rmem_end).It compiles and works for me as intended, but maybe there is a cleaner fix by someone who understands better the netdevice internals...
=====
drivers/net/pcmcia/pcnet_cs.c1.7 vs edited =====
drivers/net/pcmcia/pcnet_cs.c line 1465
Quoted 7 lines
drivers/net/pcmcia/pcnet_cs.c +2
-1@@ -1460,7 +1460,8 @@struct e8390_pkt_hdr *hdr, int ring_page) { - void *xfer_start = (void *)(dev->rmem_start + (ring_page << 8) + void *xfer_start = (void *)(dev->mem_start + (TX_PAGES<<8) + + (ring_page <<8 ) - (ei_status.rx_start_page <<8 ));
the earlier poster was more correct: don't remove rmem_start, replacing it with ei_status.rmem_{start,end}
Anyway, this patch is long completed already, and sent to Linus already.
Jeff