On Fri, 3 Mar 2006, Jeff Garzik wrote:
Jeff Kirsher wrote:
+#define DEFAULT_DEBUG_LEVEL_SHIFT 3
+static int debug = DEFAULT_DEBUG_LEVEL_SHIFT;
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
@@ -386,6 +394,7 @@ ixgb_probe(struct pci_dev *pdev,
adapter->netdev = netdev;
adapter->pdev = pdev;
adapter->hw.back = adapter;
+ adapter->msg_enable = (1 << debug) - 1;
mmio_start = pci_resource_start(pdev, BAR_0);
mmio_len = pci_resource_len(pdev, BAR_0);
Why are you not using netif_msg_init()?
I didn't know it existed. Seems like a good idea to me.
WRT to these changes, e100/e1000 in the kernel (and now ixgb) all do it
the same way. I was just catching up ixgb.
@@ -426,6 +435,7 @@ ixgb_probe(struct pci_dev *pdev,
netdev->poll_controller = ixgb_netpoll;
#endif
+ strcpy(netdev->name, pci_name(pdev));
netdev->mem_start = mmio_start;
netdev->mem_end = mmio_start + mmio_len;
netdev->base_addr = adapter->hw.io_base;
@@ -476,6 +487,7 @@ ixgb_probe(struct pci_dev *pdev,
INIT_WORK(&adapter->tx_timeout_task,
(void (*)(void *))ixgb_tx_timeout_task, netdev);
+ strcpy(netdev->name, "eth%d");
if((err = register_netdev(netdev)))
goto err_register;
This is cheating, I'm not sure I like this at all.
I don't think this is cheating at all. It allows us to use the DPRINTK
macro before everything is all set up to print "eth0: blah" and instead it
prints "Bus:dev:Fn: blah" which is pretty useful, IMO. If you have any
ideas about how to do this better we're open to them. This solves a very
specific problem for us.
I would ask that you take the patches as is for now, esp since it is
making ixgb look more like e100 / e1000 and then we move them all to more
correct api's as an evolution.
Thanks,
Jesse
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html