diff options
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r-- | drivers/net/s2io.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index c6ba3dee8ae0..09078ff84cd2 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -2868,6 +2868,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data) | |||
2868 | struct tx_curr_get_info get_info, put_info; | 2868 | struct tx_curr_get_info get_info, put_info; |
2869 | struct sk_buff *skb; | 2869 | struct sk_buff *skb; |
2870 | struct TxD *txdlp; | 2870 | struct TxD *txdlp; |
2871 | u8 err_mask; | ||
2871 | 2872 | ||
2872 | get_info = fifo_data->tx_curr_get_info; | 2873 | get_info = fifo_data->tx_curr_get_info; |
2873 | memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info)); | 2874 | memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info)); |
@@ -2886,8 +2887,8 @@ static void tx_intr_handler(struct fifo_info *fifo_data) | |||
2886 | } | 2887 | } |
2887 | 2888 | ||
2888 | /* update t_code statistics */ | 2889 | /* update t_code statistics */ |
2889 | err >>= 48; | 2890 | err_mask = err >> 48; |
2890 | switch(err) { | 2891 | switch(err_mask) { |
2891 | case 2: | 2892 | case 2: |
2892 | nic->mac_control.stats_info->sw_stat. | 2893 | nic->mac_control.stats_info->sw_stat. |
2893 | tx_buf_abort_cnt++; | 2894 | tx_buf_abort_cnt++; |
@@ -6805,6 +6806,7 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) | |||
6805 | u16 l3_csum, l4_csum; | 6806 | u16 l3_csum, l4_csum; |
6806 | unsigned long long err = rxdp->Control_1 & RXD_T_CODE; | 6807 | unsigned long long err = rxdp->Control_1 & RXD_T_CODE; |
6807 | struct lro *lro; | 6808 | struct lro *lro; |
6809 | u8 err_mask; | ||
6808 | 6810 | ||
6809 | skb->dev = dev; | 6811 | skb->dev = dev; |
6810 | 6812 | ||
@@ -6813,8 +6815,8 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) | |||
6813 | if (err & 0x1) { | 6815 | if (err & 0x1) { |
6814 | sp->mac_control.stats_info->sw_stat.parity_err_cnt++; | 6816 | sp->mac_control.stats_info->sw_stat.parity_err_cnt++; |
6815 | } | 6817 | } |
6816 | err >>= 48; | 6818 | err_mask = err >> 48; |
6817 | switch(err) { | 6819 | switch(err_mask) { |
6818 | case 1: | 6820 | case 1: |
6819 | sp->mac_control.stats_info->sw_stat. | 6821 | sp->mac_control.stats_info->sw_stat. |
6820 | rx_parity_err_cnt++; | 6822 | rx_parity_err_cnt++; |
@@ -6867,9 +6869,9 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) | |||
6867 | * Note that in this case, since checksum will be incorrect, | 6869 | * Note that in this case, since checksum will be incorrect, |
6868 | * stack will validate the same. | 6870 | * stack will validate the same. |
6869 | */ | 6871 | */ |
6870 | if (err != 0x5) { | 6872 | if (err_mask != 0x5) { |
6871 | DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", | 6873 | DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%x\n", |
6872 | dev->name, err); | 6874 | dev->name, err_mask); |
6873 | sp->stats.rx_crc_errors++; | 6875 | sp->stats.rx_crc_errors++; |
6874 | sp->mac_control.stats_info->sw_stat.mem_freed | 6876 | sp->mac_control.stats_info->sw_stat.mem_freed |
6875 | += skb->truesize; | 6877 | += skb->truesize; |