Commit 22d3efe5 authored by Pavel Machek's avatar Pavel Machek Committed by David S. Miller

stmmac: fix comments, make debug output consistent

Fix comments, add some new, and make debugfs output consistent.
Signed-off-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01ae87ea
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#define DWMAC_CORE_4_00 0x40 #define DWMAC_CORE_4_00 0x40
#define STMMAC_CHAN0 0 /* Always supported and default for all chips */ #define STMMAC_CHAN0 0 /* Always supported and default for all chips */
/* These need to be power of two, and >= 4 */
#define DMA_TX_SIZE 512 #define DMA_TX_SIZE 512
#define DMA_RX_SIZE 512 #define DMA_RX_SIZE 512
#define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1)) #define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1))
......
...@@ -105,8 +105,8 @@ module_param(eee_timer, int, S_IRUGO | S_IWUSR); ...@@ -105,8 +105,8 @@ module_param(eee_timer, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(eee_timer, "LPI tx expiration time in msec"); MODULE_PARM_DESC(eee_timer, "LPI tx expiration time in msec");
#define STMMAC_LPI_T(x) (jiffies + msecs_to_jiffies(x)) #define STMMAC_LPI_T(x) (jiffies + msecs_to_jiffies(x))
/* By default the driver will use the ring mode to manage tx and rx descriptors /* By default the driver will use the ring mode to manage tx and rx descriptors,
* but passing this value so user can force to use the chain instead of the ring * but allow user to force to use the chain instead of the ring
*/ */
static unsigned int chain_mode; static unsigned int chain_mode;
module_param(chain_mode, int, S_IRUGO); module_param(chain_mode, int, S_IRUGO);
...@@ -2960,6 +2960,8 @@ static int stmmac_sysfs_ring_open(struct inode *inode, struct file *file) ...@@ -2960,6 +2960,8 @@ static int stmmac_sysfs_ring_open(struct inode *inode, struct file *file)
return single_open(file, stmmac_sysfs_ring_read, inode->i_private); return single_open(file, stmmac_sysfs_ring_read, inode->i_private);
} }
/* Debugfs files, should appear in /sys/kernel/debug/stmmaceth/eth0 */
static const struct file_operations stmmac_rings_status_fops = { static const struct file_operations stmmac_rings_status_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = stmmac_sysfs_ring_open, .open = stmmac_sysfs_ring_open,
...@@ -2982,11 +2984,11 @@ static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v) ...@@ -2982,11 +2984,11 @@ static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v)
seq_printf(seq, "\tDMA HW features\n"); seq_printf(seq, "\tDMA HW features\n");
seq_printf(seq, "==============================\n"); seq_printf(seq, "==============================\n");
seq_printf(seq, "\t10/100 Mbps %s\n", seq_printf(seq, "\t10/100 Mbps: %s\n",
(priv->dma_cap.mbps_10_100) ? "Y" : "N"); (priv->dma_cap.mbps_10_100) ? "Y" : "N");
seq_printf(seq, "\t1000 Mbps %s\n", seq_printf(seq, "\t1000 Mbps: %s\n",
(priv->dma_cap.mbps_1000) ? "Y" : "N"); (priv->dma_cap.mbps_1000) ? "Y" : "N");
seq_printf(seq, "\tHalf duple %s\n", seq_printf(seq, "\tHalf duplex: %s\n",
(priv->dma_cap.half_duplex) ? "Y" : "N"); (priv->dma_cap.half_duplex) ? "Y" : "N");
seq_printf(seq, "\tHash Filter: %s\n", seq_printf(seq, "\tHash Filter: %s\n",
(priv->dma_cap.hash_filter) ? "Y" : "N"); (priv->dma_cap.hash_filter) ? "Y" : "N");
...@@ -3004,9 +3006,9 @@ static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v) ...@@ -3004,9 +3006,9 @@ static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v)
(priv->dma_cap.rmon) ? "Y" : "N"); (priv->dma_cap.rmon) ? "Y" : "N");
seq_printf(seq, "\tIEEE 1588-2002 Time Stamp: %s\n", seq_printf(seq, "\tIEEE 1588-2002 Time Stamp: %s\n",
(priv->dma_cap.time_stamp) ? "Y" : "N"); (priv->dma_cap.time_stamp) ? "Y" : "N");
seq_printf(seq, "\tIEEE 1588-2008 Advanced Time Stamp:%s\n", seq_printf(seq, "\tIEEE 1588-2008 Advanced Time Stamp: %s\n",
(priv->dma_cap.atime_stamp) ? "Y" : "N"); (priv->dma_cap.atime_stamp) ? "Y" : "N");
seq_printf(seq, "\t802.3az - Energy-Efficient Ethernet (EEE) %s\n", seq_printf(seq, "\t802.3az - Energy-Efficient Ethernet (EEE): %s\n",
(priv->dma_cap.eee) ? "Y" : "N"); (priv->dma_cap.eee) ? "Y" : "N");
seq_printf(seq, "\tAV features: %s\n", (priv->dma_cap.av) ? "Y" : "N"); seq_printf(seq, "\tAV features: %s\n", (priv->dma_cap.av) ? "Y" : "N");
seq_printf(seq, "\tChecksum Offload in TX: %s\n", seq_printf(seq, "\tChecksum Offload in TX: %s\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment