Menu

#262 Ndiswrapper fails to build on i686 with 3.3.0 kernel

open
nobody
None
5
2014-08-29
2012-03-31
Anonymous
No

Here's the failed buildlog

http://buildsys.rpmfusion.org/logs/fedora-16-rpmfusion_free/12565-ndiswrapper-kmod-1.57-2.fc16/i686/build.log

I have applied the commits from svn as a patch but it fails to build on i686 arch (x86_64 builds ok).

--- a/driver/wrapndis.c 2012/03/26 17:00:31 3107
+++ b/driver/wrapndis.c 2012/03/26 17:01:18 3108
@@ -1675,6 +1675,7 @@
return 0;
}

+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
static u32 ndis_get_tx_csum(struct net_device dev)
{
struct ndis_device
wnd = netdev_priv(dev);
@@ -1735,18 +1736,21 @@
else
return -EOPNOTSUPP;
}
+#endif

static struct ethtool_ops ndis_ethtool_ops = {
.get_drvinfo = ndis_get_drvinfo,
.get_link = ndis_get_link,
.get_wol = ndis_get_wol,
.set_wol = ndis_set_wol,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
.get_tx_csum = ndis_get_tx_csum,
.get_rx_csum = ndis_get_rx_csum,
.set_tx_csum = ndis_set_tx_csum,
.set_rx_csum = ndis_set_rx_csum,
.get_sg = ndis_get_sg,
.set_sg = ndis_set_sg,
+#endif
};

static int notifier_event(struct notifier_block notifier, unsigned long event,
--- a/driver/ndis.c 2011/10/04 15:31:37 3085
+++ b/driver/ndis.c 2012/03/26 17:00:31 3107
@@ -2654,9 +2654,15 @@
(ULONG
idle, ULONG kernel_user, ULONG index)
{
int cpu = smp_processor_id();
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)

  • *idle = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE];
  • *kernel_user = kcpustat_cpu(cpu).cpustat[CPUTIME_SYSTEM] +
  • kcpustat_cpu(cpu).cpustat[CPUTIME_USER];
    +#else
    idle = kstat_cpu(cpu).cpustat.idle;
    kernel_user = kstat_cpu(cpu).cpustat.system +
    kstat_cpu(cpu).cpustat.user;
    +#endif
    *index = cpu;
    }

Discussion

  • Thomas Reitmayr

    Thomas Reitmayr - 2012-04-01

    I have the impression that this might be a kernel bug due to the following commit:
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=31a8394e069e47dc47f4c29e4213aa943342f19f

    With the following patch, compilation works fine:

    --- linux-3.3.0-gentoo-org/arch/x86/include/asm/cmpxchg.h 2012-04-01 23:35:19.593992589 +0200
    +++ linux-3.3.0-gentoo/arch/x86/include/asm/cmpxchg.h 2012-04-01 23:35:33.325747911 +0200
    @@ -43,7 +43,7 @@ extern void __add_wrong_size(void)
    switch (sizeof(*(ptr))) { \
    case __X86_CASE_B: \
    asm volatile (lock #op "b %b0, %1\n" \

    • : "+r" (__ret), "+m" (*(ptr)) \
    • : "+q" (__ret), "+m" (*(ptr)) \
      : : "memory", "cc"); \
      break; \
      case __X86_CASE_W: \
     

Log in to post a comment.