Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-19 Thread Shannon Nelson
On 7/19/19 12:07 PM, Andrew Lunn wrote: On Fri, Jul 19, 2019 at 11:41:28AM -0700, Shannon Nelson wrote: On 7/18/19 7:40 PM, Andrew Lunn wrote: On Thu, Jul 18, 2019 at 05:12:07PM -0700, Shannon Nelson wrote: On 7/17/19 8:28 PM, Andrew Lunn wrote: On Fri, Jul 12, 2019 at 10:16:31PM -0700, Shann

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-19 Thread Andrew Lunn
On Fri, Jul 19, 2019 at 11:41:28AM -0700, Shannon Nelson wrote: > On 7/18/19 7:40 PM, Andrew Lunn wrote: > >On Thu, Jul 18, 2019 at 05:12:07PM -0700, Shannon Nelson wrote: > >>On 7/17/19 8:28 PM, Andrew Lunn wrote: > >>>On Fri, Jul 12, 2019 at 10:16:31PM -0700, Shannon Nelson wrote: > On 7/8/19

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-19 Thread Shannon Nelson
On 7/18/19 7:40 PM, Andrew Lunn wrote: On Thu, Jul 18, 2019 at 05:12:07PM -0700, Shannon Nelson wrote: On 7/17/19 8:28 PM, Andrew Lunn wrote: On Fri, Jul 12, 2019 at 10:16:31PM -0700, Shannon Nelson wrote: On 7/8/19 7:14 PM, Andrew Lunn wrote: +static int ionic_set_pauseparam(struct net_devic

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-18 Thread Andrew Lunn
On Thu, Jul 18, 2019 at 05:12:07PM -0700, Shannon Nelson wrote: > On 7/17/19 8:28 PM, Andrew Lunn wrote: > >On Fri, Jul 12, 2019 at 10:16:31PM -0700, Shannon Nelson wrote: > >>On 7/8/19 7:14 PM, Andrew Lunn wrote: > +static int ionic_set_pauseparam(struct net_device *netdev, > +

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-18 Thread Shannon Nelson
On 7/17/19 8:28 PM, Andrew Lunn wrote: On Fri, Jul 12, 2019 at 10:16:31PM -0700, Shannon Nelson wrote: On 7/8/19 7:14 PM, Andrew Lunn wrote: +static int ionic_set_pauseparam(struct net_device *netdev, + struct ethtool_pauseparam *pause) +{ + struct lif *lif =

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-18 Thread Shannon Nelson
On 7/18/19 10:28 AM, Andrew Lunn wrote: On Thu, Jul 18, 2019 at 10:05:23AM -0700, Shannon Nelson wrote: On 7/17/19 8:21 PM, Andrew Lunn wrote: On Tue, Jul 09, 2019 at 03:42:39PM -0700, Shannon Nelson wrote: On 7/8/19 7:27 PM, Andrew Lunn wrote: +static int ionic_get_module_eeprom(struct net_d

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-18 Thread Andrew Lunn
On Thu, Jul 18, 2019 at 10:05:23AM -0700, Shannon Nelson wrote: > On 7/17/19 8:21 PM, Andrew Lunn wrote: > >On Tue, Jul 09, 2019 at 03:42:39PM -0700, Shannon Nelson wrote: > >>On 7/8/19 7:27 PM, Andrew Lunn wrote: > +static int ionic_get_module_eeprom(struct net_device *netdev, > +

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-18 Thread Shannon Nelson
On 7/17/19 8:31 PM, Andrew Lunn wrote: On Fri, Jul 12, 2019 at 10:32:38PM -0700, Shannon Nelson wrote: On 7/8/19 7:30 PM, Andrew Lunn wrote: +static int ionic_nway_reset(struct net_device *netdev) +{ + struct lif *lif = netdev_priv(netdev); + int err = 0; + + if (netif_running

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-18 Thread Shannon Nelson
On 7/17/19 8:21 PM, Andrew Lunn wrote: On Tue, Jul 09, 2019 at 03:42:39PM -0700, Shannon Nelson wrote: On 7/8/19 7:27 PM, Andrew Lunn wrote: +static int ionic_get_module_eeprom(struct net_device *netdev, + struct ethtool_eeprom *ee, +

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-17 Thread Andrew Lunn
On Fri, Jul 12, 2019 at 10:32:38PM -0700, Shannon Nelson wrote: > On 7/8/19 7:30 PM, Andrew Lunn wrote: > >>+static int ionic_nway_reset(struct net_device *netdev) > >>+{ > >>+ struct lif *lif = netdev_priv(netdev); > >>+ int err = 0; > >>+ > >>+ if (netif_running(netdev)) > >>+ err

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-17 Thread Andrew Lunn
On Fri, Jul 12, 2019 at 10:16:31PM -0700, Shannon Nelson wrote: > On 7/8/19 7:14 PM, Andrew Lunn wrote: > >>+static int ionic_set_pauseparam(struct net_device *netdev, > >>+ struct ethtool_pauseparam *pause) > >>+{ > >>+ struct lif *lif = netdev_priv(netdev); > >>+ str

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-17 Thread Andrew Lunn
On Tue, Jul 09, 2019 at 03:42:39PM -0700, Shannon Nelson wrote: > On 7/8/19 7:27 PM, Andrew Lunn wrote: > >>+static int ionic_get_module_eeprom(struct net_device *netdev, > >>+ struct ethtool_eeprom *ee, > >>+ u8 *data) > >>+{ > >>+ struct

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-12 Thread Shannon Nelson
On 7/8/19 7:30 PM, Andrew Lunn wrote: +static int ionic_nway_reset(struct net_device *netdev) +{ + struct lif *lif = netdev_priv(netdev); + int err = 0; + + if (netif_running(netdev)) + err = ionic_reset_queues(lif); What does ionic_reset_queues() do? It sounds no

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-12 Thread Shannon Nelson
On 7/8/19 7:14 PM, Andrew Lunn wrote: +static int ionic_set_pauseparam(struct net_device *netdev, + struct ethtool_pauseparam *pause) +{ + struct lif *lif = netdev_priv(netdev); + struct ionic *ionic = lif->ionic; + struct ionic_dev *idev = &lif->io

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-11 Thread Shannon Nelson
On 7/8/19 3:04 PM, Andrew Lunn wrote: + case XCVR_PID_SFP_10GBASE_ER: + ethtool_link_ksettings_add_link_mode(ks, supported, +1baseER_Full); + break; I don't know these link modes too well. But only setting

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-09 Thread Shannon Nelson
On 7/8/19 7:27 PM, Andrew Lunn wrote: +static int ionic_get_module_eeprom(struct net_device *netdev, + struct ethtool_eeprom *ee, + u8 *data) +{ + struct lif *lif = netdev_priv(netdev); + struct ionic_dev *idev = &lif->

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-09 Thread Shannon Nelson
On 7/8/19 10:15 PM, Michal Kubecek wrote: Also, there is no need to zero initialize ks->link_modes.advertising above if it's going to be rewritten here anyway. Michal Got it. Thanks, sln

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-09 Thread Shannon Nelson
On 7/8/19 10:25 PM, Michal Kubecek wrote: On Mon, Jul 08, 2019 at 12:25:26PM -0700, Shannon Nelson wrote: Add in the basic ethtool callbacks for device information and control. + + if (fec_type != idev->port_info->config.fec_type) { + mutex_lock(&ionic->dev_cmd_lock); +

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-08 Thread Michal Kubecek
On Mon, Jul 08, 2019 at 12:25:26PM -0700, Shannon Nelson wrote: > Add in the basic ethtool callbacks for device information > and control. > > Signed-off-by: Shannon Nelson > --- > drivers/net/ethernet/pensando/ionic/Makefile | 2 +- > .../net/ethernet/pensando/ionic/ionic_dev.h | 3 + >

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-08 Thread Michal Kubecek
On Tue, Jul 09, 2019 at 12:04:06AM +0200, Andrew Lunn wrote: > > +static int ionic_get_link_ksettings(struct net_device *netdev, > > + struct ethtool_link_ksettings *ks) > > +{ > > + struct lif *lif = netdev_priv(netdev); > > + struct ionic_dev *idev = &lif->ionic-

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-08 Thread Andrew Lunn
> +static int ionic_nway_reset(struct net_device *netdev) > +{ > + struct lif *lif = netdev_priv(netdev); > + int err = 0; > + > + if (netif_running(netdev)) > + err = ionic_reset_queues(lif); What does ionic_reset_queues() do? It sounds nothing like restarting auto negotia

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-08 Thread Andrew Lunn
> +static int ionic_get_module_eeprom(struct net_device *netdev, > +struct ethtool_eeprom *ee, > +u8 *data) > +{ > + struct lif *lif = netdev_priv(netdev); > + struct ionic_dev *idev = &lif->ionic->idev; > + struct xcvr_sta

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-08 Thread Andrew Lunn
> +static int ionic_set_pauseparam(struct net_device *netdev, > + struct ethtool_pauseparam *pause) > +{ > + struct lif *lif = netdev_priv(netdev); > + struct ionic *ionic = lif->ionic; > + struct ionic_dev *idev = &lif->ionic->idev; > + > + u32 requested

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-08 Thread Andrew Lunn
> +static int ionic_get_link_ksettings(struct net_device *netdev, > + struct ethtool_link_ksettings *ks) > +{ > + struct lif *lif = netdev_priv(netdev); > + struct ionic_dev *idev = &lif->ionic->idev; > + int copper_seen = 0; > + > + ethtool_link_kset

[PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-08 Thread Shannon Nelson
Add in the basic ethtool callbacks for device information and control. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- .../net/ethernet/pensando/ionic/ionic_dev.h | 3 + .../ethernet/pensando/ionic/ionic_ethtool.c | 509 ++ .../ethe