aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-11-28 13:58:12 -0500
committerBen Hutchings <bhutchings@solarflare.com>2013-12-12 17:07:18 -0500
commitbbbe7149bf0bd14432373de39315505e7a133acc (patch)
tree72d40e8027b0880333d659c6d91dfe32af29fb19
parenta45a3a5cdc8dca283e4373045aae8af485f07a07 (diff)
sfc: Remove unnecessary condition for processing the TX timestamp queue
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
-rw-r--r--drivers/net/ethernet/sfc/ptp.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
index 06c6420f40d7..084e2d44790f 100644
--- a/drivers/net/ethernet/sfc/ptp.c
+++ b/drivers/net/ethernet/sfc/ptp.c
@@ -890,13 +890,10 @@ static enum ptp_packet_state efx_ptp_match_rx(struct efx_nic *efx,
890/* Process any queued receive events and corresponding packets 890/* Process any queued receive events and corresponding packets
891 * 891 *
892 * q is returned with all the packets that are ready for delivery. 892 * q is returned with all the packets that are ready for delivery.
893 * true is returned if at least one of those packets requires
894 * synchronisation.
895 */ 893 */
896static bool efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q) 894static void efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q)
897{ 895{
898 struct efx_ptp_data *ptp = efx->ptp_data; 896 struct efx_ptp_data *ptp = efx->ptp_data;
899 bool rc = false;
900 struct sk_buff *skb; 897 struct sk_buff *skb;
901 898
902 while ((skb = skb_dequeue(&ptp->rxq))) { 899 while ((skb = skb_dequeue(&ptp->rxq))) {
@@ -907,7 +904,6 @@ static bool efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q)
907 __skb_queue_tail(q, skb); 904 __skb_queue_tail(q, skb);
908 } else if (efx_ptp_match_rx(efx, skb) == 905 } else if (efx_ptp_match_rx(efx, skb) ==
909 PTP_PACKET_STATE_MATCHED) { 906 PTP_PACKET_STATE_MATCHED) {
910 rc = true;
911 __skb_queue_tail(q, skb); 907 __skb_queue_tail(q, skb);
912 } else if (time_after(jiffies, match->expiry)) { 908 } else if (time_after(jiffies, match->expiry)) {
913 match->state = PTP_PACKET_STATE_TIMED_OUT; 909 match->state = PTP_PACKET_STATE_TIMED_OUT;
@@ -921,8 +917,6 @@ static bool efx_ptp_process_events(struct efx_nic *efx, struct sk_buff_head *q)
921 break; 917 break;
922 } 918 }
923 } 919 }
924
925 return rc;
926} 920}
927 921
928/* Complete processing of a received packet */ 922/* Complete processing of a received packet */
@@ -1088,12 +1082,10 @@ static void efx_ptp_worker(struct work_struct *work)
1088 efx_ptp_drop_time_expired_events(efx); 1082 efx_ptp_drop_time_expired_events(efx);
1089 1083
1090 __skb_queue_head_init(&tempq); 1084 __skb_queue_head_init(&tempq);
1091 if (efx_ptp_process_events(efx, &tempq) || 1085 efx_ptp_process_events(efx, &tempq);
1092 !skb_queue_empty(&ptp_data->txq)) {
1093 1086
1094 while ((skb = skb_dequeue(&ptp_data->txq))) 1087 while ((skb = skb_dequeue(&ptp_data->txq)))
1095 efx_ptp_xmit_skb(efx, skb); 1088 efx_ptp_xmit_skb(efx, skb);
1096 }
1097 1089
1098 while ((skb = __skb_dequeue(&tempq))) 1090 while ((skb = __skb_dequeue(&tempq)))
1099 efx_ptp_process_rx(efx, skb); 1091 efx_ptp_process_rx(efx, skb);