aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sun3_82586.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-05-10 08:01:31 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-10 08:01:31 -0400
commit1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (patch)
treed1955a7639e99832590df26466a34d5786a880ae /drivers/net/sun3_82586.c
parent2b0b05ddc04b6d45e71cd36405df512075786f1e (diff)
net: trans_start cleanups
Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sun3_82586.c')
-rw-r--r--drivers/net/sun3_82586.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/sun3_82586.c b/drivers/net/sun3_82586.c
index 31ab4ab0796f..151312342243 100644
--- a/drivers/net/sun3_82586.c
+++ b/drivers/net/sun3_82586.c
@@ -985,7 +985,7 @@ static void sun3_82586_timeout(struct net_device *dev)
985 p->scb->cmd_cuc = CUC_START; 985 p->scb->cmd_cuc = CUC_START;
986 sun3_attn586(); 986 sun3_attn586();
987 WAIT_4_SCB_CMD(); 987 WAIT_4_SCB_CMD();
988 dev->trans_start = jiffies; 988 dev->trans_start = jiffies; /* prevent tx timeout */
989 return 0; 989 return 0;
990 } 990 }
991#endif 991#endif
@@ -998,7 +998,7 @@ static void sun3_82586_timeout(struct net_device *dev)
998 sun3_82586_close(dev); 998 sun3_82586_close(dev);
999 sun3_82586_open(dev); 999 sun3_82586_open(dev);
1000 } 1000 }
1001 dev->trans_start = jiffies; 1001 dev->trans_start = jiffies; /* prevent tx timeout */
1002} 1002}
1003 1003
1004/****************************************************** 1004/******************************************************
@@ -1062,7 +1062,6 @@ static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev)
1062 } 1062 }
1063 1063
1064 sun3_attn586(); 1064 sun3_attn586();
1065 dev->trans_start = jiffies;
1066 if(!i) 1065 if(!i)
1067 dev_kfree_skb(skb); 1066 dev_kfree_skb(skb);
1068 WAIT_4_SCB_CMD(); 1067 WAIT_4_SCB_CMD();
@@ -1082,7 +1081,6 @@ static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev)
1082 p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0; 1081 p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0;
1083 1082
1084 p->nop_cmds[p->nop_point]->cmd_link = make16((p->xmit_cmds[0])); 1083 p->nop_cmds[p->nop_point]->cmd_link = make16((p->xmit_cmds[0]));
1085 dev->trans_start = jiffies;
1086 p->nop_point = next_nop; 1084 p->nop_point = next_nop;
1087 dev_kfree_skb(skb); 1085 dev_kfree_skb(skb);
1088# endif 1086# endif
@@ -1097,7 +1095,6 @@ static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev)
1097 p->nop_cmds[next_nop]->cmd_status = 0; 1095 p->nop_cmds[next_nop]->cmd_status = 0;
1098 1096
1099 p->nop_cmds[p->xmit_count]->cmd_link = make16((p->xmit_cmds[p->xmit_count])); 1097 p->nop_cmds[p->xmit_count]->cmd_link = make16((p->xmit_cmds[p->xmit_count]));
1100 dev->trans_start = jiffies;
1101 p->xmit_count = next_nop; 1098 p->xmit_count = next_nop;
1102 1099
1103 { 1100 {