From: Surya Prabhakar N <surya.prabhakar@wipro.com>
To: starvik@axis.com
Cc: dev-etrax@axis.com, linux-kernel@vger.kernel.org
Subject: cli/sti cleanup in drivers/net/cris/eth_v10.c
Date: Mon, 13 Aug 2007 15:02:14 +0530 [thread overview]
Message-ID: <1186997534.3175.21.camel@bluegenie> (raw)
Hi,
Removed the cli/sti reference in eth_v10.c and updated it with
proper spinlock code.
Signed-off-by: Surya Prabhakar <surya.prabhakar@wipro.com>
---
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index 5bdf5ca..d1f7225 100644
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -642,6 +642,7 @@ e100_set_mac_address(struct net_device *dev, void *p)
static int
e100_open(struct net_device *dev)
{
+ struct net_local *np = (struct net_local *)dev->priv;
unsigned long flags;
/* enable the MDIO output pin */
@@ -723,9 +724,7 @@ e100_open(struct net_device *dev)
SETS(network_tr_ctrl_shadow, R_NETWORK_TR_CTRL, crc, enable);
*R_NETWORK_TR_CTRL = network_tr_ctrl_shadow;
- save_flags(flags);
- cli();
-
+ spin_lock_irqsave(&np->lock, flags);
/* enable the irq's for ethernet DMA */
*R_IRQ_MASK2_SET =
@@ -757,7 +756,7 @@ e100_open(struct net_device *dev)
*R_DMA_CH0_FIRST = 0;
*R_DMA_CH0_DESCR = virt_to_phys(myLastTxDesc);
- restore_flags(flags);
+ spin_unlock_irqrestore(&np->lock, flags);
/* Probe for transceiver */
if (e100_probe_transceiver(dev))
--
thanks
surya.
reply other threads:[~2007-08-13 13:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1186997534.3175.21.camel@bluegenie \
--to=surya.prabhakar@wipro.com \
--cc=dev-etrax@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=starvik@axis.com \
/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
all inboxes | Powered by JetHome®