aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-04-11be2net: remove unused variable 'sge'Ivan Vecera1-2/+0
Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-17drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)Joe Perches1-8/+6
Reduce the number of calls required to alloc a zeroed block of memory. Trivially reduces overall object size. Other changes around these removals o Neaten call argument alignment o Remove an unnecessary OOM message after dma_alloc_coherent failure o Remove unnecessary gfp_t stack variable Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-15drivers:net: Remove dma_alloc_coherent OOM messagesJoe Perches3-15/+4
I believe these error messages are already logged on allocation failure by warn_alloc_failed and so get a dump_stack on OOM. Remove the unnecessary additional error logging. Around these deletions: o Alignment neatening. o Remove unnecessary casts of dma_alloc_coherent. o Hoist assigns from ifs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-15be2net: Use new F/W mailbox cmd to manipulate interrupts.Somnath Kotur3-8/+50
This is needed as the earlier method of manipulating this register via PCI Config space is disallowed by certain Hypervisors. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-15be2net: enable interrupts in be_probe() (RoCE and other ULPs need them)Somnath Kotur1-11/+10
As the NIC PCI function may be used by other protocols, the chip interrupts must be enabled in be_probe() itself rather than be_open(). Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@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. Miller4-22/+29
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 Volam8-8/+8
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 Perla4-8/+22
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-03-06benet: Wait f/w POST until timeoutGavin Shan1-17/+10
While PCI card faces EEH errors, reset (usually hot reset) is expected to recover from the EEH errors. After EEH core finishes the reset, the driver callback (be_eeh_reset) is called and wait the firmware to complete POST successfully. The original code would return with error once detecting failure during POST stage. That seems not enough. The patch forces the driver (be_eeh_reset) to wait the firmware completes POST until timeout, instead of returning error upon detection POST failure immediately. Also, it would improve the reliability of the EEH funtionality of the driver. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Acked-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-13be2net: remove BUG_ON() in be_mcc_compl_is_new()Sathya Perla1-5/+8
The current code expects that the last word (with valid bit) of an MCC compl is DMAed in one shot. This may not be the case. Remove this assertion. 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. Miller2-5/+5
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 Perla1-1/+1
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04be2net: fix re-loaded PF driver to re-gain control of its VFsSathya Perla3-64/+153
Currently, when the PF driver is unloaded and re-loaded while VFs are attached to VMs, it loses control of its VFs. The PF driver now uses the newly defined/created GET_IFACE_LIST cmd (available in FW ver >= 4.6) to query the if_id of the VFs (enabled in its previous life). The PF driver then uses the if_id for further VF configuration. The GET_IFACE_MAC_LIST cmd has also implemented in BE3 FW for PF to query pmac-ids used by its VFs. 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 Corporation"Sarveshwar Bandi2-5/+5
Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-9/+21
Conflicts: Documentation/networking/ip-sysctl.txt drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Both conflicts were simply overlapping context. A build fix for qlcnic is in here too, simply removing the added devinit annotations which no longer exist. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-12be2net: fix unconditionally returning IRQ_HANDLED in INTxSathya Perla2-9/+21
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>
2013-01-06ethtool: fix drvinfo strings set in driversJiri Pirko1-6/+6
Use strlcpy where possible to ensure the string is \0 terminated. Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN and custom defines. Use snprintf instead of sprint. Remove unnecessary inits of ->fw_version Remove unnecessary inits of drvinfo struct. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-18be2net: fix wrong frag_idx reported by RX CQSathya Perla2-7/+33
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-12-18be2net: fix be_close() to ensure all events are ack'edSathya Perla2-9/+17
In be_close(), be_eq_clean() must be called after all RX/TX/MCC queues have been cleaned to ensure that any events caused while cleaning up completions are notified/acked. Not clearing all events can cause upredictable behaviour when RX rings are re-created in the subsequent be_open(). Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07drivers/net: fix up function prototypes after __dev* removalsGreg Kroah-Hartman1-2/+1
The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03be2net: remove __dev* attributesBill Pemberton1-2/+2
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Sathya Perla <sathya.perla@emulex.com> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com> Cc: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28be2net: fix INTx ISR for interrupt behaviour on BE2Sathya Perla1-31/+23
On BE2 chip, an interrupt may be raised even when EQ is in un-armed state. As a result be_intx()::events_get() and be_poll:events_get() can race and notify an EQ wrongly. Fix this by counting events only in be_poll(). Commit 0b545a629 fixes the same issue in the MSI-x path. But, on Lancer, INTx can be de-asserted only by notifying num evts. This is not an issue as the above BE2 behavior doesn't exist/has never been seen on Lancer. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-23be2net: fix a possible events_get() race on BE2Sathya Perla1-4/+7
On BE2 chip, an interrupt being raised even when EQ is in un-armed state has been observed a few times. This is not expected and has never been observed on BE3/Lancer chips. As a consequence, be_msix()::events_get() and be_poll()::events_get() can race and notify an EQ wrongly causing a CEV UE. The other possible side-effect would be traffic stalling because after notifying EQ, napi_schedule() is ignored as NAPI is already running. This patch fixes this issue by counting events only in be_poll(). Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-19net: Remove bogus dependencies on INETBen Hutchings2-2/+2
Various drivers depend on INET because they used to select INET_LRO, but they have all been converted to use GRO which has no such dependency. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07be2net: remove adapter->eq_next_idxSathya Perla2-4/+0
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 Perla3-29/+4
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 Perla4-22/+11
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: re-factor bar mapping codeSathya Perla1-95/+42
1) separate NIC and roce bar mapping code 2) parse sli_intf::if_type inside be_map_pci_bars() as if_type must be used only to identify bars. 3) Use pci_iomap/unmap() routines 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 Perla4-9/+4
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 Perla4-93/+92
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-11-07be2net: remove LANCER A0 workaroundSathya Perla1-10/+0
It's not needed anymore. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23be2net: Fix smatch warnings in be_main.cPadmanabh Ratnakar3-7/+16
FW flashing code, even though it works correctly, makes some hidden assumptions about buffer sizes. This is causing code analysers to report error. Cleanup FW flashing code to remove these hidden assumptions. Reported-by: Yuanhan Liu <yuanhan.liu@intel.com> Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Update driver versionPadmanabh Ratnakar1-1/+1
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 Ratnakar2-1/+6
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 Ratnakar2-76/+173
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: Enabling Wake-on-LAN is not supported in S5 statePadmanabh Ratnakar1-3/+0
be_shutdown is enabling wake-on-lan by calling be_setup_wol. Emulex adapter do not support wake-on-lan in S5 state. 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 VF driver load on newer Lancer FWPadmanabh Ratnakar3-0/+42
PF driver should enable VF so that VF goes to ready state in new Lancer FW. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix unnecessary delay in PCI EEHPadmanabh Ratnakar1-2/+6
During PCI EEH, driver waits for all functions in the card. Wait is needed only once per card. Fix is to wait only for the first PCI function. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix issues in error recovery due to wrong queue statePadmanabh Ratnakar1-4/+5
During recovery from a FW error, destroy queue operation may fail. Queue should be marked as destroyed so that recovery code can recreate the queue. Also fix queue created state not getting checked at one instance. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix ethtool get_settings output for VFPadmanabh Ratnakar1-31/+42
Return default values for fields for which VFs dont have privilege to get the required information from FW. 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 Ratnakar5-2/+173
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 configuring VLAN for VF for LancerPadmanabh Ratnakar1-2/+10
Allow adding VLANs for Lancer VF. VLAN ID 0 should not be added to list of VLANs sent to FW. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Wait till resources are available for VF in error recoveryPadmanabh Ratnakar3-2/+37
After FW error, driver should wait for NO_RESOURCE error to disappear before proceeding with recovery. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21be2net: Fix change MAC operation for VF for LancerPadmanabh Ratnakar1-10/+42
For changing MAC of VF from PF, delete MAC operation needs to be done before assigning new MAC. Also in ndo_set_mac_address operation avoid delete MAC if it has been already deleted by PF. 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 Ratnakar4-1/+86
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 Ratnakar4-54/+349
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-10-09be2net: Remove code that stops further access to BE NIC based on UE bitsAjit Khaparde1-2/+5
On certain platforms, BE hardware could falsely indicate UE. For BE family of NICs, do not set hw_error based on the UE bits. If there was a real fatal error, the corresponding h/w block will automatically go offline and stop traffic. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds5-103/+113
Pull networking changes from David Miller: 1) GRE now works over ipv6, from Dmitry Kozlov. 2) Make SCTP more network namespace aware, from Eric Biederman. 3) TEAM driver now works with non-ethernet devices, from Jiri Pirko. 4) Make openvswitch network namespace aware, from Pravin B Shelar. 5) IPV6 NAT implementation, from Patrick McHardy. 6) Server side support for TCP Fast Open, from Jerry Chu and others. 7) Packet BPF filter supports MOD and XOR, from Eric Dumazet and Daniel Borkmann. 8) Increate the loopback default MTU to 64K, from Eric Dumazet. 9) Use a per-task rather than per-socket page fragment allocator for outgoing networking traffic. This benefits processes that have very many mostly idle sockets, which is quite common. From Eric Dumazet. 10) Use up to 32K for page fragment allocations, with fallbacks to smaller sizes when higher order page allocations fail. Benefits are a) less segments for driver to process b) less calls to page allocator c) less waste of space. From Eric Dumazet. 11) Allow GRO to be used on GRE tunnels, from Eric Dumazet. 12) VXLAN device driver, one way to handle VLAN issues such as the limitation of 4096 VLAN IDs yet still have some level of isolation. From Stephen Hemminger. 13) As usual there is a large boatload of driver changes, with the scale perhaps tilted towards the wireless side this time around. Fix up various fairly trivial conflicts, mostly caused by the user namespace changes. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1012 commits) hyperv: Add buffer for extended info after the RNDIS response message. hyperv: Report actual status in receive completion packet hyperv: Remove extra allocated space for recv_pkt_list elements hyperv: Fix page buffer handling in rndis_filter_send_request() hyperv: Fix the missing return value in rndis_filter_set_packet_filter() hyperv: Fix the max_xfer_size in RNDIS initialization vxlan: put UDP socket in correct namespace vxlan: Depend on CONFIG_INET sfc: Fix the reported priorities of different filter types sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IP sfc: Fix loopback self-test with separate_tx_channels=1 sfc: Fix MCDI structure field lookup sfc: Add parentheses around use of bitfield macro arguments sfc: Fix null function pointer in efx_sriov_channel_type vxlan: virtual extensible lan igmp: export symbol ip_mc_leave_group netlink: add attributes to fdb interface tg3: unconditionally select HWMON support when tg3 is enabled. Revert "net: ti cpsw ethernet: allow reading phy interface mode from DT" gre: fix sparse warning ...
2012-10-01be2net: fix vfs enumerationIvan Vecera1-4/+2
Current VFs enumeration algorithm used in be_find_vfs does not take domain number into the match. The match found in igb/ixgbe is more elegant and safe. This 2nd version uses pci_physfn instead of checking dev->physfn directly. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30be2net: fixup log messagesSathya Perla2-6/+31
Added and modified a few log messages mostly in probe path. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>