aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/qlge/qlge.h97
-rw-r--r--drivers/net/qlge/qlge_ethtool.c3
2 files changed, 66 insertions, 34 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index e6fdce9206cc..8b3c37afe80a 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -164,7 +164,7 @@ enum {
164 CSR_RP = (1 << 10), 164 CSR_RP = (1 << 10),
165 CSR_CMD_PARM_SHIFT = 22, 165 CSR_CMD_PARM_SHIFT = 22,
166 CSR_CMD_NOP = 0x00000000, 166 CSR_CMD_NOP = 0x00000000,
167 CSR_CMD_SET_RST = 0x1000000, 167 CSR_CMD_SET_RST = 0x10000000,
168 CSR_CMD_CLR_RST = 0x20000000, 168 CSR_CMD_CLR_RST = 0x20000000,
169 CSR_CMD_SET_PAUSE = 0x30000000, 169 CSR_CMD_SET_PAUSE = 0x30000000,
170 CSR_CMD_CLR_PAUSE = 0x40000000, 170 CSR_CMD_CLR_PAUSE = 0x40000000,
@@ -424,7 +424,7 @@ enum {
424 RX_SYMBOL_ERR = 0x00000370, 424 RX_SYMBOL_ERR = 0x00000370,
425 RX_MAC_ERR = 0x00000378, 425 RX_MAC_ERR = 0x00000378,
426 RX_CTL_PKTS = 0x00000380, 426 RX_CTL_PKTS = 0x00000380,
427 RX_PAUSE_PKTS = 0x00000384, 427 RX_PAUSE_PKTS = 0x00000388,
428 RX_64_PKTS = 0x00000390, 428 RX_64_PKTS = 0x00000390,
429 RX_65_TO_127_PKTS = 0x00000398, 429 RX_65_TO_127_PKTS = 0x00000398,
430 RX_128_255_PKTS = 0x000003a0, 430 RX_128_255_PKTS = 0x000003a0,
@@ -733,6 +733,11 @@ enum {
733 AEN_LINK_DOWN = 0x00008012, 733 AEN_LINK_DOWN = 0x00008012,
734 AEN_IDC_CMPLT = 0x00008100, 734 AEN_IDC_CMPLT = 0x00008100,
735 AEN_IDC_REQ = 0x00008101, 735 AEN_IDC_REQ = 0x00008101,
736 AEN_IDC_EXT = 0x00008102,
737 AEN_DCBX_CHG = 0x00008110,
738 AEN_AEN_LOST = 0x00008120,
739 AEN_AEN_SFP_IN = 0x00008130,
740 AEN_AEN_SFP_OUT = 0x00008131,
736 AEN_FW_INIT_DONE = 0x00008400, 741 AEN_FW_INIT_DONE = 0x00008400,
737 AEN_FW_INIT_FAIL = 0x00008401, 742 AEN_FW_INIT_FAIL = 0x00008401,
738 743
@@ -742,40 +747,48 @@ enum {
742 MB_CMD_MB_TEST = 0x00000006, 747 MB_CMD_MB_TEST = 0x00000006,
743 MB_CMD_CSUM_TEST = 0x00000007, /* Verify Checksum */ 748 MB_CMD_CSUM_TEST = 0x00000007, /* Verify Checksum */
744 MB_CMD_ABOUT_FW = 0x00000008, 749 MB_CMD_ABOUT_FW = 0x00000008,
750 MB_CMD_COPY_RISC_RAM = 0x0000000a,
745 MB_CMD_LOAD_RISC_RAM = 0x0000000b, 751 MB_CMD_LOAD_RISC_RAM = 0x0000000b,
746 MB_CMD_DUMP_RISC_RAM = 0x0000000c, 752 MB_CMD_DUMP_RISC_RAM = 0x0000000c,
747 MB_CMD_WRITE_RAM = 0x0000000d, 753 MB_CMD_WRITE_RAM = 0x0000000d,
754 MB_CMD_INIT_RISC_RAM = 0x0000000e,
748 MB_CMD_READ_RAM = 0x0000000f, 755 MB_CMD_READ_RAM = 0x0000000f,
749 MB_CMD_STOP_FW = 0x00000014, 756 MB_CMD_STOP_FW = 0x00000014,
750 MB_CMD_MAKE_SYS_ERR = 0x0000002a, 757 MB_CMD_MAKE_SYS_ERR = 0x0000002a,
758 MB_CMD_WRITE_SFP = 0x00000030,
759 MB_CMD_READ_SFP = 0x00000031,
751 MB_CMD_INIT_FW = 0x00000060, 760 MB_CMD_INIT_FW = 0x00000060,
752 MB_CMD_GET_INIT_CB = 0x00000061, 761 MB_CMD_GET_IFCB = 0x00000061,
753 MB_CMD_GET_FW_STATE = 0x00000069, 762 MB_CMD_GET_FW_STATE = 0x00000069,
754 MB_CMD_IDC_REQ = 0x00000100, /* Inter-Driver Communication */ 763 MB_CMD_IDC_REQ = 0x00000100, /* Inter-Driver Communication */
755 MB_CMD_IDC_ACK = 0x00000101, /* Inter-Driver Communication */ 764 MB_CMD_IDC_ACK = 0x00000101, /* Inter-Driver Communication */
756 MB_CMD_SET_WOL_MODE = 0x00000110, /* Wake On Lan */ 765 MB_CMD_SET_WOL_MODE = 0x00000110, /* Wake On Lan */
757 MB_WOL_DISABLE = 0x00000000, 766 MB_WOL_DISABLE = 0,
758 MB_WOL_MAGIC_PKT = 0x00000001, 767 MB_WOL_MAGIC_PKT = (1 << 1),
759 MB_WOL_FLTR = 0x00000002, 768 MB_WOL_FLTR = (1 << 2),
760 MB_WOL_UCAST = 0x00000004, 769 MB_WOL_UCAST = (1 << 3),
761 MB_WOL_MCAST = 0x00000008, 770 MB_WOL_MCAST = (1 << 4),
762 MB_WOL_BCAST = 0x00000010, 771 MB_WOL_BCAST = (1 << 5),
763 MB_WOL_LINK_UP = 0x00000020, 772 MB_WOL_LINK_UP = (1 << 6),
764 MB_WOL_LINK_DOWN = 0x00000040, 773 MB_WOL_LINK_DOWN = (1 << 7),
765 MB_CMD_SET_WOL_FLTR = 0x00000111, /* Wake On Lan Filter */ 774 MB_CMD_SET_WOL_FLTR = 0x00000111, /* Wake On Lan Filter */
766 MB_CMD_CLEAR_WOL_FLTR = 0x00000112, /* Wake On Lan Filter */ 775 MB_CMD_CLEAR_WOL_FLTR = 0x00000112, /* Wake On Lan Filter */
767 MB_CMD_SET_WOL_MAGIC = 0x00000113, /* Wake On Lan Magic Packet */ 776 MB_CMD_SET_WOL_MAGIC = 0x00000113, /* Wake On Lan Magic Packet */
768 MB_CMD_CLEAR_WOL_MAGIC = 0x00000114, /* Wake On Lan Magic Packet */ 777 MB_CMD_CLEAR_WOL_MAGIC = 0x00000114,/* Wake On Lan Magic Packet */
778 MB_CMD_SET_WOL_IMMED = 0x00000115,
769 MB_CMD_PORT_RESET = 0x00000120, 779 MB_CMD_PORT_RESET = 0x00000120,
770 MB_CMD_SET_PORT_CFG = 0x00000122, 780 MB_CMD_SET_PORT_CFG = 0x00000122,
771 MB_CMD_GET_PORT_CFG = 0x00000123, 781 MB_CMD_GET_PORT_CFG = 0x00000123,
772 MB_CMD_SET_ASIC_VOLTS = 0x00000130, 782 MB_CMD_GET_LINK_STS = 0x00000124,
773 MB_CMD_GET_SNS_DATA = 0x00000131, /* Temp and Volt Sense data. */
774 783
775 /* Mailbox Command Status. */ 784 /* Mailbox Command Status. */
776 MB_CMD_STS_GOOD = 0x00004000, /* Success. */ 785 MB_CMD_STS_GOOD = 0x00004000, /* Success. */
777 MB_CMD_STS_INTRMDT = 0x00001000, /* Intermediate Complete. */ 786 MB_CMD_STS_INTRMDT = 0x00001000, /* Intermediate Complete. */
778 MB_CMD_STS_ERR = 0x00004005, /* Error. */ 787 MB_CMD_STS_INVLD_CMD = 0x00004001, /* Invalid. */
788 MB_CMD_STS_XFC_ERR = 0x00004002, /* Interface Error. */
789 MB_CMD_STS_CSUM_ERR = 0x00004003, /* Csum Error. */
790 MB_CMD_STS_ERR = 0x00004005, /* System Error. */
791 MB_CMD_STS_PARAM_ERR = 0x00004006, /* Parameter Error. */
779}; 792};
780 793
781struct mbox_params { 794struct mbox_params {
@@ -967,6 +980,7 @@ struct ib_mac_iocb_rsp {
967 __le16 vlan_id; /* 12 bits */ 980 __le16 vlan_id; /* 12 bits */
968#define IB_MAC_IOCB_RSP_C 0x1000 /* VLAN CFI bit */ 981#define IB_MAC_IOCB_RSP_C 0x1000 /* VLAN CFI bit */
969#define IB_MAC_IOCB_RSP_COS_SHIFT 12 /* class of service value */ 982#define IB_MAC_IOCB_RSP_COS_SHIFT 12 /* class of service value */
983#define IB_MAC_IOCB_RSP_VLAN_MASK 0x0ffff
970 984
971 __le16 reserved1; 985 __le16 reserved1;
972 __le32 reserved2[6]; 986 __le32 reserved2[6];
@@ -1032,6 +1046,7 @@ struct wqicb {
1032#define Q_LEN_CPP_16 0x0001 1046#define Q_LEN_CPP_16 0x0001
1033#define Q_LEN_CPP_32 0x0002 1047#define Q_LEN_CPP_32 0x0002
1034#define Q_LEN_CPP_64 0x0003 1048#define Q_LEN_CPP_64 0x0003
1049#define Q_LEN_CPP_512 0x0006
1035 __le16 flags; 1050 __le16 flags;
1036#define Q_PRI_SHIFT 1 1051#define Q_PRI_SHIFT 1
1037#define Q_FLAGS_LC 0x1000 1052#define Q_FLAGS_LC 0x1000
@@ -1313,27 +1328,43 @@ enum {
1313 QL_DMA64 = (1 << 5), 1328 QL_DMA64 = (1 << 5),
1314 QL_PROMISCUOUS = (1 << 6), 1329 QL_PROMISCUOUS = (1 << 6),
1315 QL_ALLMULTI = (1 << 7), 1330 QL_ALLMULTI = (1 << 7),
1331 QL_PORT_CFG = (1 << 8),
1332 QL_CAM_RT_SET = (1 << 9),
1316}; 1333};
1317 1334
1318/* link_status bit definitions */ 1335/* link_status bit definitions */
1319enum { 1336enum {
1320 LOOPBACK_MASK = 0x00000700, 1337 STS_LOOPBACK_MASK = 0x00000700,
1321 LOOPBACK_PCS = 0x00000100, 1338 STS_LOOPBACK_PCS = 0x00000100,
1322 LOOPBACK_HSS = 0x00000200, 1339 STS_LOOPBACK_HSS = 0x00000200,
1323 LOOPBACK_EXT = 0x00000300, 1340 STS_LOOPBACK_EXT = 0x00000300,
1324 PAUSE_MASK = 0x000000c0, 1341 STS_PAUSE_MASK = 0x000000c0,
1325 PAUSE_STD = 0x00000040, 1342 STS_PAUSE_STD = 0x00000040,
1326 PAUSE_PRI = 0x00000080, 1343 STS_PAUSE_PRI = 0x00000080,
1327 SPEED_MASK = 0x00000038, 1344 STS_SPEED_MASK = 0x00000038,
1328 SPEED_100Mb = 0x00000000, 1345 STS_SPEED_100Mb = 0x00000000,
1329 SPEED_1Gb = 0x00000008, 1346 STS_SPEED_1Gb = 0x00000008,
1330 SPEED_10Gb = 0x00000010, 1347 STS_SPEED_10Gb = 0x00000010,
1331 LINK_TYPE_MASK = 0x00000007, 1348 STS_LINK_TYPE_MASK = 0x00000007,
1332 LINK_TYPE_XFI = 0x00000001, 1349 STS_LINK_TYPE_XFI = 0x00000001,
1333 LINK_TYPE_XAUI = 0x00000002, 1350 STS_LINK_TYPE_XAUI = 0x00000002,
1334 LINK_TYPE_XFI_BP = 0x00000003, 1351 STS_LINK_TYPE_XFI_BP = 0x00000003,
1335 LINK_TYPE_XAUI_BP = 0x00000004, 1352 STS_LINK_TYPE_XAUI_BP = 0x00000004,
1336 LINK_TYPE_10GBASET = 0x00000005, 1353 STS_LINK_TYPE_10GBASET = 0x00000005,
1354};
1355
1356/* link_config bit definitions */
1357enum {
1358 CFG_JUMBO_FRAME_SIZE = 0x00010000,
1359 CFG_PAUSE_MASK = 0x00000060,
1360 CFG_PAUSE_STD = 0x00000020,
1361 CFG_PAUSE_PRI = 0x00000040,
1362 CFG_DCBX = 0x00000010,
1363 CFG_LOOPBACK_MASK = 0x00000007,
1364 CFG_LOOPBACK_PCS = 0x00000002,
1365 CFG_LOOPBACK_HSS = 0x00000004,
1366 CFG_LOOPBACK_EXT = 0x00000006,
1367 CFG_DEFAULT_MAX_FRAME_SIZE = 0x00002580,
1337}; 1368};
1338 1369
1339/* 1370/*
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c
index 9d922e2ff226..a50078627fb6 100644
--- a/drivers/net/qlge/qlge_ethtool.c
+++ b/drivers/net/qlge/qlge_ethtool.c
@@ -271,7 +271,8 @@ static int ql_get_settings(struct net_device *ndev,
271 ecmd->advertising = ADVERTISED_10000baseT_Full; 271 ecmd->advertising = ADVERTISED_10000baseT_Full;
272 ecmd->autoneg = AUTONEG_ENABLE; 272 ecmd->autoneg = AUTONEG_ENABLE;
273 ecmd->transceiver = XCVR_EXTERNAL; 273 ecmd->transceiver = XCVR_EXTERNAL;
274 if ((qdev->link_status & LINK_TYPE_MASK) == LINK_TYPE_10GBASET) { 274 if ((qdev->link_status & STS_LINK_TYPE_MASK) ==
275 STS_LINK_TYPE_10GBASET) {
275 ecmd->supported |= (SUPPORTED_TP | SUPPORTED_Autoneg); 276 ecmd->supported |= (SUPPORTED_TP | SUPPORTED_Autoneg);
276 ecmd->advertising |= (ADVERTISED_TP | ADVERTISED_Autoneg); 277 ecmd->advertising |= (ADVERTISED_TP | ADVERTISED_Autoneg);
277 ecmd->port = PORT_TP; 278 ecmd->port = PORT_TP;