History log of /linux-master/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h
Revision Date Author Comments
# 65dc2f1a 24-Feb-2020 Gustavo A. R. Silva <gustavo@embeddedor.com>

chelsio: Replace zero-length array with flexible-array member

The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
int stuff;
struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# b09026c6 15-Dec-2018 Yangtao Li <tiny.windzz@gmail.com>

cxgb4: remove DEFINE_SIMPLE_DEBUGFS_FILE()

We already have the DEFINE_SHOW_ATTRIBUTE. There is no need to define
such a macro, so remove DEFINE_SIMPLE_DEBUGFS_FILE. Also use the
DEFINE_SHOW_ATTRIBUTE macro to simplify some code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c1d81b1c 06-Mar-2015 David Howells <dhowells@redhat.com>

VFS: Fix up some ->d_inode accesses in the chelsio driver

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>


# 92fc41c3 01-Jan-2015 Al Viro <viro@zeniv.linux.org.uk>

mode_t whack-a-mole: chelsio

it's umode_t, damnit...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 688ea5fe 19-Jan-2015 Hariprasad Shenai <hariprasad@chelsio.com>

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>


# 49216c1c 19-Jan-2015 Hariprasad Shenai <hariprasad@chelsio.com>

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>


# f1ff24aa 06-Jan-2015 Hariprasad Shenai <hariprasad@chelsio.com>

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>


# fd88b31a 06-Nov-2014 Hariprasad Shenai <hariprasad@chelsio.com>

cxgb4: Add cxgb4_debugfs.c, move all debugfs code to new file

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>