From: Stephen Hemminger <shemminger@vyatta.com>
To: Jie Yang <Jie.Yang@Atheros.com>
Cc: "jeff@garzik.org" <jeff@garzik.org>,
David Miller <davem@davemloft.net>,
"jcliburn@gmail.com" <jcliburn@gmail.com>,
"parag.warudkar@gmail.com" <parag.warudkar@gmail.com>,
Willy Tarreau <w@1wt.eu>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] atl1e: Atheros L1E Gigabit Ethernet driver
Date: Tue, 15 Jul 2008 21:15:14 -0700 [thread overview]
Message-ID: <20080715211514.25848d8a@extreme> (raw)
In-Reply-To: <72981EBCFD196144B7C6999B9FC34A9A3EE60E9F58@SHEXMB-01.global.atheros.com>
On Mon, 14 Jul 2008 11:28:21 +0800
Jie Yang <Jie.Yang@Atheros.com> wrote:
> From: Jie Yang <jie.yang@atheros.com>
>
> Full patch for the Atheros L1E Gigabit Ethernet driver.
> Supportring AR8121, AR8113 and AR8114
>
> Signed-off-by: Jie Yang <jie.yang @atheros.com>
>
> +
> +struct atl1e_recv_ret_status {
> + u16 seq_num;
> + u16 hash_lo;
> + __le32 word1;
> + u16 pkt_flag;
> + u16 err_flag;
> + u16 hash_hi;
> + u16 vtag;
> +} __attribute__((packed));
No need for packed if structure has no holes. And compiler is too stupid
to know that and generates worse code.
> +typedef enum {
> + atl1e_10_half = 0,
> + atl1e_10_full = 1,
> + atl1e_100_half = 2,
> + atl1e_100_full = 3
> +} atl1e_speed_duplex_type;
enum's are good, typedef's are bad. Kernel style is not to use typedef's
except in a very few limited places like locking.
...
> +#ifdef module_param_array
> + if (num_media_type > bd) {
> +#endif
shouldn't need to ifdef like that?? module_param_array is part of 2.6 always.
> + val = media_type[bd];
> + atl1e_validate_option(&val, &opt, pdev);
> + adapter->hw.media_type = (u16) val;
> +#ifdef module_param_array
> + } else {
> + adapter->hw.media_type = (u16)(opt.def);
> + }
> +#endif
> + }
> +}
> +
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index e74b14a..9388130 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -2181,6 +2181,7 @@
>
> #define PCI_VENDOR_ID_ATTANSIC 0x1969
> #define PCI_DEVICE_ID_ATTANSIC_L1 0x1048
> +#define PCI_DEVICE_ID_ATTANSIC_L1E 0x1026
Don't add pci_ids just put in driver. Jeff made that decision because
the number of id's was just growing too large.
next prev parent reply other threads:[~2008-07-16 4:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-14 3:28 [PATCH net-next] atl1e: Atheros L1E Gigabit Ethernet driver Jie Yang
2008-07-16 4:15 ` Stephen Hemminger [this message]
2008-07-16 9:42 ` Jie Yang
2008-07-16 15:53 ` Stephen Hemminger
2008-07-16 16:36 ` Roland Dreier
2008-07-17 2:47 ` Jie Yang
2008-07-17 3:30 ` Wei Yongjun
2008-07-17 3:34 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2008-07-17 9:04 jie.yang
2008-07-17 9:31 ` Alexey Dobriyan
2008-07-17 9:41 ` Jie Yang
2008-07-17 15:44 ` Stephen Hemminger
2008-07-17 20:04 ` Mariusz Kozlowski
2008-07-17 20:23 ` Ben Hutchings
2008-07-17 21:37 ` David Miller
2008-07-18 3:37 jie.yang
2008-07-22 23:31 ` Jeff Garzik
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=20080715211514.25848d8a@extreme \
--to=shemminger@vyatta.com \
--cc=Jie.Yang@Atheros.com \
--cc=davem@davemloft.net \
--cc=jcliburn@gmail.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=parag.warudkar@gmail.com \
--cc=w@1wt.eu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.