From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Florian Fainelli <florian.fainelli@telecomint.eu>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH][RFC] Add support for the RDC R6040 Fast Ethernet controller
Date: Wed, 31 Oct 2007 09:07:23 -0700 [thread overview]
Message-ID: <20071031090723.408cf228@shemminger-laptop> (raw)
In-Reply-To: <200710292251.43257.florian.fainelli@telecomint.eu>
On Mon, 29 Oct 2007 22:51:42 +0100
Florian Fainelli <florian.fainelli@telecomint.eu> wrote:
> This patch adds support for the RDC R6040 MAC we can find in the RDC R-321x System-on-chips.
> This driver really needs improvements especially on the NAPI part which probably does not
> fully use the new NAPI structure.
> You will need the RDC PCI identifiers if you want to test this driver which are the following ones :
>
> RDC_PCI_VENDOR_ID = 0x17f3
> RDC_PCI_DEVICE_ID_RDC_R6040 = 0x6040
>
> Thank you very much in advance for your comments.
>
> Signed-off-by: Sten Wang <sten.wang@rdc.com.tw>
> Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
> Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
**** BUG *** Don't call kfree() to free the network device; use free_netdev()
* Don't define use uppercase for variable names (NUM_MAC_TABLE)
* Use get_random_ether_addr() rather than a hardcoded table of mac addresses.
* checkpatch complains about some extra blanks, and several lines > 80 chars.
* use ethtool stubs for check_link
* add ethtool get_settings to allow use by bonding/bridging, etc.
* this is unusual coding style:
+ do {} while ((i++ < 2048) && (inw(ioaddr + 0x04) & 0x1));
* add a blank line after declarations and before code in a function
* use of global NAPI_status should be replaced by putting it in priv
* the handling of shared IRQ is wrong.
- need to check for status == 0 || status == 0xffff and return IRQ_NONE
* don't call napi_disable() with irq's disabled in r6040_close
* poll routine shouldn't call dev_kfree_skb_irq() to free Tx buffers because
that means going through TX softirq, just call dev_kfree_skb()
* the down routine calls pci_unmap_single with wrong length when handling
TX buffers.
* pci id table can be cleaned up:
static struct pci_device_id r6040_pci_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_RDC, 0x6040) },
{ PCI_DEVICE(PCI_VENDOR_VIA, 0x3065) },
{ 0 }
};
* use netdev_priv() consistently rather than dev->priv.
Yes they are the same now, but that will be fixed in future.
* eliminate check for dev being NULL in IRQ handler.
* reorder functions to eliminate need for forward declarations
* get rid of R6040_PCI_CMD and pci_flags field it is unused.
* do you really have to have the whole chip_info at all? The only usage
seems to be to validate the pci region size. Do you have platforms with
busted BIOS that set it wrong or something??
---
WARNING: no space between function name and open parenthesis '('
#1071: FILE: drivers/net/r6040.c:958:
+static int __init r6040_init (void)
WARNING: no space between function name and open parenthesis '('
#1073: FILE: drivers/net/r6040.c:960:
+ return pci_register_driver (&r6040_driver);
WARNING: no space between function name and open parenthesis '('
#1077: FILE: drivers/net/r6040.c:964:
+static void __exit r6040_cleanup (void)
WARNING: no space between function name and open parenthesis '('
#1079: FILE: drivers/net/r6040.c:966:
+ pci_unregister_driver (&r6040_driver);
total: 0 errors, 36 warnings, 1001 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
next prev parent reply other threads:[~2007-10-31 16:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-29 21:51 [PATCH][RFC] Add support for the RDC R6040 Fast Ethernet controller Florian Fainelli
2007-10-30 8:29 ` Ilpo Järvinen
2007-10-31 8:57 ` Jeff Garzik
2007-10-31 16:07 ` Stephen Hemminger [this message]
2007-11-10 18:22 ` [PATCH][RFC take 2] " Florian Fainelli
2007-11-10 19:33 ` Stephen Hemminger
2007-11-13 19:09 ` Stephen Hemminger
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=20071031090723.408cf228@shemminger-laptop \
--to=shemminger@linux-foundation.org \
--cc=florian.fainelli@telecomint.eu \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).