[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 04 Apr 2011 11:37:42 -0700
From: Joe Perches <joe@...ches.com>
To: Matt Carlson <mcarlson@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/7] tg3: Add 5720 ASIC rev
On Mon, 2011-04-04 at 11:24 -0700, Matt Carlson wrote:
> This patch adds support for the 5720 ASIC rev.
>
> Signed-off-by: Matt Carlson <mcarlson@...adcom.com>
> Reviewed-by: Michael Chan <mchan@...adcom.com>
> ---
> drivers/net/tg3.c | 67 +++++++++++++++++++++++++++++++++++++---------------
> drivers/net/tg3.h | 5 ++++
> 2 files changed, 52 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
> index b7e03a6..b105cdd 100644
> --- a/drivers/net/tg3.c
> +++ b/drivers/net/tg3.c
> @@ -98,12 +98,14 @@
> */
> #define TG3_RX_STD_RING_SIZE(tp) \
> ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || \
> - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) ? \
> + GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || \
> + GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) ? \
Maybe it'd be better to convert all of these:
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720)
tests to a common functions something like:
static bool can_asic_<foo>(struct tg3 *tp)
{
int rev = GET_ASIC_REV(tp->pci_chip_rev_id);
return (rev == ASIC_REV_5717) ||
(rev == ASIC_REV_5719) ||
(rev == ASIC_REV_5720);
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists