diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-22 22:51:46 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-22 22:51:46 -0400 |
commit | dbe1ab9514c231c9b062140a107d9dea0eabefcc (patch) | |
tree | 0001c7143cf923fc704215f0a0e54221e9e5cbb9 /drivers/net | |
parent | 612eff0e3715a6faff5ba1b74873b99e036c59fe (diff) | |
parent | d588fcbe5a7ba8bba2cebf7799ab2d573717a806 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/3c59x.c | 5 | ||||
-rw-r--r-- | drivers/net/acenic.c | 6 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 20 | ||||
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 2 | ||||
-rw-r--r-- | drivers/net/smc91x.h | 44 | ||||
-rw-r--r-- | drivers/net/sunhme.c | 5 | ||||
-rw-r--r-- | drivers/net/sunlance.c | 2 |
7 files changed, 41 insertions, 43 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 274b0138d442..e27778926eba 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -1382,17 +1382,12 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1382 | for (i = 0; i < 6; i++) | 1382 | for (i = 0; i < 6; i++) |
1383 | iowrite8(dev->dev_addr[i], ioaddr + i); | 1383 | iowrite8(dev->dev_addr[i], ioaddr + i); |
1384 | 1384 | ||
1385 | #ifdef __sparc__ | ||
1386 | if (print_info) | ||
1387 | printk(", IRQ %s\n", __irq_itoa(dev->irq)); | ||
1388 | #else | ||
1389 | if (print_info) | 1385 | if (print_info) |
1390 | printk(", IRQ %d\n", dev->irq); | 1386 | printk(", IRQ %d\n", dev->irq); |
1391 | /* Tell them about an invalid IRQ. */ | 1387 | /* Tell them about an invalid IRQ. */ |
1392 | if (dev->irq <= 0 || dev->irq >= NR_IRQS) | 1388 | if (dev->irq <= 0 || dev->irq >= NR_IRQS) |
1393 | printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", | 1389 | printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", |
1394 | dev->irq); | 1390 | dev->irq); |
1395 | #endif | ||
1396 | 1391 | ||
1397 | EL3WINDOW(4); | 1392 | EL3WINDOW(4); |
1398 | step = (ioread8(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; | 1393 | step = (ioread8(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; |
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index b508812e97ac..23ff22ba5d31 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
@@ -579,11 +579,7 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev, | |||
579 | } | 579 | } |
580 | 580 | ||
581 | printk("Gigabit Ethernet at 0x%08lx, ", dev->base_addr); | 581 | printk("Gigabit Ethernet at 0x%08lx, ", dev->base_addr); |
582 | #ifdef __sparc__ | 582 | printk("irq %d\n", pdev->irq); |
583 | printk("irq %s\n", __irq_itoa(pdev->irq)); | ||
584 | #else | ||
585 | printk("irq %i\n", pdev->irq); | ||
586 | #endif | ||
587 | 583 | ||
588 | #ifdef CONFIG_ACENIC_OMIT_TIGON_I | 584 | #ifdef CONFIG_ACENIC_OMIT_TIGON_I |
589 | if ((readl(&ap->regs->HostCtrl) >> 28) == 4) { | 585 | if ((readl(&ap->regs->HostCtrl) >> 28) == 4) { |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 04a53f1dfdbd..62b38a4494b8 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2991,13 +2991,13 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
2991 | netif_carrier_off(dev); | 2991 | netif_carrier_off(dev); |
2992 | if (netif_running(dev)) { | 2992 | if (netif_running(dev)) { |
2993 | nv_disable_irq(dev); | 2993 | nv_disable_irq(dev); |
2994 | spin_lock_bh(&dev->xmit_lock); | 2994 | netif_tx_lock_bh(dev); |
2995 | spin_lock(&np->lock); | 2995 | spin_lock(&np->lock); |
2996 | /* stop engines */ | 2996 | /* stop engines */ |
2997 | nv_stop_rx(dev); | 2997 | nv_stop_rx(dev); |
2998 | nv_stop_tx(dev); | 2998 | nv_stop_tx(dev); |
2999 | spin_unlock(&np->lock); | 2999 | spin_unlock(&np->lock); |
3000 | spin_unlock_bh(&dev->xmit_lock); | 3000 | netif_tx_unlock_bh(dev); |
3001 | } | 3001 | } |
3002 | 3002 | ||
3003 | if (ecmd->autoneg == AUTONEG_ENABLE) { | 3003 | if (ecmd->autoneg == AUTONEG_ENABLE) { |
@@ -3131,13 +3131,13 @@ static int nv_nway_reset(struct net_device *dev) | |||
3131 | netif_carrier_off(dev); | 3131 | netif_carrier_off(dev); |
3132 | if (netif_running(dev)) { | 3132 | if (netif_running(dev)) { |
3133 | nv_disable_irq(dev); | 3133 | nv_disable_irq(dev); |
3134 | spin_lock_bh(&dev->xmit_lock); | 3134 | netif_tx_lock_bh(dev); |
3135 | spin_lock(&np->lock); | 3135 | spin_lock(&np->lock); |
3136 | /* stop engines */ | 3136 | /* stop engines */ |
3137 | nv_stop_rx(dev); | 3137 | nv_stop_rx(dev); |
3138 | nv_stop_tx(dev); | 3138 | nv_stop_tx(dev); |
3139 | spin_unlock(&np->lock); | 3139 | spin_unlock(&np->lock); |
3140 | spin_unlock_bh(&dev->xmit_lock); | 3140 | netif_tx_unlock_bh(dev); |
3141 | printk(KERN_INFO "%s: link down.\n", dev->name); | 3141 | printk(KERN_INFO "%s: link down.\n", dev->name); |
3142 | } | 3142 | } |
3143 | 3143 | ||
@@ -3244,7 +3244,7 @@ static int nv_set_ringparam(struct net_device *dev, struct ethtool_ringparam* ri | |||
3244 | 3244 | ||
3245 | if (netif_running(dev)) { | 3245 | if (netif_running(dev)) { |
3246 | nv_disable_irq(dev); | 3246 | nv_disable_irq(dev); |
3247 | spin_lock_bh(&dev->xmit_lock); | 3247 | netif_tx_lock_bh(dev); |
3248 | spin_lock(&np->lock); | 3248 | spin_lock(&np->lock); |
3249 | /* stop engines */ | 3249 | /* stop engines */ |
3250 | nv_stop_rx(dev); | 3250 | nv_stop_rx(dev); |
@@ -3303,7 +3303,7 @@ static int nv_set_ringparam(struct net_device *dev, struct ethtool_ringparam* ri | |||
3303 | nv_start_rx(dev); | 3303 | nv_start_rx(dev); |
3304 | nv_start_tx(dev); | 3304 | nv_start_tx(dev); |
3305 | spin_unlock(&np->lock); | 3305 | spin_unlock(&np->lock); |
3306 | spin_unlock_bh(&dev->xmit_lock); | 3306 | netif_tx_unlock_bh(dev); |
3307 | nv_enable_irq(dev); | 3307 | nv_enable_irq(dev); |
3308 | } | 3308 | } |
3309 | return 0; | 3309 | return 0; |
@@ -3339,13 +3339,13 @@ static int nv_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam* | |||
3339 | netif_carrier_off(dev); | 3339 | netif_carrier_off(dev); |
3340 | if (netif_running(dev)) { | 3340 | if (netif_running(dev)) { |
3341 | nv_disable_irq(dev); | 3341 | nv_disable_irq(dev); |
3342 | spin_lock_bh(&dev->xmit_lock); | 3342 | netif_tx_lock_bh(dev); |
3343 | spin_lock(&np->lock); | 3343 | spin_lock(&np->lock); |
3344 | /* stop engines */ | 3344 | /* stop engines */ |
3345 | nv_stop_rx(dev); | 3345 | nv_stop_rx(dev); |
3346 | nv_stop_tx(dev); | 3346 | nv_stop_tx(dev); |
3347 | spin_unlock(&np->lock); | 3347 | spin_unlock(&np->lock); |
3348 | spin_unlock_bh(&dev->xmit_lock); | 3348 | netif_tx_unlock_bh(dev); |
3349 | } | 3349 | } |
3350 | 3350 | ||
3351 | np->pause_flags &= ~(NV_PAUSEFRAME_RX_REQ|NV_PAUSEFRAME_TX_REQ); | 3351 | np->pause_flags &= ~(NV_PAUSEFRAME_RX_REQ|NV_PAUSEFRAME_TX_REQ); |
@@ -3729,7 +3729,7 @@ static void nv_self_test(struct net_device *dev, struct ethtool_test *test, u64 | |||
3729 | if (test->flags & ETH_TEST_FL_OFFLINE) { | 3729 | if (test->flags & ETH_TEST_FL_OFFLINE) { |
3730 | if (netif_running(dev)) { | 3730 | if (netif_running(dev)) { |
3731 | netif_stop_queue(dev); | 3731 | netif_stop_queue(dev); |
3732 | spin_lock_bh(&dev->xmit_lock); | 3732 | netif_tx_lock_bh(dev); |
3733 | spin_lock_irq(&np->lock); | 3733 | spin_lock_irq(&np->lock); |
3734 | nv_disable_hw_interrupts(dev, np->irqmask); | 3734 | nv_disable_hw_interrupts(dev, np->irqmask); |
3735 | if (!(np->msi_flags & NV_MSI_X_ENABLED)) { | 3735 | if (!(np->msi_flags & NV_MSI_X_ENABLED)) { |
@@ -3745,7 +3745,7 @@ static void nv_self_test(struct net_device *dev, struct ethtool_test *test, u64 | |||
3745 | nv_drain_rx(dev); | 3745 | nv_drain_rx(dev); |
3746 | nv_drain_tx(dev); | 3746 | nv_drain_tx(dev); |
3747 | spin_unlock_irq(&np->lock); | 3747 | spin_unlock_irq(&np->lock); |
3748 | spin_unlock_bh(&dev->xmit_lock); | 3748 | netif_tx_unlock_bh(dev); |
3749 | } | 3749 | } |
3750 | 3750 | ||
3751 | if (!nv_register_test(dev)) { | 3751 | if (!nv_register_test(dev)) { |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index e1feb58bd661..1a2b9785e998 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -2120,7 +2120,7 @@ abort_linearize: | |||
2120 | goto drop; | 2120 | goto drop; |
2121 | } | 2121 | } |
2122 | 2122 | ||
2123 | if (skb_linearize(skb, GFP_ATOMIC)) | 2123 | if (skb_linearize(skb)) |
2124 | goto drop; | 2124 | goto drop; |
2125 | 2125 | ||
2126 | mgp->tx_linearized++; | 2126 | mgp->tx_linearized++; |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index f72a4f57905a..bf776125ca38 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -260,15 +260,17 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
260 | #define RPC_LSA_DEFAULT RPC_LED_TX_RX | 260 | #define RPC_LSA_DEFAULT RPC_LED_TX_RX |
261 | #define RPC_LSB_DEFAULT RPC_LED_100_10 | 261 | #define RPC_LSB_DEFAULT RPC_LED_100_10 |
262 | 262 | ||
263 | #elif defined(CONFIG_MACH_LPD7A400) || defined(CONFIG_MACH_LPD7A404) | 263 | #elif defined(CONFIG_MACH_LPD79520) \ |
264 | || defined(CONFIG_MACH_LPD7A400) \ | ||
265 | || defined(CONFIG_MACH_LPD7A404) | ||
264 | 266 | ||
265 | /* The LPD7A40X_IOBARRIER is necessary to overcome a mismatch between | 267 | /* The LPD7X_IOBARRIER is necessary to overcome a mismatch between the |
266 | * the way that the CPU handles chip selects and the way that the SMC | 268 | * way that the CPU handles chip selects and the way that the SMC chip |
267 | * chip expects the chip select to operate. Refer to | 269 | * expects the chip select to operate. Refer to |
268 | * Documentation/arm/Sharp-LH/IOBarrier for details. The read from | 270 | * Documentation/arm/Sharp-LH/IOBarrier for details. The read from |
269 | * IOBARRIER is a byte as a least-common denominator of possible | 271 | * IOBARRIER is a byte, in order that we read the least-common |
270 | * regions to use as the barrier. It would be wasteful to read 32 | 272 | * denominator. It would be wasteful to read 32 bits from an 8-bit |
271 | * bits from a byte oriented region. | 273 | * accessible region. |
272 | * | 274 | * |
273 | * There is no explicit protection against interrupts intervening | 275 | * There is no explicit protection against interrupts intervening |
274 | * between the writew and the IOBARRIER. In SMC ISR there is a | 276 | * between the writew and the IOBARRIER. In SMC ISR there is a |
@@ -287,25 +289,35 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
287 | #define SMC_CAN_USE_16BIT 1 | 289 | #define SMC_CAN_USE_16BIT 1 |
288 | #define SMC_CAN_USE_32BIT 0 | 290 | #define SMC_CAN_USE_32BIT 0 |
289 | #define SMC_NOWAIT 0 | 291 | #define SMC_NOWAIT 0 |
290 | #define LPD7A40X_IOBARRIER readb (IOBARRIER_VIRT) | 292 | #define LPD7X_IOBARRIER readb (IOBARRIER_VIRT) |
291 | 293 | ||
292 | #define SMC_inw(a,r) readw ((void*) ((a) + (r))) | 294 | #define SMC_inw(a,r)\ |
293 | #define SMC_insw(a,r,p,l) readsw ((void*) ((a) + (r)), p, l) | 295 | ({ unsigned short v = readw ((void*) ((a) + (r))); LPD7X_IOBARRIER; v; }) |
294 | #define SMC_outw(v,a,r) ({ writew ((v), (a) + (r)); LPD7A40X_IOBARRIER; }) | 296 | #define SMC_outw(v,a,r) ({ writew ((v), (a) + (r)); LPD7X_IOBARRIER; }) |
295 | 297 | ||
296 | #define SMC_outsw LPD7A40X_SMC_outsw | 298 | #define SMC_insw LPD7_SMC_insw |
299 | static inline void LPD7_SMC_insw (unsigned char* a, int r, | ||
300 | unsigned char* p, int l) | ||
301 | { | ||
302 | unsigned short* ps = (unsigned short*) p; | ||
303 | while (l-- > 0) { | ||
304 | *ps++ = readw (a + r); | ||
305 | LPD7X_IOBARRIER; | ||
306 | } | ||
307 | } | ||
297 | 308 | ||
298 | static inline void LPD7A40X_SMC_outsw(unsigned long a, int r, | 309 | #define SMC_outsw LPD7_SMC_outsw |
299 | unsigned char* p, int l) | 310 | static inline void LPD7_SMC_outsw (unsigned char* a, int r, |
311 | unsigned char* p, int l) | ||
300 | { | 312 | { |
301 | unsigned short* ps = (unsigned short*) p; | 313 | unsigned short* ps = (unsigned short*) p; |
302 | while (l-- > 0) { | 314 | while (l-- > 0) { |
303 | writew (*ps++, a + r); | 315 | writew (*ps++, a + r); |
304 | LPD7A40X_IOBARRIER; | 316 | LPD7X_IOBARRIER; |
305 | } | 317 | } |
306 | } | 318 | } |
307 | 319 | ||
308 | #define SMC_INTERRUPT_PREAMBLE LPD7A40X_IOBARRIER | 320 | #define SMC_INTERRUPT_PREAMBLE LPD7X_IOBARRIER |
309 | 321 | ||
310 | #define RPC_LSA_DEFAULT RPC_LED_TX_RX | 322 | #define RPC_LSA_DEFAULT RPC_LED_TX_RX |
311 | #define RPC_LSB_DEFAULT RPC_LED_100_10 | 323 | #define RPC_LSB_DEFAULT RPC_LED_100_10 |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 9f046cae2f71..bd5d2668a362 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2221,13 +2221,8 @@ static int happy_meal_open(struct net_device *dev) | |||
2221 | if (request_irq(dev->irq, &happy_meal_interrupt, | 2221 | if (request_irq(dev->irq, &happy_meal_interrupt, |
2222 | SA_SHIRQ, dev->name, (void *)dev)) { | 2222 | SA_SHIRQ, dev->name, (void *)dev)) { |
2223 | HMD(("EAGAIN\n")); | 2223 | HMD(("EAGAIN\n")); |
2224 | #ifdef __sparc__ | ||
2225 | printk(KERN_ERR "happy_meal(SBUS): Can't order irq %s to go.\n", | ||
2226 | __irq_itoa(dev->irq)); | ||
2227 | #else | ||
2228 | printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n", | 2224 | printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n", |
2229 | dev->irq); | 2225 | dev->irq); |
2230 | #endif | ||
2231 | 2226 | ||
2232 | return -EAGAIN; | 2227 | return -EAGAIN; |
2233 | } | 2228 | } |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index b7d87d4690b4..6381243d8d00 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -936,7 +936,7 @@ static int lance_open(struct net_device *dev) | |||
936 | 936 | ||
937 | if (request_irq(dev->irq, &lance_interrupt, SA_SHIRQ, | 937 | if (request_irq(dev->irq, &lance_interrupt, SA_SHIRQ, |
938 | lancestr, (void *) dev)) { | 938 | lancestr, (void *) dev)) { |
939 | printk(KERN_ERR "Lance: Can't get irq %s\n", __irq_itoa(dev->irq)); | 939 | printk(KERN_ERR "Lance: Can't get irq %d\n", dev->irq); |
940 | return -EAGAIN; | 940 | return -EAGAIN; |
941 | } | 941 | } |
942 | 942 | ||