lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1186997534.3175.21.camel@bluegenie>
Date:	Mon, 13 Aug 2007 15:02:14 +0530
From:	Surya Prabhakar N <surya.prabhakar@...ro.com>
To:	starvik@...s.com
Cc:	dev-etrax@...s.com, linux-kernel@...r.kernel.org
Subject: cli/sti cleanup in drivers/net/cris/eth_v10.c

Hi,
   Removed the cli/sti reference in eth_v10.c and updated it with 
proper spinlock code.



Signed-off-by: Surya Prabhakar <surya.prabhakar@...ro.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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ