* [PATCH] smsc911x: leave RX_STOP interrupt permanently enabled
@ 2009-01-26 15:57 Steve Glendinning
2009-01-27 5:33 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Steve Glendinning @ 2009-01-26 15:57 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Ian Saturley, Steve Glendinning
smsc911x_set_multicast_list currently performs the only non-atomic
read-modify-write of INT_EN. This patch permanently enables the
RXSTOP_INT interrupt, and changes the ISR to only conditionally run the
multicast filter workaround code.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
drivers/net/smsc911x.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index f513bdf..29ffb0e 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1246,7 +1246,7 @@ static int smsc911x_open(struct net_device *dev)
napi_enable(&pdata->napi);
temp = smsc911x_reg_read(pdata, INT_EN);
- temp |= (INT_EN_TDFA_EN_ | INT_EN_RSFL_EN_);
+ temp |= (INT_EN_TDFA_EN_ | INT_EN_RSFL_EN_ | INT_EN_RXSTOP_INT_EN_);
smsc911x_reg_write(pdata, INT_EN, temp);
spin_lock_irq(&pdata->mac_lock);
@@ -1418,11 +1418,6 @@ static void smsc911x_set_multicast_list(struct net_device *dev)
/* Request the hardware to stop, then perform the
* update when we get an RX_STOP interrupt */
- smsc911x_reg_write(pdata, INT_STS, INT_STS_RXSTOP_INT_);
- temp = smsc911x_reg_read(pdata, INT_EN);
- temp |= INT_EN_RXSTOP_INT_EN_;
- smsc911x_reg_write(pdata, INT_EN, temp);
-
temp = smsc911x_mac_read(pdata, MAC_CR);
temp &= ~(MAC_CR_RXEN_);
smsc911x_mac_write(pdata, MAC_CR, temp);
@@ -1461,11 +1456,9 @@ static irqreturn_t smsc911x_irqhandler(int irq, void *dev_id)
/* Called when there is a multicast update scheduled and
* it is now safe to complete the update */
SMSC_TRACE(INTR, "RX Stop interrupt");
- temp = smsc911x_reg_read(pdata, INT_EN);
- temp &= (~INT_EN_RXSTOP_INT_EN_);
- smsc911x_reg_write(pdata, INT_EN, temp);
smsc911x_reg_write(pdata, INT_STS, INT_STS_RXSTOP_INT_);
- smsc911x_rx_multicast_update_workaround(pdata);
+ if (pdata->multicast_update_pending)
+ smsc911x_rx_multicast_update_workaround(pdata);
serviced = IRQ_HANDLED;
}
--
1.6.0.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] smsc911x: leave RX_STOP interrupt permanently enabled
2009-01-26 15:57 [PATCH] smsc911x: leave RX_STOP interrupt permanently enabled Steve Glendinning
@ 2009-01-27 5:33 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-01-27 5:33 UTC (permalink / raw)
To: steve.glendinning; +Cc: netdev, ian.saturley
From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Mon, 26 Jan 2009 15:57:52 +0000
> smsc911x_set_multicast_list currently performs the only non-atomic
> read-modify-write of INT_EN. This patch permanently enables the
> RXSTOP_INT interrupt, and changes the ISR to only conditionally run the
> multicast filter workaround code.
>
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Applied to net-next-2.6, thanks Steve.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-27 5:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26 15:57 [PATCH] smsc911x: leave RX_STOP interrupt permanently enabled Steve Glendinning
2009-01-27 5:33 ` David Miller
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).