On Mon, 2008-04-14 at 11:08 +0100, David Woodhouse wrote:That would look something like this (in fact, I think it would let us get rid of the special case for S390 too)... --- ./udev-120/extras/rule_generator/75-persistent-net-generator.rules~ 2008-04-03 20:12:53.000000000 +0100 +++ ./udev-120/extras/rule_generator/75-persistent-net-generator.rules 2008-04-14 11:52:46.000000000 +0100 @@ -18,7 +18,7 @@ SUBSYSTEM!="net", GOTO="persistent_net_g NAME=="?*", GOTO="persistent_net_generator_end" # device name whitelist -KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" +KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*|msh*", GOTO="persistent_net_generator_end" # ignore Xen virtual interfaces SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" @@ -29,6 +29,9 @@ ENV{MATCHADDR}="$attr{address}" # match interface type ENV{MATCHIFTYPE}="$attr{type}" +# match dev_id +ENV{MATCHDEVID}="$attr{dev_id}" + # do not use "locally administered" MAC address ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" --- ./udev-120/extras/rule_generator/write_net_rules~ 2008-04-03 20:12:53.000000000 +0100 +++ ./udev-120/extras/rule_generator/write_net_rules 2008-04-14 11:47:27.000000000 +0100 @@ -15,6 +15,7 @@ # variables used to communicate: # MATCHADDR MAC address used for the match # MATCHID bus_id used for the match +# MATCHDEVID dev_id used for the match # MATCHDRV driver name used for the match # MATCHIFTYPE interface type match # COMMENT comment to add to the generated rule @@ -78,6 +79,10 @@ if [ "$MATCHDRV" ]; then match="$match, DRIVERS==\"$MATCHDRV\"" fi +if [ "$MATCHDEVID" ]; then + match="$match, ATTR{dev_id}==\"$MATCHDEVID\"" +fi + if [ "$MATCHID" ]; then match="$match, KERNELS==\"$MATCHID\"" fi ... and this... --- ./linux-2.6.24.ppc/drivers/net/ps3_gelic_wireless.c~ 2008-04-13 13:38:15.000000000 +0100 +++ ./linux-2.6.24.ppc/drivers/net/ps3_gelic_wireless.c 2008-04-14 11:15:10.000000000 +0100 @@ -2699,6 +2699,7 @@ int gelic_wl_driver_probe(struct gelic_c gelic_wl_setup_netdev_ops(netdev); /* setup some of net_device and register it */ + netdev->dev_id = GELIC_PORT_WIRELESS; ret = gelic_net_setup_netdev(netdev, card); if (ret) goto fail_setup; --- ./linux-2.6.24.ppc/drivers/net/ps3_gelic_net.c~ 2008-04-13 13:38:15.000000000 +0100 +++ ./linux-2.6.24.ppc/drivers/net/ps3_gelic_net.c 2008-04-14 11:15:19.000000000 +0100 @@ -1635,6 +1635,7 @@ static int ps3_gelic_driver_probe(struct netdev->irq = card->irq; SET_NETDEV_DEV(netdev, &card->dev->core); gelic_ether_setup_netdev_ops(netdev, &card->napi); + netdev->dev_id = GELIC_PORT_ETHERNET; result = gelic_net_setup_netdev(netdev, card); if (result) { dev_dbg(&dev->core, "%s: setup_netdev failed %d", --- ./linux-2.6.24.ppc/drivers/net/wireless/libertas/main.c~ 2008-04-13 13:38:16.000000000 +0100 +++ ./linux-2.6.24.ppc/drivers/net/wireless/libertas/main.c 2008-04-14 10:49:52.000000000 +0100 @@ -1205,6 +1205,8 @@ int lbs_start_card(struct lbs_private *p /* init 802.11d */ lbs_init_11d(priv); + dev->dev_id = 0; + if (register_netdev(dev)) { lbs_pr_err("cannot register ethX device\n"); goto done; @@ -1327,6 +1329,7 @@ static int lbs_add_mesh(struct lbs_priva mesh_dev->wireless_handlers = (struct iw_handler_def *)&mesh_handler_def; #endif /* Register virtual mesh interface */ + mesh_dev->dev_id = 1; ret = register_netdev(mesh_dev); if (ret) { lbs_pr_err("cannot register mshX virtual interface\n"); @@ -1542,6 +1545,7 @@ static int lbs_add_rtap(struct lbs_priva rtap_dev->set_multicast_list = lbs_set_multicast_list; rtap_dev->priv = priv; + rtap_dev->dev_id = 2; ret = register_netdev(rtap_dev); if (ret) { free_netdev(rtap_dev); --- ./linux-2.6.24.ppc/net/core/net-sysfs.c~ 2008-04-13 13:38:24.000000000 +0100 +++ ./linux-2.6.24.ppc/net/core/net-sysfs.c 2008-04-14 10:58:32.000000000 +0100 @@ -87,6 +87,7 @@ static ssize_t netdev_store(struct devic return ret; } +NETDEVICE_SHOW(dev_id, fmt_hex); NETDEVICE_SHOW(addr_len, fmt_dec); NETDEVICE_SHOW(iflink, fmt_dec); NETDEVICE_SHOW(ifindex, fmt_dec); @@ -210,6 +211,7 @@ static ssize_t store_tx_queue_len(struct static struct device_attribute net_class_attributes[] = { __ATTR(addr_len, S_IRUGO, show_addr_len, NULL), + __ATTR(dev_id, S_IRUGO, show_dev_id, NULL), __ATTR(iflink, S_IRUGO, show_iflink, NULL), __ATTR(ifindex, S_IRUGO, show_ifindex, NULL), __ATTR(features, S_IRUGO, show_features, NULL), -- dwmw2 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.27 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Alan Cox | [PATCH 00/80] TTY updates for 2.6.28 |
git: | |
| Linus Torvalds | People unaware of the importance of "git gc"? |
| Linus Torvalds | [PATCH 1/6] diff-lib: use ce_mode_from_stat() rather than messing with modes manua... |
| Joakim Tjernlund | git-svn set-tree bug |
| Robert Collins | Re: VCS comparison table |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Samuel Moñux | Cyrus IMAP performance problems [Long] |
| Pekka Enberg | Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP |
| Frithjof Hammer | Re: [LARTC] ifb and ppp |
| Evgeniy Polyakov | [2/3] POHMELFS: Documentation. |
| Maxim Levitsky | How I can reset TCP sockets after long suspend/resume cyscle |
| How to make my PCIE ATA storage device running in Linux | 6 hours ago | Linux general |
| sata/ide timeout errors on asus server-mb | 9 hours ago | Linux kernel |
| Shared swap partition | 10 hours ago | Linux general |
| usb mic not detected | 14 hours ago | Applications and Utilities |
| Problem in Inserting a module | 15 hours ago | Linux kernel |
| Treason Uncloaked | 20 hours ago | Linux kernel |
| high memory | 3 days ago | Linux kernel |
| semaphore access speed | 3 days ago | Applications and Utilities |
| the kernel how to power off the machine | 3 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
