- Jun 15, 2019
-
-
Piotr Marczak authored
Driver did not check response on LLDP flag change and always returned SUCCESS. This patch now checks for an error and returns an error code and has additional information in the log. Signed-off-by:
Piotr Marczak <piotr.marczak@intel.com> Tested-by:
Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Sergey Nemov authored
Change some data to unsigned int instead of integer when we compare. Check LUT values in VIRTCHNL_OP_CONFIG_RSS_LUT handler. Also enhance error/warning messages to print the real values of I40E_MAX_VF_QUEUES, I40E_MAX_VF_VSI and I40E_DEFAULT_QUEUES_PER_VF instead of plain text. Refactor code to comply with 'check first then assign' policy. Remove duplicate checks for VIRTCHNL_OP_CONFIG_RSS_KEY and VIRTCHNL_OP_CONFIG_RSS_LUT opcodes in i40e_vc_process_vf_msg(). We have the very same checks inside the handlers already. Signed-off-by:
Sergey Nemov <sergey.nemov@intel.com> Tested-by:
Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Doug Dziggel authored
This patch makes it possible to log only AQ descriptors, without the entire AQ message buffers being dumped too. It should greatly reduce kernel log size in cases where a full AQ dump is not needed. Selection is made by setting flags in hw->debug_mask. Additionally, some debug messages that preceded an AQ dump have been moved to I40E_DEBUG_AQ_COMMAND class, which seems more appropriate. Signed-off-by:
Doug Dziggel <douglas.a.dziggel@intel.com> Tested-by:
Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Piotr Kwapulinski authored
Add bounds check for ch[] array. Use ARRAY_SIZE() to ensure that idx is within the range. Signed-off-by:
Piotr Kwapulinski <piotr.kwapulinski@intel.com> Tested-by:
Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Mitch Williams authored
The counter variable in i40e_clean_tx_irq starts out negative and climbs to 0. So it should not be defined as a u16. This was working by accident due to the fact the u16 overflows and underflows predictably. Replace the u16 with int, which is signed and can handle the negativity. Signed-off-by:
Mitch Williams <mitch.a.williams@intel.com> Tested-by:
Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Piotr Kwapulinski authored
Add veb array access boundary checks. Ensure veb array index is smaller than I40E_MAX_VEB. Signed-off-by:
Piotr Kwapulinski <piotr.kwapulinski@intel.com> Tested-by:
Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Piotr Kwapulinski authored
This patch lets untrusted VF to create up to 16 VLANs. It was implemented by increasing I40E_VC_MAX_VLAN_PER_VF up to 16. Without this patch untrusted VF could create only up to 8 VLANs. Signed-off-by:
Piotr Kwapulinski <piotr.kwapulinski@intel.com> Tested-by:
Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Aleksandr Loktionov authored
This patch adds functions stubs to support EEE on/off. Signed-off-by:
Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by:
Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
- Jun 14, 2019
-
-
Kevin Darbyshire-Bryant authored
Use extack error reporting mechanism in addition to returning -EINVAL NL_SET_ERR_* code shamelessy copy/paste/adjusted from act_pedit & sch_cake and used as reference as to what I should have done in the first place. Signed-off-by:
Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Greg Kroah-Hartman authored
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, there is no need to store the individual debugfs file name, just remove the whole directory all at once, saving a local variable. Cc: "David S. Miller" <davem@davemloft.net> Cc: Guillaume Nault <g.nault@alphalink.fr> Cc: netdev@vger.kernel.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by:
Guillaume Nault <gnault@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Heiner Kallweit says: ==================== r8169: add and use helper rtl_is_8168evl_up Few registers have been added or changed its purpose with version RTL8168e-vl, so create a helper for identifying chip versions from RTL8168e-vl. ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Heiner Kallweit authored
>From RTL8168e-vl the value in register MaxTxPacketSize is interpreted differently, therefore use new helper rtl_is_8168evl_up to set this register. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Heiner Kallweit authored
Add helper rtl_is_8168evl_up to make the code better readable and to simplify it. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Heiner Kallweit authored
tp->coalesce_info is used in rtl_coalesce_info() only, so we can remove this member. In addition replace phy_ethtool_get_link_ksettings with a direct access to tp->phydev->speed. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Heiner Kallweit authored
In case of a timeout currently ~0 is returned. Callers often just check whether a certain bit is set and therefore may behave incorrectly. So let's return -ETIMEDOUT in case of a timeout. r8168_phy_ocp_read is used in r8168g_mdio_read only, therefore we can apply the same change. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Vladimir Oltean authored
The packing facility is needed to decode Ethernet meta frames containing source port and RX timestamping information. The DSA driver selects CONFIG_PACKING, but the tagger did not, and since taggers can be now compiled as modules independently from the drivers themselves, this is an issue now, as CONFIG_PACKING is disabled by default on all architectures. Fixes: e53e18a6 ("net: dsa: sja1105: Receive and decode meta frames") Signed-off-by:
Vladimir Oltean <olteanv@gmail.com> Reported-by:
Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Robert Hancock authored
We were accessing the pointer returned from platform_get_resource before checking if it was valid, causing an oops if it was not. Move this access after the call to devm_ioremap_resource which does the validity check. Signed-off-by:
Robert Hancock <hancock@sedsystems.ca> Reviewed-by:
Andrew Lunn <andrew@lunn.ch> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Julian Wiedmann says: ==================== s390/qeth: updates 2019-06-11 please apply the following patch series for qeth to net-next. This brings all sorts of cleanups and minor improvements, primarily for the control IO path. ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
We statically allocate 8 cmd buffers on the read channel, when the only IO left that's still using them is the long-running READ. Replace this with a single allocated cmd, that gets restarted whenever the READ completed. This introduces refcounting for allocated cmds, so that the READ cmd can survive the IO completion. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
The current IDX sequence first sends one WRITE cmd to activate the device, and then sends a second cmd that READs the response. Using qeth_alloc_cmd(), we can combine this into a single IO with two command-chained CCWs. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
The RCD code is the last remaining IO path that doesn't use the qeth_send_control_data() infrastructure. Doing so allows us to remove all sorts of custom state machinery and logic in the IRQ handler. Instead of introducing statically allocated cmd buffers for this single IO on the data channel, use the new qeth_alloc_cmd() helper. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
qeth currently uses a fixed set of statically allocated cmd buffers for the read and write IO channels. This (1) doesn't play well with the single RCD cmd we need to issue on the data channel, (2) doesn't provide the necessary flexibility for certain IDX improvements, and (3) is also rather wasteful since the buffers are idle most of the time. Add a new type of cmd buffer that is dynamically allocated, and keeps its ccw chain in the DMA data area. Since this touches most callers of qeth_setup_ccw(), also add a new CCW flags parameter for future usage. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
Each cmd buffer maintains a pointer to the IO channel that it was/will be issued on. So when dealing with cmd buffers, we don't need to pass around a separate channel pointer. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
The vast majority of SETUP-classified trace entries can be moved to their device-specific trace file. This reduces pollution of the global SETUP file, and provides a consistent trace view of all activity on the device. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
OSN currently provides a custom code path to submit IPA cmds, without waiting for the cmd response. Replace it with qeth_send_ipa_cmd(), which uses the common qeth_send_control_data() IO infrastructure. By setting a custom iob->callback, we can now provide feedback to the caller about whether the cmd has been successfully submitted to HW. Since the callback then immediately wakes up the reply-waiter object, we maintain the old behaviour of returning early without waiting for the response. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
The basic MPC initialization sequence is strictly sequential, and waiting for an available cmd buffer should never be necessary. So this change only affects the OSN path, where dangling waiters on an unbounded wait_event() are not desirable. Switch to qeth_get_buffers(), and let OSN callers deal with -ENOMEM. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
When called from qeth_core_probe_device(), qeth_determine_capabilities() initializes the device's BLKT defaults. From all other callers, the ccw_device has already been set online and the BLKT setting is skipped. Clean this up by extracting the BLKT setting into a separate helper that gets called from the right place. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
The completion of a pending READ cmd is processed via qeth_issue_next_read_cb(). Let this callback also start the next READ cmd, instead of hardcoding that step into the IRQ handler. While at it remove the check of the channel state, __qeth_issue_next_read() already does this. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
When the tear down sequence in qeth_l?_stop_card() has finished, the card is guaranteed to be in DOWN state and we don't have to check for it again. With this insight we can also remove the redundant setting of card->state in qeth_l?_set_online()'s error path. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
Slightly reduce the complexity of the core xmit path, by replacing some open-coded logic with the corresponding helpers. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
Current code suppresses debug entries when an TX buffer completes in ERROR state with no error indication set in SBALF15. This was introduced back with commit 58490f18 ("qeth: HiperSockets SIGA retry support on CC=2."). But qeth no longer retries after CC=2, and this sort of suppression make no sense anymore. Remove it. Signed-off-by:
Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Ido Schimmel says: ==================== mlxsw: Add support for physical hardware clock Shalom says: This patchset adds support for physical hardware clock for Spectrum-1 ASIC only. Patches #1, #2 and #3 add the ability to query the free running clock PCI address. Patches #4 and #5 add two new register, the Management UTC Register and the Management Pulse Per Second Register. Patch #6 publishes scaled_ppm_to_ppb() to allow drivers to use it. Patch #7 adds the physical hardware clock operations. Patch #8 initializes the physical hardware clock. Patch #9 adds a selftest for testing the PTP physical hardware clock. v2 (Richard): * s/ptp_clock_scaled_ppm_to_ppb/scaled_ppm_to_ppb/ * imply PTP_1588_CLOCK in mlxsw Kconfig * s/mlxsw_sp1_ptp_update_phc_settime/mlxsw_sp1_ptp_phc_settime/ * s/mlxsw_sp1_ptp_update_phc_adjfreq/mlxsw_sp1_ptp_phc_adjfreq/ ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shalom Toledo authored
Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a part of "linuxptp"). The test contains three sub-tests: * "settime" test * "adjtime" test * "adjfreq" test "settime" test: * set the PHC time to 0 seconds. * wait for 120.5 seconds. * check if PHC time equal to 120.XX seconds. "adjtime" test: * set the PHC time to 0 seconds. * adjust the time by 10 seconds. * check if PHC time equal to 10.XX seconds. "adjfreq" test: * adjust the PHC frequency to be 1% faster. * set the PHC time to 0 seconds. * wait for 100.5 seconds. * check if PHC time equal to 101.XX seconds. Usage: $ ./phc.sh /dev/ptp<X> It is possible to run a subset of the tests, for example: * To run only the "settime" test: $ TESTS="settime" ./phc.sh /dev/ptp<X> Signed-off-by:
Shalom Toledo <shalomt@mellanox.com> Reviewed-by:
Petr Machata <petrm@mellanox.com> Acked-by:
Richard Cochran <richardcochran@gmail.com> Tested-by:
Vladimir Oltean <olteanv@gmail.com> Signed-off-by:
Ido Schimmel <idosch@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shalom Toledo authored
Initialize the PTP physical hardware clock. Signed-off-by:
Shalom Toledo <shalomt@mellanox.com> Acked-by:
Jiri Pirko <jiri@mellanox.com> Reviewed-by:
Petr Machata <petrm@mellanox.com> Signed-off-by:
Ido Schimmel <idosch@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shalom Toledo authored
Implement physical hardware clock operations. Signed-off-by:
Shalom Toledo <shalomt@mellanox.com> Acked-by:
Jiri Pirko <jiri@mellanox.com> Reviewed-by:
Petr Machata <petrm@mellanox.com> Signed-off-by:
Ido Schimmel <idosch@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shalom Toledo authored
Publish scaled_ppm_to_ppb to allow drivers to use it. Signed-off-by:
Shalom Toledo <shalomt@mellanox.com> Reviewed-by:
Petr Machata <petrm@mellanox.com> Signed-off-by:
Ido Schimmel <idosch@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shalom Toledo authored
The MTPPS register provides the device PPS capabilities, configure the PPS in and out modules and holds the PPS in time stamp. Signed-off-by:
Shalom Toledo <shalomt@mellanox.com> Acked-by:
Jiri Pirko <jiri@mellanox.com> Reviewed-by:
Petr Machata <petrm@mellanox.com> Signed-off-by:
Ido Schimmel <idosch@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shalom Toledo authored
The MTUTC register configures the HW UTC counter. Signed-off-by:
Shalom Toledo <shalomt@mellanox.com> Reviewed-by:
Petr Machata <petrm@mellanox.com> Acked-by:
Jiri Pirko <jiri@mellanox.com> Signed-off-by:
Ido Schimmel <idosch@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shalom Toledo authored
Query free running clock PCI BAR and offsets during the pci_init. Signed-off-by:
Shalom Toledo <shalomt@mellanox.com> Acked-by:
Jiri Pirko <jiri@mellanox.com> Reviewed-by:
Petr Machata <petrm@mellanox.com> Signed-off-by:
Ido Schimmel <idosch@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shalom Toledo authored
Add two new bus operations for reading the hardware free running clock. Signed-off-by:
Shalom Toledo <shalomt@mellanox.com> Acked-by:
Jiri Pirko <jiri@mellanox.com> Reviewed-by:
Petr Machata <petrm@mellanox.com> Signed-off-by:
Ido Schimmel <idosch@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-