diff options
author | Olaf Hering <olaf@aepfle.de> | 2007-06-19 16:41:10 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-06-27 02:33:06 -0400 |
commit | f9046eb3f64db73f1c5b2a25d2a5983351cd1a04 (patch) | |
tree | 5141957ac1f702f63025275fcd33bdc1229b1c93 | |
parent | 549f8009830177fe8897fd098a999b647990f30d (diff) |
2.6.22: ERROR: "__ucmpdi2" [drivers/net/s2io.ko] undefined!
On Tue, Jun 19, Stephen Hemminger wrote:
> Olaf Hering <olaf@aepfle.de> wrote:
> > What happend to __ucmpdi2 from David Woodhouse?
> > google has a few hits about stuff like this on 32bit powerpc with gcc 4.1.2:
> >
> > ERROR: "__ucmpdi2" [drivers/net/s2io.ko] undefined!
> >
> > using the drivers/net/s2io* files from 2.6.21 with 2.6.22-rc5 fixes the
> > compile.
> >
> > 25805dcf9d83098cf5492117ad2669cd14cc9b24 adds two u64 >>= 48 followed by
> > a switch statement (line 2889 and 6816).
>
> Probably the "switch(err) {" needs a cast to a smaller type (like u8).
This change removes the compiler-generated calls to __ucmpdi2.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-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; |