diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 14:17:05 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 14:17:05 -0500 |
commit | 70c07e02625ec46d0ffbfce1acef42d660803528 (patch) | |
tree | f500f1a4f93e72747fb08b0eefabb167dcdc5db9 /drivers/net/hp100.c | |
parent | 5d1769ac3d0ea5ff3a286b097c21faaf6a9e6859 (diff) | |
parent | 2746b8623abce815aaae7afc946b1b39f8436f5a (diff) |
Merge branch 'viro'
Diffstat (limited to 'drivers/net/hp100.c')
-rw-r--r-- | drivers/net/hp100.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index a37b82ebca37..247c8ca86033 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
@@ -1719,17 +1719,10 @@ static int hp100_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1719 | hp100_outw(i, FRAGMENT_LEN); /* and first/only fragment length */ | 1719 | hp100_outw(i, FRAGMENT_LEN); /* and first/only fragment length */ |
1720 | 1720 | ||
1721 | if (lp->mode == 2) { /* memory mapped */ | 1721 | if (lp->mode == 2) { /* memory mapped */ |
1722 | if (lp->mem_ptr_virt) { /* high pci memory was remapped */ | 1722 | /* Note: The J2585B needs alignment to 32bits here! */ |
1723 | /* Note: The J2585B needs alignment to 32bits here! */ | 1723 | memcpy_toio(lp->mem_ptr_virt, skb->data, (skb->len + 3) & ~3); |
1724 | memcpy_toio(lp->mem_ptr_virt, skb->data, (skb->len + 3) & ~3); | 1724 | if (!ok_flag) |
1725 | if (!ok_flag) | 1725 | memset_io(lp->mem_ptr_virt, 0, HP100_MIN_PACKET_SIZE - skb->len); |
1726 | memset_io(lp->mem_ptr_virt, 0, HP100_MIN_PACKET_SIZE - skb->len); | ||
1727 | } else { | ||
1728 | /* Note: The J2585B needs alignment to 32bits here! */ | ||
1729 | isa_memcpy_toio(lp->mem_ptr_phys, skb->data, (skb->len + 3) & ~3); | ||
1730 | if (!ok_flag) | ||
1731 | isa_memset_io(lp->mem_ptr_phys, 0, HP100_MIN_PACKET_SIZE - skb->len); | ||
1732 | } | ||
1733 | } else { /* programmed i/o */ | 1726 | } else { /* programmed i/o */ |
1734 | outsl(ioaddr + HP100_REG_DATA32, skb->data, | 1727 | outsl(ioaddr + HP100_REG_DATA32, skb->data, |
1735 | (skb->len + 3) >> 2); | 1728 | (skb->len + 3) >> 2); |
@@ -1799,10 +1792,7 @@ static void hp100_rx(struct net_device *dev) | |||
1799 | /* First we get the header, which contains information about the */ | 1792 | /* First we get the header, which contains information about the */ |
1800 | /* actual length of the received packet. */ | 1793 | /* actual length of the received packet. */ |
1801 | if (lp->mode == 2) { /* memory mapped mode */ | 1794 | if (lp->mode == 2) { /* memory mapped mode */ |
1802 | if (lp->mem_ptr_virt) /* if memory was remapped */ | 1795 | header = readl(lp->mem_ptr_virt); |
1803 | header = readl(lp->mem_ptr_virt); | ||
1804 | else | ||
1805 | header = isa_readl(lp->mem_ptr_phys); | ||
1806 | } else /* programmed i/o */ | 1796 | } else /* programmed i/o */ |
1807 | header = hp100_inl(DATA32); | 1797 | header = hp100_inl(DATA32); |
1808 | 1798 | ||
@@ -1834,13 +1824,9 @@ static void hp100_rx(struct net_device *dev) | |||
1834 | ptr = skb->data; | 1824 | ptr = skb->data; |
1835 | 1825 | ||
1836 | /* Now transfer the data from the card into that area */ | 1826 | /* Now transfer the data from the card into that area */ |
1837 | if (lp->mode == 2) { | 1827 | if (lp->mode == 2) |
1838 | if (lp->mem_ptr_virt) | 1828 | memcpy_fromio(ptr, lp->mem_ptr_virt,pkt_len); |
1839 | memcpy_fromio(ptr, lp->mem_ptr_virt,pkt_len); | 1829 | else /* io mapped */ |
1840 | /* Note alignment to 32bit transfers */ | ||
1841 | else | ||
1842 | isa_memcpy_fromio(ptr, lp->mem_ptr_phys, pkt_len); | ||
1843 | } else /* io mapped */ | ||
1844 | insl(ioaddr + HP100_REG_DATA32, ptr, pkt_len >> 2); | 1830 | insl(ioaddr + HP100_REG_DATA32, ptr, pkt_len >> 2); |
1845 | 1831 | ||
1846 | skb->protocol = eth_type_trans(skb, dev); | 1832 | skb->protocol = eth_type_trans(skb, dev); |