diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/benet/be_hw.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/benet/be_hw.h')
-rw-r--r-- | drivers/net/benet/be_hw.h | 153 |
1 files changed, 141 insertions, 12 deletions
diff --git a/drivers/net/benet/be_hw.h b/drivers/net/benet/be_hw.h index a2ec5df0d733..53d658afea2a 100644 --- a/drivers/net/benet/be_hw.h +++ b/drivers/net/benet/be_hw.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2005 - 2010 ServerEngines | 2 | * Copyright (C) 2005 - 2011 Emulex |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
@@ -8,11 +8,11 @@ | |||
8 | * Public License is included in this distribution in the file called COPYING. | 8 | * Public License is included in this distribution in the file called COPYING. |
9 | * | 9 | * |
10 | * Contact Information: | 10 | * Contact Information: |
11 | * linux-drivers@serverengines.com | 11 | * linux-drivers@emulex.com |
12 | * | 12 | * |
13 | * ServerEngines | 13 | * Emulex |
14 | * 209 N. Fair Oaks Ave | 14 | * 3333 Susan Street |
15 | * Sunnyvale, CA 94085 | 15 | * Costa Mesa, CA 92626 |
16 | */ | 16 | */ |
17 | 17 | ||
18 | /********* Mailbox door bell *************/ | 18 | /********* Mailbox door bell *************/ |
@@ -32,16 +32,30 @@ | |||
32 | #define MPU_EP_CONTROL 0 | 32 | #define MPU_EP_CONTROL 0 |
33 | 33 | ||
34 | /********** MPU semphore ******************/ | 34 | /********** MPU semphore ******************/ |
35 | #define MPU_EP_SEMAPHORE_OFFSET 0xac | 35 | #define MPU_EP_SEMAPHORE_OFFSET 0xac |
36 | #define EP_SEMAPHORE_POST_STAGE_MASK 0x0000FFFF | 36 | #define MPU_EP_SEMAPHORE_IF_TYPE2_OFFSET 0x400 |
37 | #define EP_SEMAPHORE_POST_ERR_MASK 0x1 | 37 | #define EP_SEMAPHORE_POST_STAGE_MASK 0x0000FFFF |
38 | #define EP_SEMAPHORE_POST_ERR_SHIFT 31 | 38 | #define EP_SEMAPHORE_POST_ERR_MASK 0x1 |
39 | #define EP_SEMAPHORE_POST_ERR_SHIFT 31 | ||
40 | |||
39 | /* MPU semphore POST stage values */ | 41 | /* MPU semphore POST stage values */ |
40 | #define POST_STAGE_AWAITING_HOST_RDY 0x1 /* FW awaiting goahead from host */ | 42 | #define POST_STAGE_AWAITING_HOST_RDY 0x1 /* FW awaiting goahead from host */ |
41 | #define POST_STAGE_HOST_RDY 0x2 /* Host has given go-ahed to FW */ | 43 | #define POST_STAGE_HOST_RDY 0x2 /* Host has given go-ahed to FW */ |
42 | #define POST_STAGE_BE_RESET 0x3 /* Host wants to reset chip */ | 44 | #define POST_STAGE_BE_RESET 0x3 /* Host wants to reset chip */ |
43 | #define POST_STAGE_ARMFW_RDY 0xc000 /* FW is done with POST */ | 45 | #define POST_STAGE_ARMFW_RDY 0xc000 /* FW is done with POST */ |
44 | 46 | ||
47 | |||
48 | /* Lancer SLIPORT_CONTROL SLIPORT_STATUS registers */ | ||
49 | #define SLIPORT_STATUS_OFFSET 0x404 | ||
50 | #define SLIPORT_CONTROL_OFFSET 0x408 | ||
51 | |||
52 | #define SLIPORT_STATUS_ERR_MASK 0x80000000 | ||
53 | #define SLIPORT_STATUS_RN_MASK 0x01000000 | ||
54 | #define SLIPORT_STATUS_RDY_MASK 0x00800000 | ||
55 | |||
56 | |||
57 | #define SLI_PORT_CONTROL_IP_MASK 0x08000000 | ||
58 | |||
45 | /********* Memory BAR register ************/ | 59 | /********* Memory BAR register ************/ |
46 | #define PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET 0xfc | 60 | #define PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET 0xfc |
47 | /* Host Interrupt Enable, if set interrupts are enabled although "PCI Interrupt | 61 | /* Host Interrupt Enable, if set interrupts are enabled although "PCI Interrupt |
@@ -66,6 +80,28 @@ | |||
66 | #define PCICFG_UE_STATUS_LOW_MASK 0xA8 | 80 | #define PCICFG_UE_STATUS_LOW_MASK 0xA8 |
67 | #define PCICFG_UE_STATUS_HI_MASK 0xAC | 81 | #define PCICFG_UE_STATUS_HI_MASK 0xAC |
68 | 82 | ||
83 | /******** SLI_INTF ***********************/ | ||
84 | #define SLI_INTF_REG_OFFSET 0x58 | ||
85 | #define SLI_INTF_VALID_MASK 0xE0000000 | ||
86 | #define SLI_INTF_VALID 0xC0000000 | ||
87 | #define SLI_INTF_HINT2_MASK 0x1F000000 | ||
88 | #define SLI_INTF_HINT2_SHIFT 24 | ||
89 | #define SLI_INTF_HINT1_MASK 0x00FF0000 | ||
90 | #define SLI_INTF_HINT1_SHIFT 16 | ||
91 | #define SLI_INTF_FAMILY_MASK 0x00000F00 | ||
92 | #define SLI_INTF_FAMILY_SHIFT 8 | ||
93 | #define SLI_INTF_IF_TYPE_MASK 0x0000F000 | ||
94 | #define SLI_INTF_IF_TYPE_SHIFT 12 | ||
95 | #define SLI_INTF_REV_MASK 0x000000F0 | ||
96 | #define SLI_INTF_REV_SHIFT 4 | ||
97 | #define SLI_INTF_FT_MASK 0x00000001 | ||
98 | |||
99 | |||
100 | /* SLI family */ | ||
101 | #define BE_SLI_FAMILY 0x0 | ||
102 | #define LANCER_A0_SLI_FAMILY 0xA | ||
103 | |||
104 | |||
69 | /********* ISR0 Register offset **********/ | 105 | /********* ISR0 Register offset **********/ |
70 | #define CEV_ISR0_OFFSET 0xC18 | 106 | #define CEV_ISR0_OFFSET 0xC18 |
71 | #define CEV_ISR_SIZE 4 | 107 | #define CEV_ISR_SIZE 4 |
@@ -73,6 +109,9 @@ | |||
73 | /********* Event Q door bell *************/ | 109 | /********* Event Q door bell *************/ |
74 | #define DB_EQ_OFFSET DB_CQ_OFFSET | 110 | #define DB_EQ_OFFSET DB_CQ_OFFSET |
75 | #define DB_EQ_RING_ID_MASK 0x1FF /* bits 0 - 8 */ | 111 | #define DB_EQ_RING_ID_MASK 0x1FF /* bits 0 - 8 */ |
112 | #define DB_EQ_RING_ID_EXT_MASK 0x3e00 /* bits 9-13 */ | ||
113 | #define DB_EQ_RING_ID_EXT_MASK_SHIFT (2) /* qid bits 9-13 placing at 11-15 */ | ||
114 | |||
76 | /* Clear the interrupt for this eq */ | 115 | /* Clear the interrupt for this eq */ |
77 | #define DB_EQ_CLR_SHIFT (9) /* bit 9 */ | 116 | #define DB_EQ_CLR_SHIFT (9) /* bit 9 */ |
78 | /* Must be 1 */ | 117 | /* Must be 1 */ |
@@ -85,6 +124,10 @@ | |||
85 | /********* Compl Q door bell *************/ | 124 | /********* Compl Q door bell *************/ |
86 | #define DB_CQ_OFFSET 0x120 | 125 | #define DB_CQ_OFFSET 0x120 |
87 | #define DB_CQ_RING_ID_MASK 0x3FF /* bits 0 - 9 */ | 126 | #define DB_CQ_RING_ID_MASK 0x3FF /* bits 0 - 9 */ |
127 | #define DB_CQ_RING_ID_EXT_MASK 0x7C00 /* bits 10-14 */ | ||
128 | #define DB_CQ_RING_ID_EXT_MASK_SHIFT (1) /* qid bits 10-14 | ||
129 | placing at 11-15 */ | ||
130 | |||
88 | /* Number of event entries processed */ | 131 | /* Number of event entries processed */ |
89 | #define DB_CQ_NUM_POPPED_SHIFT (16) /* bits 16 - 28 */ | 132 | #define DB_CQ_NUM_POPPED_SHIFT (16) /* bits 16 - 28 */ |
90 | /* Rearm bit */ | 133 | /* Rearm bit */ |
@@ -112,6 +155,10 @@ | |||
112 | /********** SRIOV VF PCICFG OFFSET ********/ | 155 | /********** SRIOV VF PCICFG OFFSET ********/ |
113 | #define SRIOV_VF_PCICFG_OFFSET (4096) | 156 | #define SRIOV_VF_PCICFG_OFFSET (4096) |
114 | 157 | ||
158 | /********** FAT TABLE ********/ | ||
159 | #define RETRIEVE_FAT 0 | ||
160 | #define QUERY_FAT 1 | ||
161 | |||
115 | /* Flashrom related descriptors */ | 162 | /* Flashrom related descriptors */ |
116 | #define IMAGE_TYPE_FIRMWARE 160 | 163 | #define IMAGE_TYPE_FIRMWARE 160 |
117 | #define IMAGE_TYPE_BOOTCODE 224 | 164 | #define IMAGE_TYPE_BOOTCODE 224 |
@@ -258,10 +305,10 @@ struct be_eth_rx_d { | |||
258 | 305 | ||
259 | /* RX Compl Queue Descriptor */ | 306 | /* RX Compl Queue Descriptor */ |
260 | 307 | ||
261 | /* Pseudo amap definition for eth_rx_compl in which each bit of the | 308 | /* Pseudo amap definition for BE2 and BE3 legacy mode eth_rx_compl in which |
262 | * actual structure is defined as a byte: used to calculate | 309 | * each bit of the actual structure is defined as a byte: used to calculate |
263 | * offset/shift/mask of each field */ | 310 | * offset/shift/mask of each field */ |
264 | struct amap_eth_rx_compl { | 311 | struct amap_eth_rx_compl_v0 { |
265 | u8 vlan_tag[16]; /* dword 0 */ | 312 | u8 vlan_tag[16]; /* dword 0 */ |
266 | u8 pktsize[14]; /* dword 0 */ | 313 | u8 pktsize[14]; /* dword 0 */ |
267 | u8 port; /* dword 0 */ | 314 | u8 port; /* dword 0 */ |
@@ -292,10 +339,92 @@ struct amap_eth_rx_compl { | |||
292 | u8 rsshash[32]; /* dword 3 */ | 339 | u8 rsshash[32]; /* dword 3 */ |
293 | } __packed; | 340 | } __packed; |
294 | 341 | ||
342 | /* Pseudo amap definition for BE3 native mode eth_rx_compl in which | ||
343 | * each bit of the actual structure is defined as a byte: used to calculate | ||
344 | * offset/shift/mask of each field */ | ||
345 | struct amap_eth_rx_compl_v1 { | ||
346 | u8 vlan_tag[16]; /* dword 0 */ | ||
347 | u8 pktsize[14]; /* dword 0 */ | ||
348 | u8 vtp; /* dword 0 */ | ||
349 | u8 ip_opt; /* dword 0 */ | ||
350 | u8 err; /* dword 1 */ | ||
351 | u8 rsshp; /* dword 1 */ | ||
352 | u8 ipf; /* dword 1 */ | ||
353 | u8 tcpf; /* dword 1 */ | ||
354 | u8 udpf; /* dword 1 */ | ||
355 | u8 ipcksm; /* dword 1 */ | ||
356 | u8 l4_cksm; /* dword 1 */ | ||
357 | u8 ip_version; /* dword 1 */ | ||
358 | u8 macdst[7]; /* dword 1 */ | ||
359 | u8 rsvd0; /* dword 1 */ | ||
360 | u8 fragndx[10]; /* dword 1 */ | ||
361 | u8 ct[2]; /* dword 1 */ | ||
362 | u8 sw; /* dword 1 */ | ||
363 | u8 numfrags[3]; /* dword 1 */ | ||
364 | u8 rss_flush; /* dword 2 */ | ||
365 | u8 cast_enc[2]; /* dword 2 */ | ||
366 | u8 vtm; /* dword 2 */ | ||
367 | u8 rss_bank; /* dword 2 */ | ||
368 | u8 port[2]; /* dword 2 */ | ||
369 | u8 vntagp; /* dword 2 */ | ||
370 | u8 header_len[8]; /* dword 2 */ | ||
371 | u8 header_split[2]; /* dword 2 */ | ||
372 | u8 rsvd1[13]; /* dword 2 */ | ||
373 | u8 valid; /* dword 2 */ | ||
374 | u8 rsshash[32]; /* dword 3 */ | ||
375 | } __packed; | ||
376 | |||
295 | struct be_eth_rx_compl { | 377 | struct be_eth_rx_compl { |
296 | u32 dw[4]; | 378 | u32 dw[4]; |
297 | }; | 379 | }; |
298 | 380 | ||
381 | struct mgmt_hba_attribs { | ||
382 | u8 flashrom_version_string[32]; | ||
383 | u8 manufacturer_name[32]; | ||
384 | u32 supported_modes; | ||
385 | u32 rsvd0[3]; | ||
386 | u8 ncsi_ver_string[12]; | ||
387 | u32 default_extended_timeout; | ||
388 | u8 controller_model_number[32]; | ||
389 | u8 controller_description[64]; | ||
390 | u8 controller_serial_number[32]; | ||
391 | u8 ip_version_string[32]; | ||
392 | u8 firmware_version_string[32]; | ||
393 | u8 bios_version_string[32]; | ||
394 | u8 redboot_version_string[32]; | ||
395 | u8 driver_version_string[32]; | ||
396 | u8 fw_on_flash_version_string[32]; | ||
397 | u32 functionalities_supported; | ||
398 | u16 max_cdblength; | ||
399 | u8 asic_revision; | ||
400 | u8 generational_guid[16]; | ||
401 | u8 hba_port_count; | ||
402 | u16 default_link_down_timeout; | ||
403 | u8 iscsi_ver_min_max; | ||
404 | u8 multifunction_device; | ||
405 | u8 cache_valid; | ||
406 | u8 hba_status; | ||
407 | u8 max_domains_supported; | ||
408 | u8 phy_port; | ||
409 | u32 firmware_post_status; | ||
410 | u32 hba_mtu[8]; | ||
411 | u32 rsvd1[4]; | ||
412 | }; | ||
413 | |||
414 | struct mgmt_controller_attrib { | ||
415 | struct mgmt_hba_attribs hba_attribs; | ||
416 | u16 pci_vendor_id; | ||
417 | u16 pci_device_id; | ||
418 | u16 pci_sub_vendor_id; | ||
419 | u16 pci_sub_system_id; | ||
420 | u8 pci_bus_number; | ||
421 | u8 pci_device_number; | ||
422 | u8 pci_function_number; | ||
423 | u8 interface_type; | ||
424 | u64 unique_identifier; | ||
425 | u32 rsvd0[5]; | ||
426 | }; | ||
427 | |||
299 | struct controller_id { | 428 | struct controller_id { |
300 | u32 vendor; | 429 | u32 vendor; |
301 | u32 device; | 430 | u32 device; |