Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=699784b7614ce61b16a075445b8e5b6c379c5086
Commit:     699784b7614ce61b16a075445b8e5b6c379c5086
Parent:     bb8a954f27ed8fb8f57e80e6b63d837cfdcad689
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 9 11:51:15 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Apr 9 13:31:14 2007 -0700

    [SC92031]: Fix priv->lock context
    
    The spin_lock calls made in dev->open and dev->close must disable
    BH since open/close are made in process context.  Conversely, the
    call in dev->hard_start_xmit does not need to disable BH since it
    is already executing with BH disabled.
    
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/sc92031.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index 4a926f2..c32c21a 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -964,7 +964,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct 
net_device *dev)
                goto out;
        }
 
-       spin_lock_bh(&priv->lock);
+       spin_lock(&priv->lock);
 
        if (unlikely(!netif_carrier_ok(dev))) {
                err = -ENOLINK;
@@ -1005,7 +1005,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct 
net_device *dev)
                netif_stop_queue(dev);
 
 out_unlock:
-       spin_unlock_bh(&priv->lock);
+       spin_unlock(&priv->lock);
 
 out:
        dev_kfree_skb(skb);
@@ -1042,12 +1042,12 @@ static int sc92031_open(struct net_device *dev)
        priv->pm_config = 0;
 
        /* Interrupts already disabled by sc92031_stop or sc92031_probe */
-       spin_lock(&priv->lock);
+       spin_lock_bh(&priv->lock);
 
        _sc92031_reset(dev);
        mmiowb();
 
-       spin_unlock(&priv->lock);
+       spin_unlock_bh(&priv->lock);
        sc92031_enable_interrupts(dev);
 
        if (netif_carrier_ok(dev))
@@ -1077,13 +1077,13 @@ static int sc92031_stop(struct net_device *dev)
        /* Disable interrupts, stop Tx and Rx. */
        sc92031_disable_interrupts(dev);
 
-       spin_lock(&priv->lock);
+       spin_lock_bh(&priv->lock);
 
        _sc92031_disable_tx_rx(dev);
        _sc92031_tx_clear(dev);
        mmiowb();
 
-       spin_unlock(&priv->lock);
+       spin_unlock_bh(&priv->lock);
 
        free_irq(pdev->irq, dev);
        pci_free_consistent(pdev, TX_BUF_TOT_LEN, priv->tx_bufs,
@@ -1539,13 +1539,13 @@ static int sc92031_suspend(struct pci_dev *pdev, 
pm_message_t state)
        /* Disable interrupts, stop Tx and Rx. */
        sc92031_disable_interrupts(dev);
 
-       spin_lock(&priv->lock);
+       spin_lock_bh(&priv->lock);
 
        _sc92031_disable_tx_rx(dev);
        _sc92031_tx_clear(dev);
        mmiowb();
 
-       spin_unlock(&priv->lock);
+       spin_unlock_bh(&priv->lock);
 
 out:
        pci_set_power_state(pdev, pci_choose_state(pdev, state));
@@ -1565,12 +1565,12 @@ static int sc92031_resume(struct pci_dev *pdev)
                goto out;
 
        /* Interrupts already disabled by sc92031_suspend */
-       spin_lock(&priv->lock);
+       spin_lock_bh(&priv->lock);
 
        _sc92031_reset(dev);
        mmiowb();
 
-       spin_unlock(&priv->lock);
+       spin_unlock_bh(&priv->lock);
        sc92031_enable_interrupts(dev);
 
        netif_device_attach(dev);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to