diff mbox

Added SIOCSMIIREG (mii write) support to intel igb driver

Message ID 20170622132356.2567-1-michael.moese@men.de
State Changes Requested
Headers show

Commit Message

Michael Moese June 22, 2017, 1:23 p.m. UTC
From: Andreas Werner <andreas.werner@men.de>

Signed-off-by: Andreas Werner <andreas.werner@men.de>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Kirsher, Jeffrey T June 26, 2017, 9:11 p.m. UTC | #1
On Thu, 2017-06-22 at 15:23 +0200, Michael Moese wrote:
> From: Andreas Werner <andreas.werner@men.de>
> 
> Signed-off-by: Andreas Werner <andreas.werner@men.de>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++
>  1 file changed, 4 insertions(+)

NACK

Why?  Your lack of patch description does not provide a reasoning on why we
need this change.  I need a patch description that provides justification
on why we need this change, before I add this to my queue for testing and
acceptance upstream.

Please resubmit with the requested information/change.

> 
> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
> b/drivers/net/ethernet/intel/igb/igb_main.c
> index 1cf74aa4ebd9..87e496eeefb1 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> @@ -7716,6 +7716,10 @@ static int igb_mii_ioctl(struct net_device
> *netdev, struct ifreq *ifr, int cmd)
>  			return -EIO;
>  		break;
>  	case SIOCSMIIREG:
> +		if (igb_write_phy_reg(&adapter->hw, data->reg_num &
> 0x1F,
> +				      data->val_in))
> +			return -EIO;
> +		break;
>  	default:
>  		return -EOPNOTSUPP;
>  	}
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 1cf74aa4ebd9..87e496eeefb1 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -7716,6 +7716,10 @@  static int igb_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
 			return -EIO;
 		break;
 	case SIOCSMIIREG:
+		if (igb_write_phy_reg(&adapter->hw, data->reg_num & 0x1F,
+				      data->val_in))
+			return -EIO;
+		break;
 	default:
 		return -EOPNOTSUPP;
 	}