* [PATCH 3/4] staging: et131x: Remove spaces between tabs inserted in patch 7b7fb34d3ffa
@ 2011-07-07 22:38 Mark Einon
2011-07-07 22:38 ` [PATCH 4/4] staging: et131x: et1310_mac.c: ConfigMacStatRegs() add missing regs to be zeroed Mark Einon
0 siblings, 1 reply; 2+ messages in thread
From: Mark Einon @ 2011-07-07 22:38 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, o.hartmann, Mark Einon
I must remember to run checkpatch on 'trivial' patches too...
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
drivers/staging/et131x/et1310_address_map.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index a02335a..410677e 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -1225,7 +1225,7 @@ struct macstat_regs { /* Location: */
u32 txrx_1519_1522_gvln_frames; /* 0x6098 */
/* Rx Byte Counter */
- u32 rx_bytes; /* 0x609C */
+ u32 rx_bytes; /* 0x609C */
/* Rx Packet Counter */
u32 rx_packets; /* 0x60A0 */
@@ -1240,7 +1240,7 @@ struct macstat_regs { /* Location: */
u32 rx_broadcast_packets; /* 0x60AC */
/* Rx Control Frame Packet Counter */
- u32 rx_control_frames; /* 0x60B0 */
+ u32 rx_control_frames; /* 0x60B0 */
/* Rx Pause Frame Packet Counter */
u32 rx_pause_frames; /* 0x60B4 */
@@ -1276,7 +1276,7 @@ struct macstat_regs { /* Location: */
u32 rx_drops; /* 0x60DC */
/* Tx Byte Counter */
- u32 tx_bytes; /* 0x60E0 */
+ u32 tx_bytes; /* 0x60E0 */
/* Tx Packet Counter */
u32 tx_packets; /* 0x60E4 */
@@ -1339,7 +1339,7 @@ struct macstat_regs { /* Location: */
u32 carry_reg1; /* 0x6130 */
/* Carry Register Two Register */
- u32 carry_reg2; /* 0x6134 */
+ u32 carry_reg2; /* 0x6134 */
/* Carry Register One Mask Register */
u32 carry_reg1_mask; /* 0x6138 */
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 4/4] staging: et131x: et1310_mac.c: ConfigMacStatRegs() add missing regs to be zeroed
2011-07-07 22:38 [PATCH 3/4] staging: et131x: Remove spaces between tabs inserted in patch 7b7fb34d3ffa Mark Einon
@ 2011-07-07 22:38 ` Mark Einon
0 siblings, 0 replies; 2+ messages in thread
From: Mark Einon @ 2011-07-07 22:38 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, o.hartmann, Mark Einon
The comment at the top of the function states 'we need to initialize all the macstat registers to zero', but not all macstat registers are zeroed. Zero the missing registers.
Tested on an ET-131x device.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
drivers/staging/et131x/et1310_mac.c | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c
index dc3e062..656be4b 100644
--- a/drivers/staging/et131x/et1310_mac.c
+++ b/drivers/staging/et131x/et1310_mac.c
@@ -387,21 +387,54 @@ void ConfigMacStatRegs(struct et131x_adapter *etdev)
/* Next we need to initialize all the macstat registers to zero on
* the device.
*/
+ writel(0, &macstat->txrx_0_64_byte_frames);
+ writel(0, &macstat->txrx_65_127_byte_frames);
+ writel(0, &macstat->txrx_128_255_byte_frames);
+ writel(0, &macstat->txrx_256_511_byte_frames);
+ writel(0, &macstat->txrx_512_1023_byte_frames);
+ writel(0, &macstat->txrx_1024_1518_byte_frames);
+ writel(0, &macstat->txrx_1519_1522_gvln_frames);
+
+ writel(0, &macstat->rx_bytes);
+ writel(0, &macstat->rx_packets);
writel(0, &macstat->rx_fcs_errs);
+ writel(0, &macstat->rx_multicast_packets);
+ writel(0, &macstat->rx_broadcast_packets);
+ writel(0, &macstat->rx_control_frames);
+ writel(0, &macstat->rx_pause_frames);
+ writel(0, &macstat->rx_unknown_opcodes);
writel(0, &macstat->rx_align_errs);
writel(0, &macstat->rx_frame_len_errs);
writel(0, &macstat->rx_code_errs);
- writel(0, &macstat->rx_drops);
+ writel(0, &macstat->rx_carrier_sense_errs);
+ writel(0, &macstat->rx_undersize_packets);
writel(0, &macstat->rx_oversize_packets);
writel(0, &macstat->rx_fragment_packets);
+ writel(0, &macstat->rx_jabbers);
+ writel(0, &macstat->rx_drops);
+ writel(0, &macstat->tx_bytes);
+ writel(0, &macstat->tx_packets);
+ writel(0, &macstat->tx_multicast_packets);
+ writel(0, &macstat->tx_broadcast_packets);
+ writel(0, &macstat->tx_pause_frames);
writel(0, &macstat->tx_deferred);
+ writel(0, &macstat->tx_excessive_deferred);
writel(0, &macstat->tx_single_collisions);
writel(0, &macstat->tx_multiple_collisions);
writel(0, &macstat->tx_late_collisions);
+ writel(0, &macstat->tx_excessive_collisions);
writel(0, &macstat->tx_total_collisions);
+ writel(0, &macstat->tx_pause_honored_frames);
+ writel(0, &macstat->tx_drops);
+ writel(0, &macstat->tx_jabbers);
+ writel(0, &macstat->tx_fcs_errs);
+ writel(0, &macstat->tx_control_frames);
writel(0, &macstat->tx_oversize_frames);
writel(0, &macstat->tx_undersize_frames);
+ writel(0, &macstat->tx_fragments);
+ writel(0, &macstat->carry_reg1);
+ writel(0, &macstat->carry_reg2);
/* Unmask any counters that we want to track the overflow of.
* Initially this will be all counters. It may become clear later
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-07 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 22:38 [PATCH 3/4] staging: et131x: Remove spaces between tabs inserted in patch 7b7fb34d3ffa Mark Einon
2011-07-07 22:38 ` [PATCH 4/4] staging: et131x: et1310_mac.c: ConfigMacStatRegs() add missing regs to be zeroed Mark Einon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox