Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112175
b: refs/heads/master
c: 8724184
h: refs/heads/master
i:
  112173: e455f9e
  112171: 42d8685
  112167: 8f23b4e
  112159: 9a28de9
v: v3
  • Loading branch information
Kevin Hao authored and David S. Miller committed Oct 8, 2008
1 parent dd79beb commit e29454e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 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: 0acb28396728f42b6b1553c85d27c37513796043
refs/heads/master: 87241840b214734c023bda83372059de3f7eeabd
24 changes: 1 addition & 23 deletions trunk/drivers/net/atlx/atl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ static int __devinit atl2_sw_init(struct atl2_adapter *adapter)
hw->max_frame_size = adapter->netdev->mtu;

spin_lock_init(&adapter->stats_lock);
spin_lock_init(&adapter->tx_lock);

set_bit(__ATL2_DOWN, &adapter->flags);

Expand Down Expand Up @@ -751,11 +750,7 @@ static void atl2_down(struct atl2_adapter *adapter)
* reschedule our watchdog timer */
set_bit(__ATL2_DOWN, &adapter->flags);

#ifdef NETIF_F_LLTX
netif_stop_queue(netdev);
#else
netif_tx_disable(netdev);
#endif

/* reset MAC to disable all RX/TX */
atl2_reset_hw(&adapter->hw);
Expand Down Expand Up @@ -831,7 +826,6 @@ static inline int TxdFreeBytes(struct atl2_adapter *adapter)
static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
{
struct atl2_adapter *adapter = netdev_priv(netdev);
unsigned long flags;
struct tx_pkt_header *txph;
u32 offset, copy_len;
int txs_unused;
Expand All @@ -847,24 +841,13 @@ static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
return NETDEV_TX_OK;
}

#ifdef NETIF_F_LLTX
local_irq_save(flags);
if (!spin_trylock(&adapter->tx_lock)) {
/* Collision - tell upper layer to requeue */
local_irq_restore(flags);
return NETDEV_TX_LOCKED;
}
#else
spin_lock_irqsave(&adapter->tx_lock, flags);
#endif
txs_unused = TxsFreeUnit(adapter);
txbuf_unused = TxdFreeBytes(adapter);

if (skb->len + sizeof(struct tx_pkt_header) + 4 > txbuf_unused ||
txs_unused < 1) {
/* not enough resources */
netif_stop_queue(netdev);
spin_unlock_irqrestore(&adapter->tx_lock, flags);
return NETDEV_TX_BUSY;
}

Expand Down Expand Up @@ -910,8 +893,7 @@ static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
ATL2_WRITE_REGW(&adapter->hw, REG_MB_TXD_WR_IDX,
(adapter->txd_write_ptr >> 2));

spin_unlock_irqrestore(&adapter->tx_lock, flags);

mmiowb();
netdev->trans_start = jiffies;
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
Expand Down Expand Up @@ -1449,10 +1431,6 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
#endif

#ifdef NETIF_F_LLTX
netdev->features |= NETIF_F_LLTX;
#endif

/* Init PHY as early as possible due to power saving issue */
atl2_phy_init(&adapter->hw);

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/atlx/atl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ struct atl2_adapter {
u16 link_duplex;

spinlock_t stats_lock;
spinlock_t tx_lock;

struct work_struct reset_task;
struct work_struct link_chg_task;
Expand Down

0 comments on commit e29454e

Please sign in to comment.