From: Florian Fainelli <florian@openwrt.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Florian Fainelli <florian@openwrt.org>
Subject: [PATCH 6/8] r6040: define and use MTPR transmit enable bit
Date: Wed, 11 Apr 2012 19:18:41 +0200 [thread overview]
Message-ID: <1334164723-9627-7-git-send-email-florian@openwrt.org> (raw)
In-Reply-To: <1334164723-9627-1-git-send-email-florian@openwrt.org>
Define MTPR bit 0 of the register and use it where it is appropriate.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/rdc/r6040.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 1a365ae..afa4186 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -74,6 +74,7 @@
#define MT_ICR 0x0C /* TX interrupt control */
#define MR_ICR 0x10 /* RX interrupt control */
#define MTPR 0x14 /* TX poll command register */
+#define TM2TX 0x0001 /* Trigger MAC to transmit */
#define MR_BSR 0x18 /* RX buffer size */
#define MR_DCR 0x1A /* RX descriptor control */
#define MLSR 0x1C /* Last status */
@@ -420,7 +421,7 @@ static void r6040_init_mac_regs(struct net_device *dev)
/* Let TX poll the descriptors
* we may got called by r6040_tx_timeout which has left
* some unsent tx buffers */
- iowrite16(0x01, ioaddr + MTPR);
+ iowrite16(TM2TX, ioaddr + MTPR);
}
static void r6040_tx_timeout(struct net_device *dev)
@@ -844,7 +845,7 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
skb_tx_timestamp(skb);
/* Trigger the MAC to check the TX descriptor */
- iowrite16(0x01, ioaddr + MTPR);
+ iowrite16(TM2TX, ioaddr + MTPR);
lp->tx_insert_ptr = descptr->vndescp;
/* If no tx resource, stop */
--
1.7.5.4
next prev parent reply other threads:[~2012-04-11 17:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 17:18 [PATCH 0/8] r6040: misc cleanups Florian Fainelli
2012-04-11 17:18 ` [PATCH 1/8] r6040: consolidate MAC reset to its own function Florian Fainelli
2012-04-11 17:18 ` [PATCH 2/8] r6040: remove unused variable mcr1 from private structure Florian Fainelli
2012-04-11 17:18 ` [PATCH 3/8] r6040: add a MAC operation timeout define Florian Fainelli
2012-04-11 17:18 ` [PATCH 4/8] r6040: fix typo on stats update in tx path Florian Fainelli
2012-04-11 17:18 ` [PATCH 5/8] r6040: define and use MLSR register bits Florian Fainelli
2012-04-11 17:18 ` Florian Fainelli [this message]
2012-04-11 17:18 ` [PATCH 7/8] r6040: define and use bits of register PHY_CC Florian Fainelli
2012-04-11 17:18 ` [PATCH 8/8] r6040: update copyright from 2007 to now Florian Fainelli
2012-04-12 20:07 ` [PATCH 0/8] r6040: misc cleanups David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334164723-9627-7-git-send-email-florian@openwrt.org \
--to=florian@openwrt.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).