* [net-next 1/5] ixgbe: modify behavior on receiving a HW ECC error.
2014-02-13 8:00 [net-next 0/5] Intel Wired LAN Driver Updates Aaron Brown
@ 2014-02-13 8:00 ` Aaron Brown
2014-02-13 8:00 ` [net-next 2/5] ixgbe: implement SIOCGHWTSTAMP ioctl Aaron Brown
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Aaron Brown @ 2014-02-13 8:00 UTC (permalink / raw)
To: davem; +Cc: Don Skidmore, netdev, gospo, sassmann, Aaron Brown
From: Don Skidmore <donald.c.skidmore@intel.com>
Currently when we noticed a HW ECC error we would request the use reload
the driver to force a reset of the part. This was done due to the mistaken
believe that a normal reset would not be sufficient. Well it turns out it
would be so now we just schedule a reset upon seeing the ECC.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 6d4ada7..7824559 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2630,9 +2630,12 @@ static irqreturn_t ixgbe_msix_other(int irq, void *data)
switch (hw->mac.type) {
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
- if (eicr & IXGBE_EICR_ECC)
- e_info(link, "Received unrecoverable ECC Err, please "
- "reboot\n");
+ if (eicr & IXGBE_EICR_ECC) {
+ e_info(link, "Received ECC Err, initiating reset\n");
+ adapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;
+ ixgbe_service_event_schedule(adapter);
+ IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC);
+ }
/* Handle Flow Director Full threshold interrupt */
if (eicr & IXGBE_EICR_FLOW_DIR) {
int reinit_count = 0;
@@ -2846,9 +2849,12 @@ static irqreturn_t ixgbe_intr(int irq, void *data)
ixgbe_check_sfp_event(adapter, eicr);
/* Fall through */
case ixgbe_mac_X540:
- if (eicr & IXGBE_EICR_ECC)
- e_info(link, "Received unrecoverable ECC err, please "
- "reboot\n");
+ if (eicr & IXGBE_EICR_ECC) {
+ e_info(link, "Received ECC Err, initiating reset\n");
+ adapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;
+ ixgbe_service_event_schedule(adapter);
+ IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC);
+ }
ixgbe_check_overtemp_event(adapter, eicr);
break;
default:
--
1.8.5.GIT
^ permalink raw reply related [flat|nested] 10+ messages in thread* [net-next 2/5] ixgbe: implement SIOCGHWTSTAMP ioctl
2014-02-13 8:00 [net-next 0/5] Intel Wired LAN Driver Updates Aaron Brown
2014-02-13 8:00 ` [net-next 1/5] ixgbe: modify behavior on receiving a HW ECC error Aaron Brown
@ 2014-02-13 8:00 ` Aaron Brown
2014-02-13 20:03 ` Ben Hutchings
2014-02-13 8:00 ` [net-next 3/5] ixgbe: don't use magic size number to assign ptp_caps.name Aaron Brown
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Aaron Brown @ 2014-02-13 8:00 UTC (permalink / raw)
To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Aaron Brown
From: Jacob Keller <jacob.e.keller@intel.com>
This patch adds support for the new SIOCGHWTSTAMP ioctl, which enables
a process to determine the current timestamp configuration. In order to
implement this, store a copy of the timestamp configuration. In addition,
we can remove the 'int cmd' parameter as the new set_ts_config function
doesn't use it. I also fixed a typo in the function description.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 5 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++-
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 35 +++++++++++++++++----------
3 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 0186ea2..d7c7f13 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -765,6 +765,7 @@ struct ixgbe_adapter {
struct ptp_clock_info ptp_caps;
struct work_struct ptp_tx_work;
struct sk_buff *ptp_tx_skb;
+ struct hwtstamp_config tstamp_config;
unsigned long ptp_tx_start;
unsigned long last_overflow_check;
unsigned long last_rx_ptp_check;
@@ -958,8 +959,8 @@ static inline void ixgbe_ptp_rx_hwtstamp(struct ixgbe_ring *rx_ring,
rx_ring->last_rx_timestamp = jiffies;
}
-int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter, struct ifreq *ifr,
- int cmd);
+int ixgbe_ptp_set_ts_config(struct ixgbe_adapter *adapter, struct ifreq *ifr);
+int ixgbe_ptp_get_ts_config(struct ixgbe_adapter *adapter, struct ifreq *ifr);
void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter);
void ixgbe_ptp_reset(struct ixgbe_adapter *adapter);
void ixgbe_ptp_check_pps_event(struct ixgbe_adapter *adapter, u32 eicr);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 7824559..84ca49b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7149,7 +7149,9 @@ static int ixgbe_ioctl(struct net_device *netdev, struct ifreq *req, int cmd)
switch (cmd) {
case SIOCSHWTSTAMP:
- return ixgbe_ptp_hwtstamp_ioctl(adapter, req, cmd);
+ return ixgbe_ptp_set_ts_config(adapter, req);
+ case SIOCGHWTSTAMP:
+ return ixgbe_ptp_get_ts_config(adapter, req);
default:
return mdio_mii_ioctl(&adapter->hw.phy.mdio, if_mii(req), cmd);
}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 5184e2a..95ed8ea 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -576,14 +576,21 @@ void __ixgbe_ptp_rx_hwtstamp(struct ixgbe_q_vector *q_vector,
shhwtstamps->hwtstamp = ns_to_ktime(ns);
}
+int ixgbe_ptp_get_ts_config(struct ixgbe_adapter *adapter, struct ifreq *ifr)
+{
+ struct hwtstamp_config *config = &adapter->tstamp_config;
+
+ return copy_to_user(ifr->ifr_data, config,
+ sizeof(*config)) ? -EFAULT : 0;
+}
+
/**
- * ixgbe_ptp_hwtstamp_ioctl - control hardware time stamping
+ * ixgbe_ptp_set_ts_config - control hardware time stamping
* @adapter: pointer to adapter struct
* @ifreq: ioctl data
- * @cmd: particular ioctl requested
*
* Outgoing time stamping can be enabled and disabled. Play nice and
- * disable it when requested, although it shouldn't case any overhead
+ * disable it when requested, although it shouldn't cause any overhead
* when no packet needs it. At most one packet in the queue may be
* marked for time stamping, otherwise it would be impossible to tell
* for sure to which packet the hardware time stamp belongs.
@@ -599,25 +606,24 @@ void __ixgbe_ptp_rx_hwtstamp(struct ixgbe_q_vector *q_vector,
* Event mode. This more accurately tells the user what the hardware is going
* to do anyways.
*/
-int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
- struct ifreq *ifr, int cmd)
+int ixgbe_ptp_set_ts_config(struct ixgbe_adapter *adapter, struct ifreq *ifr)
{
struct ixgbe_hw *hw = &adapter->hw;
- struct hwtstamp_config config;
+ struct hwtstamp_config *config = &adapter->tstamp_config;
u32 tsync_tx_ctl = IXGBE_TSYNCTXCTL_ENABLED;
u32 tsync_rx_ctl = IXGBE_TSYNCRXCTL_ENABLED;
u32 tsync_rx_mtrl = PTP_EV_PORT << 16;
bool is_l2 = false;
u32 regval;
- if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
+ if (copy_from_user(config, ifr->ifr_data, sizeof(*config)))
return -EFAULT;
/* reserved for future extensions */
- if (config.flags)
+ if (config->flags)
return -EINVAL;
- switch (config.tx_type) {
+ switch (config->tx_type) {
case HWTSTAMP_TX_OFF:
tsync_tx_ctl = 0;
case HWTSTAMP_TX_ON:
@@ -626,7 +632,7 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
return -ERANGE;
}
- switch (config.rx_filter) {
+ switch (config->rx_filter) {
case HWTSTAMP_FILTER_NONE:
tsync_rx_ctl = 0;
tsync_rx_mtrl = 0;
@@ -650,7 +656,7 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
tsync_rx_ctl |= IXGBE_TSYNCRXCTL_TYPE_EVENT_V2;
is_l2 = true;
- config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
+ config->rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
break;
case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
case HWTSTAMP_FILTER_ALL:
@@ -661,7 +667,7 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
* Delay_Req messages and hardware does not support
* timestamping all packets => return error
*/
- config.rx_filter = HWTSTAMP_FILTER_NONE;
+ config->rx_filter = HWTSTAMP_FILTER_NONE;
return -ERANGE;
}
@@ -702,7 +708,7 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
regval = IXGBE_READ_REG(hw, IXGBE_TXSTMPH);
regval = IXGBE_READ_REG(hw, IXGBE_RXSTMPH);
- return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ?
+ return copy_to_user(ifr->ifr_data, config, sizeof(*config)) ?
-EFAULT : 0;
}
@@ -809,6 +815,9 @@ void ixgbe_ptp_reset(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_SYSTIMH, 0x00000000);
IXGBE_WRITE_FLUSH(hw);
+ /* Reset the saved tstamp_config */
+ memset(&adapter->tstamp_config, 0, sizeof(adapter->tstamp_config));
+
ixgbe_ptp_start_cyclecounter(adapter);
spin_lock_irqsave(&adapter->tmreg_lock, flags);
--
1.8.5.GIT
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [net-next 2/5] ixgbe: implement SIOCGHWTSTAMP ioctl
2014-02-13 8:00 ` [net-next 2/5] ixgbe: implement SIOCGHWTSTAMP ioctl Aaron Brown
@ 2014-02-13 20:03 ` Ben Hutchings
2014-02-13 21:46 ` Keller, Jacob E
0 siblings, 1 reply; 10+ messages in thread
From: Ben Hutchings @ 2014-02-13 20:03 UTC (permalink / raw)
To: Aaron Brown; +Cc: davem, Jacob Keller, netdev, gospo, sassmann
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
On Thu, 2014-02-13 at 00:00 -0800, Aaron Brown wrote:
[...]
> +int ixgbe_ptp_set_ts_config(struct ixgbe_adapter *adapter, struct ifreq *ifr)
> {
> struct ixgbe_hw *hw = &adapter->hw;
> - struct hwtstamp_config config;
> + struct hwtstamp_config *config = &adapter->tstamp_config;
> u32 tsync_tx_ctl = IXGBE_TSYNCTXCTL_ENABLED;
> u32 tsync_rx_ctl = IXGBE_TSYNCRXCTL_ENABLED;
> u32 tsync_rx_mtrl = PTP_EV_PORT << 16;
> bool is_l2 = false;
> u32 regval;
>
> - if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
> + if (copy_from_user(config, ifr->ifr_data, sizeof(*config)))
> return -EFAULT;
[...]
This is wrong. You overwrite the current config before validating it.
Ben.
--
Ben Hutchings
The world is coming to an end. Please log off.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [net-next 2/5] ixgbe: implement SIOCGHWTSTAMP ioctl
2014-02-13 20:03 ` Ben Hutchings
@ 2014-02-13 21:46 ` Keller, Jacob E
0 siblings, 0 replies; 10+ messages in thread
From: Keller, Jacob E @ 2014-02-13 21:46 UTC (permalink / raw)
To: Ben Hutchings
Cc: Brown, Aaron F, davem@davemloft.net, netdev@vger.kernel.org,
gospo@redhat.com, sassmann@redhat.com
On Thu, 2014-02-13 at 20:03 +0000, Ben Hutchings wrote:
> On Thu, 2014-02-13 at 00:00 -0800, Aaron Brown wrote:
> [...]
> > +int ixgbe_ptp_set_ts_config(struct ixgbe_adapter *adapter, struct ifreq *ifr)
> > {
> > struct ixgbe_hw *hw = &adapter->hw;
> > - struct hwtstamp_config config;
> > + struct hwtstamp_config *config = &adapter->tstamp_config;
> > u32 tsync_tx_ctl = IXGBE_TSYNCTXCTL_ENABLED;
> > u32 tsync_rx_ctl = IXGBE_TSYNCRXCTL_ENABLED;
> > u32 tsync_rx_mtrl = PTP_EV_PORT << 16;
> > bool is_l2 = false;
> > u32 regval;
> >
> > - if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
> > + if (copy_from_user(config, ifr->ifr_data, sizeof(*config)))
> > return -EFAULT;
> [...]
>
> This is wrong. You overwrite the current config before validating it.
>
> Ben.
>
Oops. Thanks for the catch. I'll respin this.
Regards,
Jake
^ permalink raw reply [flat|nested] 10+ messages in thread
* [net-next 3/5] ixgbe: don't use magic size number to assign ptp_caps.name
2014-02-13 8:00 [net-next 0/5] Intel Wired LAN Driver Updates Aaron Brown
2014-02-13 8:00 ` [net-next 1/5] ixgbe: modify behavior on receiving a HW ECC error Aaron Brown
2014-02-13 8:00 ` [net-next 2/5] ixgbe: implement SIOCGHWTSTAMP ioctl Aaron Brown
@ 2014-02-13 8:00 ` Aaron Brown
2014-02-13 8:00 ` [net-next 4/5] ixgbe: Add WoL support for a new device Aaron Brown
2014-02-13 8:00 ` [net-next 5/5] ixgbe: fixup warning regarding max_vfs parameter Aaron Brown
4 siblings, 0 replies; 10+ messages in thread
From: Aaron Brown @ 2014-02-13 8:00 UTC (permalink / raw)
To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Aaron Brown
From: Jacob Keller <jacob.e.keller@intel.com>
Rather than using a magic size number, just use sizeof since that will
work and is more robust to future changes.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 95ed8ea..5697214 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -849,7 +849,9 @@ void ixgbe_ptp_init(struct ixgbe_adapter *adapter)
switch (adapter->hw.mac.type) {
case ixgbe_mac_X540:
- snprintf(adapter->ptp_caps.name, 16, "%s", netdev->name);
+ snprintf(adapter->ptp_caps.name,
+ sizeof(adapter->ptp_caps.name),
+ "%s", netdev->name);
adapter->ptp_caps.owner = THIS_MODULE;
adapter->ptp_caps.max_adj = 250000000;
adapter->ptp_caps.n_alarm = 0;
@@ -863,7 +865,9 @@ void ixgbe_ptp_init(struct ixgbe_adapter *adapter)
adapter->ptp_caps.enable = ixgbe_ptp_enable;
break;
case ixgbe_mac_82599EB:
- snprintf(adapter->ptp_caps.name, 16, "%s", netdev->name);
+ snprintf(adapter->ptp_caps.name,
+ sizeof(adapter->ptp_caps.name),
+ "%s", netdev->name);
adapter->ptp_caps.owner = THIS_MODULE;
adapter->ptp_caps.max_adj = 250000000;
adapter->ptp_caps.n_alarm = 0;
--
1.8.5.GIT
^ permalink raw reply related [flat|nested] 10+ messages in thread* [net-next 4/5] ixgbe: Add WoL support for a new device
2014-02-13 8:00 [net-next 0/5] Intel Wired LAN Driver Updates Aaron Brown
` (2 preceding siblings ...)
2014-02-13 8:00 ` [net-next 3/5] ixgbe: don't use magic size number to assign ptp_caps.name Aaron Brown
@ 2014-02-13 8:00 ` Aaron Brown
2014-02-13 8:00 ` [net-next 5/5] ixgbe: fixup warning regarding max_vfs parameter Aaron Brown
4 siblings, 0 replies; 10+ messages in thread
From: Aaron Brown @ 2014-02-13 8:00 UTC (permalink / raw)
To: davem; +Cc: Mark Rustad, netdev, gospo, sassmann, Aaron Brown
From: Mark Rustad <mark.d.rustad@intel.com>
Add WoL support for port 0 of a new 82599-based device.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 84ca49b..e65a5be 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7800,6 +7800,7 @@ int ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id,
case IXGBE_DEV_ID_82599_SFP:
/* Only these subdevices could supports WOL */
switch (subdevice_id) {
+ case IXGBE_SUBDEV_ID_82599_SFP_WOL0:
case IXGBE_SUBDEV_ID_82599_560FLR:
/* only support first port */
if (hw->bus.func != 0)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 0d39cfc..9283cff 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -54,6 +54,7 @@
#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE 0x152a
#define IXGBE_DEV_ID_82599_SFP_FCOE 0x1529
#define IXGBE_SUBDEV_ID_82599_SFP 0x11A9
+#define IXGBE_SUBDEV_ID_82599_SFP_WOL0 0x1071
#define IXGBE_SUBDEV_ID_82599_RNDC 0x1F72
#define IXGBE_SUBDEV_ID_82599_560FLR 0x17D0
#define IXGBE_SUBDEV_ID_82599_SP_560FLR 0x211B
--
1.8.5.GIT
^ permalink raw reply related [flat|nested] 10+ messages in thread* [net-next 5/5] ixgbe: fixup warning regarding max_vfs parameter
2014-02-13 8:00 [net-next 0/5] Intel Wired LAN Driver Updates Aaron Brown
` (3 preceding siblings ...)
2014-02-13 8:00 ` [net-next 4/5] ixgbe: Add WoL support for a new device Aaron Brown
@ 2014-02-13 8:00 ` Aaron Brown
2014-02-13 20:01 ` Ben Hutchings
4 siblings, 1 reply; 10+ messages in thread
From: Aaron Brown @ 2014-02-13 8:00 UTC (permalink / raw)
To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Aaron Brown
From: Jacob Keller <jacob.e.keller@intel.com>
The max_vfs parameter for ixgbe is deprecated in favor of using the
sysfs sriov_numvfs field to assign VFs as needed, instead of fixing the
value at module load time. The current message only indicates that you
should use this, without adequately explaining how to do so.
This patch modifies the warning message to include the command necessary
to spawn VFs via sysfs, and points users to the Documentation for more
information.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e65a5be..bbd41a1 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -5068,8 +5068,18 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)
hw->fc.disable_fc_autoneg = ixgbe_device_supports_autoneg_fc(hw);
#ifdef CONFIG_PCI_IOV
- if (max_vfs > 0)
- e_dev_warn("Enabling SR-IOV VFs using the max_vfs module parameter is deprecated - please use the pci sysfs interface instead.\n");
+ if (max_vfs > 0) {
+ e_dev_warn("Enabling SR-IOV VFs using the max_vfs module parameter is deprecated.\n");
+ e_dev_warn("Please use the pci sysfs interface instead. Ex:\n");
+ e_dev_warn("echo '%d' > /sys/bus/pci/devices/%04x:%02x:%02x.%1x/sriov_numvfs\n",
+ max_vfs,
+ pci_domain_nr(pdev->bus),
+ pdev->bus->number,
+ PCI_SLOT(pdev->devfn),
+ PCI_FUNC(pdev->devfn)
+ );
+ e_dev_warn("See 'Documentation/PCI/pci-iov-howto.txt for more information.\n");
+ }
/* assign number of SR-IOV VFs */
if (hw->mac.type != ixgbe_mac_82598EB) {
--
1.8.5.GIT
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [net-next 5/5] ixgbe: fixup warning regarding max_vfs parameter
2014-02-13 8:00 ` [net-next 5/5] ixgbe: fixup warning regarding max_vfs parameter Aaron Brown
@ 2014-02-13 20:01 ` Ben Hutchings
2014-02-13 20:20 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Ben Hutchings @ 2014-02-13 20:01 UTC (permalink / raw)
To: Aaron Brown; +Cc: davem, Jacob Keller, netdev, gospo, sassmann
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
On Thu, 2014-02-13 at 00:00 -0800, Aaron Brown wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
>
> The max_vfs parameter for ixgbe is deprecated in favor of using the
> sysfs sriov_numvfs field to assign VFs as needed, instead of fixing the
> value at module load time. The current message only indicates that you
> should use this, without adequately explaining how to do so.
I don't think the kernel log is the correct place to put documentation.
A reference alone should be enough.
[...]
> + e_dev_warn("See 'Documentation/PCI/pci-iov-howto.txt for more information.\n");
[...]
This doesn't seem very helpful to non-developers. You could instead
give the URL:
https://www.kernel.org/doc/Documentation/PCI/pci-iov-howto.txt
Ben.
--
Ben Hutchings
The world is coming to an end. Please log off.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [net-next 5/5] ixgbe: fixup warning regarding max_vfs parameter
2014-02-13 20:01 ` Ben Hutchings
@ 2014-02-13 20:20 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2014-02-13 20:20 UTC (permalink / raw)
To: ben; +Cc: aaron.f.brown, jacob.e.keller, netdev, gospo, sassmann
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 13 Feb 2014 20:01:32 +0000
> On Thu, 2014-02-13 at 00:00 -0800, Aaron Brown wrote:
>> From: Jacob Keller <jacob.e.keller@intel.com>
>>
>> The max_vfs parameter for ixgbe is deprecated in favor of using the
>> sysfs sriov_numvfs field to assign VFs as needed, instead of fixing the
>> value at module load time. The current message only indicates that you
>> should use this, without adequately explaining how to do so.
>
> I don't think the kernel log is the correct place to put documentation.
> A reference alone should be enough.
>
> [...]
>> + e_dev_warn("See 'Documentation/PCI/pci-iov-howto.txt for more information.\n");
> [...]
>
> This doesn't seem very helpful to non-developers. You could instead
> give the URL:
>
> https://www.kernel.org/doc/Documentation/PCI/pci-iov-howto.txt
I even think this is not desirable. The kernel log isn't supposed to be
a hyper-linked "all the information you could possibly need" repository
for every interesting situation the kernel encounters.
Just say plainly what the problem is, people need a certainly level of
understanding to interpret kernel messages properly.
^ permalink raw reply [flat|nested] 10+ messages in thread