Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111925
b: refs/heads/master
c: be61ea5
h: refs/heads/master
i:
  111923: 80eb996
v: v3
  • Loading branch information
Weiwei Wang authored and Jeff Garzik committed Sep 25, 2008
1 parent 04dafd8 commit c1d9af1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 315781408ef4a6ff831f8fd37c90d4bb7c234853
refs/heads/master: be61ea52900b97800effbb68478915d73b5d4df2
12 changes: 7 additions & 5 deletions trunk/drivers/net/sb1250-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2069,9 +2069,10 @@ static irqreturn_t sbmac_intr(int irq,void *dev_instance)
static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
{
struct sbmac_softc *sc = netdev_priv(dev);
unsigned long flags;

/* lock eth irq */
spin_lock_irq (&sc->sbm_lock);
spin_lock_irqsave(&sc->sbm_lock, flags);

/*
* Put the buffer on the transmit ring. If we
Expand All @@ -2081,14 +2082,14 @@ static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
if (sbdma_add_txbuffer(&(sc->sbm_txdma),skb)) {
/* XXX save skb that we could not send */
netif_stop_queue(dev);
spin_unlock_irq(&sc->sbm_lock);
spin_unlock_irqrestore(&sc->sbm_lock, flags);

return 1;
}

dev->trans_start = jiffies;

spin_unlock_irq (&sc->sbm_lock);
spin_unlock_irqrestore(&sc->sbm_lock, flags);

return 0;
}
Expand Down Expand Up @@ -2568,14 +2569,15 @@ static void sbmac_mii_poll(struct net_device *dev)
static void sbmac_tx_timeout (struct net_device *dev)
{
struct sbmac_softc *sc = netdev_priv(dev);
unsigned long flags;

spin_lock_irq (&sc->sbm_lock);
spin_lock_irqsave(&sc->sbm_lock, flags);


dev->trans_start = jiffies;
dev->stats.tx_errors++;

spin_unlock_irq (&sc->sbm_lock);
spin_unlock_irqrestore(&sc->sbm_lock, flags);

printk (KERN_WARNING "%s: Transmit timed out\n",dev->name);
}
Expand Down

0 comments on commit c1d9af1

Please sign in to comment.