summaryrefslogtreecommitdiff
path: root/drivers/net/benet/be_cmds.c
AgeCommit message (Collapse)Author
2011-08-11be2net: Move the Emulex driverJeff Kirsher
Moves the Emulex driver into drivers/net/ethernet/emulex/ and make the necessary Kconfig and Makefile changes. CC: Sathya Perla <sathya.perla@emulex.com> CC: Subbu Seetharaman <subbu.seetharaman@emulex.com> CC: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-03be2net: fix cmd-rx-filter not notifying MCCSathya Perla
Dave, I missed out on this line while composing the 4/6 patch from my yesterday's patchset ("[PATCH net-next 4/6] be2net: use RX_FILTER cmd to program multicast addresses"). As you've already queued up the patchset for net-next, I'm sending the fix in a separate patch. Pls apply. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-03be2net: add support for flashing Teranetics PHY firmwareSathya Perla
Support for flashing RJ45 PHY (from Teranetics) on a 10GBaseT BE3 card. Signed-off-by: Naresh G <bgottumukkala@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-03be2net: use RX_FILTER cmd to program multicast addressesSathya Perla
Use this cmd for both promiscous and multicast address programming. Get rid of the old MULTICAST_SET cmd. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-03be2net: non-member vlan pkts not received in promiscous modeSathya Perla
While configuring promiscous mode, explicitly set the VLAN_PROMISCOUS bit to make this happen. When switching off promiscous mode, re-program the vids. Signed-off-by: Xavier Selvin <xavier.selvin@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-03be2net: no need to query link statusSathya Perla
Change in the link status generates an MCC event. This is processed and netif_carrier_on/off is called accordingly. Don't need to query/store the link_status state. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-01be2net: use stats-sync to read/write 64-bit statsSathya Perla
64-bit stats in be2net are written/read as follows using the stats-sync interface for safe access in 32-bit archs: 64-bit sync writer reader stats ------------------------------------------------------------------------------ tx_stats tx_stats->sync be_xmit be_get_stats64, ethtool tx-compl tx_stats->sync_compl tx-compl-processing ethtool rx-stats rx_stats->sync rx-compl-processing be_get_stats64, ethtool, eqd-update This patch is based on Stephen Hemminger's earlier patch on the same issue... Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-01be2net: cleanup and refactor stats codeSathya Perla
In preparation for 64-bit stats interface, the following cleanups help streamline the code: 1) made some more rx/tx stats stored by driver 64 bit 2) made some HW stas (err/drop counters) stored in be_drv_stats 32 bit to keep the code simple as BE provides 32-bit counters only. 3) removed duplication of netdev stats in ethtool 4) removed some un-necessary stats and fixed some names Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22be2net: request native mode each time the card is resetSathya Perla
Currently be3-native mode is requested only in probe(). It must be requested, each time the card is reset either after an EEH error or after sleep/hibernation. Also, the be_cmd_check_native_mode() is better named be_cmd_req_native_mode() Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-01be2net: create/destroy rx-queues on interface open/closeSathya Perla
On some skews, the BE card sends pause frames (and not drop pkts) if there are no more posted buffers available for packet reception. This behaviour has a side effect: When an interface is disabled, buffers are no longer posted on the corresponding RX rings. All broadcast and multicast traffic being received on the port will quickly fill up the PMEM and cause pause push back. As the PMEM is shared by both the ports, all traffic being received on the other (enabled) port also gets stalled. The fix is to destroy RX rings when the interface is disabled. If there is no RX ring match in the RXF lookup, the packets are discarded and so don't hog the PMEM. The RXQ creation cmd must now use MCC instead of MBOX as they are are called post MCC queue creation. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-01be2net: fix certain cmd failure loggingSathya Perla
Some (older)versions of cards/fw may not recognize certain cmds and return illegal/unsupported errors. As long as the driver can handle this gracefully there is no need to log an error msg. Also finetuned 2 existing error log messages. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-21drivers/net: Remove casts of void *Joe Perches
Unnecessary casts of void * clutter the code. These are the remainder casts after several specific patches to remove netdev_priv and dev_priv. Done via coccinelle script (and a little editing): $ cat cast_void_pointer.cocci @@ type T; T *pt; void *pv; @@ - pt = (T *)pv; + pt = pv; Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-By: Chris Snook <chris.snook@gmail.com> Acked-by: Jon Mason <jdmason@kudzu.us> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-01be2net: Fallback to the older opcode if MCC_CREATE_EXT opcode is not ↵Somnath Kotur
supported on the card Instead of failing the init/probe code in the driver fallback to the older opcode to ensure the driver is loaded thereby enabling users to upgrade the f/w to whatever version is required. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-24be2net: hash key for rss-config cmd not setSathya Perla
A non-zero, non-descript value is needed as the hash key. The hash variable was left un-initialized; but sometimes it gets a zero value and hashing is not effective. The constant value used now (not of any significance) seems to work fine. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-16be2net: FW download for LancerShripad Nunjundarao
Added implementation of FW download feature for Lancer. Signed-off-by: Shripad Nunjundarao <shripad.nunjundarao@emulex.com> Signed-off-by: Sevin Xavier <selvin.xavier@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-16be2net: Stats for LancerSelvin Xavier
Added Lancer stats implementation. Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-16be2net: Support for version 1 of stats for BE3Ajit Khaparde
Added support to get version 1 of the stats for BE3. Use old stats command for BE2. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-13be2net: fix mbox polling for signal receptionSathya Perla
Sending mbox cmds require multiple steps of writing to the DB register and polling for an ack. Gettting interrupted in the middle by a signal breaks the mbox protocol. Use msleep() to not get interrupted. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-13be2net: handle signal reception while waiting for POSTSathya Perla
If waiting on POST returns prematurely (due to a signal), abort polling and return an error. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-11be2net: Use NTWK_RX_FILTER command for promiscous modePadmanabh Ratnakar
Use OPCODE_COMMON_NTWK_RX_FILTER command for promiscous mode as OPCODE_ETH_PROMISCUOUS command is getting deprecated. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-11be2net: In case of UE, do not dump registers for LancerPadmanabh Ratnakar
In case of UE, do not dump registers for Lancer as they are not supported. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-11be2net: Disable coalesce water mark mode of CQ for LancerPadmanabh Ratnakar
Disable coalesce water mark mode of CQ for Lancer Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-11Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-3.6 Conflicts: drivers/net/benet/be_main.c
2011-05-09be2net: Fixed bugs related to PVID.Somnath Kotur
Fixed bug to make sure 'pvid' retrieval will work on big endian hosts. Fixed incorrect comparison between the Rx Completion's 16-bit VLAN TCI and the PVID. Now comparing only the relevant 12 bits corresponding to the VID. Renamed 'vid' field under Rx Completion to 'vlan_tag' to reflect accurate description. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-25be2net: Fixed a bug in be_cmd_get_regs().Somnath Kotur
Same WRB entry was being reused over different iterations of a loop while issuing non-embedded IOCTL requests.Fixed couple of minor bugs in this path as well. Re-factored code to alloc/free memory for DMA outside of loop Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-20be2net: pass domain id to be_cmd_link_status_queryAjit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-20be2net: fix be_mcc_compl_process to identify eth_get_stat commandAjit Khaparde
eth_get_statistics and vlan_config command have same opcode. Use opcode subsystem id to differentiate one from other. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/smsc911x.c
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31be2net: Support for FAT dump retrieval using ethtool --register-dump optionSomnath Kotur
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16be2net: Copyright notice change. Update to Emulex instead of ServerEnginesAjit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-14be2net: changes for BE3 native mode supportSathya Perla
So far be2net has been using BE3 in legacy mode. It now checks for native mode capability and if available it sets it. In native mode, the RX_COMPL structure is different from that in legacy mode. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07be2net: Change f/w command versions for LancerPadmanabh Ratnakar
Change f/w command versions for Lancer Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22be2net: use hba_port_num instead of port_numAjit Khaparde
Use hba_port_num for phy loopback and ethtool phy identification. From: Suresh R <suresh.reddy@emulex.com> Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22be2net: add code to display temperature of ASICAjit Khaparde
Add support to display temperature of ASIC via ethtool -S From: Somnath K <somnath.kotur@emulex.com> Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22be2net: fix to ignore transparent vlan ids wrongly indicated by NICAjit Khaparde
With transparent VLAN tagging, the ASIC wrongly indicates packets with VLAN ID. Strip them off in the driver. The VLAN Tag to be stripped will be given to the host as an async message. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22be2net: variable name changeAjit Khaparde
change occurances of stats_ioctl_sent to stats_cmd_sent Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-12be2net: gracefully handle situations when UE is detectedAjit Khaparde
Avoid accessing the hardware when UE is detected. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-12be2net: Fix broken priority setting when vlan tagging is enabled.Ajit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-12be2net: pass domain numbers for pmac_add/del functionsAjit Khaparde
be_cmd_pmac_add/del functions need to pass domain number to the firmware. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-12be2net: Use domain id when be_cmd_if_destroy is called.Ajit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-12be2net: endianness fix in be_cmd_set_qos().Ajit Khaparde
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-06benet: Avoid potential null deref in be_cmd_get_seeprom_data()Ajit Khaparde
Found by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-17Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/bnx2x/bnx2x.h drivers/net/wireless/iwlwifi/iwl-1000.c drivers/net/wireless/iwlwifi/iwl-6000.c drivers/net/wireless/iwlwifi/iwl-core.h drivers/vhost/vhost.c
2010-12-16be2net: use mutex instead of spin lock for mbox_lockIvan Vecera
Since the mbox polling uses the schedule_timeout, the mbox_lock should be a mutex and not a spin lock. The commit f25b03a replaced udelay() with schedule_timeout() but didn't change mbox_lock to semaphore or mutex. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-08Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/ath/ath9k/ar9003_eeprom.c net/llc/af_llc.c
2010-12-08driver/net/benet: fix be_cmd_multicast_set() memcpy bugJoe Jin
Regarding benet be_cmd_multicast_set() function, now using netdev_for_each_mc_addr() helper for mac address copy, but when copying to req->mac[] did not increase of the index. Cc: Sathya Perla <sathyap@serverengines.com> Cc: Subbu Seetharaman <subbus@serverengines.com> Cc: Sarveshwar Bandi <sarveshwarb@serverengines.com> Cc: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: Joe Jin <joe.jin@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-06be2net: FW init cmd fix for lancerSathya Perla
Lancer can use the same pattern as BE to indicate a driver load to the FW. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-28be2net: adding support for Lancer family of CNAsSathya Perla
Key changes are: - EQ ids are not assigned consecutively in Lancer. So, fix mapping of MSIx vector to EQ-id. - BAR mapping and some req locations different for Lancer. - TCP,UDP,IP checksum fields must be compulsorily set in TX wrb for TSO in Lancer. - CEV_IST reg not present in Lancer; so, peek into event queue to check for new entries - cq_create and mcc_create cmd interface is different for Lancer; handle accordingly Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-24benet: remove dead codestephen hemminger
The following code and data are defined but never used in current driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>