diff options
Diffstat (limited to 'drivers/net/tulip/de4x5.c')
-rw-r--r-- | drivers/net/tulip/de4x5.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 4b3cd3d8b62a..62143f92c231 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -1160,7 +1160,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) | |||
1160 | sprintf(lp->adapter_name,"%s (%s)", name, gendev->bus_id); | 1160 | sprintf(lp->adapter_name,"%s (%s)", name, gendev->bus_id); |
1161 | 1161 | ||
1162 | lp->dma_size = (NUM_RX_DESC + NUM_TX_DESC) * sizeof(struct de4x5_desc); | 1162 | lp->dma_size = (NUM_RX_DESC + NUM_TX_DESC) * sizeof(struct de4x5_desc); |
1163 | #if defined(__alpha__) || defined(__powerpc__) || defined(__sparc_v9__) || defined(DE4X5_DO_MEMCPY) | 1163 | #if defined(__alpha__) || defined(__powerpc__) || defined(CONFIG_SPARC) || defined(DE4X5_DO_MEMCPY) |
1164 | lp->dma_size += RX_BUFF_SZ * NUM_RX_DESC + DE4X5_ALIGN; | 1164 | lp->dma_size += RX_BUFF_SZ * NUM_RX_DESC + DE4X5_ALIGN; |
1165 | #endif | 1165 | #endif |
1166 | lp->rx_ring = dma_alloc_coherent(gendev, lp->dma_size, | 1166 | lp->rx_ring = dma_alloc_coherent(gendev, lp->dma_size, |
@@ -1175,7 +1175,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) | |||
1175 | ** Set up the RX descriptor ring (Intels) | 1175 | ** Set up the RX descriptor ring (Intels) |
1176 | ** Allocate contiguous receive buffers, long word aligned (Alphas) | 1176 | ** Allocate contiguous receive buffers, long word aligned (Alphas) |
1177 | */ | 1177 | */ |
1178 | #if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sparc_v9__) && !defined(DE4X5_DO_MEMCPY) | 1178 | #if !defined(__alpha__) && !defined(__powerpc__) && !defined(CONFIG_SPARC) && !defined(DE4X5_DO_MEMCPY) |
1179 | for (i=0; i<NUM_RX_DESC; i++) { | 1179 | for (i=0; i<NUM_RX_DESC; i++) { |
1180 | lp->rx_ring[i].status = 0; | 1180 | lp->rx_ring[i].status = 0; |
1181 | lp->rx_ring[i].des1 = cpu_to_le32(RX_BUFF_SZ); | 1181 | lp->rx_ring[i].des1 = cpu_to_le32(RX_BUFF_SZ); |
@@ -1252,11 +1252,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) | |||
1252 | mii_get_phy(dev); | 1252 | mii_get_phy(dev); |
1253 | } | 1253 | } |
1254 | 1254 | ||
1255 | #ifndef __sparc_v9__ | ||
1256 | printk(" and requires IRQ%d (provided by %s).\n", dev->irq, | 1255 | printk(" and requires IRQ%d (provided by %s).\n", dev->irq, |
1257 | #else | ||
1258 | printk(" and requires IRQ%x (provided by %s).\n", dev->irq, | ||
1259 | #endif | ||
1260 | ((lp->bus == PCI) ? "PCI BIOS" : "EISA CNFG")); | 1256 | ((lp->bus == PCI) ? "PCI BIOS" : "EISA CNFG")); |
1261 | } | 1257 | } |
1262 | 1258 | ||
@@ -3627,14 +3623,13 @@ de4x5_alloc_rx_buff(struct net_device *dev, int index, int len) | |||
3627 | struct de4x5_private *lp = netdev_priv(dev); | 3623 | struct de4x5_private *lp = netdev_priv(dev); |
3628 | struct sk_buff *p; | 3624 | struct sk_buff *p; |
3629 | 3625 | ||
3630 | #if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sparc_v9__) && !defined(DE4X5_DO_MEMCPY) | 3626 | #if !defined(__alpha__) && !defined(__powerpc__) && !defined(CONFIG_SPARC) && !defined(DE4X5_DO_MEMCPY) |
3631 | struct sk_buff *ret; | 3627 | struct sk_buff *ret; |
3632 | u_long i=0, tmp; | 3628 | u_long i=0, tmp; |
3633 | 3629 | ||
3634 | p = dev_alloc_skb(IEEE802_3_SZ + DE4X5_ALIGN + 2); | 3630 | p = dev_alloc_skb(IEEE802_3_SZ + DE4X5_ALIGN + 2); |
3635 | if (!p) return NULL; | 3631 | if (!p) return NULL; |
3636 | 3632 | ||
3637 | p->dev = dev; | ||
3638 | tmp = virt_to_bus(p->data); | 3633 | tmp = virt_to_bus(p->data); |
3639 | i = ((tmp + DE4X5_ALIGN) & ~DE4X5_ALIGN) - tmp; | 3634 | i = ((tmp + DE4X5_ALIGN) & ~DE4X5_ALIGN) - tmp; |
3640 | skb_reserve(p, i); | 3635 | skb_reserve(p, i); |
@@ -3655,7 +3650,6 @@ de4x5_alloc_rx_buff(struct net_device *dev, int index, int len) | |||
3655 | p = dev_alloc_skb(len + 2); | 3650 | p = dev_alloc_skb(len + 2); |
3656 | if (!p) return NULL; | 3651 | if (!p) return NULL; |
3657 | 3652 | ||
3658 | p->dev = dev; | ||
3659 | skb_reserve(p, 2); /* Align */ | 3653 | skb_reserve(p, 2); /* Align */ |
3660 | if (index < lp->rx_old) { /* Wrapped buffer */ | 3654 | if (index < lp->rx_old) { /* Wrapped buffer */ |
3661 | short tlen = (lp->rxRingSize - lp->rx_old) * RX_BUFF_SZ; | 3655 | short tlen = (lp->rxRingSize - lp->rx_old) * RX_BUFF_SZ; |