From: Stephen Hemminger <shemminger@linux-foundation.org>
To: "Eliezer Tamir" <eliezert@broadcom.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, jeff@garzik.org,
"masbock" <masbock@us.ibm.com>,
"Eilon Greenstein" <eilong@broadcom.com>,
"Michael Chan" <mchan@broadcom.com>,
"Ram Pai" <linuxram@us.ibm.com>,
"Philip Oswald" <poswald@novell.com>
Subject: Re: [PATCH 2.6.25] add bnx2x driver for BCM57710 - bnx2x.c
Date: Thu, 15 Nov 2007 15:03:49 -0800 [thread overview]
Message-ID: <20071115150349.51e6d133@freepuppy.rosehill> (raw)
In-Reply-To: <1195155983.24548.35.camel@lb-tlvb-eliezer.il.broadcom.com>
1. Please use dev_err() to help user figure out which board has problem:
Not:
printk(KERN_ERR PFX "Cannot register net device\n");
Instead:
dev_err(&pdev->dev, "cannot register net device\n");
2. Use new MAC_ADDR() rather than
printk("node addr ");
for (i = 0; i < 6; i++)
printk("%2.2x", dev->dev_addr[i]);
printk("\n");
3. The reset task logic needs more cleanup/protection.
Don't you want to cancel it on remove, and bp->in_reset_task is
not sufficient protection on SMP??
Could you not flush_scheduled_work(), instead use cancel_delayed_work_sync()?
4. Rather than hard coding mac address, could you use random_ether_address()
instead?
5. Current style police will complain about single line {}
if (bp->phy_flags & PHY_XGXS_FLAG) {
cmd->port = PORT_FIBRE;
} else {
cmd->port = PORT_TP;
}
instead:
if (bp->phy_flags & PHY_XGXS_FLAG)
cmd->port = PORT_FIBRE;
else
cmd->port = PORT_TP;
6. The driver is using per-cpu tx queue, maybe it wants to have multi
queue instead?
7. bnx2x_get_stats() is uneeded. If you leave dev->get_stats() set to NULL
then register_netdev will handle it.
8. Spelling fixes:
> *
> * Written by: Eliezer Tamir <eliezert@broadcom.com>
> * Based on code from Michael Chan's bnx2 driver
> * UDP CSUM errata workaround by Arik Gendelman
> * Slowpath rework by Vladislav Zolotarov
> * Statistics and Link managment by Yitchak Gertner
spelling fix: s/managment/management/
...
>MODULE_PARM_DESC(nomcp, "ignore managment CPU (Implies onefunc)");
management
>MODULE_PARM_DESC(debug, "defualt debug msglevel");
default
> /* indexed by board_t, above */
> static const struct {
> char *name;
> } board_info[] __devinitdata = {
> { "Broadcom NetXtreme II BCM57710 XGb" }
> };
why not just
static const char *board_info[] = {
"NetXtreme II BCM57710 XGb",
};
> static const struct pci_device_id bnx2x_pci_tbl[] = {
> { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_NX2_57710,
> PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM57710 },
> { 0 }
> };
>
> /* reolve from gp_status in case of AN complete and not sgmii */
resolve??
> DP(NETIF_MSG_LINK, "enableing BigMAC\n");
enabling
next prev parent reply other threads:[~2007-11-15 23:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 19:19 [PATCH 2.6.25] add bnx2x driver for BCM57710 Eliezer Tamir
2007-11-15 19:45 ` [PATCH 2.6.25] add bnx2x driver for BCM57710 - bnx2x.h Eliezer Tamir
2007-11-15 19:46 ` [PATCH 2.6.25] add bnx2x driver for BCM57710 - bnx2x.c Eliezer Tamir
2007-11-15 23:03 ` Stephen Hemminger [this message]
2007-11-15 23:10 ` David Miller
2007-11-16 7:55 ` Eliezer Tamir
2007-11-15 19:47 ` [PATCH 2.6.25] add bnx2x driver for BCM57710 - bnx2x_fw_defs.h Eliezer Tamir
2007-11-15 19:47 ` [PATCH 2.6.25] add bnx2x driver for BCM57710 - bnx2x_hsi.h Eliezer Tamir
2007-11-15 19:48 ` [PATCH 2.6.25] add bnx2x driver for BCM57710 - bnx2x_init.h Eliezer Tamir
2007-11-15 19:49 ` [PATCH 2.6.25] add bnx2x driver for BCM57710 - bnx2x_reg.h Eliezer Tamir
2007-11-15 23:16 ` [PATCH 2.6.25] add bnx2x driver for BCM57710 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071115150349.51e6d133@freepuppy.rosehill \
--to=shemminger@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.com \
--cc=eliezert@broadcom.com \
--cc=jeff@garzik.org \
--cc=linuxram@us.ibm.com \
--cc=masbock@us.ibm.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=poswald@novell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox