diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-12 18:39:32 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-12 18:39:32 -0400 |
| commit | 18552b8f227bddf569dade5c69798a37839ea913 (patch) | |
| tree | 2538b43849d9ba6da32e1a309907c9ad488a939c | |
| parent | faa88df860fdfad13afc99fc7201432f9263b3b5 (diff) | |
| parent | bd89efc532fe41f867f848144cc8b42054ddf6f9 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[NEIGH]: Fix IP-over-ATM and ARP interaction.
[TG3]: ethtool always report port is TP.
| -rw-r--r-- | drivers/net/tg3.c | 8 | ||||
| -rw-r--r-- | include/net/neighbour.h | 1 | ||||
| -rw-r--r-- | net/atm/clip.c | 2 | ||||
| -rw-r--r-- | net/core/neighbour.c | 21 |
4 files changed, 26 insertions, 6 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 2bd9592b75cd..e1b33a25a25f 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
| @@ -7653,21 +7653,23 @@ static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
| 7653 | cmd->supported |= (SUPPORTED_1000baseT_Half | | 7653 | cmd->supported |= (SUPPORTED_1000baseT_Half | |
| 7654 | SUPPORTED_1000baseT_Full); | 7654 | SUPPORTED_1000baseT_Full); |
| 7655 | 7655 | ||
| 7656 | if (!(tp->tg3_flags2 & TG3_FLG2_ANY_SERDES)) | 7656 | if (!(tp->tg3_flags2 & TG3_FLG2_ANY_SERDES)) { |
| 7657 | cmd->supported |= (SUPPORTED_100baseT_Half | | 7657 | cmd->supported |= (SUPPORTED_100baseT_Half | |
| 7658 | SUPPORTED_100baseT_Full | | 7658 | SUPPORTED_100baseT_Full | |
| 7659 | SUPPORTED_10baseT_Half | | 7659 | SUPPORTED_10baseT_Half | |
| 7660 | SUPPORTED_10baseT_Full | | 7660 | SUPPORTED_10baseT_Full | |
| 7661 | SUPPORTED_MII); | 7661 | SUPPORTED_MII); |
| 7662 | else | 7662 | cmd->port = PORT_TP; |
| 7663 | } else { | ||
| 7663 | cmd->supported |= SUPPORTED_FIBRE; | 7664 | cmd->supported |= SUPPORTED_FIBRE; |
| 7665 | cmd->port = PORT_FIBRE; | ||
| 7666 | } | ||
| 7664 | 7667 | ||
| 7665 | cmd->advertising = tp->link_config.advertising; | 7668 | cmd->advertising = tp->link_config.advertising; |
| 7666 | if (netif_running(dev)) { | 7669 | if (netif_running(dev)) { |
| 7667 | cmd->speed = tp->link_config.active_speed; | 7670 | cmd->speed = tp->link_config.active_speed; |
| 7668 | cmd->duplex = tp->link_config.active_duplex; | 7671 | cmd->duplex = tp->link_config.active_duplex; |
| 7669 | } | 7672 | } |
| 7670 | cmd->port = 0; | ||
| 7671 | cmd->phy_address = PHY_ADDR; | 7673 | cmd->phy_address = PHY_ADDR; |
| 7672 | cmd->transceiver = 0; | 7674 | cmd->transceiver = 0; |
| 7673 | cmd->autoneg = tp->link_config.autoneg; | 7675 | cmd->autoneg = tp->link_config.autoneg; |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index b0666d66293f..4901ee446879 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
| @@ -211,6 +211,7 @@ struct neigh_table | |||
| 211 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 | 211 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 |
| 212 | 212 | ||
| 213 | extern void neigh_table_init(struct neigh_table *tbl); | 213 | extern void neigh_table_init(struct neigh_table *tbl); |
| 214 | extern void neigh_table_init_no_netlink(struct neigh_table *tbl); | ||
| 214 | extern int neigh_table_clear(struct neigh_table *tbl); | 215 | extern int neigh_table_clear(struct neigh_table *tbl); |
| 215 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, | 216 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, |
| 216 | const void *pkey, | 217 | const void *pkey, |
diff --git a/net/atm/clip.c b/net/atm/clip.c index 1a786bfaa416..72d852982664 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
| @@ -963,7 +963,7 @@ static struct file_operations arp_seq_fops = { | |||
| 963 | static int __init atm_clip_init(void) | 963 | static int __init atm_clip_init(void) |
| 964 | { | 964 | { |
| 965 | struct proc_dir_entry *p; | 965 | struct proc_dir_entry *p; |
| 966 | neigh_table_init(&clip_tbl); | 966 | neigh_table_init_no_netlink(&clip_tbl); |
| 967 | 967 | ||
| 968 | clip_tbl_hook = &clip_tbl; | 968 | clip_tbl_hook = &clip_tbl; |
| 969 | register_atm_ioctl(&clip_ioctl_ops); | 969 | register_atm_ioctl(&clip_ioctl_ops); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 4cf878efdb49..50a8c73caf97 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
| @@ -1326,8 +1326,7 @@ void neigh_parms_destroy(struct neigh_parms *parms) | |||
| 1326 | kfree(parms); | 1326 | kfree(parms); |
| 1327 | } | 1327 | } |
| 1328 | 1328 | ||
| 1329 | 1329 | void neigh_table_init_no_netlink(struct neigh_table *tbl) | |
| 1330 | void neigh_table_init(struct neigh_table *tbl) | ||
| 1331 | { | 1330 | { |
| 1332 | unsigned long now = jiffies; | 1331 | unsigned long now = jiffies; |
| 1333 | unsigned long phsize; | 1332 | unsigned long phsize; |
| @@ -1383,10 +1382,27 @@ void neigh_table_init(struct neigh_table *tbl) | |||
| 1383 | 1382 | ||
| 1384 | tbl->last_flush = now; | 1383 | tbl->last_flush = now; |
| 1385 | tbl->last_rand = now + tbl->parms.reachable_time * 20; | 1384 | tbl->last_rand = now + tbl->parms.reachable_time * 20; |
| 1385 | } | ||
| 1386 | |||
| 1387 | void neigh_table_init(struct neigh_table *tbl) | ||
| 1388 | { | ||
| 1389 | struct neigh_table *tmp; | ||
| 1390 | |||
| 1391 | neigh_table_init_no_netlink(tbl); | ||
| 1386 | write_lock(&neigh_tbl_lock); | 1392 | write_lock(&neigh_tbl_lock); |
| 1393 | for (tmp = neigh_tables; tmp; tmp = tmp->next) { | ||
| 1394 | if (tmp->family == tbl->family) | ||
| 1395 | break; | ||
| 1396 | } | ||
| 1387 | tbl->next = neigh_tables; | 1397 | tbl->next = neigh_tables; |
| 1388 | neigh_tables = tbl; | 1398 | neigh_tables = tbl; |
| 1389 | write_unlock(&neigh_tbl_lock); | 1399 | write_unlock(&neigh_tbl_lock); |
| 1400 | |||
| 1401 | if (unlikely(tmp)) { | ||
| 1402 | printk(KERN_ERR "NEIGH: Registering multiple tables for " | ||
| 1403 | "family %d\n", tbl->family); | ||
| 1404 | dump_stack(); | ||
| 1405 | } | ||
| 1390 | } | 1406 | } |
| 1391 | 1407 | ||
| 1392 | int neigh_table_clear(struct neigh_table *tbl) | 1408 | int neigh_table_clear(struct neigh_table *tbl) |
| @@ -2657,6 +2673,7 @@ EXPORT_SYMBOL(neigh_rand_reach_time); | |||
| 2657 | EXPORT_SYMBOL(neigh_resolve_output); | 2673 | EXPORT_SYMBOL(neigh_resolve_output); |
| 2658 | EXPORT_SYMBOL(neigh_table_clear); | 2674 | EXPORT_SYMBOL(neigh_table_clear); |
| 2659 | EXPORT_SYMBOL(neigh_table_init); | 2675 | EXPORT_SYMBOL(neigh_table_init); |
| 2676 | EXPORT_SYMBOL(neigh_table_init_no_netlink); | ||
| 2660 | EXPORT_SYMBOL(neigh_update); | 2677 | EXPORT_SYMBOL(neigh_update); |
| 2661 | EXPORT_SYMBOL(neigh_update_hhs); | 2678 | EXPORT_SYMBOL(neigh_update_hhs); |
| 2662 | EXPORT_SYMBOL(pneigh_enqueue); | 2679 | EXPORT_SYMBOL(pneigh_enqueue); |
