From: Linjun Bao <meljbao@gmail.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
"David S. Miller" <davem@davemloft.net>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] igc: Remove _I_PHY_ID check for i225 devices
Date: Wed, 10 Aug 2022 16:22:42 +0800 [thread overview]
Message-ID: <0b4ce201-be78-5a5d-0098-0cbe14ea43fd@gmail.com> (raw)
In-Reply-To: <b39c9fa3-1b7c-c7b1-c3dd-bf5ceb035dc8@intel.com>
On 2022/8/10 上午1:32, Tony Nguyen wrote:
> On 8/9/2022 6:35 AM, Linjun Bao wrote:
>> Source commit 7c496de538ee ("igc: Remove _I_PHY_ID checking"),
>> remove _I_PHY_ID check for i225 device, since i225 devices only
>> have one PHY vendor.
>
> What are you trying to do with this patch? You're referencing the original commit so you know it's committed, but it's not clear to me why you are re-sending it.
>
I'm new here, please correct me if I am doing things in the wrong way.
Yes this commit was committed to mainline about one year ago. But this commit has not been included into kernel 5.4 yet, and I encountered the probe failure when using alderlake-s with Ethernet adapter i225-LM. Since I could not directly apply the patch 7c496de538ee to kernel 5.4, so I generated this patch for kernel 5.4 usage.
Looks like sending a duplicated patch is not expected. Would you please advise what is the proper action when encountering such case? I would like this fix to be implemented into LTS kernel 5.4, I also wrote a ticket on https://bugzilla.kernel.org/show_bug.cgi?id=216261, but no response.
Regards
Joseph
> Thanks,
> Tony
>
>> Signed-off-by: Linjun Bao <meljbao@gmail.com>
>> ---
>> drivers/net/ethernet/intel/igc/igc_base.c | 10 +---------
>> drivers/net/ethernet/intel/igc/igc_main.c | 3 +--
>> drivers/net/ethernet/intel/igc/igc_phy.c | 6 ++----
>> 3 files changed, 4 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/igc/igc_base.c b/drivers/net/ethernet/intel/igc/igc_base.c
>> index db289bcce21d..d66429eb14a5 100644
>> --- a/drivers/net/ethernet/intel/igc/igc_base.c
>> +++ b/drivers/net/ethernet/intel/igc/igc_base.c
>> @@ -187,15 +187,7 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw)
>> igc_check_for_copper_link(hw);
>> - /* Verify phy id and set remaining function pointers */
>> - switch (phy->id) {
>> - case I225_I_PHY_ID:
>> - phy->type = igc_phy_i225;
>> - break;
>> - default:
>> - ret_val = -IGC_ERR_PHY;
>> - goto out;
>> - }
>> + phy->type = igc_phy_i225;
>> out:
>> return ret_val;
>> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
>> index 9ba05d9aa8e0..b8297a63a7fd 100644
>> --- a/drivers/net/ethernet/intel/igc/igc_main.c
>> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
>> @@ -2884,8 +2884,7 @@ bool igc_has_link(struct igc_adapter *adapter)
>> break;
>> }
>> - if (hw->mac.type == igc_i225 &&
>> - hw->phy.id == I225_I_PHY_ID) {
>> + if (hw->mac.type == igc_i225) {
>> if (!netif_carrier_ok(adapter->netdev)) {
>> adapter->flags &= ~IGC_FLAG_NEED_LINK_UPDATE;
>> } else if (!(adapter->flags & IGC_FLAG_NEED_LINK_UPDATE)) {
>> diff --git a/drivers/net/ethernet/intel/igc/igc_phy.c b/drivers/net/ethernet/intel/igc/igc_phy.c
>> index 6156c76d765f..1be112ce6774 100644
>> --- a/drivers/net/ethernet/intel/igc/igc_phy.c
>> +++ b/drivers/net/ethernet/intel/igc/igc_phy.c
>> @@ -235,8 +235,7 @@ static s32 igc_phy_setup_autoneg(struct igc_hw *hw)
>> return ret_val;
>> }
>> - if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
>> - hw->phy.id == I225_I_PHY_ID) {
>> + if (phy->autoneg_mask & ADVERTISE_2500_FULL) {
>> /* Read the MULTI GBT AN Control Register - reg 7.32 */
>> ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK <<
>> MMD_DEVADDR_SHIFT) |
>> @@ -376,8 +375,7 @@ static s32 igc_phy_setup_autoneg(struct igc_hw *hw)
>> ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL,
>> mii_1000t_ctrl_reg);
>> - if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
>> - hw->phy.id == I225_I_PHY_ID)
>> + if (phy->autoneg_mask & ADVERTISE_2500_FULL)
>> ret_val = phy->ops.write_reg(hw,
>> (STANDARD_AN_REG_MASK <<
>> MMD_DEVADDR_SHIFT) |
next prev parent reply other threads:[~2022-08-10 8:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 13:35 [PATCH] igc: Remove _I_PHY_ID check for i225 devices Linjun Bao
2022-08-09 17:32 ` Tony Nguyen
2022-08-10 7:37 ` Linjun Bao
2022-08-10 8:22 ` Linjun Bao [this message]
2022-08-10 17:20 ` Tony Nguyen
2022-08-11 0:09 ` Linjun Bao
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=0b4ce201-be78-5a5d-0098-0cbe14ea43fd@gmail.com \
--to=meljbao@gmail.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-kernel@vger.kernel.org \
--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