Import 2.3.18pre1
[davej-history.git] / include / asm-sparc64 / ethtool.h
blobb070ea1a4b8fc2558944bae841023f3dc2314898
1 /* $Id: ethtool.h,v 1.1 1998/12/19 15:09:40 davem Exp $
2 * ethtool.h: Defines for SparcLinux ethtool.
4 * Copyright (C) 1998 David S. Miller (davem@dm.cobaltmicro.com)
5 */
7 #ifndef _SPARC64_ETHTOOL_H
8 #define _SPARC64_ETHTOOL_H
10 /* We do things like this so it does not matter what kernel
11 * headers you have on your system etc.
13 #undef SIOCETHTOOL
14 #define SIOCETHTOOL (SIOCDEVPRIVATE + 0x0f)
16 /* This should work for both 32 and 64 bit userland. */
17 struct ethtool_cmd {
18 u32 cmd;
19 u32 supported;
20 u16 speed;
21 u8 duplex;
22 u8 port;
23 u8 phy_address;
24 u8 transceiver;
25 u8 autoneg;
28 /* CMDs currently supported */
29 #define SPARC_ETH_GSET 0x00000001 /* Get settings, non-privileged. */
30 #define SPARC_ETH_SSET 0x00000002 /* Set settings, privileged. */
32 /* Indicates what features are supported by the interface. */
33 #define SUPPORTED_10baseT_Half 0x00000001
34 #define SUPPORTED_10baseT_Full 0x00000002
35 #define SUPPORTED_100baseT_Half 0x00000004
36 #define SUPPORTED_100baseT_Full 0x00000008
37 #define SUPPORTED_1000baseT_Half 0x00000010
38 #define SUPPORTED_1000baseT_Full 0x00000020
39 #define SUPPORTED_Autoneg 0x00000040
40 #define SUPPORTED_TP 0x00000080
41 #define SUPPORTED_AUI 0x00000100
42 #define SUPPORTED_MII 0x00000200
43 #define SUPPORTED_FIBRE 0x00000400
45 /* The following are all involved in forcing a particular link
46 * mode for the device for setting things. When getting the
47 * devices settings, these indicate the current mode and whether
48 * it was foced up into this mode or autonegotiated.
51 /* The forced speec, 10Mb, 100Mb, gigabit. */
52 #define SPEED_10 10
53 #define SPEED_100 100
54 #define SPEED_1000 1000
56 /* Duplex, half or full. */
57 #define DUPLEX_HALF 0x00
58 #define DUPLEX_FULL 0x01
60 /* Which connector port. */
61 #define PORT_TP 0x00
62 #define PORT_AUI 0x01
63 #define PORT_MII 0x02
64 #define PORT_FIBRE 0x03
66 /* Which tranceiver to use. */
67 #define XCVR_INTERNAL 0x00
68 #define XCVR_EXTERNAL 0x01
69 #define XCVR_DUMMY1 0x02
70 #define XCVR_DUMMY2 0x03
71 #define XCVR_DUMMY3 0x04
73 /* Enable or disable autonegotiation. If this is set to enable,
74 * the forced link modes above are completely ignored.
76 #define AUTONEG_DISABLE 0x00
77 #define AUTONEG_ENABLE 0x01
79 #endif /* _SPARC64_ETHTOOL_H */