aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Dunlap <[email protected]>2021-10-13 22:05:00 -0700
committerJakub Kicinski <[email protected]>2021-10-14 19:18:22 -0700
commitcd2621d07d517473611b170c69beb6524c677740 (patch)
tree3f87b1bcbd983e1e3289a77e6ab187a28c0f475a
parent78e0a006914b9fc0dd714d68f0bb6e0f50c944f2 (diff)
net: fealnx: fix build for UML
On i386, when builtin (not a loadable module), the fealnx driver inspects boot_cpu_data to see what CPU family it is running on, and then acts on that data. The "family" struct member (x86) does not exist when running on UML, so prevent that test and do the default action. Prevents this build error on UML + i386: ../drivers/net/ethernet/fealnx.c: In function ‘netdev_open’: ../drivers/net/ethernet/fealnx.c:861:19: error: ‘struct cpuinfo_um’ has no member named ‘x86’ Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver") Signed-off-by: Randy Dunlap <[email protected]> Cc: [email protected] Cc: Jeff Dike <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Anton Ivanov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/ethernet/fealnx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/fealnx.c b/drivers/net/ethernet/fealnx.c
index 63c935e7b625..ab194c9b0691 100644
--- a/drivers/net/ethernet/fealnx.c
+++ b/drivers/net/ethernet/fealnx.c
@@ -857,7 +857,7 @@ static int netdev_open(struct net_device *dev)
np->bcrvalue |= 0x04; /* big-endian */
#endif
-#if defined(__i386__) && !defined(MODULE)
+#if defined(__i386__) && !defined(MODULE) && !defined(CONFIG_UML)
if (boot_cpu_data.x86 <= 4)
np->crvalue = 0xa00;
else