1
0
Fork 0
Commit Graph

368 Commits (bf7c781d576823e5d71f40585aeeac430a1845c8)

Author SHA1 Message Date
Hariprasad Shenai bf7c781d57 cxgb4: Add support to dump mailbox content in debugfs
Adds support to dump the current contents of mailbox and the driver which owns
it.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-07 22:52:39 -08:00
Hariprasad Shenai 797ff0f573 cxgb4: Add support for ULP RX logic analyzer output in debugfs
Dump Upper Layer Protocol RX module command trace

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-07 22:52:39 -08:00
Hariprasad Shenai 2d277b3b44 cxgb4: Added support in debugfs to display TP logic analyzer output
Dump Transport Processor event trace.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-07 22:52:39 -08:00
Hariprasad Shenai 70a5f3bb5f cxgb4: Add support in debugfs to display sensor information
Dump out various chip sensor information. Currently Chip Temperature
and Core Voltage.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-07 22:52:39 -08:00
Lad, Prabhakar 4a95b6d0a7 chelsio: cxgb4: fix sparse warning
this patch fixes following sparse warning:

cxgb4_dcb.c:25:6: warning: symbol 'dcb_ver_array' was not declared. Should it be static?

Alongside making it const.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-05 16:03:27 -08:00
Markus Elfring 0b5b6beea1 cxgb4: Delete an unnecessary check before the function call "release_firmware"
The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-05 00:06:47 -08:00
Hariprasad Shenai 3a336cb171 cxgb4: Add low latency socket busy_poll support
cxgb_busy_poll, corresponding to ndo_busy_poll, gets called by the socket
waiting for data.

With busy_poll enabled, improvement is seen in latency numbers as observed by
collecting netperf TCP_RR numbers.
Below are latency number, with and without busy-poll, in a switched environment
for a particular msg size:
netperf command: netperf -4 -H <ip> -l 30 -t TCP_RR -- -r1,1
Latency without busy-poll: ~16.25 us
Latency with busy-poll   : ~08.79 us

Based on original work by Kumar Sanghvi <kumaras@chelsio.com>

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-04 23:55:58 -08:00
Anish Bhatt ba0c39cb98 cxgb4 : Improve IEEE DCBx support, other minor open-lldp fixes
* Add support for IEEE ets & pfc api.
* Fix bug that resulted in incorrect bandwidth percentage being returned for
  CEE peers
* Convert pfc enabled info from firmware format to what dcbnl expects before
  returning

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-02 18:54:35 -08:00
Hariprasad Shenai 3051fa617a cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCB
In commit dc9daab226 ("cxgb4: Added support in debugfs to dump
sge_qinfo") a preprocessor check for CONFIG_CXGB4_DCB got added, which should
have been CONFIG_CHELSIO_T4_DCB. After adding the right preprocessor, build
fails due to missing function ethqset2pinfo. Fixing that as well.

V2: Updated description since the patch also fixes build failure

Reported-by: Paul Bolle <pebolle@tiscal.nl>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-01 22:38:00 -08:00
Hariprasad Shenai cd6c2f12ec cxgb4: Move firmware version MACRO to t4fw_version.h
Move firmware version MACRO to a new t4fw_version.h file so that csiostor driver
can also use it.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-27 17:18:24 -08:00
Hariprasad Shenai b58b667687 cxgb4: Added support in debugfs to dump different timer and clock values of the adapter
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-27 00:15:02 -08:00
Hariprasad Shenai b3bbe36a26 cxgb4: Added support in debugfs to dump PM module stats
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-27 00:15:02 -08:00
Hariprasad Shenai c778af7d18 cxgb4: Addded support in debugfs to dump CIM outbound queue content
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-27 00:15:01 -08:00
Hariprasad Shenai e5f0e43bee cxgb4: Added support in debugfs to dump cim ingress bound queue contents
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-27 00:15:01 -08:00
Hariprasad Shenai dc9daab226 cxgb4: Added support in debugfs to dump sge_qinfo
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-27 00:15:01 -08:00
Hariprasad Shenai 1793c798c3 cxgb4: Fixes cxgb4_inet6addr_notifier unregister call
commit b5a02f503c ("cxgb4 : Update ipv6 address handling api") introduced
a regression where unregister cxgb4_inet6addr_notifier wasn't getting called
during module_exit.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-26 14:45:46 -08:00
Andy Shevchenko 7aee42c676 cxgb3: re-use native hex2bin()
Call hex2bin() library function instead of doing conversion here.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-25 00:09:41 -08:00
Hariprasad Shenai 688ea5fe7f cxgb4: Add debugfs options to dump the rss key, config for PF, VF, etc
Adds support to dump the rss table, rss_config, rss_key, rss_pf_config and
rss_vf_config

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-24 17:13:25 -08:00
Hariprasad Shenai 49216c1c17 cxgb4: Add debugfs entry to dump the contents of the flash
Adds support to dump the contents of the flash in the adapter

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-24 17:13:24 -08:00
Anish Bhatt b5a02f503c cxgb4 : Update ipv6 address handling api
This patch improves on previously added support for ipv6 addresses. The code
is consolidated to a single file and adds an api for use by dependent upper
level drivers such as cxgb4i/iw_cxgb4 etc.

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Deepak Singh <deepak.s@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-15 18:59:46 -05:00
David S. Miller 3f3558bb51 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/xen-netfront.c

Minor overlapping changes in xen-netfront.c, mostly to do
with some buffer management changes alongside the split
of stats into TX and RX.

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-15 00:53:17 -05:00
Hariprasad Shenai 14b3812f7a cxgb4vf: Fix queue allocation for 40G adapter
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-14 16:48:08 -05:00
Jiri Pirko df8a39defa net: rename vlan_tx_* helpers since "tx" is misleading there
The same macros are used for rx as well. So rename it.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-13 17:51:08 -05:00
Hariprasad Shenai 06640310b4 cxgb4: Ripping out old hard-wired initialization code in driver
Removing old hard-wired initialization code in the driver, which is no longer
used. Also deprecating few module parameters.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-13 16:50:15 -05:00
Hariprasad Shenai fd48e639df cxgb4vf: Initialize mdio_addr before using it
In commit 5ad24def21 ("cxgb4vf: Fix ethtool get_settings for VF driver")
mdio_addr of port_info structure was used unininitialzed. Fixing it.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-13 16:31:52 -05:00
Hariprasad Shenai bdc590b99f iw_cxgb4/cxgb4/cxgb4vf/cxgb4i/csiostor: Cleanup register defines/macros related to all other cpl messages
This patch cleanups all other macros/register define related to
CPL messages that are defined in t4_msg.h and the affected files

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-12 16:19:34 -05:00
Hariprasad Shenai 6c53e938a8 iw_cxgb4/cxgb4/cxgb4i: Cleanup register defines/MACROS related to CM CPL messages
This patch cleanups all macros/register define related to connection management
CPL messages that are defined in t4_msg.h and the affected files

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-12 16:19:34 -05:00
Hariprasad Shenai ef82f662ba cxgb4: Add support for mps_tcam debugfs
Debug log to get the MPS TCAM table

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-08 19:39:12 -08:00
Hariprasad Shenai 74b3092c45 cxgb4: Add support for cim_qcfg entry in debugfs
Adds debug log to get cim queue config

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-08 19:39:11 -08:00
Hariprasad Shenai f1ff24aa95 cxgb4: Add support for cim_la entry in debugfs
The CIM LA captures the embedded processor’s internal state. Optionally, it can
also trace the flow of data in and out of the embedded processor. Therefore, the
CIM LA output contains detailed information of what code the embedded processor
executed prior to the CIM LA capture.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-08 19:39:10 -08:00
Hariprasad Shenai 49aa284ffe cxgb4: Add support for devlog
Add support for device log entry in debugfs

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-08 19:39:09 -08:00
Hariprasad Shenai 678109ea09 cxgb4: Add PCI device ID for new T5 adapter
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-06 13:15:15 -05:00
Hariprasad Shenai 0d8043389b cxgb4/cxgb4vf/csiostor: Cleanup PL, XGMAC, SF and MC related register defines
This patch cleanups all PL, XGMAC and SF related macros/register defines
that are defined in t4_regs.h and the affected files

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-05 16:34:48 -05:00
Hariprasad Shenai 837e4a42bb cxgb4/csiostor: Cleanup TP, MPS and TCAM related register defines
This patch cleanups all TP, MPS and TCAM related macros/register defines
that are defined in t4_regs.h and the affected files

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-05 16:34:48 -05:00
Hariprasad Shenai 89c3a86cc7 cxgb4/cxg4vf/csiostor: Cleanup MC, MA and CIM related register defines
This patch cleanups all MC, MA and CIM related macros/register defines that are
defined in t4_regs.h and the affected files.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-05 16:34:47 -05:00
Hariprasad Shenai f061de42e6 cxgb4/cxgb4vf/csiostor: Cleanup SGE and PCI related register defines
This patch cleansup remaining SGE related macros/register defines and all PCI
related ones that are defined in t4_regs.h and the affected files.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-05 16:34:47 -05:00
Hariprasad Shenai f612b815d7 RDMA/cxgb4/cxgb4vf/csiostor: Cleanup SGE register defines
This patch cleanups all SGE related macros/register defines that are
defined in t4_regs.h and the affected files.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-05 16:34:47 -05:00
Rickard Strandqvist 7841d5d622 net: ethernet: chelsio: cxgb3: mc5.c: Remove some unused functions
Removes some functions that are not used anywhere:
dbgi_rd_rsp3() dbgi_wr_addr3()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-02 16:32:37 -05:00
Hariprasad Shenai 5ad24def21 cxgb4vf: Fix ethtool get_settings for VF driver
Decode and display Port Type and Module Type for ethtool get_settings() call

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-22 16:35:28 -05:00
Hariprasad Shenai 5aa80e5144 cxgb4: Fix decoding QSA module for ethtool get settings
QSA module was getting decoded as QSFP module in ethtool get settings, this
patch fixes it.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-18 12:39:16 -05:00
Hariprasad Shenai 40e9de4b60 cxgb4: Add support for QSA modules
Firmware 1.12.25.0 added support for QSA module, adding the driver code for it.
Also fixes some ethtool get settings for other module types.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-12 11:24:03 -05:00
Karen Xie 64bfead85d cxgb4/cxgb4i: set the max. pdu length in firmware
Programs the firmware of the maximum outgoing iscsi pdu length per connection.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-12 11:22:29 -05:00
Hariprasad Shenai 666224d4d5 cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
Remove use of calls into t4_fw_hello() with MASTER_MUST, which results in
FW_HELLO_CMD_MASTERFORCE being set. The firmware doesn't support this and of
course any existing PF Drivers will totally go for a toss.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-11 14:25:17 -05:00
Stephen Rothwell dd0bcc0bc8 cxgb4/cxgb4vf: global named must be unique
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-10 15:52:39 -05:00
David S. Miller 22f10923dd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/ethernet/amd/xgbe/xgbe-desc.c
	drivers/net/ethernet/renesas/sh_eth.c

Overlapping changes in both conflict cases.

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-10 15:48:20 -05:00
Alexander Duyck e0e31216ef cxgb: Use napi_alloc_skb instead of netdev_alloc_skb_ip_align
In order to use napi_alloc_skb I needed to pass a pointer to struct adapter
instead of struct pci_dev.  This allowed me to access &adapter->napi.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-10 13:31:57 -05:00
Julia Lawall 5e84e189ce chelsio: fix misspelling of current function in string
Replace a misspelled function name by %s and then __func__.

This was done using Coccinelle, including the use of Levenshtein distance,
as proposed by Rasmus Villemoes.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-09 16:18:47 -05:00
Hariprasad Shenai dff04bceef cxgb4: Update firmware version after flashing it via ethtool
After successfully loading new firmware, reload the new firmware's version
number information so "ethtool -i", etc. will report the right value

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-09 13:32:00 -05:00
Hariprasad Shenai df64e4d38c cxgb4/cxgb4vf: Use new interfaces to calculate BAR2 SGE Queue Register addresses
Use BAR2 Going To Sleep (GTS) for T5 and later. Use new BAR2 User Doorbells for
T5 for both cxgb4 and cxgb4vf driver.

Based on original work by Casey Leedom <leedom@chelsio.com>

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-09 13:32:00 -05:00
Hariprasad Shenai e85c9a7abf cxgb4/cxgb4vf: Add code to calculate T5 BAR2 Offsets for SGE Queue Registers
Add new Common Code facilities for calculating T5 BAR2 Offsets for SGE Queue
Registers. This new code can handle situations where

    Queues Per Page * SGE BAR2 Queue Register Area Size > Page Size

Based on original work by Casey Leedom <leedom@chelsio.com>

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-09 13:32:00 -05:00