summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
Commit message (Collapse)AuthorAgeFilesLines
* cxgb4: Add support to enable logging of firmware mailbox commandsHariprasad Shenai2016-04-291-0/+99
| | | | | | | | | | Add new /sys/kernel/debug/ support to dump a firmware mailbox command issued and replies for debugging purpose. 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>
* cxgb4: Add llseek operation for flash debugfs entryHariprasad Shenai2016-04-261-0/+1
| | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: allocate resources for CXGB4_ULD_ISCSITVarun Prakash2016-03-221-1/+33
| | | | | | | | | allocate rxqs for non T4 adapters, dump rxqs sge qinfo through debugfs. Signed-off-by: Varun Prakash <varun@chelsio.com> Acked-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* cxgb4: Fixes static checker warning in mps_tcam_show()Hariprasad Shenai2016-01-111-2/+2
| | | | | | | | | | | | | | | | The commit 115b56af88b5 ("cxgb4: Update mps_tcam output to include T6 fields") from Dec 23, 2015, leads to the following static checker warning: drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:1735 mps_tcam_show() warn: we tested 'lookup_type' before and it was 'true' Fixing it. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Update mps_tcam output to include T6 fieldsHariprasad Shenai2015-12-241-19/+81
| | | | | | | | | | In T6, MPS classification has a 512 deep TCAM to do the match lookup. Each entry has 80x2b sets containing 48 bit MAC address, port number, VLAN Valid/ID, VNI, lookup type (outer or inner packet header). [71:48] bit locations are overloaded for outer vs. inner lookup types. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Update pm_stats for T6 adapter familyHariprasad Shenai2015-12-241-2/+28
| | | | | | | | Updated pm_stats code to display input FIFO wait (index 5) and read latency (index 7) counters for T6 adapters Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: get naming correct for iscsi queuesHariprasad Shenai2015-12-231-4/+4
| | | | | | | | | All the upper level protocols like rdma, iscsi have their own offload rx queues, so instead of using the generic naming convention be specific while naming them. Improves code readability Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add FL DMA mapping error and low counterHariprasad Shenai2015-12-091-0/+6
| | | | | | | | | | Add Free List DMA Mapping Errors to SGE Queue info for Free Lists. Add Free List "Low" counter to count the number of times we see the number of pointers that we _think_ the hardware sees in the Free List below the Egress Threshold. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Adds a new Device Log Facility FW_DEVLOG_FACILITY_CFHariprasad Shenai2015-10-051-0/+1
| | | | | | | | | The firmware team added a new Device Log Facility FW_DEVLOG_FACILITY_CF, but the driver has been decoding Device Log messages with that Facility as "(NULL)", fixing it. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: For T4, don't read the Firmware Mailbox Control registerHariprasad Shenai2015-10-051-6/+14
| | | | | | | | T4 doesn't have the Shadow copy of the register which we can read without side effect. So don't read mbox control register for T4 adapter Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: memory corruption in debugfsDan Carpenter2015-08-191-5/+6
| | | | | | | | | | | You can't use kstrtoul() with an int or it causes memory corruption. Also j should be unsigned or we have underflow bugs. I considered changing "j" to unsigned long but everything fits in a u32. Fixes: 8e3d04fd7d70 ('cxgb4: Add MPS tracing support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add MPS tracing supportHariprasad Shenai2015-08-141-0/+298
| | | | | | | | | Handle TRACE_PKT, stack can sniff them on the first port Add debubfs enrty to configure tracing for offload traffic like iWARP & iSCSI for debugging purpose. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-08-141-1/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/cavium/Kconfig The cavium conflict was overlapping dependency changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * cxgb4: missing curly braces in t4_setup_debugfs()Dan Carpenter2015-08-101-1/+2
| | | | | | | | | | | | | | | | | | There were missing curly braces so it means we call add_debugfs_mem() unintentionally. Fixes: 3ccc6cf74d8c ('cxgb4: Adds support for T6 adapter') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Add debugfs support to dump tid infoHariprasad Shenai2015-08-131-0/+68
| | | | | | | | | | | | | | | | Add debugfs support to dump tid info like stid, sftid, tids, atid and hwtids Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Add some more details to sge qinfoHariprasad Shenai2015-08-131-8/+53
| | | | | | | | | | | | | | Adding more details to sge qinfo for debugging purpose. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: cleanup some indentingDan Carpenter2015-08-101-3/+3
| | | | | | | | | | | | | | Add or remove some tabs so that statements line up correctly. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Add debugfs support to dump meminfoHariprasad Shenai2015-08-041-0/+285
| | | | | | | | | | | | | | | | Add debug support to dump memory address ranges of various hardware modules of the adapter. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Add debugfs entry to enable backdoor accessHariprasad Shenai2015-07-221-0/+2
| | | | | | | | | | | | | | | | | | | | Add debugfs entry 'use_backdoor' to enable backdoor access to read sge context. By default, we read sge context's via firmware. In case of FW issues, one can enable backdoor access via debugfs to dump sge context for debugging purpose. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Enable cim_la dump to support T6Hariprasad Shenai2015-07-091-3/+51
|/ | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Fix incorrect sequence numbers shown in devlogHariprasad Shenai2015-07-031-12/+13
| | | | | | | | | | | | | | Part of commit 49aa284fe64c4c1 ("cxgb4: Add support for devlog") change introduced a real bug where the Device Log Sequence Numbers are no longer being converted from firmware Big-Endian to local CPU-Endian format. This patch moves all of the translation into the devlog_show() routine. The only endianness code now in devlog_open() is the small loop to find the earliest (lowest Sequence Number) Device Log entry in the circular buffer. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add debugfs entry to dump channel rateHariprasad Shenai2015-06-111-0/+34
| | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add debugfs entry to dump CIM PIF logic analyzer contentsHariprasad Shenai2015-06-111-0/+44
| | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add a debugfs entry to dump CIM MA logic analyzer logsHariprasad Shenai2015-06-111-0/+47
| | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Adds support for T6 adapterHariprasad Shenai2015-06-021-45/+135
| | | | | | | | | Adds NIC driver related changes for T6 adapter. Register related changes, MC related changes, VF related changes, doorbell related changes, debugfs changes, etc Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4/cxgb4vf: function and argument name cleanupHariprasad Shenai2015-05-271-1/+1
| | | | | | | | | | | | | | | | | | This patch changes variable name 'fn' to 'pf' of structure adapter. A 'fn' usually stands for PCI function which could be a PF or a VF. However, the use of this particular variable is explicitly limited to PF only. So, be specific about it in the variable name. Also corrects arguments passed for fn t4_ofld_eq_free, t4_ctrl_eq_free, t4_eth_eq_free, t4_iq_free, t4_alloc_vi, t4_fw_hello, t4_wr_mbox and t4_cfg_pfvf function. Also renames cxgb4_t4_bar2_sge_qregs to t4_bar2_sge_qregs and renames the latter function name in cxgb4vf driver to t4vf_bar2_sge_qregs to avoid conflicts. Also fixes alignment for these function. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add debugfs facility to inject FL starvationHariprasad Shenai2015-05-271-0/+56
| | | | | | | | Add debugfs entry to inject Freelist starvation, used only for debugging purpose. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* VFS: Fix up some ->d_inode accesses in the chelsio driverDavid Howells2015-04-151-14/+7Star
| | | | | | | | | | | | Fix up some ->d_inode accesses in the chelsio driver. (1) FILE_DATA() should just be replaced with file_inode(). (2) set_debugfs_file_size() should be removed and debugfs_create_file_size() should be used to create the file. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-04-021-1/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/usb/asix_common.c drivers/net/usb/sr9800.c drivers/net/usb/usbnet.c include/linux/usb/usbnet.h net/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c The TCP conflicts were overlapping changes. In 'net' we added a READ_ONCE() to the socket cached RX route read, whilst in 'net-next' Eric Dumazet touched the surrounding code dealing with how mini sockets are handled. With USB, it's a case of the same bug fix first going into net-next and then I cherry picked it back into net. Signed-off-by: David S. Miller <davem@davemloft.net>
| * cxgb4: Fix frame size warning for 32 bit archHariprasad Shenai2015-03-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes below warning by dynamically allocating memory All warnings: drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c: In function 'cctrl_tbl_show': >> drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:689:1: warning: the >> frame >> size of 1028 bytes is larger than 1024 bytes [-Wframe-larger-than=] Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Try and provide an RDMA CIQ per cpuHariprasad Shenai2015-03-051-0/+4
|/ | | | | | | | | | | | | | | To allow for better scalability on systems with large core counts, we will try and allocate enough RDMA Concentrator IQs and MSI/X vectors as we have cores. If we cannot get enough MSI/X vectors, fall back to the minimum required: 1 per adapter rx channel. Also clean up cxgb_enable_msix() to make it readable and correct a bug where the vectors are not correctly assigned if the driver doesn't get the full amount requested. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'debugfs_automount' of ↵Linus Torvalds2015-02-181-6/+3Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull debugfs patches from Al Viro: "debugfs patches, mostly to make it possible for something like tracefs to be transparently automounted on given directory in debugfs. New primitive in there is debugfs_create_automount(name, parent, func, arg), which creates a directory and makes its ->d_automount() return func(arg). Another missing primitive was debugfs_create_file_size() - open-coded in quite a few places. Dave's patch adds it and converts the open-code instances to calling it" * 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: debugfs: Provide a file creation function that also takes an initial size new primitive: debugfs_create_automount() debugfs: split end_creating() into success and failure cases debugfs: take mode-dependent parts of debugfs_get_inode() into callers fold debugfs_mknod() into callers fold debugfs_create() into caller fold debugfs_mkdir() into caller debugfs_mknod(): get rid useless arguments fold debugfs_link() into caller debugfs: kill __create_file() debugfs: split the beginning and the end of __create_file() off debugfs_{mkdir,create,link}(): get rid of redundant argument
| * debugfs: Provide a file creation function that also takes an initial sizeDavid Howells2015-02-171-6/+3Star
| | | | | | | | | | | | | | | | | | Provide a file creation function that also takes an initial size so that the caller doesn't have to set i_size, thus meaning that we don't have to call deal with ->d_inode in the callers. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | cxgb4: Fix trace observed while dumping clip_tblHariprasad Shenai2015-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle clip_tbl debugfs entry, when clip_tbl isn't allocated. In commit b5a02f503caa0837 ("cxgb4: Update ipv6 address handling api") wrong argument was passed for single_open for clip_tbl debugfs entry, which led to below trace. Fixing it. ====== call Trace: [<ffffffffa073c606>] clip_tbl_open+0x16/0x30 [cxgb4] [<ffffffff8119e2fa>] do_dentry_open+0x21a/0x370 [<ffffffff8119e499>] vfs_open+0x49/0x50 [<ffffffff811b0d0e>] do_last+0x21e/0x800 [<ffffffff811b1382>] path_openat+0x92/0x470 [<ffffffff8110569f>] ? rb_reserve_next_event+0xaf/0x380 [<ffffffff8110569f>] ? rb_reserve_next_event+0xaf/0x380 [<ffffffff811b189a>] do_filp_open+0x4a/0xa0 [<ffffffff811bdc5d>] ? __alloc_fd+0xcd/0x140 [<ffffffff8119fa4a>] do_sys_open+0x11a/0x230 [<ffffffff8101219f>] ? syscall_trace_enter_phase2+0xaf/0x1b0 [<ffffffff8119fb9e>] SyS_open+0x1e/0x20 [<ffffffff815bf6f0>] tracesys_phase2+0xd4/0xd9 Code: 89 e5 66 66 66 66 90 48 8b 47 e0 48 8b 40 30 48 8b 40 58 c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 66 66 66 66 90 48 8b 47 e0 <48> 8b 40 58 c9 c3 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 RIP [<ffffffff8120898d>] PDE_DATA+0xd/0x20 RSP <ffff8800b08c3c48> CR2: 0000000000000058 ===== Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Add support in debugfs to dump the congestion control tableHariprasad Shenai2015-02-081-0/+28
| | | | | | | | | | | | | | Dump Transport Processor modules congestion control configuration Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Add support to dump mailbox content in debugfsHariprasad Shenai2015-02-081-0/+85
| | | | | | | | | | | | | | | | 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>
* | cxgb4: Add support for ULP RX logic analyzer output in debugfsHariprasad Shenai2015-02-081-0/+36
| | | | | | | | | | | | | | 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>
* | cxgb4: Added support in debugfs to display TP logic analyzer outputHariprasad Shenai2015-02-081-0/+248
| | | | | | | | | | | | | | Dump Transport Processor event trace. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Add support in debugfs to display sensor informationHariprasad Shenai2015-02-081-0/+36
| | | | | | | | | | | | | | | | 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>
* | cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCBHariprasad Shenai2015-02-021-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | In commit dc9daab226aa ("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>
* | cxgb4: Added support in debugfs to dump different timer and clock values of ↵Hariprasad Shenai2015-01-271-0/+63
| | | | | | | | | | | | | | the adapter Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Added support in debugfs to dump PM module statsHariprasad Shenai2015-01-271-0/+66
| | | | | | | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Addded support in debugfs to dump CIM outbound queue contentHariprasad Shenai2015-01-271-0/+57
| | | | | | | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Added support in debugfs to dump cim ingress bound queue contentsHariprasad Shenai2015-01-271-0/+42
| | | | | | | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Added support in debugfs to dump sge_qinfoHariprasad Shenai2015-01-271-0/+211
| | | | | | | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb4: Add debugfs options to dump the rss key, config for PF, VF, etcHariprasad Shenai2015-01-251-0/+407
| | | | | | | | | | | | | | | | 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>
* | cxgb4: Add debugfs entry to dump the contents of the flashHariprasad Shenai2015-01-251-1/+72
| | | | | | | | | | | | | | 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>
* | cxgb4 : Update ipv6 address handling apiAnish Bhatt2015-01-161-0/+19
| | | | | | | | | | | | | | | | | | | | 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>
* | cxgb4: Add support for mps_tcam debugfsHariprasad Shenai2015-01-091-0/+131
| | | | | | | | | | | | | | 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>
* | cxgb4: Add support for cim_qcfg entry in debugfsHariprasad Shenai2015-01-091-0/+70
| | | | | | | | | | | | | | 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>