aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-26 17:11:03 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-26 17:11:03 -0400
commit8b0ee07e108b2eefdab5bb73f33223f18926c3b2 (patch)
treef68ca04180c5488301a40ec212ef2eb2467cf56c /drivers/net/pcmcia
parent4638aef40ba9ebb9734caeed1f373c24015259fd (diff)
parent8678887e7fb43cd6c9be6c9807b05e77848e0920 (diff)
Merge upstream (approx. 2.6.12-git8) into 'janitor' branch of netdev-2.6.
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r--drivers/net/pcmcia/3c574_cs.c3
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c17
2 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 41e517114807..c6e8b25f9685 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -1274,6 +1274,9 @@ static int el3_close(struct net_device *dev)
1274 spin_lock_irqsave(&lp->window_lock, flags); 1274 spin_lock_irqsave(&lp->window_lock, flags);
1275 update_stats(dev); 1275 update_stats(dev);
1276 spin_unlock_irqrestore(&lp->window_lock, flags); 1276 spin_unlock_irqrestore(&lp->window_lock, flags);
1277
1278 /* force interrupts off */
1279 outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD);
1277 } 1280 }
1278 1281
1279 link->open--; 1282 link->open--;
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;