diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:39:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:39:49 -0500 |
commit | d3143e71a95fe504c3d2d4a3b7aac126a588b1ac (patch) | |
tree | 78cf757c2896c3b5977e9a53d77642916ba7523e /drivers | |
parent | b20c8453a7d6e8d63c0f05ba3e38d9428c8091b1 (diff) | |
parent | 90afd0e574a1a739aeb62e30d556ebf0289389e5 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
Broadcom 4400 resume small fix
b44: src_desc->addr is little-endian
e100: fix irq leak on suspend/resume
bonding: ARP monitoring broken on x86_64
ehea: Fixed missing tasklet_kill() call
ehea: Fixed wrong jumbo frames status query
82596 warning fixes
FS_ENET: OF-related fixup for FEC and SCC MAC's
net: ifb error path loop fix
b44: Fix frequent link changes
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/82596.c | 7 | ||||
-rw-r--r-- | drivers/net/b44.c | 50 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 7 | ||||
-rw-r--r-- | drivers/net/e100.c | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 31 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-fec.c | 13 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 6 | ||||
-rw-r--r-- | drivers/net/ifb.c | 3 | ||||
-rw-r--r-- | drivers/net/phy/fixed.c | 2 |
10 files changed, 83 insertions, 40 deletions
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 8236f26ffd4..640d7ca2ebc 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c | |||
@@ -1066,8 +1066,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1066 | short length = skb->len; | 1066 | short length = skb->len; |
1067 | dev->trans_start = jiffies; | 1067 | dev->trans_start = jiffies; |
1068 | 1068 | ||
1069 | DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%x) called\n", dev->name, | 1069 | DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%p) called\n", |
1070 | skb->len, (unsigned int)skb->data)); | 1070 | dev->name, skb->len, skb->data)); |
1071 | 1071 | ||
1072 | if (skb->len < ETH_ZLEN) { | 1072 | if (skb->len < ETH_ZLEN) { |
1073 | if (skb_padto(skb, ETH_ZLEN)) | 1073 | if (skb_padto(skb, ETH_ZLEN)) |
@@ -1246,7 +1246,8 @@ struct net_device * __init i82596_probe(int unit) | |||
1246 | dev->priv = (void *)(dev->mem_start); | 1246 | dev->priv = (void *)(dev->mem_start); |
1247 | 1247 | ||
1248 | lp = dev->priv; | 1248 | lp = dev->priv; |
1249 | DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n", | 1249 | DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%zd bytes), " |
1250 | "lp->scb at 0x%08lx\n", | ||
1250 | dev->name, (unsigned long)lp, | 1251 | dev->name, (unsigned long)lp, |
1251 | sizeof(struct i596_private), (unsigned long)&lp->scb)); | 1252 | sizeof(struct i596_private), (unsigned long)&lp->scb)); |
1252 | memset((void *) lp, 0, sizeof(struct i596_private)); | 1253 | memset((void *) lp, 0, sizeof(struct i596_private)); |
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index cfc89bc105b..303a8d94ad4 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -110,6 +110,11 @@ MODULE_DEVICE_TABLE(pci, b44_pci_tbl); | |||
110 | 110 | ||
111 | static void b44_halt(struct b44 *); | 111 | static void b44_halt(struct b44 *); |
112 | static void b44_init_rings(struct b44 *); | 112 | static void b44_init_rings(struct b44 *); |
113 | |||
114 | #define B44_FULL_RESET 1 | ||
115 | #define B44_FULL_RESET_SKIP_PHY 2 | ||
116 | #define B44_PARTIAL_RESET 3 | ||
117 | |||
113 | static void b44_init_hw(struct b44 *, int); | 118 | static void b44_init_hw(struct b44 *, int); |
114 | 119 | ||
115 | static int dma_desc_align_mask; | 120 | static int dma_desc_align_mask; |
@@ -884,7 +889,7 @@ static int b44_poll(struct net_device *netdev, int *budget) | |||
884 | spin_lock_irqsave(&bp->lock, flags); | 889 | spin_lock_irqsave(&bp->lock, flags); |
885 | b44_halt(bp); | 890 | b44_halt(bp); |
886 | b44_init_rings(bp); | 891 | b44_init_rings(bp); |
887 | b44_init_hw(bp, 1); | 892 | b44_init_hw(bp, B44_FULL_RESET_SKIP_PHY); |
888 | netif_wake_queue(bp->dev); | 893 | netif_wake_queue(bp->dev); |
889 | spin_unlock_irqrestore(&bp->lock, flags); | 894 | spin_unlock_irqrestore(&bp->lock, flags); |
890 | done = 1; | 895 | done = 1; |
@@ -954,7 +959,7 @@ static void b44_tx_timeout(struct net_device *dev) | |||
954 | 959 | ||
955 | b44_halt(bp); | 960 | b44_halt(bp); |
956 | b44_init_rings(bp); | 961 | b44_init_rings(bp); |
957 | b44_init_hw(bp, 1); | 962 | b44_init_hw(bp, B44_FULL_RESET); |
958 | 963 | ||
959 | spin_unlock_irq(&bp->lock); | 964 | spin_unlock_irq(&bp->lock); |
960 | 965 | ||
@@ -1071,7 +1076,7 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu) | |||
1071 | b44_halt(bp); | 1076 | b44_halt(bp); |
1072 | dev->mtu = new_mtu; | 1077 | dev->mtu = new_mtu; |
1073 | b44_init_rings(bp); | 1078 | b44_init_rings(bp); |
1074 | b44_init_hw(bp, 1); | 1079 | b44_init_hw(bp, B44_FULL_RESET); |
1075 | spin_unlock_irq(&bp->lock); | 1080 | spin_unlock_irq(&bp->lock); |
1076 | 1081 | ||
1077 | b44_enable_ints(bp); | 1082 | b44_enable_ints(bp); |
@@ -1368,12 +1373,12 @@ static int b44_set_mac_addr(struct net_device *dev, void *p) | |||
1368 | * packet processing. Invoked with bp->lock held. | 1373 | * packet processing. Invoked with bp->lock held. |
1369 | */ | 1374 | */ |
1370 | static void __b44_set_rx_mode(struct net_device *); | 1375 | static void __b44_set_rx_mode(struct net_device *); |
1371 | static void b44_init_hw(struct b44 *bp, int full_reset) | 1376 | static void b44_init_hw(struct b44 *bp, int reset_kind) |
1372 | { | 1377 | { |
1373 | u32 val; | 1378 | u32 val; |
1374 | 1379 | ||
1375 | b44_chip_reset(bp); | 1380 | b44_chip_reset(bp); |
1376 | if (full_reset) { | 1381 | if (reset_kind == B44_FULL_RESET) { |
1377 | b44_phy_reset(bp); | 1382 | b44_phy_reset(bp); |
1378 | b44_setup_phy(bp); | 1383 | b44_setup_phy(bp); |
1379 | } | 1384 | } |
@@ -1390,7 +1395,10 @@ static void b44_init_hw(struct b44 *bp, int full_reset) | |||
1390 | bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); | 1395 | bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); |
1391 | 1396 | ||
1392 | bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ | 1397 | bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ |
1393 | if (full_reset) { | 1398 | if (reset_kind == B44_PARTIAL_RESET) { |
1399 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | ||
1400 | (bp->rx_offset << DMARX_CTRL_ROSHIFT))); | ||
1401 | } else { | ||
1394 | bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); | 1402 | bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); |
1395 | bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); | 1403 | bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); |
1396 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | 1404 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | |
@@ -1401,9 +1409,6 @@ static void b44_init_hw(struct b44 *bp, int full_reset) | |||
1401 | bp->rx_prod = bp->rx_pending; | 1409 | bp->rx_prod = bp->rx_pending; |
1402 | 1410 | ||
1403 | bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); | 1411 | bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); |
1404 | } else { | ||
1405 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | ||
1406 | (bp->rx_offset << DMARX_CTRL_ROSHIFT))); | ||
1407 | } | 1412 | } |
1408 | 1413 | ||
1409 | val = br32(bp, B44_ENET_CTRL); | 1414 | val = br32(bp, B44_ENET_CTRL); |
@@ -1420,7 +1425,7 @@ static int b44_open(struct net_device *dev) | |||
1420 | goto out; | 1425 | goto out; |
1421 | 1426 | ||
1422 | b44_init_rings(bp); | 1427 | b44_init_rings(bp); |
1423 | b44_init_hw(bp, 1); | 1428 | b44_init_hw(bp, B44_FULL_RESET); |
1424 | 1429 | ||
1425 | b44_check_phy(bp); | 1430 | b44_check_phy(bp); |
1426 | 1431 | ||
@@ -1629,7 +1634,7 @@ static int b44_close(struct net_device *dev) | |||
1629 | netif_poll_enable(dev); | 1634 | netif_poll_enable(dev); |
1630 | 1635 | ||
1631 | if (bp->flags & B44_FLAG_WOL_ENABLE) { | 1636 | if (bp->flags & B44_FLAG_WOL_ENABLE) { |
1632 | b44_init_hw(bp, 0); | 1637 | b44_init_hw(bp, B44_PARTIAL_RESET); |
1633 | b44_setup_wol(bp); | 1638 | b44_setup_wol(bp); |
1634 | } | 1639 | } |
1635 | 1640 | ||
@@ -1905,7 +1910,7 @@ static int b44_set_ringparam(struct net_device *dev, | |||
1905 | 1910 | ||
1906 | b44_halt(bp); | 1911 | b44_halt(bp); |
1907 | b44_init_rings(bp); | 1912 | b44_init_rings(bp); |
1908 | b44_init_hw(bp, 1); | 1913 | b44_init_hw(bp, B44_FULL_RESET); |
1909 | netif_wake_queue(bp->dev); | 1914 | netif_wake_queue(bp->dev); |
1910 | spin_unlock_irq(&bp->lock); | 1915 | spin_unlock_irq(&bp->lock); |
1911 | 1916 | ||
@@ -1948,7 +1953,7 @@ static int b44_set_pauseparam(struct net_device *dev, | |||
1948 | if (bp->flags & B44_FLAG_PAUSE_AUTO) { | 1953 | if (bp->flags & B44_FLAG_PAUSE_AUTO) { |
1949 | b44_halt(bp); | 1954 | b44_halt(bp); |
1950 | b44_init_rings(bp); | 1955 | b44_init_rings(bp); |
1951 | b44_init_hw(bp, 1); | 1956 | b44_init_hw(bp, B44_FULL_RESET); |
1952 | } else { | 1957 | } else { |
1953 | __b44_set_flow_ctrl(bp, bp->flags); | 1958 | __b44_set_flow_ctrl(bp, bp->flags); |
1954 | } | 1959 | } |
@@ -2304,7 +2309,7 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2304 | 2309 | ||
2305 | free_irq(dev->irq, dev); | 2310 | free_irq(dev->irq, dev); |
2306 | if (bp->flags & B44_FLAG_WOL_ENABLE) { | 2311 | if (bp->flags & B44_FLAG_WOL_ENABLE) { |
2307 | b44_init_hw(bp, 0); | 2312 | b44_init_hw(bp, B44_PARTIAL_RESET); |
2308 | b44_setup_wol(bp); | 2313 | b44_setup_wol(bp); |
2309 | } | 2314 | } |
2310 | pci_disable_device(pdev); | 2315 | pci_disable_device(pdev); |
@@ -2315,21 +2320,32 @@ static int b44_resume(struct pci_dev *pdev) | |||
2315 | { | 2320 | { |
2316 | struct net_device *dev = pci_get_drvdata(pdev); | 2321 | struct net_device *dev = pci_get_drvdata(pdev); |
2317 | struct b44 *bp = netdev_priv(dev); | 2322 | struct b44 *bp = netdev_priv(dev); |
2323 | int rc = 0; | ||
2318 | 2324 | ||
2319 | pci_restore_state(pdev); | 2325 | pci_restore_state(pdev); |
2320 | pci_enable_device(pdev); | 2326 | rc = pci_enable_device(pdev); |
2327 | if (rc) { | ||
2328 | printk(KERN_ERR PFX "%s: pci_enable_device failed\n", | ||
2329 | dev->name); | ||
2330 | return rc; | ||
2331 | } | ||
2332 | |||
2321 | pci_set_master(pdev); | 2333 | pci_set_master(pdev); |
2322 | 2334 | ||
2323 | if (!netif_running(dev)) | 2335 | if (!netif_running(dev)) |
2324 | return 0; | 2336 | return 0; |
2325 | 2337 | ||
2326 | if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev)) | 2338 | rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev); |
2339 | if (rc) { | ||
2327 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); | 2340 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); |
2341 | pci_disable_device(pdev); | ||
2342 | return rc; | ||
2343 | } | ||
2328 | 2344 | ||
2329 | spin_lock_irq(&bp->lock); | 2345 | spin_lock_irq(&bp->lock); |
2330 | 2346 | ||
2331 | b44_init_rings(bp); | 2347 | b44_init_rings(bp); |
2332 | b44_init_hw(bp, 1); | 2348 | b44_init_hw(bp, B44_FULL_RESET); |
2333 | netif_device_attach(bp->dev); | 2349 | netif_device_attach(bp->dev); |
2334 | spin_unlock_irq(&bp->lock); | 2350 | spin_unlock_irq(&bp->lock); |
2335 | 2351 | ||
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index dc434fb6da8..0978c9ac6d2 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -151,8 +151,8 @@ struct slave { | |||
151 | struct slave *next; | 151 | struct slave *next; |
152 | struct slave *prev; | 152 | struct slave *prev; |
153 | int delay; | 153 | int delay; |
154 | u32 jiffies; | 154 | unsigned long jiffies; |
155 | u32 last_arp_rx; | 155 | unsigned long last_arp_rx; |
156 | s8 link; /* one of BOND_LINK_XXXX */ | 156 | s8 link; /* one of BOND_LINK_XXXX */ |
157 | s8 state; /* one of BOND_STATE_XXXX */ | 157 | s8 state; /* one of BOND_STATE_XXXX */ |
158 | u32 original_flags; | 158 | u32 original_flags; |
@@ -242,7 +242,8 @@ extern inline int slave_do_arp_validate(struct bonding *bond, struct slave *slav | |||
242 | return bond->params.arp_validate & (1 << slave->state); | 242 | return bond->params.arp_validate & (1 << slave->state); |
243 | } | 243 | } |
244 | 244 | ||
245 | extern inline u32 slave_last_rx(struct bonding *bond, struct slave *slave) | 245 | extern inline unsigned long slave_last_rx(struct bonding *bond, |
246 | struct slave *slave) | ||
246 | { | 247 | { |
247 | if (slave_do_arp_validate(bond, slave)) | 248 | if (slave_do_arp_validate(bond, slave)) |
248 | return slave->last_arp_rx; | 249 | return slave->last_arp_rx; |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index c2ae2a24629..3208dac2916 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2725,6 +2725,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2725 | del_timer_sync(&nic->watchdog); | 2725 | del_timer_sync(&nic->watchdog); |
2726 | netif_carrier_off(nic->netdev); | 2726 | netif_carrier_off(nic->netdev); |
2727 | 2727 | ||
2728 | netif_device_detach(netdev); | ||
2728 | pci_save_state(pdev); | 2729 | pci_save_state(pdev); |
2729 | 2730 | ||
2730 | if ((nic->flags & wol_magic) | e100_asf(nic)) { | 2731 | if ((nic->flags & wol_magic) | e100_asf(nic)) { |
@@ -2736,6 +2737,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2736 | } | 2737 | } |
2737 | 2738 | ||
2738 | pci_disable_device(pdev); | 2739 | pci_disable_device(pdev); |
2740 | free_irq(pdev->irq, netdev); | ||
2739 | pci_set_power_state(pdev, PCI_D3hot); | 2741 | pci_set_power_state(pdev, PCI_D3hot); |
2740 | 2742 | ||
2741 | return 0; | 2743 | return 0; |
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index be10a3a26b5..272e1ec51aa 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | #define DRV_NAME "ehea" | 41 | #define DRV_NAME "ehea" |
42 | #define DRV_VERSION "EHEA_0044" | 42 | #define DRV_VERSION "EHEA_0045" |
43 | 43 | ||
44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | 44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ |
45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) | 45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 1072e69ef85..9de2d38a532 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2316,6 +2316,7 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2316 | struct ehea_adapter *adapter = port->adapter; | 2316 | struct ehea_adapter *adapter = port->adapter; |
2317 | struct hcp_ehea_port_cb4 *cb4; | 2317 | struct hcp_ehea_port_cb4 *cb4; |
2318 | u32 *dn_log_port_id; | 2318 | u32 *dn_log_port_id; |
2319 | int jumbo = 0; | ||
2319 | 2320 | ||
2320 | sema_init(&port->port_lock, 1); | 2321 | sema_init(&port->port_lock, 1); |
2321 | port->state = EHEA_PORT_DOWN; | 2322 | port->state = EHEA_PORT_DOWN; |
@@ -2357,13 +2358,25 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2357 | if (!cb4) { | 2358 | if (!cb4) { |
2358 | ehea_error("no mem for cb4"); | 2359 | ehea_error("no mem for cb4"); |
2359 | } else { | 2360 | } else { |
2360 | cb4->jumbo_frame = 1; | 2361 | hret = ehea_h_query_ehea_port(adapter->handle, |
2361 | hret = ehea_h_modify_ehea_port(adapter->handle, | 2362 | port->logical_port_id, |
2362 | port->logical_port_id, | 2363 | H_PORT_CB4, |
2363 | H_PORT_CB4, H_PORT_CB4_JUMBO, | 2364 | H_PORT_CB4_JUMBO, cb4); |
2364 | cb4); | 2365 | |
2365 | if (hret != H_SUCCESS) { | 2366 | if (hret == H_SUCCESS) { |
2366 | ehea_info("Jumbo frames not activated"); | 2367 | if (cb4->jumbo_frame) |
2368 | jumbo = 1; | ||
2369 | else { | ||
2370 | cb4->jumbo_frame = 1; | ||
2371 | hret = ehea_h_modify_ehea_port(adapter->handle, | ||
2372 | port-> | ||
2373 | logical_port_id, | ||
2374 | H_PORT_CB4, | ||
2375 | H_PORT_CB4_JUMBO, | ||
2376 | cb4); | ||
2377 | if (hret == H_SUCCESS) | ||
2378 | jumbo = 1; | ||
2379 | } | ||
2367 | } | 2380 | } |
2368 | kfree(cb4); | 2381 | kfree(cb4); |
2369 | } | 2382 | } |
@@ -2402,6 +2415,9 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2402 | goto out_free; | 2415 | goto out_free; |
2403 | } | 2416 | } |
2404 | 2417 | ||
2418 | ehea_info("%s: Jumbo frames are %sabled", dev->name, | ||
2419 | jumbo == 1 ? "en" : "dis"); | ||
2420 | |||
2405 | port->netdev = dev; | 2421 | port->netdev = dev; |
2406 | ret = 0; | 2422 | ret = 0; |
2407 | goto out; | 2423 | goto out; |
@@ -2582,6 +2598,7 @@ static int __devexit ehea_remove(struct ibmebus_dev *dev) | |||
2582 | destroy_workqueue(adapter->ehea_wq); | 2598 | destroy_workqueue(adapter->ehea_wq); |
2583 | 2599 | ||
2584 | ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter); | 2600 | ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter); |
2601 | tasklet_kill(&adapter->neq_tasklet); | ||
2585 | 2602 | ||
2586 | ehea_destroy_eq(adapter->neq); | 2603 | ehea_destroy_eq(adapter->neq); |
2587 | 2604 | ||
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index c2c5fd419bd..ff683947730 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -104,9 +104,9 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
104 | fep->interrupt = platform_get_irq_byname(pdev,"interrupt"); | 104 | fep->interrupt = platform_get_irq_byname(pdev,"interrupt"); |
105 | if (fep->interrupt < 0) | 105 | if (fep->interrupt < 0) |
106 | return -EINVAL; | 106 | return -EINVAL; |
107 | 107 | ||
108 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); | 108 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); |
109 | fep->fec.fecp =(void*)r->start; | 109 | fep->fec.fecp = ioremap(r->start, r->end - r->start + 1); |
110 | 110 | ||
111 | if(fep->fec.fecp == NULL) | 111 | if(fep->fec.fecp == NULL) |
112 | return -EINVAL; | 112 | return -EINVAL; |
@@ -319,11 +319,14 @@ static void restart(struct net_device *dev) | |||
319 | * Clear any outstanding interrupt. | 319 | * Clear any outstanding interrupt. |
320 | */ | 320 | */ |
321 | FW(fecp, ievent, 0xffc0); | 321 | FW(fecp, ievent, 0xffc0); |
322 | #ifndef CONFIG_PPC_MERGE | ||
322 | FW(fecp, ivec, (fep->interrupt / 2) << 29); | 323 | FW(fecp, ivec, (fep->interrupt / 2) << 29); |
323 | 324 | #else | |
325 | FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29); | ||
326 | #endif | ||
324 | 327 | ||
325 | /* | 328 | /* |
326 | * adjust to speed (only for DUET & RMII) | 329 | * adjust to speed (only for DUET & RMII) |
327 | */ | 330 | */ |
328 | #ifdef CONFIG_DUET | 331 | #ifdef CONFIG_DUET |
329 | if (fpi->use_rmii) { | 332 | if (fpi->use_rmii) { |
@@ -418,6 +421,7 @@ static void stop(struct net_device *dev) | |||
418 | 421 | ||
419 | static void pre_request_irq(struct net_device *dev, int irq) | 422 | static void pre_request_irq(struct net_device *dev, int irq) |
420 | { | 423 | { |
424 | #ifndef CONFIG_PPC_MERGE | ||
421 | immap_t *immap = fs_enet_immap; | 425 | immap_t *immap = fs_enet_immap; |
422 | u32 siel; | 426 | u32 siel; |
423 | 427 | ||
@@ -431,6 +435,7 @@ static void pre_request_irq(struct net_device *dev, int irq) | |||
431 | siel &= ~(0x80000000 >> (irq & ~1)); | 435 | siel &= ~(0x80000000 >> (irq & ~1)); |
432 | out_be32(&immap->im_siu_conf.sc_siel, siel); | 436 | out_be32(&immap->im_siu_conf.sc_siel, siel); |
433 | } | 437 | } |
438 | #endif | ||
434 | } | 439 | } |
435 | 440 | ||
436 | static void post_free_irq(struct net_device *dev, int irq) | 441 | static void post_free_irq(struct net_device *dev, int irq) |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 95ec5872c50..afd7fca7c6c 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -121,13 +121,13 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
121 | return -EINVAL; | 121 | return -EINVAL; |
122 | 122 | ||
123 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); | 123 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); |
124 | fep->scc.sccp = (void *)r->start; | 124 | fep->scc.sccp = ioremap(r->start, r->end - r->start + 1); |
125 | 125 | ||
126 | if (fep->scc.sccp == NULL) | 126 | if (fep->scc.sccp == NULL) |
127 | return -EINVAL; | 127 | return -EINVAL; |
128 | 128 | ||
129 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); | 129 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); |
130 | fep->scc.ep = (void *)r->start; | 130 | fep->scc.ep = ioremap(r->start, r->end - r->start + 1); |
131 | 131 | ||
132 | if (fep->scc.ep == NULL) | 132 | if (fep->scc.ep == NULL) |
133 | return -EINVAL; | 133 | return -EINVAL; |
@@ -397,6 +397,7 @@ static void stop(struct net_device *dev) | |||
397 | 397 | ||
398 | static void pre_request_irq(struct net_device *dev, int irq) | 398 | static void pre_request_irq(struct net_device *dev, int irq) |
399 | { | 399 | { |
400 | #ifndef CONFIG_PPC_MERGE | ||
400 | immap_t *immap = fs_enet_immap; | 401 | immap_t *immap = fs_enet_immap; |
401 | u32 siel; | 402 | u32 siel; |
402 | 403 | ||
@@ -410,6 +411,7 @@ static void pre_request_irq(struct net_device *dev, int irq) | |||
410 | siel &= ~(0x80000000 >> (irq & ~1)); | 411 | siel &= ~(0x80000000 >> (irq & ~1)); |
411 | out_be32(&immap->im_siu_conf.sc_siel, siel); | 412 | out_be32(&immap->im_siu_conf.sc_siel, siel); |
412 | } | 413 | } |
414 | #endif | ||
413 | } | 415 | } |
414 | 416 | ||
415 | static void post_free_irq(struct net_device *dev, int irq) | 417 | static void post_free_irq(struct net_device *dev, int irq) |
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index ca2b21f9d44..c4ca7c930a4 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c | |||
@@ -271,8 +271,7 @@ static int __init ifb_init_module(void) | |||
271 | for (i = 0; i < numifbs && !err; i++) | 271 | for (i = 0; i < numifbs && !err; i++) |
272 | err = ifb_init_one(i); | 272 | err = ifb_init_one(i); |
273 | if (err) { | 273 | if (err) { |
274 | i--; | 274 | while (i--) |
275 | while (--i >= 0) | ||
276 | ifb_free_one(i); | 275 | ifb_free_one(i); |
277 | } | 276 | } |
278 | 277 | ||
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 096d4a100bf..86135397f43 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c | |||
@@ -349,7 +349,7 @@ static int __init fixed_init(void) | |||
349 | fixed_mdio_register_device(0, 100, 1); | 349 | fixed_mdio_register_device(0, 100, 1); |
350 | #endif | 350 | #endif |
351 | 351 | ||
352 | #ifdef CONFIX_FIXED_MII_10_FDX | 352 | #ifdef CONFIG_FIXED_MII_10_FDX |
353 | fixed_mdio_register_device(0, 10, 1); | 353 | fixed_mdio_register_device(0, 10, 1); |
354 | #endif | 354 | #endif |
355 | return 0; | 355 | return 0; |