summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
Commit message (Collapse)AuthorAgeFilesLines
* qlcnic: Mark expected switch fall-througsGustavo A. R. Silva2018-08-071-1/+2
| | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1410181 ("Missing break in switch") Addresses-Coverity-ID: 1410184 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix link configuration with autoneg disabledChopra, Manish2017-05-111-0/+3
| | | | | | | | | | | | Currently driver returns error on speed configurations for 83xx adapter's non XGBE ports, due to this link doesn't come up on the ports using 1000Base-T as a connector with autoneg disabled. This patch fixes this with initializing appropriate port type based on queried module/connector types from hardware before any speed/autoneg configuration. Signed-off-by: Manish Chopra <manish.chopra@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: qlogic: qlcnic: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2017-02-201-63/+69
| | | | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix mailbox completion handling during spurious interruptRajesh Borundia2016-03-101-1/+2
| | | | | | | | | | | | o While the driver is in the middle of a MB completion processing and it receives a spurious MB interrupt, it is mistaken as a good MB completion interrupt leading to premature completion of the next MB request. Fix the driver to guard against this by checking the current state of MB processing and ignore the spurious interrupt. Also added a stats counter to record this condition. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix ordering of stats in stats buffer.Manish Chopra2014-09-261-0/+2
| | | | | | | | | | | | | o When TX queues are not allocated, driver does not fill TX queues stats in the buffer. However, it is also not advancing data pointer by TX queue stats length, which would misplace all successive stats data in the buffer and will result in mismatch between stats strings and it's values. o Fix this by advancing data pointer by TX queue stats length when queues are not allocated. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Remove __QLCNIC_DEV_UP bit check to read TX queues statistics.Manish Chopra2014-09-261-1/+1
| | | | | | | | o TX queues stats must be read when queues are allocated regardless of interface is up or not. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix memory corruption while reading stats using ethtool.Manish Chopra2014-09-261-4/+2
| | | | | | | | | | | o Driver is doing memset with zero for total number of stats bytes when it has already filled some data in the stats buffer, which can overwrite memory area beyond the length of stats buffer. o Fix this by initializing stats buffer with zero before filling any data in it. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix update of ethtool stats.Rajesh Borundia2014-08-051-5/+13
| | | | | | | | | | | | | o Aggregating tx stats in adapter variable was resulting in an increase in stats even after no traffic was run and user runs ifconfig/ethtool command. o qlcnic_update_stats used to accumulate stats in adapter struct at each function call, instead accumulate tx stats in local variable and then assign it to adapter structure. Reported-by: Holger Kiehl <holger.kiehl@dwd.de> Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Optimize ring count validationsShahed Shaikh2014-06-111-2/+7
| | | | | | | | - Check interrupt mode at the start of qlcnic_set_channels(). - Do not validate ring count if they are not going to change. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Add VXLAN Rx offload supportShahed Shaikh2014-03-241-0/+2
| | | | | | | | | | This patch adds Rx checksum offload support for VXLAN. Implements .ndo_{add|del}_vxlan_port netdev ops. Adapter supports only one VXLAN port, so program adapter with very first UDP port which VXLAN driver is listening to. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Add VXLAN Tx offload supportShahed Shaikh2014-03-241-0/+4
| | | | | | | | This patch adds LSO, LSO6 and Tx checksum offload support for VXLAN encapsulated packets on 83xx/84xx series adapters. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Re-factor firmware minidump template header handlingShahed Shaikh2014-02-241-6/+11
| | | | | | | | Treat firmware minidump template headers for 82xx and 83xx/84xx adapters separately, as it may change for 82xx and 83xx/84xx adapter type independently. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Enhance logic to calculate msix vectors.Himanshu Madhani2014-01-231-2/+5
| | | | | | | | | | | | o Refactored MSI-x vector calculation for All adapters. Decoupled logic in the code which was using same call to request MSI-x vectors in default driver load, as well as during set_channel() operation for TSS/RSS. This refactoring simplifies code for TSS/RSS code path as well as probe path of the driver load for all adapters. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Refactor interrupt coalescing code for all adapters.Himanshu Madhani2014-01-231-76/+23
| | | | | | | | o Refactor configuration of interrupt coalescing parameters for all supported adapters. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: make local functions staticstephen hemminger2014-01-171-16/+17
| | | | | | | | | | Functions only used in one file should be static. Found by running make namespacecheck Compile tested only. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2014-01-141-19/+22
|\
| * qlcnic: Fix ethtool statistics length calculationShahed Shaikh2014-01-101-18/+21
| | | | | | | | | | | | | | | | | | o Consider number of Tx queues while calculating the length of Tx statistics as part of ethtool stats. o Calculate statistics lenght properly for 82xx and 83xx adapter Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix bug in TX statisticsManish Chopra2014-01-101-1/+1
| | | | | | | | | | | | | | | | o Driver was not updating TX stats so it was not populating statistics in `ifconfig` command output. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-12-181-11/+8
|\| | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/intel/i40e/i40e_main.c drivers/net/macvtap.c Both minor merge hassles, simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix TSS/RSS validation for 83xx/84xx series adapter.Himanshu Madhani2013-12-171-10/+1
| | | | | | | | | | | | | | | | | | | | | | o Current code was not allowing the user to configure more than one Tx ring using ethtool for 83xx/84xx adapter. This regression was introduced by commit id 18afc102fdcb95d6c7d57f2967a06f2f8fe3ba4c ("qlcnic: Enable multiple Tx queue support for 83xx/84xx Series adapter.") Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix TSS/RSS ring validation logic.Himanshu Madhani2013-12-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | o TSS/RSS ring validation does not take into account that either of these ring values can be 0. This patch fixes this validation and would fail set_channel operation if any of these ring value is 0. This regression was added as part of commit id 34e8c406fda5b5a9d2e126a92bab84cd28e3b5fa ("qlcnic: refactor Tx/SDS ring calculation and validation in driver.") Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix diagnostic test for all adapters.Himanshu Madhani2013-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | o Driver should re-allocate all Tx queues after completing diagnostic tests. This regression was added by commit id c2c5e3a0681bb1945c0cb211a5f4baa22cb2cbb3 ("qlcnic: Enable diagnostic test for multiple Tx queues.") Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: Support for 16 virtual NIC functions.Jitendra Kalsaria2013-12-171-1/+4
|/ | | | | | | | Extend virtual NIC functions from 8 to 16 for 84xx adapter. Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Enable multiple Tx queue support for 83xx/84xx Series adapters.Himanshu Madhani2013-11-041-1/+1
| | | | | | | | | o 83xx and 84xx firmware is capable of multiple Tx queues. This patch will enable multiple Tx queues for 83xx/84xx series adapters. Max number of Tx queues supported will be 8. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: refactor Tx/SDS ring calculation and validation in driver.Himanshu Madhani2013-11-041-37/+79
| | | | | | | | | | | | o Current driver has duplicate code for validating user input for changing Tx/SDS rings using set_channel ethtool interface. This patch removes duplicate code and refactored Tx/SDS ring validation for 82xx/83xx/84xx series adapter. o Refactored code now calculates maximum Tx/Rx ring driver can support based on Default, NPAR and SRIOV PF/VF mode of driver. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Enhance ethtool Statistics for Multiple Tx queue.Himanshu Madhani2013-11-041-31/+65
| | | | | | | | o Enhance ethtool statistics to display multiple Tx queue stats for all supported adapters. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Register netdev in FAILED state for 83xx/84xxSucheta Chakraborty2013-11-041-4/+2
| | | | | | | | | | o Without failing probe, register netdev when device is in FAILED state. o Device will come up with minimum functionality and allow diagnostics and repair of the adapter. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-10-231-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/usb/qmi_wwan.c include/net/dst.h Trivial merge conflicts, both were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Validate Tx queue only for 82xx adapters.Himanshu Madhani2013-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | o validate Tx queue only in case of adapters which supports multi Tx queue. This patch is to fix regression introduced in commit aa4a1f7df7cbb98797c9f4edfde3c726e2b3841f "qlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter" Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: Enhance ethtool to display ring indices and interrupt maskPratik Pujar2013-10-181-14/+40
|/ | | | | | | | | | | o Updated ethtool -d <ethX> option to display ring indices for Transmit(Tx), Receive(Rx), and Status(St) rings. o Updated ethtool -d <ethX> option to display ring interrupt mask for Transmit(Tx), and Status(St) rings. Signed-off-by: Pratik Pujar <pratik.pujar@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix register device in FAILED state for 82xx.Sucheta Chakraborty2013-09-271-0/+8
| | | | | | | | | | | o Commit 7e2cf4feba058476324dc545e3d1b316998c91e6 ("qlcnic: change driver hardware interface mechanism") has overwritten commit b43e5ee76a4320c070cf0fe65cf4927198fbb4d1 ("qlcnic: Register device in FAILED state") Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: remove a stray semicolonDan Carpenter2013-09-041-1/+1
| | | | | | | | Just remove a small semicolon. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Store firmware dump state in CAMRAM registerShahed Shaikh2013-08-311-28/+124
| | | | | | | | | -Use CAMRAM register to store firmware dump state in adapter instead of maintaining it in each function driver separately. -Return appropriate error code on failure Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Enable diagnostic test for multiple Tx queues.Himanshu Madhani2013-08-211-0/+2
| | | | | | | | | o Enable diagnostic test via ethtool and QConvergeConsole application when Multiple Tx queues are enabled on 82xx series adapters. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter.Himanshu Madhani2013-08-211-12/+51
| | | | | | | | | o using ethtool {set|get}_channel option, user can change number of Tx queues for 82xx Series adapter. o updated ethtool -S <ethX> option to display stats from each Tx queue. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-08-031-22/+63
|\ | | | | | | | | | | | | Merge net into net-next to setup some infrastructure Eric Dumazet needs for usbnet changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix for flash update failure on 83xx adapterHimanshu Madhani2013-08-031-17/+46
| | | | | | | | | | | | | | | | Flash update routine was improperly checking register read API return value. Modify register read API and perform proper error check. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix link speed display for 82xx adapterRajesh Borundia2013-08-031-3/+7
| | | | | | | | | | | | | | | | | | o Do not obtain link speed from register when adapter link is down. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix external loopback test.Shahed Shaikh2013-08-031-2/+10
| | | | | | | | | | | | | | | | Driver was not handling external loopback diagnostic test request. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix invalid register offset calculationShahed Shaikh2013-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | 83xx adapter specific code was accessing 82xx register which resulted in invalid register offset. This patch uses proper register access method. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: Enhance diagnostic loopback error codes.Jitendra Kalsaria2013-08-011-3/+3
|/ | | | | | | | | o Enhanced the driver to use standard Linux error codes o Return a unique error code to indicate loopback is in progress Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Handle qlcnic_alloc_mbx_args() failureShahed Shaikh2013-06-231-1/+5
| | | | | | | | | | qlcnic_alloc_mbx_args() may fail due to failure in memory allocation. This patch checks for failure of qlcnic_alloc_mbx_args() to avoid potential invalid memory access. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix ethtool supported port status for 83xxHimanshu Madhani2013-05-111-25/+24
| | | | | | | | o Fix display for interface while using 'ethtool <device>' for 83xx adapter Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix ethtool stringsShahed Shaikh2013-05-111-2/+3
| | | | | | | | o Add missing information in ethtool statistics information array. o Fix the typo in the statistics information string. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Enable Interrupt Coalescing for 83xx adapterHimanshu Madhani2013-04-241-13/+55
| | | | | | | | | Enable Interrupt coalescing through ethtool on 83xx adapter. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Add eSwitch statistics supportShahed Shaikh2013-04-241-0/+7
| | | | | | | | | o Read eSwitch statistics from adapter and display them as part of ethtool statistics. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Enhance channel configuration logsManish Chopra2013-04-241-1/+1
| | | | | | | | | o Add logs for various failure conditions during channel configuration. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix loopback test for SR-IOV PF.Rajesh Borundia2013-04-191-5/+29
| | | | | | | | | o Do not disable mailbox interrupts while running loopback test through SR-IOV PF. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix ethtool statistics collectionShahed Shaikh2013-03-091-4/+4
| | | | | | | | o Properly fill statistics data into buffer. Update buffer pointer properly after filling statistics data into buffer. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix ethtool statistics for 82xx adapterShahed Shaikh2013-03-091-1/+2
| | | | | | | o Fix miscalculation of statistics length Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>