Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1352999

[PATCH net 3/3] net: mvneta: fix error messages in mvneta_port_down function

From Gregory CLEMENT <gregory.clement@free-electrons.com>
Newsgroups linux.kernel
Subject [PATCH net 3/3] net: mvneta: fix error messages in mvneta_port_down function
Date 2016-03-08 14:00 +0100
Message-ID <rapp0-XW-7@gated-at.bofh.it> (permalink)
References <rapp0-XW-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Dmitri Epshtein <dima@marvell.com>

This commit corrects error printing when shutting down the port. Also
magic numbers are replaced by existing macros.

Signed-off-by: Dmitri Epshtein <dima@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvneta.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 2ee05cebea75..225d933259c0 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -873,14 +873,14 @@ static void mvneta_port_down(struct mvneta_port *pp)
 	do {
 		if (count++ >= MVNETA_RX_DISABLE_TIMEOUT_MSEC) {
 			netdev_warn(pp->dev,
-				    "TIMEOUT for RX stopped ! rx_queue_cmd: 0x08%x\n",
+				    "TIMEOUT for RX stopped ! rx_queue_cmd: 0x%08x\n",
 				    val);
 			break;
 		}
 		mdelay(1);
 
 		val = mvreg_read(pp, MVNETA_RXQ_CMD);
-	} while (val & 0xff);
+	} while (val & MVNETA_RXQ_ENABLE_MASK);
 
 	/* Stop Tx port activity. Check port Tx activity. Issue stop
 	 * command for active channels only
@@ -905,14 +905,14 @@ static void mvneta_port_down(struct mvneta_port *pp)
 		/* Check TX Command reg that all Txqs are stopped */
 		val = mvreg_read(pp, MVNETA_TXQ_CMD);
 
-	} while (val & 0xff);
+	} while (val & MVNETA_TXQ_ENABLE_MASK);
 
 	/* Double check to verify that TX FIFO is empty */
 	count = 0;
 	do {
 		if (count++ >= MVNETA_TX_FIFO_EMPTY_TIMEOUT) {
 			netdev_warn(pp->dev,
-				    "TX FIFO empty timeout status=0x08%x\n",
+				    "TX FIFO empty timeout status=0x%08x\n",
 				    val);
 			break;
 		}
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net 0/3] Few mvneta fixes Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-03-08 14:00 +0100
  [PATCH net 3/3] net: mvneta: fix error messages in mvneta_port_down function Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-03-08 14:00 +0100
    Re: [PATCH net 3/3] net: mvneta: fix error messages in  mvneta_port_down function David Miller <davem@davemloft.net> - 2016-03-11 20:30 +0100
  [PATCH net 1/3] net: mvneta: Fix spinlock usage Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-03-08 14:00 +0100
    Re: [PATCH net 1/3] net: mvneta: Fix spinlock usage Jisheng Zhang <jszhang@marvell.com> - 2016-03-09 07:50 +0100
      Re: [PATCH net 1/3] net: mvneta: Fix spinlock usage Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-03-09 09:00 +0100
        Re: [PATCH net 1/3] net: mvneta: Fix spinlock usage Jisheng Zhang <jszhang@marvell.com> - 2016-03-09 09:20 +0100
  [PATCH net 2/3] net: mvneta: enable change MAC address when interface is up Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-03-08 14:00 +0100

csiph-web