aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
author <jgarzik@pretzel.yyz.us>2005-06-04 17:07:40 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-04 17:07:40 -0400
commit105adfc63f921a9976c5abc4ff079e9fec197ed7 (patch)
tree0f1360ea40543ebaa3f93451d18b1333a403cbdd /drivers/net
parent7f6a57a907c8655e78a654ab62da86e61ef7f2c9 (diff)
parent99417769bae55d34348320d7a05615e8a891fd3d (diff)
Automatic merge of /spare/repo/netdev-2.6 branch viro
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/arm/etherh.c16
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c17
2 files changed, 18 insertions, 15 deletions
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c
index 942a2819576c..2e28c201dcc0 100644
--- a/drivers/net/arm/etherh.c
+++ b/drivers/net/arm/etherh.c
@@ -68,6 +68,7 @@ struct etherh_priv {
68 void __iomem *dma_base; 68 void __iomem *dma_base;
69 unsigned int id; 69 unsigned int id;
70 void __iomem *ctrl_port; 70 void __iomem *ctrl_port;
71 void __iomem *base;
71 unsigned char ctrl; 72 unsigned char ctrl;
72 u32 supported; 73 u32 supported;
73}; 74};
@@ -177,7 +178,7 @@ etherh_setif(struct net_device *dev)
177 switch (etherh_priv(dev)->id) { 178 switch (etherh_priv(dev)->id) {
178 case PROD_I3_ETHERLAN600: 179 case PROD_I3_ETHERLAN600:
179 case PROD_I3_ETHERLAN600A: 180 case PROD_I3_ETHERLAN600A:
180 addr = (void *)dev->base_addr + EN0_RCNTHI; 181 addr = etherh_priv(dev)->base + EN0_RCNTHI;
181 182
182 switch (dev->if_port) { 183 switch (dev->if_port) {
183 case IF_PORT_10BASE2: 184 case IF_PORT_10BASE2:
@@ -218,7 +219,7 @@ etherh_getifstat(struct net_device *dev)
218 switch (etherh_priv(dev)->id) { 219 switch (etherh_priv(dev)->id) {
219 case PROD_I3_ETHERLAN600: 220 case PROD_I3_ETHERLAN600:
220 case PROD_I3_ETHERLAN600A: 221 case PROD_I3_ETHERLAN600A:
221 addr = (void *)dev->base_addr + EN0_RCNTHI; 222 addr = etherh_priv(dev)->base + EN0_RCNTHI;
222 switch (dev->if_port) { 223 switch (dev->if_port) {
223 case IF_PORT_10BASE2: 224 case IF_PORT_10BASE2:
224 stat = 1; 225 stat = 1;
@@ -281,7 +282,7 @@ static void
281etherh_reset(struct net_device *dev) 282etherh_reset(struct net_device *dev)
282{ 283{
283 struct ei_device *ei_local = netdev_priv(dev); 284 struct ei_device *ei_local = netdev_priv(dev);
284 void __iomem *addr = (void *)dev->base_addr; 285 void __iomem *addr = etherh_priv(dev)->base;
285 286
286 writeb(E8390_NODMA+E8390_PAGE0+E8390_STOP, addr); 287 writeb(E8390_NODMA+E8390_PAGE0+E8390_STOP, addr);
287 288
@@ -327,7 +328,7 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf
327 328
328 ei_local->dmaing = 1; 329 ei_local->dmaing = 1;
329 330
330 addr = (void *)dev->base_addr; 331 addr = etherh_priv(dev)->base;
331 dma_base = etherh_priv(dev)->dma_base; 332 dma_base = etherh_priv(dev)->dma_base;
332 333
333 count = (count + 1) & ~1; 334 count = (count + 1) & ~1;
@@ -387,7 +388,7 @@ etherh_block_input (struct net_device *dev, int count, struct sk_buff *skb, int
387 388
388 ei_local->dmaing = 1; 389 ei_local->dmaing = 1;
389 390
390 addr = (void *)dev->base_addr; 391 addr = etherh_priv(dev)->base;
391 dma_base = etherh_priv(dev)->dma_base; 392 dma_base = etherh_priv(dev)->dma_base;
392 393
393 buf = skb->data; 394 buf = skb->data;
@@ -427,7 +428,7 @@ etherh_get_header (struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_p
427 428
428 ei_local->dmaing = 1; 429 ei_local->dmaing = 1;
429 430
430 addr = (void *)dev->base_addr; 431 addr = etherh_priv(dev)->base;
431 dma_base = etherh_priv(dev)->dma_base; 432 dma_base = etherh_priv(dev)->dma_base;
432 433
433 writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD); 434 writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD);
@@ -696,7 +697,8 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
696 eh->ctrl_port = eh->ioc_fast; 697 eh->ctrl_port = eh->ioc_fast;
697 } 698 }
698 699
699 dev->base_addr = (unsigned long)eh->memc + data->ns8390_offset; 700 eh->base = eh->memc + data->ns8390_offset;
701 dev->base_addr = (unsigned long)eh->base;
700 eh->dma_base = eh->memc + data->dataport_offset; 702 eh->dma_base = eh->memc + data->dataport_offset;
701 eh->ctrl_port += data->ctrlport_offset; 703 eh->ctrl_port += data->ctrlport_offset;
702 704
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index b0126304ca08..181b6ed55003 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -1537,20 +1537,20 @@ static void shmem_get_8390_hdr(struct net_device *dev,
1537static void shmem_block_input(struct net_device *dev, int count, 1537static void shmem_block_input(struct net_device *dev, int count,
1538 struct sk_buff *skb, int ring_offset) 1538 struct sk_buff *skb, int ring_offset)
1539{ 1539{
1540 void __iomem *xfer_start = ei_status.mem + (TX_PAGES<<8) 1540 void __iomem *base = ei_status.mem;
1541 + ring_offset 1541 unsigned long offset = (TX_PAGES<<8) + ring_offset
1542 - (ei_status.rx_start_page << 8); 1542 - (ei_status.rx_start_page << 8);
1543 char *buf = skb->data; 1543 char *buf = skb->data;
1544 1544
1545 if (xfer_start + count > (void __iomem *)ei_status.rmem_end) { 1545 if (offset + count > ei_status.priv) {
1546 /* We must wrap the input move. */ 1546 /* We must wrap the input move. */
1547 int semi_count = (void __iomem *)ei_status.rmem_end - xfer_start; 1547 int semi_count = ei_status.priv - offset;
1548 copyin(buf, xfer_start, semi_count); 1548 copyin(buf, base + offset, semi_count);
1549 buf += semi_count; 1549 buf += semi_count;
1550 xfer_start = ei_status.mem + (TX_PAGES<<8); 1550 offset = TX_PAGES<<8;
1551 count -= semi_count; 1551 count -= semi_count;
1552 } 1552 }
1553 copyin(buf, xfer_start, count); 1553 copyin(buf, base + offset, count);
1554} 1554}
1555 1555
1556/*====================================================================*/ 1556/*====================================================================*/
@@ -1611,8 +1611,9 @@ static int setup_shmem_window(dev_link_t *link, int start_pg,
1611 } 1611 }
1612 1612
1613 ei_status.mem = info->base + offset; 1613 ei_status.mem = info->base + offset;
1614 ei_status.priv = req.Size;
1614 dev->mem_start = (u_long)ei_status.mem; 1615 dev->mem_start = (u_long)ei_status.mem;
1615 dev->mem_end = ei_status.rmem_end = (u_long)info->base + req.Size; 1616 dev->mem_end = dev->mem_start + req.Size;
1616 1617
1617 ei_status.tx_start_page = start_pg; 1618 ei_status.tx_start_page = start_pg;
1618 ei_status.rx_start_page = start_pg + TX_PAGES; 1619 ei_status.rx_start_page = start_pg + TX_PAGES;