/* ** ISXKBRD.C - public domain by Ed Kowalski. ** ** isxkeybrd() - detects enhanced kbd */ #include /* ** Check for enhanced keyboard support. */ int isxkeybrd(void) { union REGS rg; unsigned kbdflags; rg.h.ah = 0x02; /* check BIOS supports enhanced kbd */ int86(0x16, &rg, &rg); /* get kbd flags */ kbdflags = rg.h.al; /* mess 'em up, get enhanced flags */ rg.x.ax = 0x1200 + kbdflags ^ 0xff; int86(0x16, &rg, &rg); if (rg.h.al == kbdflags) /* BIOS supports enhanced keyboard */ { /* if bit 4 at 40:96h is set machine has an enhanced kbd */ if ((*(( char far *) 0x400096L) & 0x10)) return 1; /* enhanced keyboard present */ } return 0; /* don't use enhanced keyboard calls */ } #ifdef TEST #include main() { if (isxkeybrd()) puts( "Enhanced Keyboard supported" ); else puts( "Enhanced Keyboard NOT supported "); return 0; } #endif /* TEST */ lue='master'>master net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2017-02-08 11:16:33 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-08 15:25:17 -0500
commitb8399a1e5ad86807cee52b65820ffa543c8d66d0 (patch)
treeee139b902534dcec0658eb33c9ede9a239efe007 /drivers
parentb3e8d1ebad2d041d3226ce283451bc9d38cf5870 (diff)
mlxsw: spectrum_router: Store routes in a more generic way
Up until now, the only FIB entries that were associated with a nexthop group were routes to remote networks where all the nexthop devices had a valid router interface (RIF). This is in contrast to the FIB code, where all the routes are associated with a FIB info. The same design choice needs to be applied to the driver's cache. Based on the NH_{ADD,DEL} events which will be added later in the patchset, we need to be able to change the action (forward / trap) associated with all the routes using the nexthop group. However, if we can't link between the nexthop and the routes using it, then the above is impossible. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c40
1 files changed, 27 insertions, 13 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c