* [PATCH 11/11] drivers/net/usb/catc.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Greg Kroah-Hartman, Jeff Garzik, linux-usb-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
---
drivers/net/usb/catc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index 76752d8..e20db50 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -757,6 +757,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
struct catc *catc;
u8 broadcast[6];
int i, pktsz;
+ DECLARE_MAC_BUF(mac);
if (usb_set_interface(usbdev,
intf->altsetting->desc.bInterfaceNumber, 1)) {
@@ -891,11 +892,10 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
f5u011_rxmode(catc, catc->rxmode);
}
dbg("Init done.");
- printk(KERN_INFO "%s: %s USB Ethernet at usb-%s-%s, ",
+ printk(KERN_INFO "%s: %s USB Ethernet at usb-%s-%s, %s\n",
netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate",
- usbdev->bus->bus_name, usbdev->devpath);
- for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]);
- printk("%2.2x.\n", netdev->dev_addr[i]);
+ usbdev->bus->bus_name, usbdev->devpath,
+ print_mac(mac, netdev->dev_addr));
usb_set_intfdata(intf, catc);
SET_NETDEV_DEV(netdev, &intf->dev);
--
1.5.3.7.949.g2221a6
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH 11/11] drivers/net/usb/catc.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, Jeff Garzik, linux-usb, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/usb/catc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index 76752d8..e20db50 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -757,6 +757,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
struct catc *catc;
u8 broadcast[6];
int i, pktsz;
+ DECLARE_MAC_BUF(mac);
if (usb_set_interface(usbdev,
intf->altsetting->desc.bInterfaceNumber, 1)) {
@@ -891,11 +892,10 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
f5u011_rxmode(catc, catc->rxmode);
}
dbg("Init done.");
- printk(KERN_INFO "%s: %s USB Ethernet at usb-%s-%s, ",
+ printk(KERN_INFO "%s: %s USB Ethernet at usb-%s-%s, %s\n",
netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate",
- usbdev->bus->bus_name, usbdev->devpath);
- for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]);
- printk("%2.2x.\n", netdev->dev_addr[i]);
+ usbdev->bus->bus_name, usbdev->devpath,
+ print_mac(mac, netdev->dev_addr));
usb_set_intfdata(intf, catc);
SET_NETDEV_DEV(netdev, &intf->dev);
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 01/11] drivers/net/ax88796.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, Paul Gortmaker, netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ax88796.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c
index 7495a9e..107c11f 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -750,14 +750,10 @@ static int ax_init_dev(struct net_device *dev, int first_init)
ax_NS8390_init(dev, 0);
if (first_init) {
- printk("AX88796: %dbit, irq %d, %lx, MAC: ",
- ei_status.word16 ? 16:8, dev->irq, dev->base_addr);
-
- for (i = 0; i < ETHER_ADDR_LEN; i++)
- printk("%2.2x%c", dev->dev_addr[i],
- (i < (ETHER_ADDR_LEN-1) ? ':' : ' '));
-
- printk("\n");
+ DECLARE_MAC_BUF(mac);
+ printk("AX88796: %dbit, irq %d, %lx, MAC: %s\n",
+ ei_status.word16 ? 16:8, dev->irq, dev->base_addr,
+ print_mac(mac, dev->dev_addr));
}
ret = register_netdev(dev);
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 02/11] drivers/net/hplance.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/hplance.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/hplance.c b/drivers/net/hplance.c
index be6e5bc..2748b47 100644
--- a/drivers/net/hplance.c
+++ b/drivers/net/hplance.c
@@ -77,7 +77,7 @@ static int __devinit hplance_init_one(struct dio_dev *d,
{
struct net_device *dev;
int err = -ENOMEM;
- int i;
+ DECLARE_MAC_BUF(mac);
dev = alloc_etherdev(sizeof(struct hplance_private));
if (!dev)
@@ -95,13 +95,9 @@ static int __devinit hplance_init_one(struct dio_dev *d,
dio_set_drvdata(d, dev);
- printk(KERN_INFO "%s: %s; select code %d, addr %2.2x", dev->name, d->name, d->scode, dev->dev_addr[0]);
-
- for (i=1; i<6; i++) {
- printk(":%2.2x", dev->dev_addr[i]);
- }
-
- printk(", irq %d\n", d->ipl);
+ printk(KERN_INFO "%s: %s; select code %d, addr %s, irq %d\n",
+ dev->name, d->name, d->scode,
+ print_mac(mac, dev->dev_addr), d->irq);
return 0;
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 03/11] drivers/net/mac8390.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, Paul Gortmaker, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/mac8390.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
index 9e70074..4eccebb 100644
--- a/drivers/net/mac8390.c
+++ b/drivers/net/mac8390.c
@@ -483,6 +483,7 @@ void cleanup_module(void)
static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * ndev,
enum mac8390_type type)
{
+ DECLARE_MAC_BUF(mac);
static u32 fwrd4_offsets[16]={
0, 4, 8, 12,
16, 20, 24, 28,
@@ -612,18 +613,11 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
/* Good, done, now spit out some messages */
printk(KERN_INFO "%s: %s in slot %X (type %s)\n",
dev->name, ndev->board->name, ndev->board->slot, cardname[type]);
- printk(KERN_INFO "MAC ");
- {
- int i;
- for (i = 0; i < 6; i++) {
- printk("%2.2x", dev->dev_addr[i]);
- if (i < 5)
- printk(":");
- }
- }
- printk(" IRQ %d, %d KB shared memory at %#lx, %d-bit access.\n",
- dev->irq, (int)((dev->mem_end - dev->mem_start)/0x1000) * 4,
- dev->mem_start, access_bitmode?32:16);
+ printk(KERN_INFO "MAC %s IRQ %d, %d KB shared memory at %#lx, "
+ "%d-bit access.\n",
+ print_mac(mac, dev->dev_addr), dev->irq,
+ (int)((dev->mem_end - dev->mem_start)/0x1000) * 4,
+ dev->mem_start, access_bitmode?32:16);
return 0;
}
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 04/11] drivers/net/mac89x0.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/mac89x0.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mac89x0.c b/drivers/net/mac89x0.c
index a19b595..45b56ca 100644
--- a/drivers/net/mac89x0.c
+++ b/drivers/net/mac89x0.c
@@ -584,11 +584,12 @@ static void set_multicast_list(struct net_device *dev)
static int set_mac_address(struct net_device *dev, void *addr)
{
+ DECLARE_MAC_BUF(mac);
int i;
- printk("%s: Setting MAC address to ", dev->name);
for (i = 0; i < 6; i++)
- printk(" %2.2x", dev->dev_addr[i] = ((unsigned char *)addr)[i]);
- printk(".\n");
+ dev->dev_addr[i] = ((unsigned char *)addr)[i];
+ printk(KERN_INFO "%s: Setting MAC address to %s\n",
+ dev->name, print_mac(mac, dev->dev_addr));
/* set the Ethernet address */
for (i=0; i < ETH_ALEN/2; i++)
writereg(dev, PP_IA+i*2, dev->dev_addr[i*2] | (dev->dev_addr[i*2+1] << 8));
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 06/11] drivers/net/pcnet32.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Don Fry, Jeff Garzik, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/pcnet32.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index ff92aca..87edeb6 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1769,8 +1769,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
memset(dev->dev_addr, 0, sizeof(dev->dev_addr));
if (pcnet32_debug & NETIF_MSG_PROBE) {
- for (i = 0; i < 6; i++)
- printk(" %2.2x", dev->dev_addr[i]);
+ DECLARE_MAC_BUF(mac);
+ printk(" %s", print_mac(mac, dev->dev_addr));
/* Version 0x2623 and 0x2624 */
if (((chip_version + 1) & 0xfffe) == 0x2624) {
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 05/11] drivers/net/niu.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/niu.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index abfc61c..8a0f8f8 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -7392,12 +7392,10 @@ static void __devinit niu_assign_netdev_ops(struct net_device *dev)
static void __devinit niu_device_announce(struct niu *np)
{
struct net_device *dev = np->dev;
- int i;
+ DECLARE_MAC_BUF(mac);
- pr_info("%s: NIU Ethernet ", dev->name);
- for (i = 0; i < 6; i++)
- printk("%2.2x%c", dev->dev_addr[i],
- i == 5 ? '\n' : ':');
+ pr_info("%s: NIU Ethernet %s\n",
+ dev->name, print_mac(mac, dev->dev_addr));
pr_info("%s: Port type[%s] mode[%s:%s] XCVR[%s] phy[%s]\n",
dev->name,
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 07/11] drivers/net/smc911x.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/smc911x.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 76cc1d3..f503b73 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -2086,10 +2086,9 @@ static int __init smc911x_probe(struct net_device *dev, unsigned long ioaddr)
"set using ifconfig\n", dev->name);
} else {
/* Print the Ethernet address */
- printk("%s: Ethernet addr: ", dev->name);
- for (i = 0; i < 5; i++)
- printk("%2.2x:", dev->dev_addr[i]);
- printk("%2.2x\n", dev->dev_addr[5]);
+ DECLARE_MAC_BUF(mac);
+ printk("%s: Ethernet addr: %s\n",
+ dev->name, print_mac(mac, dev->dev_addr));
}
if (lp->phy_type == 0) {
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 08/11] drivers/net/sunvnet.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/sunvnet.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c
index ff1028a..4a0035f 100644
--- a/drivers/net/sunvnet.c
+++ b/drivers/net/sunvnet.c
@@ -1149,6 +1149,7 @@ static int __devinit vnet_port_probe(struct vio_dev *vdev,
struct vnet *vp;
const u64 *rmac;
int len, i, err, switch_port;
+ DECLARE_MAC_BUF(mac);
print_version();
@@ -1213,12 +1214,9 @@ static int __devinit vnet_port_probe(struct vio_dev *vdev,
dev_set_drvdata(&vdev->dev, port);
- printk(KERN_INFO "%s: PORT ( remote-mac ", vp->dev->name);
- for (i = 0; i < 6; i++)
- printk("%2.2x%c", port->raddr[i], i == 5 ? ' ' : ':');
- if (switch_port)
- printk("switch-port ");
- printk(")\n");
+ printk(KERN_INFO "%s: PORT ( remote-mac %s%s )\n",
+ vp->dev->name, print_mac(mac, port->raddr),
+ switch_port ? " switch-port" : "");
vio_port_up(&port->vio);
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 09/11] drivers/net/tg3.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, Michael Chan, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/tg3.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 4942f7d..eea7da9 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -12351,9 +12351,10 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
unsigned long tg3reg_base, tg3reg_len;
struct net_device *dev;
struct tg3 *tp;
- int i, err, pm_cap;
+ int err, pm_cap;
char str[40];
u64 dma_mask, persist_dma_mask;
+ DECLARE_MAC_BUF(mac);
if (tg3_version_printed++ == 0)
printk(KERN_INFO "%s", version);
@@ -12632,7 +12633,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
goto err_out_apeunmap;
}
- printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (%s) %s Ethernet ",
+ printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] "
+ "(%s) %s Ethernet %s\n",
dev->name,
tp->board_part_number,
tp->pci_chip_rev_id,
@@ -12640,11 +12642,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
tg3_bus_string(tp, str),
((tp->tg3_flags & TG3_FLAG_10_100_ONLY) ? "10/100Base-TX" :
((tp->tg3_flags2 & TG3_FLG2_ANY_SERDES) ? "1000Base-SX" :
- "10/100/1000Base-T")));
-
- for (i = 0; i < 6; i++)
- printk("%2.2x%c", dev->dev_addr[i],
- i == 5 ? '\n' : ':');
+ "10/100/1000Base-T")),
+ print_mac(mac, dev->dev_addr));
printk(KERN_INFO "%s: RXcsums[%d] LinkChgREG[%d] "
"MIirq[%d] ASF[%d] WireSpeed[%d] TSOcap[%d]\n",
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 10/11] drivers/net/tulip/de4x5.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik, netdev, tulip-users
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/tulip/de4x5.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index 41f34bb..288f994 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -5361,14 +5361,11 @@ de4x5_dbg_open(struct net_device *dev)
{
struct de4x5_private *lp = netdev_priv(dev);
int i;
+ DECLARE_MAC_BUF(mac);
if (de4x5_debug & DEBUG_OPEN) {
printk("%s: de4x5 opening with irq %d\n",dev->name,dev->irq);
- printk("\tphysical address: ");
- for (i=0;i<6;i++) {
- printk("%2.2x:",(short)dev->dev_addr[i]);
- }
- printk("\n");
+ printk("\tphysical address: %s\n", print_mac(mac, dev->dev_addr));
printk("Descriptor head addresses:\n");
printk("\t0x%8.8lx 0x%8.8lx\n",(u_long)lp->rx_ring,(u_long)lp->tx_ring);
printk("Descriptor addresses:\nRX: ");
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* [PATCH 11/11] drivers/net/usb/catc.c: Use print_mac
From: Joe Perches @ 2007-12-14 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, Jeff Garzik, linux-usb, netdev
In-Reply-To: <9fc484fc034428ab68ecb2711c8456df9e98d56d.1197671367.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/usb/catc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index 76752d8..e20db50 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -757,6 +757,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
struct catc *catc;
u8 broadcast[6];
int i, pktsz;
+ DECLARE_MAC_BUF(mac);
if (usb_set_interface(usbdev,
intf->altsetting->desc.bInterfaceNumber, 1)) {
@@ -891,11 +892,10 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
f5u011_rxmode(catc, catc->rxmode);
}
dbg("Init done.");
- printk(KERN_INFO "%s: %s USB Ethernet at usb-%s-%s, ",
+ printk(KERN_INFO "%s: %s USB Ethernet at usb-%s-%s, %s\n",
netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate",
- usbdev->bus->bus_name, usbdev->devpath);
- for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]);
- printk("%2.2x.\n", netdev->dev_addr[i]);
+ usbdev->bus->bus_name, usbdev->devpath,
+ print_mac(mac, netdev->dev_addr));
usb_set_intfdata(intf, catc);
SET_NETDEV_DEV(netdev, &intf->dev);
--
1.5.3.7.949.g2221a6
^ permalink raw reply related
* Re: [patch 01/10] e1000e: make E1000E default to the same kconfig setting as E1000
From: Adrian Bunk @ 2007-12-14 22:39 UTC (permalink / raw)
To: Jeff Garzik
Cc: akpm, netdev, randy.dunlap, auke-jan.h.kok,
Linux Kernel Mailing List
In-Reply-To: <4762E9FE.1070707@garzik.org>
On Fri, Dec 14, 2007 at 03:39:26PM -0500, Jeff Garzik wrote:
> akpm@linux-foundation.org wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>...
> So I think the breakage that occurs is mitigated by two factors:
> 1) kernel hackers that do their own configs are expected to be able to
> figure this stuff.
> 2) kernel builders (read: distros, mainly) are expected to have put thought
> into the Kconfig selection and driver migration strategies.
>...
> I would prefer simply to communicate to kernel experts and builders about a
> Kconfig issue that could potentially their booting/networking... because
> this patch is only needed if the kernel experts do not already know about a
> necessary config update.
You miss the vast majority of kconfig users:
3) system administrators etc. who for different reasons compile their
own kernels but neither are nor want to be kernel developers
There's a reason why e.g. LPI requires you to be able to compile your
own kernel even for getting a "Junior Level Linux Professional"
certificate.
Or that one of the authors of "Linux Device drivers" has written a book
covering only how to build and run your own kernel.
> Jeff
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* Re: [Bugme-new] [Bug 9543] New: RTNL: assertion failed at net/ipv6/addrconf.c (2164)/RTNL: assertion failed at net/ipv4/devinet.c (1055)
From: Andy Gospodarek @ 2007-12-14 22:47 UTC (permalink / raw)
To: Krzysztof Oledzki
Cc: Andy Gospodarek, Jay Vosburgh, Herbert Xu, Andrew Morton,
bugme-daemon, shemminger, davem, netdev
In-Reply-To: <Pine.LNX.4.64.0712141955080.12202@bizon.gios.gov.pl>
On Fri, Dec 14, 2007 at 07:57:42PM +0100, Krzysztof Oledzki wrote:
>
>
> On Fri, 14 Dec 2007, Andy Gospodarek wrote:
>
> >On Fri, Dec 14, 2007 at 05:14:57PM +0100, Krzysztof Oledzki wrote:
> >>
> >>
> >>On Wed, 12 Dec 2007, Jay Vosburgh wrote:
> >>
> >>>Herbert Xu <herbert@gondor.apana.org.au> wrote:
> >>>
> >>>>>diff -puN drivers/net/bonding/bond_sysfs.c~bonding-locking-fix
> >>>>>drivers/net/bonding/bond_sysfs.c
> >>>>>--- a/drivers/net/bonding/bond_sysfs.c~bonding-locking-fix
> >>>>>+++ a/drivers/net/bonding/bond_sysfs.c
> >>>>>@@ -1111,8 +1111,6 @@ static ssize_t bonding_store_primary(str
> >>>>>out:
> >>>>> write_unlock_bh(&bond->lock);
> >>>>>
> >>>>>- rtnl_unlock();
> >>>>>-
> >>>>
> >>>>Looking at the changeset that added this perhaps the intention
> >>>>is to hold the lock? If so we should add an rtnl_lock to the start
> >>>>of the function.
> >>>
> >>> Yes, this function needs to hold locks, and more than just
> >>>what's there now. I believe the following should be correct; I haven't
> >>>tested it, though (I'm supposedly on vacation right now).
> >>>
> >>> The following change should be correct for the
> >>>bonding_store_primary case discussed in this thread, and also corrects
> >>>the bonding_store_active case which performs similar functions.
> >>>
> >>> The bond_change_active_slave and bond_select_active_slave
> >>>functions both require rtnl, bond->lock for read and curr_slave_lock for
> >>>write_bh, and no other locks. This is so that the lower level
> >>>mode-specific functions can release locks down to just rtnl in order to
> >>>call, e.g., dev_set_mac_address with the locks it expects (rtnl only).
> >>>
> >>>Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
> >>>
> >>>diff --git a/drivers/net/bonding/bond_sysfs.c
> >>>b/drivers/net/bonding/bond_sysfs.c
> >>>index 11b76b3..28a2d80 100644
> >>>--- a/drivers/net/bonding/bond_sysfs.c
> >>>+++ b/drivers/net/bonding/bond_sysfs.c
> >>>@@ -1075,7 +1075,10 @@ static ssize_t bonding_store_primary(struct device
> >>>*d,
> >>> struct slave *slave;
> >>> struct bonding *bond = to_bond(d);
> >>>
> >>>- write_lock_bh(&bond->lock);
> >>>+ rtnl_lock();
> >>>+ read_lock(&bond->lock);
> >>>+ write_lock_bh(&bond->curr_slave_lock);
> >>>+
> >>> if (!USES_PRIMARY(bond->params.mode)) {
> >>> printk(KERN_INFO DRV_NAME
> >>> ": %s: Unable to set primary slave; %s is in mode
> >>> %d\n",
> >>>@@ -1109,8 +1112,8 @@ static ssize_t bonding_store_primary(struct device
> >>>*d,
> >>> }
> >>> }
> >>>out:
> >>>- write_unlock_bh(&bond->lock);
> >>>-
> >>>+ write_unlock_bh(&bond->curr_slave_lock);
> >>>+ read_unlock(&bond->lock);
> >>> rtnl_unlock();
> >>>
> >>> return count;
> >>>@@ -1190,7 +1193,8 @@ static ssize_t bonding_store_active_slave(struct
> >>>device *d,
> >>> struct bonding *bond = to_bond(d);
> >>>
> >>> rtnl_lock();
> >>>- write_lock_bh(&bond->lock);
> >>>+ read_lock(&bond->lock);
> >>>+ write_lock_bh(&bond->curr_slave_lock);
> >>>
> >>> if (!USES_PRIMARY(bond->params.mode)) {
> >>> printk(KERN_INFO DRV_NAME
> >>>@@ -1247,7 +1251,8 @@ static ssize_t bonding_store_active_slave(struct
> >>>device *d,
> >>> }
> >>> }
> >>>out:
> >>>- write_unlock_bh(&bond->lock);
> >>>+ write_unlock_bh(&bond->curr_slave_lock);
> >>>+ read_unlock(&bond->lock);
> >>> rtnl_unlock();
> >>>
> >>> return count;
> >>
> >>Vanilla 2.6.24-rc5 plus this patch:
> >>
> >>=========================================================
> >>[ INFO: possible irq lock inversion dependency detected ]
> >>2.6.24-rc5 #1
> >>---------------------------------------------------------
> >>events/0/9 just changed the state of lock:
> >> (&mc->mca_lock){-+..}, at: [<c0411c7a>] mld_ifc_timer_expire+0x130/0x1fb
> >>but this lock took another, soft-read-irq-unsafe lock in the past:
> >> (&bond->lock){-.--}
> >>
> >>and interrupts could create inverse lock ordering between them.
> >>
> >>
> >
> >Grrr, I should have seen that -- sorry. Try your luck with this instead:
> <CUT>
>
> No luck.
>
I'm guessing if we go back to using a write-lock for bond->lock this
will go back to working again, but I'm not totally convinced since there
are plenty of places where we used a read-lock with it.
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 11b76b3..635b857 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1075,7 +1075,10 @@ static ssize_t bonding_store_primary(struct device *d,
struct slave *slave;
struct bonding *bond = to_bond(d);
+ rtnl_lock();
write_lock_bh(&bond->lock);
+ write_lock_bh(&bond->curr_slave_lock);
+
if (!USES_PRIMARY(bond->params.mode)) {
printk(KERN_INFO DRV_NAME
": %s: Unable to set primary slave; %s is in mode %d\n",
@@ -1109,8 +1112,8 @@ static ssize_t bonding_store_primary(struct device *d,
}
}
out:
+ write_unlock_bh(&bond->curr_slave_lock);
write_unlock_bh(&bond->lock);
-
rtnl_unlock();
return count;
@@ -1191,6 +1194,7 @@ static ssize_t bonding_store_active_slave(struct device *d,
rtnl_lock();
write_lock_bh(&bond->lock);
+ write_lock_bh(&bond->curr_slave_lock);
if (!USES_PRIMARY(bond->params.mode)) {
printk(KERN_INFO DRV_NAME
@@ -1247,6 +1251,7 @@ static ssize_t bonding_store_active_slave(struct device *d,
}
}
out:
+ write_unlock_bh(&bond->curr_slave_lock);
write_unlock_bh(&bond->lock);
rtnl_unlock();
^ permalink raw reply related
* Re: Packet per Second
From: Glen Turner @ 2007-12-14 22:31 UTC (permalink / raw)
To: Flávio Pires; +Cc: netdev, bridge
In-Reply-To: <nemoFri121407105527@flis.man.torun.pl>
On Fri, 2007-12-14 at 15:34 +0000, Flávio Pires wrote:
> Well, I work on an ISP and we have a linux box acting as a
> bridge+firewall. With this bridge+firewall we control the packet rate
> per second from each client and from our repeaters. But I can`t
> measure the packet rate per IP. Is there any tool for this?
The usual approach is to generate NetFlow records -- there are
a number of Linux tools for this. Collect them with a collector
(flow-tools being a common choice). Then have a Perl script
which reads the flow records, processes them whichever way you
desire, and drops the result into a rrdtool file (there are modules
for both reading the flow-tools data and outputing in the rrdtool
format). The rrdtool utilities have a limited range of graphs,
but there is a huge selection of graphing packages from other
authors for rrdtool-stored data (Drraw, etc). Flow-tools also
has some third-party analysis tools, some of those have good
"top talker" statistics.
This is a lot of work, since you are really putting a complete
measurement infrastructure in place to get the one statistic
you desire. But I'd encourage you to do that, since knowing
one statistic usually leads to further questions of the data.
--
Glen Turner, Senior Network Engineer
Australia's Academic & Research Network www.aarnet.edu.au
^ permalink raw reply
* Re: [PATCH 03/29] mm: slb: add knowledge of reserve pages
From: Daniel Phillips @ 2007-12-14 22:51 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Linus Torvalds, Andrew Morton, linux-kernel, linux-mm, netdev,
trond.myklebust
In-Reply-To: <20071214154439.242195000@chello.nl>
On Friday 14 December 2007 07:39, Peter Zijlstra wrote:
> Restrict objects from reserve slabs (ALLOC_NO_WATERMARKS) to
> allocation contexts that are entitled to it. This is done to ensure
> reserve pages don't leak out and get consumed.
Tighter definitions of "leak out" and "get consumed" would be helpful
here. As I see it, the chain of reasoning is:
* Any MEMALLOC mode allocation must have come from a properly
throttled path and has a finite lifetime that must eventually
produce writeout progress.
* Since the transaction that made the allocation was throttled and
must have a finite lifetime, we know that it must eventually return
the resources it consumed to the appropriate resource pool.
Now, I think what you mean by "get consumed" and "leak out" is: "become
pinned by false sharing with other allocations that do not guarantee
that they will be returned to the resource pool". We can say "pinned"
for short.
So you are attempting to prevent slab pages from becoming pinned by
users that do not obey the reserve management rules, which I think your
approach achieves. However...
Note that false sharing of slab pages is still possible between two
unrelated writeout processes, both of which obey rules for their own
writeout path, but the pinned combination does not. This still leaves
a hole through which a deadlock may slip.
My original solution was simply to allocate a full page when drawing
from the memaloc reserve, which may use a tad more reserve, but makes
it possible to prove the algorithm correct.
Regards,
Daniel
^ permalink raw reply
* [PATCH] [ROSE] finding a connected ROSE neighbor node
From: Bernard Pidoux @ 2007-12-14 22:23 UTC (permalink / raw)
To: David Miller; +Cc: Alexey Dobriyan, Ralf Baechle DL5RB, Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
Hi,
This patch introduces a test to determine if a neighbor node with a
given ROSE address is already connected and if so returns its address.
The previous test was only performed on timer t0 and not on parameter
restarted that is true when a node is connected.
Also, previously the test was not performed on the whole node list.
A new function __rose_get_neigh() is introduced to cure a spin lock
conflict related to rose_node_list_lock.
signed off by Alexey Dobriyan,adobriyan@gmail.com
signed off by Bernard Pidoux, f6bvp @ amsat.org
[-- Attachment #2: rose-2.6.24-rc5.patch2 --]
[-- Type: text/plain, Size: 2755 bytes --]
--- linux-2.6.24-rc5/include/net/rose.h 2007-12-11 04:48:43.000000000 +0100
+++ b/include/net/rose.h 2007-12-14 14:25:02.000000000 +0100
@@ -202,6 +202,7 @@
extern struct net_device *rose_dev_get(rose_address *);
extern struct rose_route *rose_route_free_lci(unsigned int, struct rose_neigh *);
extern struct rose_neigh *rose_get_neigh(rose_address *, unsigned char *, unsigned char *);
+extern struct rose_neigh *__rose_get_neigh(rose_address *, unsigned char *, unsigned char *);
extern int rose_rt_ioctl(unsigned int, void __user *);
extern void rose_link_failed(ax25_cb *, int);
extern int rose_route_frame(struct sk_buff *, ax25_cb *);
--- linux-2.6.24-rc5/net/rose/rose_route.c 2007-12-11 04:48:43.000000000 +0100
+++ b/net/rose/rose_route.c 2007-12-14 14:25:02.000000000 +0100
@@ -664,25 +664,22 @@
/*
* Find a neighbour given a ROSE address.
*/
-struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause,
+struct rose_neigh *__rose_get_neigh(rose_address *addr, unsigned char *cause,
unsigned char *diagnostic)
{
- struct rose_neigh *res = NULL;
struct rose_node *node;
int failed = 0;
int i;
- spin_lock_bh(&rose_node_list_lock);
for (node = rose_node_list; node != NULL; node = node->next) {
if (rosecmpm(addr, &node->address, node->mask) == 0) {
for (i = 0; i < node->count; i++) {
- if (!rose_ftimer_running(node->neighbour[i])) {
- res = node->neighbour[i];
- goto out;
- } else
- failed = 1;
+ if (node->neighbour[i]->restarted)
+ return node->neighbour[i];
+ if (!rose_ftimer_running(node->neighbour[i]))
+ return node->neighbour[i];
+ failed = 1;
}
- break;
}
}
@@ -694,7 +691,16 @@
*diagnostic = 0;
}
-out:
+ return NULL;
+}
+
+struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause,
+ unsigned char *diagnostic)
+{
+ struct rose_neigh *res;
+
+ spin_lock_bh(&rose_node_list_lock);
+ res = __rose_get_neigh(addr, cause, diagnostic);
spin_unlock_bh(&rose_node_list_lock);
return res;
@@ -1019,7 +1025,7 @@
rose_route = rose_route->next;
}
- if ((new_neigh = rose_get_neigh(dest_addr, &cause, &diagnostic)) == NULL) {
+ if ((new_neigh = __rose_get_neigh(dest_addr, &cause, &diagnostic)) == NULL) {
rose_transmit_clear_request(rose_neigh, lci, cause, diagnostic);
goto out;
}
--- linux-2.6.24-rc5/net/rose/af_rose.c 2007-12-11 04:48:43.000000000 +0100
+++ b/net/rose/af_rose.c 2007-12-14 14:25:02.000000000 +0100
@@ -750,7 +750,7 @@
sk->sk_state = TCP_CLOSE;
sock->state = SS_UNCONNECTED;
- rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause,
+ rose->neighbour = __rose_get_neigh(&addr->srose_addr, &cause,
&diagnostic);
if (!rose->neighbour)
return -ENETUNREACH;
^ permalink raw reply
* [PATCH] [AX25] circular locking with AX25 connection timeout
From: Bernard Pidoux @ 2007-12-14 22:29 UTC (permalink / raw)
To: David Miller; +Cc: Jarek Poplawski, Ralf Baechle DL5RB, Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 136 bytes --]
Hi,
This patch cancels a circular locking conflict that appeared with a
timeout of an AX25 connection.
signed off by Jarek Poplawski
[-- Attachment #2: rose-2.6.24-rc5.patch3 --]
[-- Type: text/plain, Size: 472 bytes --]
--- linux-2.6.24-rc5/net/ax25/ax25_subr.c 2007-12-11 04:48:43.000000000 +0100
+++ b/net/ax25/ax25_subr.c 2007-12-14 14:30:02.000000000 +0100
@@ -279,6 +279,7 @@
ax25_link_failed(ax25, reason);
if (ax25->sk != NULL) {
+ local_bh_disable();
bh_lock_sock(ax25->sk);
ax25->sk->sk_state = TCP_CLOSE;
ax25->sk->sk_err = reason;
@@ -288,5 +289,6 @@
sock_set_flag(ax25->sk, SOCK_DEAD);
}
bh_unlock_sock(ax25->sk);
+ local_bh_enable();
}
}
^ permalink raw reply
* [PATCH] [ROSE] ROSE_PACLEN definition used a number constant value
From: Bernard Pidoux @ 2007-12-14 22:42 UTC (permalink / raw)
To: David S. Miller; +Cc: Ralf Baechle DL5RB, Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
Hi,
ROSE_PACLEN was defined by a substraction using a fixed constant value
of 256 in af_rose.c
#define ROSE_PACLEN (256-ROSE_MIN_LEN)
For more convenience 256 is replaced by AX25_DEF_PACLEN default size
declared in ax25.h which is the actual AX25 MTU.
signed off by Bernard Pidoux, f6bvp@amsat.org
[-- Attachment #2: rose-2.6.24-rc5.patch5 --]
[-- Type: text/plain, Size: 384 bytes --]
--- linux-2.6.24-rc5/net/rose/af_rose.c 2007-12-11 04:48:43.000000000 +0100
+++ b/net/rose/af_rose.c 2007-12-14 14:35:16.000000000 +0100
@@ -1148,7 +1148,7 @@
}
#ifdef M_BIT
-#define ROSE_PACLEN (256-ROSE_MIN_LEN)
+#define ROSE_PACLEN (AX25_DEF_PACLEN-ROSE_MIN_LEN)
if (skb->len - ROSE_MIN_LEN > ROSE_PACLEN) {
unsigned char header[ROSE_MIN_LEN];
struct sk_buff *skbn;
^ permalink raw reply
* [PATCH] [ROSE] static const struct proto_ops in af_rose.c
From: Bernard Pidoux @ 2007-12-14 22:33 UTC (permalink / raw)
To: David Miller; +Cc: Ralf Baechle DL5RB, Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
This patch corrects the declaration of struct proto_ops as static const
like in struct socket <linux/net.h>
signed off by Bernard Pidoux, f6bvp@amsat.org
[-- Attachment #2: rose-2.6.24-rc5.patch4 --]
[-- Type: text/plain, Size: 571 bytes --]
--- linux-2.6.24-rc5/net/rose/af_rose.c 2007-12-11 04:48:43.000000000 +0100
+++ b/net/rose/af_rose.c 2007-12-14 14:32:06.000000000 +0100
@@ -63,7 +63,7 @@
static HLIST_HEAD(rose_list);
static DEFINE_SPINLOCK(rose_list_lock);
-static struct proto_ops rose_proto_ops;
+static const struct proto_ops rose_proto_ops;
ax25_address rose_callsign;
@@ -1483,7 +1483,7 @@
.owner = THIS_MODULE,
};
-static struct proto_ops rose_proto_ops = {
+static const struct proto_ops rose_proto_ops = {
.family = PF_ROSE,
.owner = THIS_MODULE,
.release = rose_release,
^ permalink raw reply
* [PATCH] [ROSE] reverts commits d85838c55d836c33077344fab424f200f2827d84
From: Bernard Pidoux @ 2007-12-14 21:58 UTC (permalink / raw)
To: David Miller; +Cc: adobriyan, ralf, netdev, Jarek Poplawski
In-Reply-To: <20071007.234433.21388460.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
Hi,
This patch against 2.6.24-rc5 reverts commit
d85838c55d836c33077344fab424f200f2827d84,
that was supposed to detect all connected ROSE node neighbors.
Actually the loop was misplaced and the node list was not completely
explored.Next sublitted patch gives a solution.
signed off by Bernard Pidoux, f6bvp@amsat.org
[-- Attachment #2: rose-2.6.24-rc5.patch1 --]
[-- Type: text/plain, Size: 738 bytes --]
--- linux-2.6.24-rc5/net/rose/af_rose.c 2007-12-11 04:48:43.000000000 +0100
+++ b/net/rose/af_rose.c 2007-12-14 14:09:40.000000000 +0100
@@ -782,7 +782,6 @@
rose_insert_socket(sk); /* Finish the bind */
}
-rose_try_next_neigh:
rose->dest_addr = addr->srose_addr;
rose->dest_call = addr->srose_call;
rose->rand = ((long)rose & 0xFFFF) + rose->lci;
@@ -844,12 +843,6 @@
}
if (sk->sk_state != TCP_ESTABLISHED) {
- /* Try next neighbour */
- rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic);
- if (rose->neighbour)
- goto rose_try_next_neigh;
-
- /* No more neighbours */
sock->state = SS_UNCONNECTED;
err = sock_error(sk); /* Always set at this point */
goto out_release;
^ permalink raw reply
* [PATCH] [ROSE] ax25_send_frame() called with a constant paclen = 260
From: Bernard Pidoux @ 2007-12-14 22:49 UTC (permalink / raw)
To: David S. Miller; +Cc: Ralf Baechle DL5RB, Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
Hi,
In rose_link.c ax25_send_frame() was called with a constant paclen
parameter of 260 bytes.
This value looked odd to me for it did not correspond to any defined or
possible computed length.Replacing this value by 0 (zero) allowed
ax25_send_frame() to substitute it by the default AX25 frame size, which
in turn induced significant results on the AX25 frame fragmentation and
removed some garbage trailing characters in AX25 frames sent.
signed off by Bernard Pidoux, f6bvp@amsat.org
[-- Attachment #2: rose-2.6.24-rc5.patch6 --]
[-- Type: text/plain, Size: 438 bytes --]
--- linux-2.6.24-rc5/net/rose/rose_link.c 2007-12-11 04:48:43.000000000 +0100
+++ b/net/rose/rose_link.c 2007-12-14 14:39:23.000000000 +0100
@@ -107,7 +107,7 @@
else
rose_call = &rose_callsign;
- neigh->ax25 = ax25_send_frame(skb, 260, rose_call, &neigh->callsign, neigh->digipeat, neigh->dev);
+ neigh->ax25 = ax25_send_frame(skb, 0, rose_call, &neigh->callsign, neigh->digipeat, neigh->dev);
return (neigh->ax25 != NULL);
}
^ permalink raw reply
* Re: [PATCH 2/2] cxgb3 - Parity initialization for T3C adapters
From: Divy Le Ray @ 2007-12-14 23:05 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, linux-kernel, Steve Wise, wenxiong
In-Reply-To: <4759E200.3050607@chelsio.com>
Divy Le Ray wrote:
> Jeff Garzik wrote:
>>
>> Divy Le Ray wrote:
>> > Jeff Garzik wrote:
>> >> Divy Le Ray wrote:
>> >>> From: Divy Le Ray <divy@chelsio.com>
>> >>>
>> >>> Add parity initialization for T3C adapters.
>> >>>
>> >>> Signed-off-by: Divy Le Ray <divy@chelsio.com>
>> >>> ---
>> >>>
>> >>> drivers/net/cxgb3/adapter.h | 1
>> >>> drivers/net/cxgb3/cxgb3_main.c | 82 ++++++++++++
>> >>> drivers/net/cxgb3/cxgb3_offload.c | 15 ++
>> >>> drivers/net/cxgb3/regs.h | 248
>> >>> +++++++++++++++++++++++++++++++++++++
>> >>> drivers/net/cxgb3/sge.c | 24 +++-
>> >>> drivers/net/cxgb3/t3_hw.c | 131 +++++++++++++++++---
>> >>> 6 files changed, 472 insertions(+), 29 deletions(-)
>> >>
>> >> dropped patches 2-3, did not apply
>> >>
>> >>
>> >
>> > Hi Jeff,
>> >
>> > I noticed that you applied the first one of this 3 patches series
>> to the
>> > #upstream-fixes branch.
>> > These patches are intended to the #upstream (2.6.25) branch, as
>> they are
>> > built on top of the
>> > last 10 patches committed - 9 from me, and the white space clean up
>> > (thanks!).
>> > May be this is the reason why they did not apply.
>>
>> Ah... you need to tell me these things. I looked for a kernel version
>> in your messages but did not see one.
>>
> I had put it in the introduction mail, I should have added the kernel
> version in the patch titles.
> I'll do from now on.
>
>>
>> Does the patch #1 need to be reverted for 2.6.24?
>>
> No, it can be applied to 2.6.24.
> The 2 next patches seem to apply cleanly on #upstream when patch #1 is
> popped out the patch stack.
>
Hi Jeff,
Did you get a chance to apply these patches #upstream ?
Cheers,
Divy
^ permalink raw reply
* Re: [patch 2/4] net: use mutex_is_locked() for ASSERT_RTNL()
From: Andrew Morton @ 2007-12-14 23:11 UTC (permalink / raw)
To: David Miller; +Cc: herbert, netdev
In-Reply-To: <20071214.111514.03773174.davem@davemloft.net>
On Fri, 14 Dec 2007 11:15:14 -0800 (PST)
David Miller <davem@davemloft.net> wrote:
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Fri, 14 Dec 2007 16:30:37 +0800
>
> > On Fri, Dec 14, 2007 at 12:22:09AM -0800, Andrew Morton wrote:
> > >
> > > I don't see how it could warn about that. Nor should it - one might want
> > > to check that rtnl_lock is held inside preempt_disable() or spin_lock or
> > > whatever.
> > >
> > > It might make sense to warn if ASSERT_RTNL is called in in_interrupt()
> > > contexts though.
> >
> > Well the paths where ASSERT_RTNL is used should never be in an
> > atomic context. In the past it has been quite useful in pointing
> > out bogus locking practices.
> >
> > There is currently one path where it's known to warn because of
> > this and it (promiscuous mode) is on my todo list.
> >
> > Oh and it only warns when you have mutex debugging enabled.
>
> Right, this change is just totally bogus.
>
> I'm all for using existing facilities to replace hand-crafted copies,
> but this case is removing useful debugging functionality so it's
> wrong.
I don't believe that ASSERT_RTNL() presently warns when called from atomic
contexts. If it does then I missed it.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox