aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/emulex/benet/be.h
AgeCommit message (Collapse)Author
2013-05-30be2net: Mark checksum fail for IP fragmented packetsSomnath Kotur
HW does not compute L4 checksum for IP Fragmented packets. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-02be2net: avoid napi_disable() when it has not been enabledSomnath Kotur
When RQ creation fails in be_open(), driver jumps to be_close() where napi_disable() is done without a prior napi_enable(); leading to a hang. This change is needed as there is no way to see if napi is enable/disabled. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c drivers/net/ethernet/emulex/benet/be.h include/net/tcp.h net/mac802154/mac802154.h Most conflicts were minor overlapping stuff. The be2net driver brought in some fixes that added __vlan_put_tag calls, which in net-next take an additional argument. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-26be2net: Renamed rx_address_mismatch_errors to rx_address_filteredSuresh Reddy
Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com> Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-26be2net: Add support for setting and getting rx flow hash optionsSuresh Reddy
Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com> Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-24be2net: fix a Tx stall bug caused by a specific ipv6 packetAjit Khaparde
The ASIC could lockup in the transmit path when it tries to insert VLAN in a specific ipv6 packet. 1) Identify the packet which can cause this. 2) Check if the firmware provides a workaround to prevent this. 3) If workaround is not present, drop the packet. 4) If the firmware provides a workaround, insert the VLAN tag in the packet and inform the firmware to skip further VLAN insertions. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-22be2net: Avoid flashing BE3 UFI on BE3-R chip.Vasundhara Volam
Avoid flashing BE3 UFI on BE3-R chip by verifying asic_revision number of the chip. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-22be2net: Use TXQ_CREATE_V2 cmdVasundhara Volam
Skyhawk-R and BE3-R (SuperNIC profile) require V2 version of TXQ_CREATE cmd to be used. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/intel/e1000e/netdev.c Minor conflict in e1000e, a line that got fixed in 'net' has been removed in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-07be2net: Update copyright yearVasundhara Volam
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-06be2net: use CSR-BAR SEMAPHORE reg for BE2/BE3Sathya Perla
The SLIPORT_SEMAPHORE register shadowed in the config-space may not reflect the correct POST stage after an EEH reset in BE2/3; it may return FW_READY state even though FW is not ready. This causes the driver to prematurely poll the FW mailbox and fail. For BE2/3 use the CSR-BAR/0xac instead. Reported-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/intel/e1000e/ethtool.c drivers/net/vmxnet3/vmxnet3_drv.c drivers/net/wireless/iwlwifi/dvm/tx.c net/ipv6/route.c The ipv6 route.c conflict is simple, just ignore the 'net' side change as we fixed the same problem in 'net-next' by eliminating cached neighbours from ipv6 routes. The e1000e conflict is an addition of a new statistic in the ethtool code, trivial. The vmxnet3 conflict is about one change in 'net' removing a guarding conditional, whilst in 'net-next' we had a netdev_info() conversion. The iwlwifi conflict is dealing with a WARN_ON() conversion in 'net-next' vs. a revert happening in 'net'. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04be2net: update driver version to 4.6.xSathya Perla
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-29be2net: Updating Module Author string and log message string to "Emulex ↵Sarveshwar Bandi
Corporation" Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-12be2net: fix unconditionally returning IRQ_HANDLED in INTxSathya Perla
commit e49cc34f introduced an unconditional IRQ_HANDLED return in be_intx() to workaround Lancer and BE2 HW issues. This is bad as it prevents the kernel from detecting interrupt storms due to broken HW. The BE2/Lancer HW issues are: 1) In Lancer, there is no means for the driver to detect if the interrupt belonged to device, other than counting and notifying events. 2) In Lancer de-asserting INTx takes a while, causing the INTx irq handler to be called multiple times till the de-assert happens. 3) In BE2, we see an occasional interrupt even when EQs are unarmed. Issue (1) can cause the notified events to be orphaned, if NAPI was already running. This patch fixes this issue by scheduling NAPI only if it is not scheduled already. Doing this also takes care of possible events_get() race that may be caused due to issue (2) and (3). Also, IRQ_HANDLED is returned only the first time zero events are detected. (Thanks Ben H. for the feedback and suggestions.) Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-18be2net: fix wrong frag_idx reported by RX CQSathya Perla
The RX CQ can report completions with invalid frag_idx when the RXQ that was *previously* using it, was not cleaned up properly. This hits a BUG_ON() in be2net. When completion coalescing is enabled on a CQ, an explicit CQ-notify (with rearm) is needed for each compl, to flush partially coalesced CQ entries that are pending DMA. In be_close(), this fix now notifies CQ for each compl, waits explicitly for the flush compl to arrive and complains if it doesn't arrive. Also renaming be_crit_error() to be_hw_error() as it's the more appropriate name and to convey that we don't wait for the flush compl only when a HW error has occurred. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07be2net: remove adapter->eq_next_idxSathya Perla
It's not used anywhere Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07be2net: remove roce on lancerSathya Perla
roce interface is suppored only on Skyhawk-R. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07be2net: fix access to SEMAPHORE regSathya Perla
The SEMAPHORE register was being accessed from the csr BAR space. This BAR may not be available in some Skyhawk-R configurations. Instead, access this register via the PCI config space (it's available there too). Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07be2net: do not use sli_family to identify skyhawk-R chipSathya Perla
SKYHAWK_FAMILY will not identify all revisions of the chip. Use device-id check (skyhawk_chip() macro) instead. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07be2net: fix wrong usage of adapter->generationSathya Perla
adapter->generation was being incorrectly set as BE_GEN3 for Skyhawk-R. Replace generation usage with XXX_chip() macros to identify the chip. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Update driver versionPadmanabh Ratnakar
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix skyhawk VF PCI Device IDPadmanabh Ratnakar
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix FW flashing on Skyhawk-RPadmanabh Ratnakar
FW flash layout on Skyhawk-R is different from BE3-R. Hence the code needs to be fixed to flash FW on Skyhawk-R. Also cleaning up code in BE3-R flashing function. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix error messages while driver load for VFsPadmanabh Ratnakar
VF does not have privileges to execute many commands. When VFs try to execute those commands there are unnecessary error messages. Fix this by executing only those commands for which VF has privilege. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix setting QoS for VF for LancerPadmanabh Ratnakar
Use Lancer specific command to set QoS for VF. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix driver load failure for different FW configs in LancerPadmanabh Ratnakar
Driver assumes FW resource counts and capabilities while creating queues and using functionality like RSS. This causes driver load to fail in FW configs where resources and capabilities are reduced. Fix this by querying FW configuration during probe and using resources and capabilities accordingly. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30be2net: cleanup code related to be_link_status_query()Sathya Perla
1) link_status_query() is always called to query the link-speed (speed after applying qos). When there is no qos setting, link-speed is derived from port-speed. Do all this inside this routine and hide this from the callers. 2) adpater->phy.forced_port_speed is not being set anywhere after being initialized. Get rid of this variable. 3) Ignore async link_speed notifications till the initial value has been fetched from FW. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-30be2net: fix max VFs reported by HWVasundhara Volam
BE3 FW allocates VF resources for upto 30 VFs per PF while a max value of 32 may be reported via PCI config space. Fix this in the driver. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-16be2net: update driver versionPadmanabh Ratnakar
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-12be2net: Enable RSS UDP hashing for Lancer and SkyhawkPadmanabh Ratnakar
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-12be2net: Activate new FW after FW download for LancerPadmanabh Ratnakar
After FW download, activate new FW by invoking FW reset. Recreate rings once new FW is operational. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-12be2net : Fix die temperature stat for LancerPadmanabh Ratnakar
Query die temperature stat for Lancer to report it correctly in ethtool. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09be2net: Fix EndianLi RongQing
ETH_P_IP is host Endian, skb->protocol is big Endian, when compare them, we should change ETH_P_IP from host endian to big endian, htons, not ntohs. CC: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27be2net: Fix to trim skb for padded vlan packets to workaround an ASIC BugSomnath Kotur
Fixed spelling error in a comment as pointed out by DaveM. Also refactored existing code a bit to provide placeholders for another ASIC Bug workaround that will be checked-in soon after this. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06be2net: update driver versionSathya Perla
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-21Merge tag 'rdma-for-3.5' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Pull InfiniBand/RDMA changes from Roland Dreier: - Add ocrdma hardware driver for Emulex IB-over-Ethernet adapters - Add generic and mlx4 support for "raw" QPs: allow suitably privileged applications to send and receive arbitrary packets directly to/from the hardware - Add "doorbell drop" handling to the cxgb4 driver - A fairly large batch of qib hardware driver changes - A few fixes for lockdep-detected issues - A few other miscellaneous fixes and cleanups Fix up trivial conflict in drivers/net/ethernet/emulex/benet/be.h. * tag 'rdma-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (53 commits) RDMA/cxgb4: Include vmalloc.h for vmalloc and vfree IB/mlx4: Fix mlx4_ib_add() error flow IB/core: Fix IB_SA_COMP_MASK macro IB/iser: Fix error flow in iser ep connection establishment IB/mlx4: Increase the number of vectors (EQs) available for ULPs RDMA/cxgb4: Add query_qp support RDMA/cxgb4: Remove kfifo usage RDMA/cxgb4: Use vmalloc() for debugfs QP dump RDMA/cxgb4: DB Drop Recovery for RDMA and LLD queues RDMA/cxgb4: Disable interrupts in c4iw_ev_dispatch() RDMA/cxgb4: Add DB Overflow Avoidance RDMA/cxgb4: Add debugfs RDMA memory stats cxgb4: DB Drop Recovery for RDMA and LLD queues cxgb4: Common platform specific changes for DB Drop Recovery cxgb4: Detect DB FULL events and notify RDMA ULD RDMA/cxgb4: Drop peer_abort when no endpoint found RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr() mlx4_core: Change bitmap allocator to work in round-robin fashion RDMA/nes: Don't call event handler if pointer is NULL RDMA/nes: Fix for the ORD value of the connecting peer ...
2012-05-18be2net: Fix to allow get/set of debug levels in the firmware.Somnath Kotur
Patch re-spin. Incorporated review comments by Ben Hutchings. Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-10be2net: avoid disabling sriov while VFs are assignedSathya Perla
Calling pci_disable_sriov() while VFs are assigned to VMs causes kernel panic. This patch uses PCI_DEV_FLAGS_ASSIGNED bit state of the VF's pci_dev to avoid this. Also, the unconditional function reset cmd issued on a PF probe can delete the VF configuration for the previously enabled VFs. A scratchpad register is now used to issue a function reset only when needed (i.e., in a crash dump scenario.) Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-08be2net: Add functionality to support RoCE driverParav Pandit
- Increase MSI-X vectors by 5 for RoCE traffic. - Add macro to check roce support on a device. - Add device-specific doorbell and MSI-X vector fields shared with NIC functionality. - Provide RoCE driver registration and deregistration functions. - Add support functions which will be invoked on adapter add/remove and port up/down events. - Traverse through the list of adapters to invoke callback functions. Signed-off-by: Parav Pandit <parav.pandit@emulex.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-04-27be2net: update the driver versionAjit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-26be2net: Fix wrong status getting returned for MCC commandsPadmanabh Ratnakar
MCC Response CQEs are processed as part of NAPI poll routine and also synchronously. If MCC completions are consumed by NAPI poll routine, wrong status is returned to synchronously waiting routine. Fix this by getting status of MCC command from command response instead of response CQEs. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-23be2net: fix ethtool get settingsAjit Khaparde
ethtool get settings was not displaying all the settings correctly. use the get_phy_info to get more information about the PHY to fix this. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-19be2net: fix programming of VLAN tags for VFAjit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-19be2net: Program secondary UC MAC address into MAC filterAjit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-19be2net: enable WOL by default if h/w supports itAjit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-01be2net: Remove unused OFFSET_IN_PAGE() macroRoland Dreier
Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-24be2net: update driver versionSathya Perla
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-24be2net: cancel be_worker during EEH recoverySathya Perla
EEH recovery involves ring cleanup and re-creation. The worker thread must not run during EEH cleanup/resume. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-13be2net: event queue re-designSathya Perla
v2: Fixed up the bad typecasting pointed out by David... In the current design 8 TXQs are serviced by 1 EQ, while each RSS queue is serviced by a separate EQ. This is being changed as follows: - Upto 8 EQs will be used (based on the availabilty of msix vectors). Each EQ will handle 1 RSS and 1 TX ring. The default non-RSS RX queue and MCC queue are handled by the last EQ. - On cards which provide support, upto 8 RSS rings will be used, instead of the current limit of 4. The new design allows spreading the TX multi-queue completion processing across multiple CPUs unlike the previous design. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>