Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112181
b: refs/heads/master
c: e109832
h: refs/heads/master
i:
  112179: 70e3637
v: v3
  • Loading branch information
Jay Cliburn authored and David S. Miller committed Oct 8, 2008
1 parent 94df42d commit 345fb12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 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: b29be6d3f215ac42651545e89afecc7d9e6a10db
refs/heads/master: e1098328e8d201c2d3966f2fc14f14eb42120d83
18 changes: 1 addition & 17 deletions trunk/drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,6 @@ static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring)
static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
struct tx_packet_desc *ptpd)
{
/* spinlock held */
u8 hdr_len, ip_off;
u32 real_len;
int err;
Expand Down Expand Up @@ -2196,7 +2195,6 @@ static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb,
static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
struct tx_packet_desc *ptpd)
{
/* spinlock held */
struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
struct atl1_buffer *buffer_info;
u16 buf_len = skb->len;
Expand Down Expand Up @@ -2303,7 +2301,6 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
struct tx_packet_desc *ptpd)
{
/* spinlock held */
struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
struct atl1_buffer *buffer_info;
struct tx_packet_desc *tpd;
Expand Down Expand Up @@ -2361,7 +2358,6 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
struct tx_packet_desc *ptpd;
u16 frag_size;
u16 vlan_tag;
unsigned long flags;
unsigned int nr_frags = 0;
unsigned int mss = 0;
unsigned int f;
Expand Down Expand Up @@ -2399,18 +2395,9 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
}
}

if (!spin_trylock_irqsave(&adapter->lock, flags)) {
/* Can't get lock - tell upper layer to requeue */
if (netif_msg_tx_queued(adapter))
dev_printk(KERN_DEBUG, &adapter->pdev->dev,
"tx locked\n");
return NETDEV_TX_LOCKED;
}

if (atl1_tpd_avail(&adapter->tpd_ring) < count) {
/* not enough descriptors */
netif_stop_queue(netdev);
spin_unlock_irqrestore(&adapter->lock, flags);
if (netif_msg_tx_queued(adapter))
dev_printk(KERN_DEBUG, &adapter->pdev->dev,
"tx busy\n");
Expand All @@ -2432,15 +2419,13 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)

tso = atl1_tso(adapter, skb, ptpd);
if (tso < 0) {
spin_unlock_irqrestore(&adapter->lock, flags);
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}

if (!tso) {
ret_val = atl1_tx_csum(adapter, skb, ptpd);
if (ret_val < 0) {
spin_unlock_irqrestore(&adapter->lock, flags);
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
Expand All @@ -2449,7 +2434,7 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
atl1_tx_map(adapter, skb, ptpd);
atl1_tx_queue(adapter, count, ptpd);
atl1_update_mailbox(adapter);
spin_unlock_irqrestore(&adapter->lock, flags);
mmiowb();
netdev->trans_start = jiffies;
return NETDEV_TX_OK;
}
Expand Down Expand Up @@ -3024,7 +3009,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
netdev->features = NETIF_F_HW_CSUM;
netdev->features |= NETIF_F_SG;
netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
netdev->features |= NETIF_F_LLTX;

/*
* patch for some L1 of old version,
Expand Down

0 comments on commit 345fb12

Please sign in to comment.