All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] igc: Remove _I_PHY_ID checking for i225 devices
@ 2022-08-11  8:39 Linjun Bao
  2022-08-11  8:52 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Linjun Bao @ 2022-08-11  8:39 UTC (permalink / raw)
  To: stable; +Cc: meljbao

commit 7c496de538ee ("igc: Remove _I_PHY_ID checking") upstream,
backported to stable kernel 5.4 to support i225 Ethernet adapters.

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) |
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] igc: Remove _I_PHY_ID checking for i225 devices
  2022-08-11  8:39 [PATCH] igc: Remove _I_PHY_ID checking for i225 devices Linjun Bao
@ 2022-08-11  8:52 ` Greg KH
  2022-08-11 10:19   ` meljbao
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2022-08-11  8:52 UTC (permalink / raw)
  To: Linjun Bao; +Cc: stable

On Thu, Aug 11, 2022 at 04:39:51PM +0800, Linjun Bao wrote:
> commit 7c496de538ee ("igc: Remove _I_PHY_ID checking") upstream,
> backported to stable kernel 5.4 to support i225 Ethernet adapters.
> 
> Signed-off-by: Linjun Bao <meljbao@gmail.com>

What happened to the original commit message and signed off by lines,
and why not cc: everyone involved in the original commit also?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] igc: Remove _I_PHY_ID checking for i225 devices
  2022-08-11  8:52 ` Greg KH
@ 2022-08-11 10:19   ` meljbao
  2022-08-11 13:48     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: meljbao @ 2022-08-11 10:19 UTC (permalink / raw)
  To: Greg KH, stable, Sasha Neftin, Dvora Fuxbrumer, Tony Nguyen

On 8/11/22 4:52 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Thu, Aug 11, 2022 at 04:39:51PM +0800, Linjun Bao wrote:
> > commit 7c496de538ee ("igc: Remove _I_PHY_ID checking") upstream,
> > backported to stable kernel 5.4 to support i225 Ethernet adapters.
> >
> > Signed-off-by: Linjun Bao <meljbao@gmail.com>
> 
> What happened to the original commit message and signed off by lines,
> and why not cc: everyone involved in the original commit also?
> 
I wrongly re-send this commit to mainline initially, then Tony guided me
submitting to the stable tree with Option#3 [1]. Sorry I did not involve 
everyone in the original commit which I should. I re-send this commit 
because I encounter probe failure with i225-LM Ethernet card on liuux-5.4, 
and the original commit could not be applied to 5.4 directly, and this 
duplicated patch has been tested with i225-LM. I would like this commit is
backported to linux-5.4, please correct me if I am doing the wrong thing.

Regards
Joseph

[1] https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#procedure-for-submitting-patches-to-the-stable-tree

> thanks,
> 
> greg k-h
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] igc: Remove _I_PHY_ID checking for i225 devices
  2022-08-11 10:19   ` meljbao
@ 2022-08-11 13:48     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2022-08-11 13:48 UTC (permalink / raw)
  To: meljbao; +Cc: stable, Sasha Neftin, Dvora Fuxbrumer, Tony Nguyen

On Thu, Aug 11, 2022 at 06:19:20PM +0800, meljbao@gmail.com wrote:
> On 8/11/22 4:52 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Thu, Aug 11, 2022 at 04:39:51PM +0800, Linjun Bao wrote:
> > > commit 7c496de538ee ("igc: Remove _I_PHY_ID checking") upstream,
> > > backported to stable kernel 5.4 to support i225 Ethernet adapters.
> > >
> > > Signed-off-by: Linjun Bao <meljbao@gmail.com>
> > 
> > What happened to the original commit message and signed off by lines,
> > and why not cc: everyone involved in the original commit also?
> > 
> I wrongly re-send this commit to mainline initially, then Tony guided me
> submitting to the stable tree with Option#3 [1]. Sorry I did not involve 
> everyone in the original commit which I should. I re-send this commit 
> because I encounter probe failure with i225-LM Ethernet card on liuux-5.4, 
> and the original commit could not be applied to 5.4 directly, and this 
> duplicated patch has been tested with i225-LM. I would like this commit is
> backported to linux-5.4, please correct me if I am doing the wrong thing.
> 
> Regards
> Joseph
> 
> [1] https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#procedure-for-submitting-patches-to-the-stable-tree

The original commit worked just fine, why not just send that?

I've now queued it up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-11 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11  8:39 [PATCH] igc: Remove _I_PHY_ID checking for i225 devices Linjun Bao
2022-08-11  8:52 ` Greg KH
2022-08-11 10:19   ` meljbao
2022-08-11 13:48     ` Greg KH

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.