File tree Expand file tree Collapse file tree 4 files changed +534
-1
lines changed
drivers/net/ethernet/intel/igc Expand file tree Collapse file tree 4 files changed +534
-1
lines changed Original file line number Diff line number Diff line change 28
28
extern char igc_driver_name [];
29
29
extern char igc_driver_version [];
30
30
31
+ /* Transmit and receive queues */
32
+ #define IGC_MAX_RX_QUEUES 4
33
+ #define IGC_MAX_TX_QUEUES 4
34
+
35
+ #define MAX_Q_VECTORS 8
36
+ #define MAX_STD_JUMBO_FRAME_SIZE 9216
37
+
38
+ enum igc_state_t {
39
+ __IGC_TESTING ,
40
+ __IGC_RESETTING ,
41
+ __IGC_DOWN ,
42
+ __IGC_PTP_TX_IN_PROGRESS ,
43
+ };
44
+
45
+ struct igc_q_vector {
46
+ struct igc_adapter * adapter ; /* backlink */
47
+
48
+ struct napi_struct napi ;
49
+ };
50
+
51
+ struct igc_mac_addr {
52
+ u8 addr [ETH_ALEN ];
53
+ u8 queue ;
54
+ u8 state ; /* bitmask */
55
+ };
56
+
57
+ #define IGC_MAC_STATE_DEFAULT 0x1
58
+ #define IGC_MAC_STATE_MODIFIED 0x2
59
+ #define IGC_MAC_STATE_IN_USE 0x4
60
+
31
61
/* Board specific private data structure */
32
62
struct igc_adapter {
63
+ struct net_device * netdev ;
64
+
65
+ unsigned long state ;
66
+ unsigned int flags ;
67
+ unsigned int num_q_vectors ;
68
+ u16 link_speed ;
69
+ u16 link_duplex ;
70
+
71
+ u8 port_num ;
72
+
33
73
u8 __iomem * io_addr ;
74
+ struct work_struct watchdog_task ;
75
+
76
+ int msg_enable ;
77
+ u32 max_frame_size ;
34
78
35
79
/* OS defined structs */
36
80
struct pci_dev * pdev ;
37
81
38
82
/* structs defined in igc_hw.h */
39
83
struct igc_hw hw ;
84
+
85
+ struct igc_q_vector * q_vector [MAX_Q_VECTORS ];
86
+
87
+ struct igc_mac_addr * mac_table ;
40
88
};
41
89
42
90
#endif /* _IGC_H_ */
Original file line number Diff line number Diff line change 4
4
#ifndef _IGC_DEFINES_H_
5
5
#define _IGC_DEFINES_H_
6
6
7
+ #define IGC_CTRL_EXT_DRV_LOAD 0x10000000 /* Drv loaded bit for FW */
8
+
7
9
/* PCI Bus Info */
8
10
#define PCIE_DEVICE_CONTROL2 0x28
9
11
#define PCIE_DEVICE_CONTROL2_16ms 0x0005
10
12
13
+ /* Receive Address
14
+ * Number of high/low register pairs in the RAR. The RAR (Receive Address
15
+ * Registers) holds the directed and multicast addresses that we monitor.
16
+ * Technically, we have 16 spots. However, we reserve one of these spots
17
+ * (RAR[15]) for our directed address used by controllers with
18
+ * manageability enabled, allowing us room for 15 multicast addresses.
19
+ */
20
+ #define IGC_RAH_AV 0x80000000 /* Receive descriptor valid */
21
+ #define IGC_RAH_POOL_1 0x00040000
22
+
11
23
/* Error Codes */
12
24
#define IGC_SUCCESS 0
13
25
#define IGC_ERR_NVM 1
17
29
#define IGC_ERR_MAC_INIT 5
18
30
#define IGC_ERR_RESET 9
19
31
32
+ /* PBA constants */
33
+ #define IGC_PBA_34K 0x0022
34
+
20
35
/* Device Status */
21
36
#define IGC_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */
22
37
#define IGC_STATUS_LU 0x00000002 /* Link up.0=no,1=link */
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ struct igc_mac_info {
59
59
60
60
bool autoneg ;
61
61
bool autoneg_failed ;
62
+ bool get_link_status ;
62
63
};
63
64
64
65
struct igc_bus_info {
You can’t perform that action at this time.
0 commit comments