From: Ben Hutchings <ben@decadent.org.uk>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] atl1c: Add support for Atheros AR8152 and AR8152
Date: Mon, 11 Oct 2010 02:18:50 +0100 [thread overview]
Message-ID: <1286759930.2955.285.camel@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]
Your commit 496c185c9495629ef1c65387cb2594578393cfe0 "atl1c: Add support
for Atheros AR8152 and AR8152" included the following changes:
> --- a/drivers/net/atl1c/atl1c_hw.c
> +++ b/drivers/net/atl1c/atl1c_hw.c
> @@ -70,17 +70,39 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)
[...]
> - /* Enable OTP CLK */
> - if (!(otp_ctrl_data & OTP_CTRL_CLK_EN)) {
> - otp_ctrl_data |= OTP_CTRL_CLK_EN;
> - AT_WRITE_REG(hw, REG_OTP_CTRL, otp_ctrl_data);
> - AT_WRITE_FLUSH(hw);
> - msleep(1);
> + if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) {
> + /* Enable OTP CLK */
> + if (!(otp_ctrl_data & OTP_CTRL_CLK_EN)) {
> + otp_ctrl_data |= OTP_CTRL_CLK_EN;
> + AT_WRITE_REG(hw, REG_OTP_CTRL, otp_ctrl_data);
> + AT_WRITE_FLUSH(hw);
> + msleep(1);
> + }
> + }
[...]
> @@ -96,11 +118,31 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)
> return -1;
> }
> /* Disable OTP_CLK */
> - if (otp_ctrl_data & OTP_CTRL_CLK_EN) {
> - otp_ctrl_data &= ~OTP_CTRL_CLK_EN;
> - AT_WRITE_REG(hw, REG_OTP_CTRL, otp_ctrl_data);
> - AT_WRITE_FLUSH(hw);
> - msleep(1);
> + if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) {
> + if (otp_ctrl_data & OTP_CTRL_CLK_EN) {
> + otp_ctrl_data &= ~OTP_CTRL_CLK_EN;
> + AT_WRITE_REG(hw, REG_OTP_CTRL, otp_ctrl_data);
> + AT_WRITE_FLUSH(hw);
> + msleep(1);
> + }
> + }
Shouldn't the first if-statement use the same condition as the second
i.e. matching the previously-defined hardware types athr_l1c and
athr_l2c?
Ben.
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next reply other threads:[~2010-10-11 1:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-11 1:18 Ben Hutchings [this message]
2010-10-11 4:03 ` [PATCH] atl1c: Add support for Atheros AR8152 and AR8152 David Miller
2010-10-11 18:48 ` Luis R. Rodriguez
2010-10-11 19:01 ` Stephen Hemminger
2010-10-11 19:02 ` David Miller
2010-10-11 22:28 ` Ben Hutchings
[not found] ` <20101012004503.GI10049@tux>
2010-10-22 20:37 ` Luis R. Rodriguez
-- strict thread matches above, loose matches on Subject: below --
2010-02-12 0:33 Luis R. Rodriguez
2010-02-16 23:16 ` 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=1286759930.2955.285.camel@localhost \
--to=ben@decadent.org.uk \
--cc=lrodriguez@atheros.com \
--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 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.