diff options
Diffstat (limited to 'drivers/net/e1000/e1000_hw.h')
| -rw-r--r-- | drivers/net/e1000/e1000_hw.h | 570 |
1 files changed, 547 insertions, 23 deletions
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h index f397e637a3c5..a0263ee96c6b 100644 --- a/drivers/net/e1000/e1000_hw.h +++ b/drivers/net/e1000/e1000_hw.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /******************************************************************************* | 1 | /******************************************************************************* |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. | 4 | Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved. |
| 5 | 5 | ||
| 6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
| 7 | under the terms of the GNU General Public License as published by the Free | 7 | under the terms of the GNU General Public License as published by the Free |
| @@ -57,6 +57,7 @@ typedef enum { | |||
| 57 | e1000_82541_rev_2, | 57 | e1000_82541_rev_2, |
| 58 | e1000_82547, | 58 | e1000_82547, |
| 59 | e1000_82547_rev_2, | 59 | e1000_82547_rev_2, |
| 60 | e1000_82573, | ||
| 60 | e1000_num_macs | 61 | e1000_num_macs |
| 61 | } e1000_mac_type; | 62 | } e1000_mac_type; |
| 62 | 63 | ||
| @@ -64,6 +65,7 @@ typedef enum { | |||
| 64 | e1000_eeprom_uninitialized = 0, | 65 | e1000_eeprom_uninitialized = 0, |
| 65 | e1000_eeprom_spi, | 66 | e1000_eeprom_spi, |
| 66 | e1000_eeprom_microwire, | 67 | e1000_eeprom_microwire, |
| 68 | e1000_eeprom_flash, | ||
| 67 | e1000_num_eeprom_types | 69 | e1000_num_eeprom_types |
| 68 | } e1000_eeprom_type; | 70 | } e1000_eeprom_type; |
| 69 | 71 | ||
| @@ -96,6 +98,7 @@ typedef enum { | |||
| 96 | e1000_bus_type_unknown = 0, | 98 | e1000_bus_type_unknown = 0, |
| 97 | e1000_bus_type_pci, | 99 | e1000_bus_type_pci, |
| 98 | e1000_bus_type_pcix, | 100 | e1000_bus_type_pcix, |
| 101 | e1000_bus_type_pci_express, | ||
| 99 | e1000_bus_type_reserved | 102 | e1000_bus_type_reserved |
| 100 | } e1000_bus_type; | 103 | } e1000_bus_type; |
| 101 | 104 | ||
| @@ -107,6 +110,7 @@ typedef enum { | |||
| 107 | e1000_bus_speed_100, | 110 | e1000_bus_speed_100, |
| 108 | e1000_bus_speed_120, | 111 | e1000_bus_speed_120, |
| 109 | e1000_bus_speed_133, | 112 | e1000_bus_speed_133, |
| 113 | e1000_bus_speed_2500, | ||
| 110 | e1000_bus_speed_reserved | 114 | e1000_bus_speed_reserved |
| 111 | } e1000_bus_speed; | 115 | } e1000_bus_speed; |
| 112 | 116 | ||
| @@ -115,6 +119,8 @@ typedef enum { | |||
| 115 | e1000_bus_width_unknown = 0, | 119 | e1000_bus_width_unknown = 0, |
| 116 | e1000_bus_width_32, | 120 | e1000_bus_width_32, |
| 117 | e1000_bus_width_64, | 121 | e1000_bus_width_64, |
| 122 | e1000_bus_width_pciex_1, | ||
| 123 | e1000_bus_width_pciex_4, | ||
| 118 | e1000_bus_width_reserved | 124 | e1000_bus_width_reserved |
| 119 | } e1000_bus_width; | 125 | } e1000_bus_width; |
| 120 | 126 | ||
| @@ -196,6 +202,7 @@ typedef enum { | |||
| 196 | typedef enum { | 202 | typedef enum { |
| 197 | e1000_phy_m88 = 0, | 203 | e1000_phy_m88 = 0, |
| 198 | e1000_phy_igp, | 204 | e1000_phy_igp, |
| 205 | e1000_phy_igp_2, | ||
| 199 | e1000_phy_undefined = 0xFF | 206 | e1000_phy_undefined = 0xFF |
| 200 | } e1000_phy_type; | 207 | } e1000_phy_type; |
| 201 | 208 | ||
| @@ -242,8 +249,19 @@ struct e1000_eeprom_info { | |||
| 242 | uint16_t address_bits; | 249 | uint16_t address_bits; |
| 243 | uint16_t delay_usec; | 250 | uint16_t delay_usec; |
| 244 | uint16_t page_size; | 251 | uint16_t page_size; |
| 252 | boolean_t use_eerd; | ||
| 253 | boolean_t use_eewr; | ||
| 245 | }; | 254 | }; |
| 246 | 255 | ||
| 256 | /* Flex ASF Information */ | ||
| 257 | #define E1000_HOST_IF_MAX_SIZE 2048 | ||
| 258 | |||
| 259 | typedef enum { | ||
| 260 | e1000_byte_align = 0, | ||
| 261 | e1000_word_align = 1, | ||
| 262 | e1000_dword_align = 2 | ||
| 263 | } e1000_align_type; | ||
| 264 | |||
| 247 | 265 | ||
| 248 | 266 | ||
| 249 | /* Error Codes */ | 267 | /* Error Codes */ |
| @@ -254,11 +272,16 @@ struct e1000_eeprom_info { | |||
| 254 | #define E1000_ERR_PARAM 4 | 272 | #define E1000_ERR_PARAM 4 |
| 255 | #define E1000_ERR_MAC_TYPE 5 | 273 | #define E1000_ERR_MAC_TYPE 5 |
| 256 | #define E1000_ERR_PHY_TYPE 6 | 274 | #define E1000_ERR_PHY_TYPE 6 |
| 275 | #define E1000_ERR_RESET 9 | ||
| 276 | #define E1000_ERR_MASTER_REQUESTS_PENDING 10 | ||
| 277 | #define E1000_ERR_HOST_INTERFACE_COMMAND 11 | ||
| 278 | #define E1000_BLK_PHY_RESET 12 | ||
| 257 | 279 | ||
| 258 | /* Function prototypes */ | 280 | /* Function prototypes */ |
| 259 | /* Initialization */ | 281 | /* Initialization */ |
| 260 | int32_t e1000_reset_hw(struct e1000_hw *hw); | 282 | int32_t e1000_reset_hw(struct e1000_hw *hw); |
| 261 | int32_t e1000_init_hw(struct e1000_hw *hw); | 283 | int32_t e1000_init_hw(struct e1000_hw *hw); |
| 284 | int32_t e1000_id_led_init(struct e1000_hw * hw); | ||
| 262 | int32_t e1000_set_mac_type(struct e1000_hw *hw); | 285 | int32_t e1000_set_mac_type(struct e1000_hw *hw); |
| 263 | void e1000_set_media_type(struct e1000_hw *hw); | 286 | void e1000_set_media_type(struct e1000_hw *hw); |
| 264 | 287 | ||
| @@ -275,7 +298,7 @@ int32_t e1000_force_mac_fc(struct e1000_hw *hw); | |||
| 275 | /* PHY */ | 298 | /* PHY */ |
| 276 | int32_t e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); | 299 | int32_t e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); |
| 277 | int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); | 300 | int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); |
| 278 | void e1000_phy_hw_reset(struct e1000_hw *hw); | 301 | int32_t e1000_phy_hw_reset(struct e1000_hw *hw); |
| 279 | int32_t e1000_phy_reset(struct e1000_hw *hw); | 302 | int32_t e1000_phy_reset(struct e1000_hw *hw); |
| 280 | int32_t e1000_detect_gig_phy(struct e1000_hw *hw); | 303 | int32_t e1000_detect_gig_phy(struct e1000_hw *hw); |
| 281 | int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); | 304 | int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); |
| @@ -287,13 +310,86 @@ int32_t e1000_check_downshift(struct e1000_hw *hw); | |||
| 287 | int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); | 310 | int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); |
| 288 | 311 | ||
| 289 | /* EEPROM Functions */ | 312 | /* EEPROM Functions */ |
| 290 | void e1000_init_eeprom_params(struct e1000_hw *hw); | 313 | int32_t e1000_init_eeprom_params(struct e1000_hw *hw); |
| 314 | boolean_t e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw); | ||
| 315 | int32_t e1000_read_eeprom_eerd(struct e1000_hw *hw, uint16_t offset, uint16_t words, uint16_t *data); | ||
| 316 | int32_t e1000_write_eeprom_eewr(struct e1000_hw *hw, uint16_t offset, uint16_t words, uint16_t *data); | ||
| 317 | int32_t e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd); | ||
| 318 | |||
| 319 | /* MNG HOST IF functions */ | ||
| 320 | uint32_t e1000_enable_mng_pass_thru(struct e1000_hw *hw); | ||
| 321 | |||
| 322 | #define E1000_MNG_DHCP_TX_PAYLOAD_CMD 64 | ||
| 323 | #define E1000_HI_MAX_MNG_DATA_LENGTH 0x6F8 /* Host Interface data length */ | ||
| 324 | |||
| 325 | #define E1000_MNG_DHCP_COMMAND_TIMEOUT 10 /* Time in ms to process MNG command */ | ||
| 326 | #define E1000_MNG_DHCP_COOKIE_OFFSET 0x6F0 /* Cookie offset */ | ||
| 327 | #define E1000_MNG_DHCP_COOKIE_LENGTH 0x10 /* Cookie length */ | ||
| 328 | #define E1000_MNG_IAMT_MODE 0x3 | ||
| 329 | #define E1000_IAMT_SIGNATURE 0x544D4149 /* Intel(R) Active Management Technology signature */ | ||
| 330 | |||
| 331 | #define E1000_MNG_DHCP_COOKIE_STATUS_PARSING_SUPPORT 0x1 /* DHCP parsing enabled */ | ||
| 332 | #define E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT 0x2 /* DHCP parsing enabled */ | ||
| 333 | #define E1000_VFTA_ENTRY_SHIFT 0x5 | ||
| 334 | #define E1000_VFTA_ENTRY_MASK 0x7F | ||
| 335 | #define E1000_VFTA_ENTRY_BIT_SHIFT_MASK 0x1F | ||
| 336 | |||
| 337 | struct e1000_host_mng_command_header { | ||
| 338 | uint8_t command_id; | ||
| 339 | uint8_t checksum; | ||
| 340 | uint16_t reserved1; | ||
| 341 | uint16_t reserved2; | ||
| 342 | uint16_t command_length; | ||
| 343 | }; | ||
| 344 | |||
| 345 | struct e1000_host_mng_command_info { | ||
| 346 | struct e1000_host_mng_command_header command_header; /* Command Head/Command Result Head has 4 bytes */ | ||
| 347 | uint8_t command_data[E1000_HI_MAX_MNG_DATA_LENGTH]; /* Command data can length 0..0x658*/ | ||
| 348 | }; | ||
| 349 | #ifdef __BIG_ENDIAN | ||
| 350 | struct e1000_host_mng_dhcp_cookie{ | ||
| 351 | uint32_t signature; | ||
| 352 | uint16_t vlan_id; | ||
| 353 | uint8_t reserved0; | ||
| 354 | uint8_t status; | ||
| 355 | uint32_t reserved1; | ||
| 356 | uint8_t checksum; | ||
| 357 | uint8_t reserved3; | ||
| 358 | uint16_t reserved2; | ||
| 359 | }; | ||
| 360 | #else | ||
| 361 | struct e1000_host_mng_dhcp_cookie{ | ||
| 362 | uint32_t signature; | ||
| 363 | uint8_t status; | ||
| 364 | uint8_t reserved0; | ||
| 365 | uint16_t vlan_id; | ||
| 366 | uint32_t reserved1; | ||
| 367 | uint16_t reserved2; | ||
| 368 | uint8_t reserved3; | ||
| 369 | uint8_t checksum; | ||
| 370 | }; | ||
| 371 | #endif | ||
| 372 | |||
| 373 | int32_t e1000_mng_write_dhcp_info(struct e1000_hw *hw, uint8_t *buffer, | ||
| 374 | uint16_t length); | ||
| 375 | boolean_t e1000_check_mng_mode(struct e1000_hw *hw); | ||
| 376 | boolean_t e1000_enable_tx_pkt_filtering(struct e1000_hw *hw); | ||
| 377 | int32_t e1000_mng_enable_host_if(struct e1000_hw *hw); | ||
| 378 | int32_t e1000_mng_host_if_write(struct e1000_hw *hw, uint8_t *buffer, | ||
| 379 | uint16_t length, uint16_t offset, uint8_t *sum); | ||
| 380 | int32_t e1000_mng_write_cmd_header(struct e1000_hw* hw, | ||
| 381 | struct e1000_host_mng_command_header* hdr); | ||
| 382 | |||
| 383 | int32_t e1000_mng_write_commit(struct e1000_hw *hw); | ||
| 384 | |||
| 291 | int32_t e1000_read_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); | 385 | int32_t e1000_read_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); |
| 292 | int32_t e1000_validate_eeprom_checksum(struct e1000_hw *hw); | 386 | int32_t e1000_validate_eeprom_checksum(struct e1000_hw *hw); |
| 293 | int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw); | 387 | int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw); |
| 294 | int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); | 388 | int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); |
| 295 | int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num); | 389 | int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num); |
| 296 | int32_t e1000_read_mac_addr(struct e1000_hw * hw); | 390 | int32_t e1000_read_mac_addr(struct e1000_hw * hw); |
| 391 | int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask); | ||
| 392 | void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask); | ||
| 297 | 393 | ||
| 298 | /* Filters (multicast, vlan, receive) */ | 394 | /* Filters (multicast, vlan, receive) */ |
| 299 | void e1000_init_rx_addrs(struct e1000_hw *hw); | 395 | void e1000_init_rx_addrs(struct e1000_hw *hw); |
| @@ -313,7 +409,6 @@ int32_t e1000_led_off(struct e1000_hw *hw); | |||
| 313 | /* Adaptive IFS Functions */ | 409 | /* Adaptive IFS Functions */ |
| 314 | 410 | ||
| 315 | /* Everything else */ | 411 | /* Everything else */ |
| 316 | uint32_t e1000_enable_mng_pass_thru(struct e1000_hw *hw); | ||
| 317 | void e1000_clear_hw_cntrs(struct e1000_hw *hw); | 412 | void e1000_clear_hw_cntrs(struct e1000_hw *hw); |
| 318 | void e1000_reset_adaptive(struct e1000_hw *hw); | 413 | void e1000_reset_adaptive(struct e1000_hw *hw); |
| 319 | void e1000_update_adaptive(struct e1000_hw *hw); | 414 | void e1000_update_adaptive(struct e1000_hw *hw); |
| @@ -330,6 +425,19 @@ void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); | |||
| 330 | void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value); | 425 | void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value); |
| 331 | int32_t e1000_config_dsp_after_link_change(struct e1000_hw *hw, boolean_t link_up); | 426 | int32_t e1000_config_dsp_after_link_change(struct e1000_hw *hw, boolean_t link_up); |
| 332 | int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); | 427 | int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); |
| 428 | int32_t e1000_set_d0_lplu_state(struct e1000_hw *hw, boolean_t active); | ||
| 429 | void e1000_set_pci_express_master_disable(struct e1000_hw *hw); | ||
| 430 | void e1000_enable_pciex_master(struct e1000_hw *hw); | ||
| 431 | int32_t e1000_disable_pciex_master(struct e1000_hw *hw); | ||
| 432 | int32_t e1000_get_auto_rd_done(struct e1000_hw *hw); | ||
| 433 | int32_t e1000_get_phy_cfg_done(struct e1000_hw *hw); | ||
| 434 | int32_t e1000_get_software_semaphore(struct e1000_hw *hw); | ||
| 435 | void e1000_release_software_semaphore(struct e1000_hw *hw); | ||
| 436 | int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); | ||
| 437 | int32_t e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw); | ||
| 438 | void e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw); | ||
| 439 | int32_t e1000_commit_shadow_ram(struct e1000_hw *hw); | ||
| 440 | uint8_t e1000_arc_subsystem_valid(struct e1000_hw *hw); | ||
| 333 | 441 | ||
| 334 | #define E1000_READ_REG_IO(a, reg) \ | 442 | #define E1000_READ_REG_IO(a, reg) \ |
| 335 | e1000_read_reg_io((a), E1000_##reg) | 443 | e1000_read_reg_io((a), E1000_##reg) |
| @@ -369,6 +477,10 @@ int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); | |||
| 369 | #define E1000_DEV_ID_82546GB_SERDES 0x107B | 477 | #define E1000_DEV_ID_82546GB_SERDES 0x107B |
| 370 | #define E1000_DEV_ID_82546GB_PCIE 0x108A | 478 | #define E1000_DEV_ID_82546GB_PCIE 0x108A |
| 371 | #define E1000_DEV_ID_82547EI 0x1019 | 479 | #define E1000_DEV_ID_82547EI 0x1019 |
| 480 | #define E1000_DEV_ID_82573E 0x108B | ||
| 481 | #define E1000_DEV_ID_82573E_IAMT 0x108C | ||
| 482 | |||
| 483 | #define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 | ||
| 372 | 484 | ||
| 373 | #define NODE_ADDRESS_SIZE 6 | 485 | #define NODE_ADDRESS_SIZE 6 |
| 374 | #define ETH_LENGTH_OF_ADDRESS 6 | 486 | #define ETH_LENGTH_OF_ADDRESS 6 |
| @@ -381,6 +493,7 @@ int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); | |||
| 381 | #define E1000_REVISION_0 0 | 493 | #define E1000_REVISION_0 0 |
| 382 | #define E1000_REVISION_1 1 | 494 | #define E1000_REVISION_1 1 |
| 383 | #define E1000_REVISION_2 2 | 495 | #define E1000_REVISION_2 2 |
| 496 | #define E1000_REVISION_3 3 | ||
| 384 | 497 | ||
| 385 | #define SPEED_10 10 | 498 | #define SPEED_10 10 |
| 386 | #define SPEED_100 100 | 499 | #define SPEED_100 100 |
| @@ -437,6 +550,7 @@ int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); | |||
| 437 | E1000_IMS_RXSEQ | \ | 550 | E1000_IMS_RXSEQ | \ |
| 438 | E1000_IMS_LSC) | 551 | E1000_IMS_LSC) |
| 439 | 552 | ||
| 553 | |||
| 440 | /* Number of high/low register pairs in the RAR. The RAR (Receive Address | 554 | /* Number of high/low register pairs in the RAR. The RAR (Receive Address |
| 441 | * Registers) holds the directed and multicast addresses that we monitor. We | 555 | * Registers) holds the directed and multicast addresses that we monitor. We |
| 442 | * reserve one of these spots for our directed address, allowing us room for | 556 | * reserve one of these spots for our directed address, allowing us room for |
| @@ -457,14 +571,74 @@ struct e1000_rx_desc { | |||
| 457 | uint16_t special; | 571 | uint16_t special; |
| 458 | }; | 572 | }; |
| 459 | 573 | ||
| 574 | /* Receive Descriptor - Extended */ | ||
| 575 | union e1000_rx_desc_extended { | ||
| 576 | struct { | ||
| 577 | uint64_t buffer_addr; | ||
| 578 | uint64_t reserved; | ||
| 579 | } read; | ||
| 580 | struct { | ||
| 581 | struct { | ||
| 582 | uint32_t mrq; /* Multiple Rx Queues */ | ||
| 583 | union { | ||
| 584 | uint32_t rss; /* RSS Hash */ | ||
| 585 | struct { | ||
| 586 | uint16_t ip_id; /* IP id */ | ||
| 587 | uint16_t csum; /* Packet Checksum */ | ||
| 588 | } csum_ip; | ||
| 589 | } hi_dword; | ||
| 590 | } lower; | ||
| 591 | struct { | ||
| 592 | uint32_t status_error; /* ext status/error */ | ||
| 593 | uint16_t length; | ||
| 594 | uint16_t vlan; /* VLAN tag */ | ||
| 595 | } upper; | ||
| 596 | } wb; /* writeback */ | ||
| 597 | }; | ||
| 598 | |||
| 599 | #define MAX_PS_BUFFERS 4 | ||
| 600 | /* Receive Descriptor - Packet Split */ | ||
| 601 | union e1000_rx_desc_packet_split { | ||
| 602 | struct { | ||
| 603 | /* one buffer for protocol header(s), three data buffers */ | ||
| 604 | uint64_t buffer_addr[MAX_PS_BUFFERS]; | ||
| 605 | } read; | ||
| 606 | struct { | ||
| 607 | struct { | ||
| 608 | uint32_t mrq; /* Multiple Rx Queues */ | ||
| 609 | union { | ||
| 610 | uint32_t rss; /* RSS Hash */ | ||
| 611 | struct { | ||
| 612 | uint16_t ip_id; /* IP id */ | ||
| 613 | uint16_t csum; /* Packet Checksum */ | ||
| 614 | } csum_ip; | ||
| 615 | } hi_dword; | ||
| 616 | } lower; | ||
| 617 | struct { | ||
| 618 | uint32_t status_error; /* ext status/error */ | ||
| 619 | uint16_t length0; /* length of buffer 0 */ | ||
| 620 | uint16_t vlan; /* VLAN tag */ | ||
| 621 | } middle; | ||
| 622 | struct { | ||
| 623 | uint16_t header_status; | ||
| 624 | uint16_t length[3]; /* length of buffers 1-3 */ | ||
| 625 | } upper; | ||
| 626 | uint64_t reserved; | ||
| 627 | } wb; /* writeback */ | ||
| 628 | }; | ||
| 629 | |||
| 460 | /* Receive Decriptor bit definitions */ | 630 | /* Receive Decriptor bit definitions */ |
| 461 | #define E1000_RXD_STAT_DD 0x01 /* Descriptor Done */ | 631 | #define E1000_RXD_STAT_DD 0x01 /* Descriptor Done */ |
| 462 | #define E1000_RXD_STAT_EOP 0x02 /* End of Packet */ | 632 | #define E1000_RXD_STAT_EOP 0x02 /* End of Packet */ |
| 463 | #define E1000_RXD_STAT_IXSM 0x04 /* Ignore checksum */ | 633 | #define E1000_RXD_STAT_IXSM 0x04 /* Ignore checksum */ |
| 464 | #define E1000_RXD_STAT_VP 0x08 /* IEEE VLAN Packet */ | 634 | #define E1000_RXD_STAT_VP 0x08 /* IEEE VLAN Packet */ |
| 635 | #define E1000_RXD_STAT_UDPCS 0x10 /* UDP xsum caculated */ | ||
| 465 | #define E1000_RXD_STAT_TCPCS 0x20 /* TCP xsum calculated */ | 636 | #define E1000_RXD_STAT_TCPCS 0x20 /* TCP xsum calculated */ |
| 466 | #define E1000_RXD_STAT_IPCS 0x40 /* IP xsum calculated */ | 637 | #define E1000_RXD_STAT_IPCS 0x40 /* IP xsum calculated */ |
| 467 | #define E1000_RXD_STAT_PIF 0x80 /* passed in-exact filter */ | 638 | #define E1000_RXD_STAT_PIF 0x80 /* passed in-exact filter */ |
| 639 | #define E1000_RXD_STAT_IPIDV 0x200 /* IP identification valid */ | ||
| 640 | #define E1000_RXD_STAT_UDPV 0x400 /* Valid UDP checksum */ | ||
| 641 | #define E1000_RXD_STAT_ACK 0x8000 /* ACK Packet indication */ | ||
| 468 | #define E1000_RXD_ERR_CE 0x01 /* CRC Error */ | 642 | #define E1000_RXD_ERR_CE 0x01 /* CRC Error */ |
| 469 | #define E1000_RXD_ERR_SE 0x02 /* Symbol Error */ | 643 | #define E1000_RXD_ERR_SE 0x02 /* Symbol Error */ |
| 470 | #define E1000_RXD_ERR_SEQ 0x04 /* Sequence Error */ | 644 | #define E1000_RXD_ERR_SEQ 0x04 /* Sequence Error */ |
| @@ -474,9 +648,20 @@ struct e1000_rx_desc { | |||
| 474 | #define E1000_RXD_ERR_RXE 0x80 /* Rx Data Error */ | 648 | #define E1000_RXD_ERR_RXE 0x80 /* Rx Data Error */ |
| 475 | #define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */ | 649 | #define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */ |
| 476 | #define E1000_RXD_SPC_PRI_MASK 0xE000 /* Priority is in upper 3 bits */ | 650 | #define E1000_RXD_SPC_PRI_MASK 0xE000 /* Priority is in upper 3 bits */ |
| 477 | #define E1000_RXD_SPC_PRI_SHIFT 0x000D /* Priority is in upper 3 of 16 */ | 651 | #define E1000_RXD_SPC_PRI_SHIFT 13 |
| 478 | #define E1000_RXD_SPC_CFI_MASK 0x1000 /* CFI is bit 12 */ | 652 | #define E1000_RXD_SPC_CFI_MASK 0x1000 /* CFI is bit 12 */ |
| 479 | #define E1000_RXD_SPC_CFI_SHIFT 0x000C /* CFI is bit 12 */ | 653 | #define E1000_RXD_SPC_CFI_SHIFT 12 |
| 654 | |||
| 655 | #define E1000_RXDEXT_STATERR_CE 0x01000000 | ||
| 656 | #define E1000_RXDEXT_STATERR_SE 0x02000000 | ||
| 657 | #define E1000_RXDEXT_STATERR_SEQ 0x04000000 | ||
| 658 | #define E1000_RXDEXT_STATERR_CXE 0x10000000 | ||
| 659 | #define E1000_RXDEXT_STATERR_TCPE 0x20000000 | ||
| 660 | #define E1000_RXDEXT_STATERR_IPE 0x40000000 | ||
| 661 | #define E1000_RXDEXT_STATERR_RXE 0x80000000 | ||
| 662 | |||
| 663 | #define E1000_RXDPS_HDRSTAT_HDRSP 0x00008000 | ||
| 664 | #define E1000_RXDPS_HDRSTAT_HDRLEN_MASK 0x000003FF | ||
| 480 | 665 | ||
| 481 | /* mask to determine if packets should be dropped due to frame errors */ | 666 | /* mask to determine if packets should be dropped due to frame errors */ |
| 482 | #define E1000_RXD_ERR_FRAME_ERR_MASK ( \ | 667 | #define E1000_RXD_ERR_FRAME_ERR_MASK ( \ |
| @@ -486,6 +671,15 @@ struct e1000_rx_desc { | |||
| 486 | E1000_RXD_ERR_CXE | \ | 671 | E1000_RXD_ERR_CXE | \ |
| 487 | E1000_RXD_ERR_RXE) | 672 | E1000_RXD_ERR_RXE) |
| 488 | 673 | ||
| 674 | |||
| 675 | /* Same mask, but for extended and packet split descriptors */ | ||
| 676 | #define E1000_RXDEXT_ERR_FRAME_ERR_MASK ( \ | ||
| 677 | E1000_RXDEXT_STATERR_CE | \ | ||
| 678 | E1000_RXDEXT_STATERR_SE | \ | ||
| 679 | E1000_RXDEXT_STATERR_SEQ | \ | ||
| 680 | E1000_RXDEXT_STATERR_CXE | \ | ||
| 681 | E1000_RXDEXT_STATERR_RXE) | ||
| 682 | |||
| 489 | /* Transmit Descriptor */ | 683 | /* Transmit Descriptor */ |
| 490 | struct e1000_tx_desc { | 684 | struct e1000_tx_desc { |
| 491 | uint64_t buffer_addr; /* Address of the descriptor's data buffer */ | 685 | uint64_t buffer_addr; /* Address of the descriptor's data buffer */ |
| @@ -667,6 +861,7 @@ struct e1000_ffvt_entry { | |||
| 667 | #define E1000_ICS 0x000C8 /* Interrupt Cause Set - WO */ | 861 | #define E1000_ICS 0x000C8 /* Interrupt Cause Set - WO */ |
| 668 | #define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */ | 862 | #define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */ |
| 669 | #define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */ | 863 | #define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */ |
| 864 | #define E1000_IAM 0x000E0 /* Interrupt Acknowledge Auto Mask */ | ||
| 670 | #define E1000_RCTL 0x00100 /* RX Control - RW */ | 865 | #define E1000_RCTL 0x00100 /* RX Control - RW */ |
| 671 | #define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */ | 866 | #define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */ |
| 672 | #define E1000_TXCW 0x00178 /* TX Configuration Word - RW */ | 867 | #define E1000_TXCW 0x00178 /* TX Configuration Word - RW */ |
| @@ -676,9 +871,23 @@ struct e1000_ffvt_entry { | |||
| 676 | #define E1000_TBT 0x00448 /* TX Burst Timer - RW */ | 871 | #define E1000_TBT 0x00448 /* TX Burst Timer - RW */ |
| 677 | #define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ | 872 | #define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ |
| 678 | #define E1000_LEDCTL 0x00E00 /* LED Control - RW */ | 873 | #define E1000_LEDCTL 0x00E00 /* LED Control - RW */ |
| 874 | #define E1000_EXTCNF_CTRL 0x00F00 /* Extended Configuration Control */ | ||
| 875 | #define E1000_EXTCNF_SIZE 0x00F08 /* Extended Configuration Size */ | ||
| 679 | #define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */ | 876 | #define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */ |
| 877 | #define E1000_PBS 0x01008 /* Packet Buffer Size */ | ||
| 878 | #define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */ | ||
| 879 | #define E1000_FLASH_UPDATES 1000 | ||
| 880 | #define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */ | ||
| 881 | #define E1000_FLASHT 0x01028 /* FLASH Timer Register */ | ||
| 882 | #define E1000_EEWR 0x0102C /* EEPROM Write Register - RW */ | ||
| 883 | #define E1000_FLSWCTL 0x01030 /* FLASH control register */ | ||
| 884 | #define E1000_FLSWDATA 0x01034 /* FLASH data register */ | ||
| 885 | #define E1000_FLSWCNT 0x01038 /* FLASH Access Counter */ | ||
| 886 | #define E1000_FLOP 0x0103C /* FLASH Opcode Register */ | ||
| 887 | #define E1000_ERT 0x02008 /* Early Rx Threshold - RW */ | ||
| 680 | #define E1000_FCRTL 0x02160 /* Flow Control Receive Threshold Low - RW */ | 888 | #define E1000_FCRTL 0x02160 /* Flow Control Receive Threshold Low - RW */ |
| 681 | #define E1000_FCRTH 0x02168 /* Flow Control Receive Threshold High - RW */ | 889 | #define E1000_FCRTH 0x02168 /* Flow Control Receive Threshold High - RW */ |
| 890 | #define E1000_PSRCTL 0x02170 /* Packet Split Receive Control - RW */ | ||
| 682 | #define E1000_RDBAL 0x02800 /* RX Descriptor Base Address Low - RW */ | 891 | #define E1000_RDBAL 0x02800 /* RX Descriptor Base Address Low - RW */ |
| 683 | #define E1000_RDBAH 0x02804 /* RX Descriptor Base Address High - RW */ | 892 | #define E1000_RDBAH 0x02804 /* RX Descriptor Base Address High - RW */ |
| 684 | #define E1000_RDLEN 0x02808 /* RX Descriptor Length - RW */ | 893 | #define E1000_RDLEN 0x02808 /* RX Descriptor Length - RW */ |
| @@ -688,6 +897,7 @@ struct e1000_ffvt_entry { | |||
| 688 | #define E1000_RXDCTL 0x02828 /* RX Descriptor Control - RW */ | 897 | #define E1000_RXDCTL 0x02828 /* RX Descriptor Control - RW */ |
| 689 | #define E1000_RADV 0x0282C /* RX Interrupt Absolute Delay Timer - RW */ | 898 | #define E1000_RADV 0x0282C /* RX Interrupt Absolute Delay Timer - RW */ |
| 690 | #define E1000_RSRPD 0x02C00 /* RX Small Packet Detect - RW */ | 899 | #define E1000_RSRPD 0x02C00 /* RX Small Packet Detect - RW */ |
| 900 | #define E1000_RAID 0x02C08 /* Receive Ack Interrupt Delay - RW */ | ||
| 691 | #define E1000_TXDMAC 0x03000 /* TX DMA Control - RW */ | 901 | #define E1000_TXDMAC 0x03000 /* TX DMA Control - RW */ |
| 692 | #define E1000_TDFH 0x03410 /* TX Data FIFO Head - RW */ | 902 | #define E1000_TDFH 0x03410 /* TX Data FIFO Head - RW */ |
| 693 | #define E1000_TDFT 0x03418 /* TX Data FIFO Tail - RW */ | 903 | #define E1000_TDFT 0x03418 /* TX Data FIFO Tail - RW */ |
| @@ -703,6 +913,14 @@ struct e1000_ffvt_entry { | |||
| 703 | #define E1000_TXDCTL 0x03828 /* TX Descriptor Control - RW */ | 913 | #define E1000_TXDCTL 0x03828 /* TX Descriptor Control - RW */ |
| 704 | #define E1000_TADV 0x0382C /* TX Interrupt Absolute Delay Val - RW */ | 914 | #define E1000_TADV 0x0382C /* TX Interrupt Absolute Delay Val - RW */ |
| 705 | #define E1000_TSPMT 0x03830 /* TCP Segmentation PAD & Min Threshold - RW */ | 915 | #define E1000_TSPMT 0x03830 /* TCP Segmentation PAD & Min Threshold - RW */ |
| 916 | #define E1000_TARC0 0x03840 /* TX Arbitration Count (0) */ | ||
| 917 | #define E1000_TDBAL1 0x03900 /* TX Desc Base Address Low (1) - RW */ | ||
| 918 | #define E1000_TDBAH1 0x03904 /* TX Desc Base Address High (1) - RW */ | ||
| 919 | #define E1000_TDLEN1 0x03908 /* TX Desc Length (1) - RW */ | ||
| 920 | #define E1000_TDH1 0x03910 /* TX Desc Head (1) - RW */ | ||
| 921 | #define E1000_TDT1 0x03918 /* TX Desc Tail (1) - RW */ | ||
| 922 | #define E1000_TXDCTL1 0x03928 /* TX Descriptor Control (1) - RW */ | ||
| 923 | #define E1000_TARC1 0x03940 /* TX Arbitration Count (1) */ | ||
| 706 | #define E1000_CRCERRS 0x04000 /* CRC Error Count - R/clr */ | 924 | #define E1000_CRCERRS 0x04000 /* CRC Error Count - R/clr */ |
| 707 | #define E1000_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ | 925 | #define E1000_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ |
| 708 | #define E1000_SYMERRS 0x04008 /* Symbol Error Count - R/clr */ | 926 | #define E1000_SYMERRS 0x04008 /* Symbol Error Count - R/clr */ |
| @@ -761,7 +979,17 @@ struct e1000_ffvt_entry { | |||
| 761 | #define E1000_BPTC 0x040F4 /* Broadcast Packets TX Count - R/clr */ | 979 | #define E1000_BPTC 0x040F4 /* Broadcast Packets TX Count - R/clr */ |
| 762 | #define E1000_TSCTC 0x040F8 /* TCP Segmentation Context TX - R/clr */ | 980 | #define E1000_TSCTC 0x040F8 /* TCP Segmentation Context TX - R/clr */ |
| 763 | #define E1000_TSCTFC 0x040FC /* TCP Segmentation Context TX Fail - R/clr */ | 981 | #define E1000_TSCTFC 0x040FC /* TCP Segmentation Context TX Fail - R/clr */ |
| 982 | #define E1000_IAC 0x4100 /* Interrupt Assertion Count */ | ||
| 983 | #define E1000_ICRXPTC 0x4104 /* Interrupt Cause Rx Packet Timer Expire Count */ | ||
| 984 | #define E1000_ICRXATC 0x4108 /* Interrupt Cause Rx Absolute Timer Expire Count */ | ||
| 985 | #define E1000_ICTXPTC 0x410C /* Interrupt Cause Tx Packet Timer Expire Count */ | ||
| 986 | #define E1000_ICTXATC 0x4110 /* Interrupt Cause Tx Absolute Timer Expire Count */ | ||
| 987 | #define E1000_ICTXQEC 0x4118 /* Interrupt Cause Tx Queue Empty Count */ | ||
| 988 | #define E1000_ICTXQMTC 0x411C /* Interrupt Cause Tx Queue Minimum Threshold Count */ | ||
| 989 | #define E1000_ICRXDMTC 0x4120 /* Interrupt Cause Rx Descriptor Minimum Threshold Count */ | ||
| 990 | #define E1000_ICRXOC 0x4124 /* Interrupt Cause Receiver Overrun Count */ | ||
| 764 | #define E1000_RXCSUM 0x05000 /* RX Checksum Control - RW */ | 991 | #define E1000_RXCSUM 0x05000 /* RX Checksum Control - RW */ |
| 992 | #define E1000_RFCTL 0x05008 /* Receive Filter Control*/ | ||
| 765 | #define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */ | 993 | #define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */ |
| 766 | #define E1000_RA 0x05400 /* Receive Address - RW Array */ | 994 | #define E1000_RA 0x05400 /* Receive Address - RW Array */ |
| 767 | #define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */ | 995 | #define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */ |
| @@ -779,6 +1007,16 @@ struct e1000_ffvt_entry { | |||
| 779 | #define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ | 1007 | #define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ |
| 780 | #define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ | 1008 | #define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ |
| 781 | 1009 | ||
| 1010 | #define E1000_GCR 0x05B00 /* PCI-Ex Control */ | ||
| 1011 | #define E1000_GSCL_1 0x05B10 /* PCI-Ex Statistic Control #1 */ | ||
| 1012 | #define E1000_GSCL_2 0x05B14 /* PCI-Ex Statistic Control #2 */ | ||
| 1013 | #define E1000_GSCL_3 0x05B18 /* PCI-Ex Statistic Control #3 */ | ||
| 1014 | #define E1000_GSCL_4 0x05B1C /* PCI-Ex Statistic Control #4 */ | ||
| 1015 | #define E1000_FACTPS 0x05B30 /* Function Active and Power State to MNG */ | ||
| 1016 | #define E1000_SWSM 0x05B50 /* SW Semaphore */ | ||
| 1017 | #define E1000_FWSM 0x05B54 /* FW Semaphore */ | ||
| 1018 | #define E1000_FFLT_DBG 0x05F04 /* Debug Register */ | ||
| 1019 | #define E1000_HICR 0x08F00 /* Host Inteface Control */ | ||
| 782 | /* Register Set (82542) | 1020 | /* Register Set (82542) |
| 783 | * | 1021 | * |
| 784 | * Some of the 82542 registers are located at different offsets than they are | 1022 | * Some of the 82542 registers are located at different offsets than they are |
| @@ -829,6 +1067,18 @@ struct e1000_ffvt_entry { | |||
| 829 | #define E1000_82542_VFTA 0x00600 | 1067 | #define E1000_82542_VFTA 0x00600 |
| 830 | #define E1000_82542_LEDCTL E1000_LEDCTL | 1068 | #define E1000_82542_LEDCTL E1000_LEDCTL |
| 831 | #define E1000_82542_PBA E1000_PBA | 1069 | #define E1000_82542_PBA E1000_PBA |
| 1070 | #define E1000_82542_PBS E1000_PBS | ||
| 1071 | #define E1000_82542_EEMNGCTL E1000_EEMNGCTL | ||
| 1072 | #define E1000_82542_EEARBC E1000_EEARBC | ||
| 1073 | #define E1000_82542_FLASHT E1000_FLASHT | ||
| 1074 | #define E1000_82542_EEWR E1000_EEWR | ||
| 1075 | #define E1000_82542_FLSWCTL E1000_FLSWCTL | ||
| 1076 | #define E1000_82542_FLSWDATA E1000_FLSWDATA | ||
| 1077 | #define E1000_82542_FLSWCNT E1000_FLSWCNT | ||
| 1078 | #define E1000_82542_FLOP E1000_FLOP | ||
| 1079 | #define E1000_82542_EXTCNF_CTRL E1000_EXTCNF_CTRL | ||
| 1080 | #define E1000_82542_EXTCNF_SIZE E1000_EXTCNF_SIZE | ||
| 1081 | #define E1000_82542_ERT E1000_ERT | ||
| 832 | #define E1000_82542_RXDCTL E1000_RXDCTL | 1082 | #define E1000_82542_RXDCTL E1000_RXDCTL |
| 833 | #define E1000_82542_RADV E1000_RADV | 1083 | #define E1000_82542_RADV E1000_RADV |
| 834 | #define E1000_82542_RSRPD E1000_RSRPD | 1084 | #define E1000_82542_RSRPD E1000_RSRPD |
| @@ -913,6 +1163,38 @@ struct e1000_ffvt_entry { | |||
| 913 | #define E1000_82542_FFMT E1000_FFMT | 1163 | #define E1000_82542_FFMT E1000_FFMT |
| 914 | #define E1000_82542_FFVT E1000_FFVT | 1164 | #define E1000_82542_FFVT E1000_FFVT |
| 915 | #define E1000_82542_HOST_IF E1000_HOST_IF | 1165 | #define E1000_82542_HOST_IF E1000_HOST_IF |
| 1166 | #define E1000_82542_IAM E1000_IAM | ||
| 1167 | #define E1000_82542_EEMNGCTL E1000_EEMNGCTL | ||
| 1168 | #define E1000_82542_PSRCTL E1000_PSRCTL | ||
| 1169 | #define E1000_82542_RAID E1000_RAID | ||
| 1170 | #define E1000_82542_TARC0 E1000_TARC0 | ||
| 1171 | #define E1000_82542_TDBAL1 E1000_TDBAL1 | ||
| 1172 | #define E1000_82542_TDBAH1 E1000_TDBAH1 | ||
| 1173 | #define E1000_82542_TDLEN1 E1000_TDLEN1 | ||
| 1174 | #define E1000_82542_TDH1 E1000_TDH1 | ||
| 1175 | #define E1000_82542_TDT1 E1000_TDT1 | ||
| 1176 | #define E1000_82542_TXDCTL1 E1000_TXDCTL1 | ||
| 1177 | #define E1000_82542_TARC1 E1000_TARC1 | ||
| 1178 | #define E1000_82542_RFCTL E1000_RFCTL | ||
| 1179 | #define E1000_82542_GCR E1000_GCR | ||
| 1180 | #define E1000_82542_GSCL_1 E1000_GSCL_1 | ||
| 1181 | #define E1000_82542_GSCL_2 E1000_GSCL_2 | ||
| 1182 | #define E1000_82542_GSCL_3 E1000_GSCL_3 | ||
| 1183 | #define E1000_82542_GSCL_4 E1000_GSCL_4 | ||
| 1184 | #define E1000_82542_FACTPS E1000_FACTPS | ||
| 1185 | #define E1000_82542_SWSM E1000_SWSM | ||
| 1186 | #define E1000_82542_FWSM E1000_FWSM | ||
| 1187 | #define E1000_82542_FFLT_DBG E1000_FFLT_DBG | ||
| 1188 | #define E1000_82542_IAC E1000_IAC | ||
| 1189 | #define E1000_82542_ICRXPTC E1000_ICRXPTC | ||
| 1190 | #define E1000_82542_ICRXATC E1000_ICRXATC | ||
| 1191 | #define E1000_82542_ICTXPTC E1000_ICTXPTC | ||
| 1192 | #define E1000_82542_ICTXATC E1000_ICTXATC | ||
| 1193 | #define E1000_82542_ICTXQEC E1000_ICTXQEC | ||
| 1194 | #define E1000_82542_ICTXQMTC E1000_ICTXQMTC | ||
| 1195 | #define E1000_82542_ICRXDMTC E1000_ICRXDMTC | ||
| 1196 | #define E1000_82542_ICRXOC E1000_ICRXOC | ||
| 1197 | #define E1000_82542_HICR E1000_HICR | ||
| 916 | 1198 | ||
| 917 | /* Statistics counters collected by the MAC */ | 1199 | /* Statistics counters collected by the MAC */ |
| 918 | struct e1000_hw_stats { | 1200 | struct e1000_hw_stats { |
| @@ -974,11 +1256,21 @@ struct e1000_hw_stats { | |||
| 974 | uint64_t bptc; | 1256 | uint64_t bptc; |
| 975 | uint64_t tsctc; | 1257 | uint64_t tsctc; |
| 976 | uint64_t tsctfc; | 1258 | uint64_t tsctfc; |
| 1259 | uint64_t iac; | ||
| 1260 | uint64_t icrxptc; | ||
| 1261 | uint64_t icrxatc; | ||
| 1262 | uint64_t ictxptc; | ||
| 1263 | uint64_t ictxatc; | ||
| 1264 | uint64_t ictxqec; | ||
| 1265 | uint64_t ictxqmtc; | ||
| 1266 | uint64_t icrxdmtc; | ||
| 1267 | uint64_t icrxoc; | ||
| 977 | }; | 1268 | }; |
| 978 | 1269 | ||
| 979 | /* Structure containing variables used by the shared code (e1000_hw.c) */ | 1270 | /* Structure containing variables used by the shared code (e1000_hw.c) */ |
| 980 | struct e1000_hw { | 1271 | struct e1000_hw { |
| 981 | uint8_t __iomem *hw_addr; | 1272 | uint8_t *hw_addr; |
| 1273 | uint8_t *flash_address; | ||
| 982 | e1000_mac_type mac_type; | 1274 | e1000_mac_type mac_type; |
| 983 | e1000_phy_type phy_type; | 1275 | e1000_phy_type phy_type; |
| 984 | uint32_t phy_init_script; | 1276 | uint32_t phy_init_script; |
| @@ -993,6 +1285,7 @@ struct e1000_hw { | |||
| 993 | e1000_ms_type original_master_slave; | 1285 | e1000_ms_type original_master_slave; |
| 994 | e1000_ffe_config ffe_config_state; | 1286 | e1000_ffe_config ffe_config_state; |
| 995 | uint32_t asf_firmware_present; | 1287 | uint32_t asf_firmware_present; |
| 1288 | uint32_t eeprom_semaphore_present; | ||
| 996 | unsigned long io_base; | 1289 | unsigned long io_base; |
| 997 | uint32_t phy_id; | 1290 | uint32_t phy_id; |
| 998 | uint32_t phy_revision; | 1291 | uint32_t phy_revision; |
| @@ -1009,6 +1302,8 @@ struct e1000_hw { | |||
| 1009 | uint32_t ledctl_default; | 1302 | uint32_t ledctl_default; |
| 1010 | uint32_t ledctl_mode1; | 1303 | uint32_t ledctl_mode1; |
| 1011 | uint32_t ledctl_mode2; | 1304 | uint32_t ledctl_mode2; |
| 1305 | boolean_t tx_pkt_filtering; | ||
| 1306 | struct e1000_host_mng_dhcp_cookie mng_cookie; | ||
| 1012 | uint16_t phy_spd_default; | 1307 | uint16_t phy_spd_default; |
| 1013 | uint16_t autoneg_advertised; | 1308 | uint16_t autoneg_advertised; |
| 1014 | uint16_t pci_cmd_word; | 1309 | uint16_t pci_cmd_word; |
| @@ -1047,16 +1342,24 @@ struct e1000_hw { | |||
| 1047 | boolean_t adaptive_ifs; | 1342 | boolean_t adaptive_ifs; |
| 1048 | boolean_t ifs_params_forced; | 1343 | boolean_t ifs_params_forced; |
| 1049 | boolean_t in_ifs_mode; | 1344 | boolean_t in_ifs_mode; |
| 1345 | boolean_t mng_reg_access_disabled; | ||
| 1050 | }; | 1346 | }; |
| 1051 | 1347 | ||
| 1052 | 1348 | ||
| 1053 | #define E1000_EEPROM_SWDPIN0 0x0001 /* SWDPIN 0 EEPROM Value */ | 1349 | #define E1000_EEPROM_SWDPIN0 0x0001 /* SWDPIN 0 EEPROM Value */ |
| 1054 | #define E1000_EEPROM_LED_LOGIC 0x0020 /* Led Logic Word */ | 1350 | #define E1000_EEPROM_LED_LOGIC 0x0020 /* Led Logic Word */ |
| 1351 | #define E1000_EEPROM_RW_REG_DATA 16 /* Offset to data in EEPROM read/write registers */ | ||
| 1352 | #define E1000_EEPROM_RW_REG_DONE 2 /* Offset to READ/WRITE done bit */ | ||
| 1353 | #define E1000_EEPROM_RW_REG_START 1 /* First bit for telling part to start operation */ | ||
| 1354 | #define E1000_EEPROM_RW_ADDR_SHIFT 2 /* Shift to the address bits */ | ||
| 1355 | #define E1000_EEPROM_POLL_WRITE 1 /* Flag for polling for write complete */ | ||
| 1356 | #define E1000_EEPROM_POLL_READ 0 /* Flag for polling for read complete */ | ||
| 1055 | /* Register Bit Masks */ | 1357 | /* Register Bit Masks */ |
| 1056 | /* Device Control */ | 1358 | /* Device Control */ |
| 1057 | #define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */ | 1359 | #define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */ |
| 1058 | #define E1000_CTRL_BEM 0x00000002 /* Endian Mode.0=little,1=big */ | 1360 | #define E1000_CTRL_BEM 0x00000002 /* Endian Mode.0=little,1=big */ |
| 1059 | #define E1000_CTRL_PRIOR 0x00000004 /* Priority on PCI. 0=rx,1=fair */ | 1361 | #define E1000_CTRL_PRIOR 0x00000004 /* Priority on PCI. 0=rx,1=fair */ |
| 1362 | #define E1000_CTRL_GIO_MASTER_DISABLE 0x00000004 /*Blocks new Master requests */ | ||
| 1060 | #define E1000_CTRL_LRST 0x00000008 /* Link reset. 0=normal,1=reset */ | 1363 | #define E1000_CTRL_LRST 0x00000008 /* Link reset. 0=normal,1=reset */ |
| 1061 | #define E1000_CTRL_TME 0x00000010 /* Test mode. 0=normal,1=test */ | 1364 | #define E1000_CTRL_TME 0x00000010 /* Test mode. 0=normal,1=test */ |
| 1062 | #define E1000_CTRL_SLE 0x00000020 /* Serial Link on 0=dis,1=en */ | 1365 | #define E1000_CTRL_SLE 0x00000020 /* Serial Link on 0=dis,1=en */ |
| @@ -1070,6 +1373,7 @@ struct e1000_hw { | |||
| 1070 | #define E1000_CTRL_BEM32 0x00000400 /* Big Endian 32 mode */ | 1373 | #define E1000_CTRL_BEM32 0x00000400 /* Big Endian 32 mode */ |
| 1071 | #define E1000_CTRL_FRCSPD 0x00000800 /* Force Speed */ | 1374 | #define E1000_CTRL_FRCSPD 0x00000800 /* Force Speed */ |
| 1072 | #define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */ | 1375 | #define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */ |
| 1376 | #define E1000_CTRL_D_UD_POLARITY 0x00004000 /* Defined polarity of Dock/Undock indication in SDP[0] */ | ||
| 1073 | #define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ | 1377 | #define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ |
| 1074 | #define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ | 1378 | #define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ |
| 1075 | #define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ | 1379 | #define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ |
| @@ -1089,6 +1393,7 @@ struct e1000_hw { | |||
| 1089 | #define E1000_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */ | 1393 | #define E1000_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */ |
| 1090 | #define E1000_STATUS_LU 0x00000002 /* Link up.0=no,1=link */ | 1394 | #define E1000_STATUS_LU 0x00000002 /* Link up.0=no,1=link */ |
| 1091 | #define E1000_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */ | 1395 | #define E1000_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */ |
| 1396 | #define E1000_STATUS_FUNC_SHIFT 2 | ||
| 1092 | #define E1000_STATUS_FUNC_0 0x00000000 /* Function 0 */ | 1397 | #define E1000_STATUS_FUNC_0 0x00000000 /* Function 0 */ |
| 1093 | #define E1000_STATUS_FUNC_1 0x00000004 /* Function 1 */ | 1398 | #define E1000_STATUS_FUNC_1 0x00000004 /* Function 1 */ |
| 1094 | #define E1000_STATUS_TXOFF 0x00000010 /* transmission paused */ | 1399 | #define E1000_STATUS_TXOFF 0x00000010 /* transmission paused */ |
| @@ -1098,6 +1403,8 @@ struct e1000_hw { | |||
| 1098 | #define E1000_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */ | 1403 | #define E1000_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */ |
| 1099 | #define E1000_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */ | 1404 | #define E1000_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */ |
| 1100 | #define E1000_STATUS_ASDV 0x00000300 /* Auto speed detect value */ | 1405 | #define E1000_STATUS_ASDV 0x00000300 /* Auto speed detect value */ |
| 1406 | #define E1000_STATUS_DOCK_CI 0x00000800 /* Change in Dock/Undock state. Clear on write '0'. */ | ||
| 1407 | #define E1000_STATUS_GIO_MASTER_ENABLE 0x00080000 /* Status of Master requests. */ | ||
| 1101 | #define E1000_STATUS_MTXCKOK 0x00000400 /* MTX clock running OK */ | 1408 | #define E1000_STATUS_MTXCKOK 0x00000400 /* MTX clock running OK */ |
| 1102 | #define E1000_STATUS_PCI66 0x00000800 /* In 66Mhz slot */ | 1409 | #define E1000_STATUS_PCI66 0x00000800 /* In 66Mhz slot */ |
| 1103 | #define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */ | 1410 | #define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */ |
| @@ -1128,6 +1435,18 @@ struct e1000_hw { | |||
| 1128 | #ifndef E1000_EEPROM_GRANT_ATTEMPTS | 1435 | #ifndef E1000_EEPROM_GRANT_ATTEMPTS |
| 1129 | #define E1000_EEPROM_GRANT_ATTEMPTS 1000 /* EEPROM # attempts to gain grant */ | 1436 | #define E1000_EEPROM_GRANT_ATTEMPTS 1000 /* EEPROM # attempts to gain grant */ |
| 1130 | #endif | 1437 | #endif |
| 1438 | #define E1000_EECD_AUTO_RD 0x00000200 /* EEPROM Auto Read done */ | ||
| 1439 | #define E1000_EECD_SIZE_EX_MASK 0x00007800 /* EEprom Size */ | ||
| 1440 | #define E1000_EECD_SIZE_EX_SHIFT 11 | ||
| 1441 | #define E1000_EECD_NVADDS 0x00018000 /* NVM Address Size */ | ||
| 1442 | #define E1000_EECD_SELSHAD 0x00020000 /* Select Shadow RAM */ | ||
| 1443 | #define E1000_EECD_INITSRAM 0x00040000 /* Initialize Shadow RAM */ | ||
| 1444 | #define E1000_EECD_FLUPD 0x00080000 /* Update FLASH */ | ||
| 1445 | #define E1000_EECD_AUPDEN 0x00100000 /* Enable Autonomous FLASH update */ | ||
| 1446 | #define E1000_EECD_SHADV 0x00200000 /* Shadow RAM Data Valid */ | ||
| 1447 | #define E1000_EECD_SEC1VAL 0x00400000 /* Sector One Valid */ | ||
| 1448 | #define E1000_STM_OPCODE 0xDB00 | ||
| 1449 | #define E1000_HICR_FW_RESET 0xC0 | ||
| 1131 | 1450 | ||
| 1132 | /* EEPROM Read */ | 1451 | /* EEPROM Read */ |
| 1133 | #define E1000_EERD_START 0x00000001 /* Start Read */ | 1452 | #define E1000_EERD_START 0x00000001 /* Start Read */ |
| @@ -1171,6 +1490,8 @@ struct e1000_hw { | |||
| 1171 | #define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 | 1490 | #define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 |
| 1172 | #define E1000_CTRL_EXT_WR_WMARK_384 0x02000000 | 1491 | #define E1000_CTRL_EXT_WR_WMARK_384 0x02000000 |
| 1173 | #define E1000_CTRL_EXT_WR_WMARK_448 0x03000000 | 1492 | #define E1000_CTRL_EXT_WR_WMARK_448 0x03000000 |
| 1493 | #define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */ | ||
| 1494 | #define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */ | ||
| 1174 | 1495 | ||
| 1175 | /* MDI Control */ | 1496 | /* MDI Control */ |
| 1176 | #define E1000_MDIC_DATA_MASK 0x0000FFFF | 1497 | #define E1000_MDIC_DATA_MASK 0x0000FFFF |
| @@ -1187,14 +1508,17 @@ struct e1000_hw { | |||
| 1187 | /* LED Control */ | 1508 | /* LED Control */ |
| 1188 | #define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F | 1509 | #define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F |
| 1189 | #define E1000_LEDCTL_LED0_MODE_SHIFT 0 | 1510 | #define E1000_LEDCTL_LED0_MODE_SHIFT 0 |
| 1511 | #define E1000_LEDCTL_LED0_BLINK_RATE 0x0000020 | ||
| 1190 | #define E1000_LEDCTL_LED0_IVRT 0x00000040 | 1512 | #define E1000_LEDCTL_LED0_IVRT 0x00000040 |
| 1191 | #define E1000_LEDCTL_LED0_BLINK 0x00000080 | 1513 | #define E1000_LEDCTL_LED0_BLINK 0x00000080 |
| 1192 | #define E1000_LEDCTL_LED1_MODE_MASK 0x00000F00 | 1514 | #define E1000_LEDCTL_LED1_MODE_MASK 0x00000F00 |
| 1193 | #define E1000_LEDCTL_LED1_MODE_SHIFT 8 | 1515 | #define E1000_LEDCTL_LED1_MODE_SHIFT 8 |
| 1516 | #define E1000_LEDCTL_LED1_BLINK_RATE 0x0002000 | ||
| 1194 | #define E1000_LEDCTL_LED1_IVRT 0x00004000 | 1517 | #define E1000_LEDCTL_LED1_IVRT 0x00004000 |
| 1195 | #define E1000_LEDCTL_LED1_BLINK 0x00008000 | 1518 | #define E1000_LEDCTL_LED1_BLINK 0x00008000 |
| 1196 | #define E1000_LEDCTL_LED2_MODE_MASK 0x000F0000 | 1519 | #define E1000_LEDCTL_LED2_MODE_MASK 0x000F0000 |
| 1197 | #define E1000_LEDCTL_LED2_MODE_SHIFT 16 | 1520 | #define E1000_LEDCTL_LED2_MODE_SHIFT 16 |
| 1521 | #define E1000_LEDCTL_LED2_BLINK_RATE 0x00200000 | ||
| 1198 | #define E1000_LEDCTL_LED2_IVRT 0x00400000 | 1522 | #define E1000_LEDCTL_LED2_IVRT 0x00400000 |
| 1199 | #define E1000_LEDCTL_LED2_BLINK 0x00800000 | 1523 | #define E1000_LEDCTL_LED2_BLINK 0x00800000 |
| 1200 | #define E1000_LEDCTL_LED3_MODE_MASK 0x0F000000 | 1524 | #define E1000_LEDCTL_LED3_MODE_MASK 0x0F000000 |
| @@ -1238,6 +1562,10 @@ struct e1000_hw { | |||
| 1238 | #define E1000_ICR_GPI_EN3 0x00004000 /* GP Int 3 */ | 1562 | #define E1000_ICR_GPI_EN3 0x00004000 /* GP Int 3 */ |
| 1239 | #define E1000_ICR_TXD_LOW 0x00008000 | 1563 | #define E1000_ICR_TXD_LOW 0x00008000 |
| 1240 | #define E1000_ICR_SRPD 0x00010000 | 1564 | #define E1000_ICR_SRPD 0x00010000 |
| 1565 | #define E1000_ICR_ACK 0x00020000 /* Receive Ack frame */ | ||
| 1566 | #define E1000_ICR_MNG 0x00040000 /* Manageability event */ | ||
| 1567 | #define E1000_ICR_DOCK 0x00080000 /* Dock/Undock */ | ||
| 1568 | #define E1000_ICR_INT_ASSERTED 0x80000000 /* If this bit asserted, the driver should claim the interrupt */ | ||
| 1241 | 1569 | ||
| 1242 | /* Interrupt Cause Set */ | 1570 | /* Interrupt Cause Set */ |
| 1243 | #define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ | 1571 | #define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ |
| @@ -1255,6 +1583,9 @@ struct e1000_hw { | |||
| 1255 | #define E1000_ICS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ | 1583 | #define E1000_ICS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ |
| 1256 | #define E1000_ICS_TXD_LOW E1000_ICR_TXD_LOW | 1584 | #define E1000_ICS_TXD_LOW E1000_ICR_TXD_LOW |
| 1257 | #define E1000_ICS_SRPD E1000_ICR_SRPD | 1585 | #define E1000_ICS_SRPD E1000_ICR_SRPD |
| 1586 | #define E1000_ICS_ACK E1000_ICR_ACK /* Receive Ack frame */ | ||
| 1587 | #define E1000_ICS_MNG E1000_ICR_MNG /* Manageability event */ | ||
| 1588 | #define E1000_ICS_DOCK E1000_ICR_DOCK /* Dock/Undock */ | ||
| 1258 | 1589 | ||
| 1259 | /* Interrupt Mask Set */ | 1590 | /* Interrupt Mask Set */ |
| 1260 | #define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ | 1591 | #define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ |
| @@ -1272,6 +1603,9 @@ struct e1000_hw { | |||
| 1272 | #define E1000_IMS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ | 1603 | #define E1000_IMS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ |
| 1273 | #define E1000_IMS_TXD_LOW E1000_ICR_TXD_LOW | 1604 | #define E1000_IMS_TXD_LOW E1000_ICR_TXD_LOW |
| 1274 | #define E1000_IMS_SRPD E1000_ICR_SRPD | 1605 | #define E1000_IMS_SRPD E1000_ICR_SRPD |
| 1606 | #define E1000_IMS_ACK E1000_ICR_ACK /* Receive Ack frame */ | ||
| 1607 | #define E1000_IMS_MNG E1000_ICR_MNG /* Manageability event */ | ||
| 1608 | #define E1000_IMS_DOCK E1000_ICR_DOCK /* Dock/Undock */ | ||
| 1275 | 1609 | ||
| 1276 | /* Interrupt Mask Clear */ | 1610 | /* Interrupt Mask Clear */ |
| 1277 | #define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ | 1611 | #define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ |
| @@ -1289,6 +1623,9 @@ struct e1000_hw { | |||
| 1289 | #define E1000_IMC_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ | 1623 | #define E1000_IMC_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ |
| 1290 | #define E1000_IMC_TXD_LOW E1000_ICR_TXD_LOW | 1624 | #define E1000_IMC_TXD_LOW E1000_ICR_TXD_LOW |
| 1291 | #define E1000_IMC_SRPD E1000_ICR_SRPD | 1625 | #define E1000_IMC_SRPD E1000_ICR_SRPD |
| 1626 | #define E1000_IMC_ACK E1000_ICR_ACK /* Receive Ack frame */ | ||
| 1627 | #define E1000_IMC_MNG E1000_ICR_MNG /* Manageability event */ | ||
| 1628 | #define E1000_IMC_DOCK E1000_ICR_DOCK /* Dock/Undock */ | ||
| 1292 | 1629 | ||
| 1293 | /* Receive Control */ | 1630 | /* Receive Control */ |
| 1294 | #define E1000_RCTL_RST 0x00000001 /* Software reset */ | 1631 | #define E1000_RCTL_RST 0x00000001 /* Software reset */ |
| @@ -1301,6 +1638,8 @@ struct e1000_hw { | |||
| 1301 | #define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */ | 1638 | #define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */ |
| 1302 | #define E1000_RCTL_LBM_SLP 0x00000080 /* serial link loopback mode */ | 1639 | #define E1000_RCTL_LBM_SLP 0x00000080 /* serial link loopback mode */ |
| 1303 | #define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ | 1640 | #define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ |
| 1641 | #define E1000_RCTL_DTYP_MASK 0x00000C00 /* Descriptor type mask */ | ||
| 1642 | #define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */ | ||
| 1304 | #define E1000_RCTL_RDMTS_HALF 0x00000000 /* rx desc min threshold size */ | 1643 | #define E1000_RCTL_RDMTS_HALF 0x00000000 /* rx desc min threshold size */ |
| 1305 | #define E1000_RCTL_RDMTS_QUAT 0x00000100 /* rx desc min threshold size */ | 1644 | #define E1000_RCTL_RDMTS_QUAT 0x00000100 /* rx desc min threshold size */ |
| 1306 | #define E1000_RCTL_RDMTS_EIGTH 0x00000200 /* rx desc min threshold size */ | 1645 | #define E1000_RCTL_RDMTS_EIGTH 0x00000200 /* rx desc min threshold size */ |
| @@ -1327,6 +1666,34 @@ struct e1000_hw { | |||
| 1327 | #define E1000_RCTL_PMCF 0x00800000 /* pass MAC control frames */ | 1666 | #define E1000_RCTL_PMCF 0x00800000 /* pass MAC control frames */ |
| 1328 | #define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */ | 1667 | #define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */ |
| 1329 | #define E1000_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */ | 1668 | #define E1000_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */ |
| 1669 | #define E1000_RCTL_FLXBUF_MASK 0x78000000 /* Flexible buffer size */ | ||
| 1670 | #define E1000_RCTL_FLXBUF_SHIFT 27 /* Flexible buffer shift */ | ||
| 1671 | |||
| 1672 | /* Use byte values for the following shift parameters | ||
| 1673 | * Usage: | ||
| 1674 | * psrctl |= (((ROUNDUP(value0, 128) >> E1000_PSRCTL_BSIZE0_SHIFT) & | ||
| 1675 | * E1000_PSRCTL_BSIZE0_MASK) | | ||
| 1676 | * ((ROUNDUP(value1, 1024) >> E1000_PSRCTL_BSIZE1_SHIFT) & | ||
| 1677 | * E1000_PSRCTL_BSIZE1_MASK) | | ||
| 1678 | * ((ROUNDUP(value2, 1024) << E1000_PSRCTL_BSIZE2_SHIFT) & | ||
| 1679 | * E1000_PSRCTL_BSIZE2_MASK) | | ||
| 1680 | * ((ROUNDUP(value3, 1024) << E1000_PSRCTL_BSIZE3_SHIFT) |; | ||
| 1681 | * E1000_PSRCTL_BSIZE3_MASK)) | ||
| 1682 | * where value0 = [128..16256], default=256 | ||
| 1683 | * value1 = [1024..64512], default=4096 | ||
| 1684 | * value2 = [0..64512], default=4096 | ||
| 1685 | * value3 = [0..64512], default=0 | ||
| 1686 | */ | ||
| 1687 | |||
| 1688 | #define E1000_PSRCTL_BSIZE0_MASK 0x0000007F | ||
| 1689 | #define E1000_PSRCTL_BSIZE1_MASK 0x00003F00 | ||
| 1690 | #define E1000_PSRCTL_BSIZE2_MASK 0x003F0000 | ||
| 1691 | #define E1000_PSRCTL_BSIZE3_MASK 0x3F000000 | ||
| 1692 | |||
| 1693 | #define E1000_PSRCTL_BSIZE0_SHIFT 7 /* Shift _right_ 7 */ | ||
| 1694 | #define E1000_PSRCTL_BSIZE1_SHIFT 2 /* Shift _right_ 2 */ | ||
| 1695 | #define E1000_PSRCTL_BSIZE2_SHIFT 6 /* Shift _left_ 6 */ | ||
| 1696 | #define E1000_PSRCTL_BSIZE3_SHIFT 14 /* Shift _left_ 14 */ | ||
| 1330 | 1697 | ||
| 1331 | /* Receive Descriptor */ | 1698 | /* Receive Descriptor */ |
| 1332 | #define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */ | 1699 | #define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */ |
| @@ -1341,6 +1708,23 @@ struct e1000_hw { | |||
| 1341 | #define E1000_FCRTL_RTL 0x0000FFF8 /* Mask Bits[15:3] for RTL */ | 1708 | #define E1000_FCRTL_RTL 0x0000FFF8 /* Mask Bits[15:3] for RTL */ |
| 1342 | #define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */ | 1709 | #define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */ |
| 1343 | 1710 | ||
| 1711 | /* Header split receive */ | ||
| 1712 | #define E1000_RFCTL_ISCSI_DIS 0x00000001 | ||
| 1713 | #define E1000_RFCTL_ISCSI_DWC_MASK 0x0000003E | ||
| 1714 | #define E1000_RFCTL_ISCSI_DWC_SHIFT 1 | ||
| 1715 | #define E1000_RFCTL_NFSW_DIS 0x00000040 | ||
| 1716 | #define E1000_RFCTL_NFSR_DIS 0x00000080 | ||
| 1717 | #define E1000_RFCTL_NFS_VER_MASK 0x00000300 | ||
| 1718 | #define E1000_RFCTL_NFS_VER_SHIFT 8 | ||
| 1719 | #define E1000_RFCTL_IPV6_DIS 0x00000400 | ||
| 1720 | #define E1000_RFCTL_IPV6_XSUM_DIS 0x00000800 | ||
| 1721 | #define E1000_RFCTL_ACK_DIS 0x00001000 | ||
| 1722 | #define E1000_RFCTL_ACKD_DIS 0x00002000 | ||
| 1723 | #define E1000_RFCTL_IPFRSP_DIS 0x00004000 | ||
| 1724 | #define E1000_RFCTL_EXTEN 0x00008000 | ||
| 1725 | #define E1000_RFCTL_IPV6_EX_DIS 0x00010000 | ||
| 1726 | #define E1000_RFCTL_NEW_IPV6_EXT_DIS 0x00020000 | ||
| 1727 | |||
| 1344 | /* Receive Descriptor Control */ | 1728 | /* Receive Descriptor Control */ |
| 1345 | #define E1000_RXDCTL_PTHRESH 0x0000003F /* RXDCTL Prefetch Threshold */ | 1729 | #define E1000_RXDCTL_PTHRESH 0x0000003F /* RXDCTL Prefetch Threshold */ |
| 1346 | #define E1000_RXDCTL_HTHRESH 0x00003F00 /* RXDCTL Host Threshold */ | 1730 | #define E1000_RXDCTL_HTHRESH 0x00003F00 /* RXDCTL Host Threshold */ |
| @@ -1354,6 +1738,8 @@ struct e1000_hw { | |||
| 1354 | #define E1000_TXDCTL_GRAN 0x01000000 /* TXDCTL Granularity */ | 1738 | #define E1000_TXDCTL_GRAN 0x01000000 /* TXDCTL Granularity */ |
| 1355 | #define E1000_TXDCTL_LWTHRESH 0xFE000000 /* TXDCTL Low Threshold */ | 1739 | #define E1000_TXDCTL_LWTHRESH 0xFE000000 /* TXDCTL Low Threshold */ |
| 1356 | #define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */ | 1740 | #define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */ |
| 1741 | #define E1000_TXDCTL_COUNT_DESC 0x00400000 /* Enable the counting of desc. | ||
| 1742 | still to be processed. */ | ||
| 1357 | 1743 | ||
| 1358 | /* Transmit Configuration Word */ | 1744 | /* Transmit Configuration Word */ |
| 1359 | #define E1000_TXCW_FD 0x00000020 /* TXCW full duplex */ | 1745 | #define E1000_TXCW_FD 0x00000020 /* TXCW full duplex */ |
| @@ -1387,12 +1773,16 @@ struct e1000_hw { | |||
| 1387 | #define E1000_TCTL_PBE 0x00800000 /* Packet Burst Enable */ | 1773 | #define E1000_TCTL_PBE 0x00800000 /* Packet Burst Enable */ |
| 1388 | #define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ | 1774 | #define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ |
| 1389 | #define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ | 1775 | #define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ |
| 1776 | #define E1000_TCTL_MULR 0x10000000 /* Multiple request support */ | ||
| 1390 | 1777 | ||
| 1391 | /* Receive Checksum Control */ | 1778 | /* Receive Checksum Control */ |
| 1392 | #define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ | 1779 | #define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ |
| 1393 | #define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */ | 1780 | #define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */ |
| 1394 | #define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */ | 1781 | #define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */ |
| 1395 | #define E1000_RXCSUM_IPV6OFL 0x00000400 /* IPv6 checksum offload */ | 1782 | #define E1000_RXCSUM_IPV6OFL 0x00000400 /* IPv6 checksum offload */ |
| 1783 | #define E1000_RXCSUM_IPPCSE 0x00001000 /* IP payload checksum enable */ | ||
| 1784 | #define E1000_RXCSUM_PCSD 0x00002000 /* packet checksum disabled */ | ||
| 1785 | |||
| 1396 | 1786 | ||
| 1397 | /* Definitions for power management and wakeup registers */ | 1787 | /* Definitions for power management and wakeup registers */ |
| 1398 | /* Wake Up Control */ | 1788 | /* Wake Up Control */ |
| @@ -1411,6 +1801,7 @@ struct e1000_hw { | |||
| 1411 | #define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */ | 1801 | #define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */ |
| 1412 | #define E1000_WUFC_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Enable */ | 1802 | #define E1000_WUFC_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Enable */ |
| 1413 | #define E1000_WUFC_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Enable */ | 1803 | #define E1000_WUFC_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Enable */ |
| 1804 | #define E1000_WUFC_IGNORE_TCO 0x00008000 /* Ignore WakeOn TCO packets */ | ||
| 1414 | #define E1000_WUFC_FLX0 0x00010000 /* Flexible Filter 0 Enable */ | 1805 | #define E1000_WUFC_FLX0 0x00010000 /* Flexible Filter 0 Enable */ |
| 1415 | #define E1000_WUFC_FLX1 0x00020000 /* Flexible Filter 1 Enable */ | 1806 | #define E1000_WUFC_FLX1 0x00020000 /* Flexible Filter 1 Enable */ |
| 1416 | #define E1000_WUFC_FLX2 0x00040000 /* Flexible Filter 2 Enable */ | 1807 | #define E1000_WUFC_FLX2 0x00040000 /* Flexible Filter 2 Enable */ |
| @@ -1446,13 +1837,19 @@ struct e1000_hw { | |||
| 1446 | #define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */ | 1837 | #define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */ |
| 1447 | #define E1000_MANC_NEIGHBOR_EN 0x00004000 /* Enable Neighbor Discovery | 1838 | #define E1000_MANC_NEIGHBOR_EN 0x00004000 /* Enable Neighbor Discovery |
| 1448 | * Filtering */ | 1839 | * Filtering */ |
| 1840 | #define E1000_MANC_ARP_RES_EN 0x00008000 /* Enable ARP response Filtering */ | ||
| 1449 | #define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */ | 1841 | #define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */ |
| 1450 | #define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ | 1842 | #define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ |
| 1451 | #define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */ | 1843 | #define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */ |
| 1844 | #define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */ | ||
| 1452 | #define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000 /* Enable MAC address | 1845 | #define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000 /* Enable MAC address |
| 1453 | * filtering */ | 1846 | * filtering */ |
| 1454 | #define E1000_MANC_EN_MNG2HOST 0x00200000 /* Enable MNG packets to host | 1847 | #define E1000_MANC_EN_MNG2HOST 0x00200000 /* Enable MNG packets to host |
| 1455 | * memory */ | 1848 | * memory */ |
| 1849 | #define E1000_MANC_EN_IP_ADDR_FILTER 0x00400000 /* Enable IP address | ||
| 1850 | * filtering */ | ||
| 1851 | #define E1000_MANC_EN_XSUM_FILTER 0x00800000 /* Enable checksum filtering */ | ||
| 1852 | #define E1000_MANC_BR_EN 0x01000000 /* Enable broadcast filtering */ | ||
| 1456 | #define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */ | 1853 | #define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */ |
| 1457 | #define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */ | 1854 | #define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */ |
| 1458 | #define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */ | 1855 | #define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */ |
| @@ -1463,11 +1860,97 @@ struct e1000_hw { | |||
| 1463 | #define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */ | 1860 | #define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */ |
| 1464 | #define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */ | 1861 | #define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */ |
| 1465 | 1862 | ||
| 1863 | /* SW Semaphore Register */ | ||
| 1864 | #define E1000_SWSM_SMBI 0x00000001 /* Driver Semaphore bit */ | ||
| 1865 | #define E1000_SWSM_SWESMBI 0x00000002 /* FW Semaphore bit */ | ||
| 1866 | #define E1000_SWSM_WMNG 0x00000004 /* Wake MNG Clock */ | ||
| 1867 | #define E1000_SWSM_DRV_LOAD 0x00000008 /* Driver Loaded Bit */ | ||
| 1868 | |||
| 1869 | /* FW Semaphore Register */ | ||
| 1870 | #define E1000_FWSM_MODE_MASK 0x0000000E /* FW mode */ | ||
| 1871 | #define E1000_FWSM_MODE_SHIFT 1 | ||
| 1872 | #define E1000_FWSM_FW_VALID 0x00008000 /* FW established a valid mode */ | ||
| 1873 | |||
| 1874 | /* FFLT Debug Register */ | ||
| 1875 | #define E1000_FFLT_DBG_INVC 0x00100000 /* Invalid /C/ code handling */ | ||
| 1876 | |||
| 1877 | typedef enum { | ||
| 1878 | e1000_mng_mode_none = 0, | ||
| 1879 | e1000_mng_mode_asf, | ||
| 1880 | e1000_mng_mode_pt, | ||
| 1881 | e1000_mng_mode_ipmi, | ||
| 1882 | e1000_mng_mode_host_interface_only | ||
| 1883 | } e1000_mng_mode; | ||
| 1884 | |||
| 1885 | /* Host Inteface Control Register */ | ||
| 1886 | #define E1000_HICR_EN 0x00000001 /* Enable Bit - RO */ | ||
| 1887 | #define E1000_HICR_C 0x00000002 /* Driver sets this bit when done | ||
| 1888 | * to put command in RAM */ | ||
| 1889 | #define E1000_HICR_SV 0x00000004 /* Status Validity */ | ||
| 1890 | #define E1000_HICR_FWR 0x00000080 /* FW reset. Set by the Host */ | ||
| 1891 | |||
| 1892 | /* Host Interface Command Interface - Address range 0x8800-0x8EFF */ | ||
| 1893 | #define E1000_HI_MAX_DATA_LENGTH 252 /* Host Interface data length */ | ||
| 1894 | #define E1000_HI_MAX_BLOCK_BYTE_LENGTH 1792 /* Number of bytes in range */ | ||
| 1895 | #define E1000_HI_MAX_BLOCK_DWORD_LENGTH 448 /* Number of dwords in range */ | ||
| 1896 | #define E1000_HI_COMMAND_TIMEOUT 500 /* Time in ms to process HI command */ | ||
| 1897 | |||
| 1898 | struct e1000_host_command_header { | ||
| 1899 | uint8_t command_id; | ||
| 1900 | uint8_t command_length; | ||
| 1901 | uint8_t command_options; /* I/F bits for command, status for return */ | ||
| 1902 | uint8_t checksum; | ||
| 1903 | }; | ||
| 1904 | struct e1000_host_command_info { | ||
| 1905 | struct e1000_host_command_header command_header; /* Command Head/Command Result Head has 4 bytes */ | ||
| 1906 | uint8_t command_data[E1000_HI_MAX_DATA_LENGTH]; /* Command data can length 0..252 */ | ||
| 1907 | }; | ||
| 1908 | |||
| 1909 | /* Host SMB register #0 */ | ||
| 1910 | #define E1000_HSMC0R_CLKIN 0x00000001 /* SMB Clock in */ | ||
| 1911 | #define E1000_HSMC0R_DATAIN 0x00000002 /* SMB Data in */ | ||
| 1912 | #define E1000_HSMC0R_DATAOUT 0x00000004 /* SMB Data out */ | ||
| 1913 | #define E1000_HSMC0R_CLKOUT 0x00000008 /* SMB Clock out */ | ||
| 1914 | |||
| 1915 | /* Host SMB register #1 */ | ||
| 1916 | #define E1000_HSMC1R_CLKIN E1000_HSMC0R_CLKIN | ||
| 1917 | #define E1000_HSMC1R_DATAIN E1000_HSMC0R_DATAIN | ||
| 1918 | #define E1000_HSMC1R_DATAOUT E1000_HSMC0R_DATAOUT | ||
| 1919 | #define E1000_HSMC1R_CLKOUT E1000_HSMC0R_CLKOUT | ||
| 1920 | |||
| 1921 | /* FW Status Register */ | ||
| 1922 | #define E1000_FWSTS_FWS_MASK 0x000000FF /* FW Status */ | ||
| 1923 | |||
| 1466 | /* Wake Up Packet Length */ | 1924 | /* Wake Up Packet Length */ |
| 1467 | #define E1000_WUPL_LENGTH_MASK 0x0FFF /* Only the lower 12 bits are valid */ | 1925 | #define E1000_WUPL_LENGTH_MASK 0x0FFF /* Only the lower 12 bits are valid */ |
| 1468 | 1926 | ||
| 1469 | #define E1000_MDALIGN 4096 | 1927 | #define E1000_MDALIGN 4096 |
| 1470 | 1928 | ||
| 1929 | #define E1000_GCR_BEM32 0x00400000 | ||
| 1930 | /* Function Active and Power State to MNG */ | ||
| 1931 | #define E1000_FACTPS_FUNC0_POWER_STATE_MASK 0x00000003 | ||
| 1932 | #define E1000_FACTPS_LAN0_VALID 0x00000004 | ||
| 1933 | #define E1000_FACTPS_FUNC0_AUX_EN 0x00000008 | ||
| 1934 | #define E1000_FACTPS_FUNC1_POWER_STATE_MASK 0x000000C0 | ||
| 1935 | #define E1000_FACTPS_FUNC1_POWER_STATE_SHIFT 6 | ||
| 1936 | #define E1000_FACTPS_LAN1_VALID 0x00000100 | ||
| 1937 | #define E1000_FACTPS_FUNC1_AUX_EN 0x00000200 | ||
| 1938 | #define E1000_FACTPS_FUNC2_POWER_STATE_MASK 0x00003000 | ||
| 1939 | #define E1000_FACTPS_FUNC2_POWER_STATE_SHIFT 12 | ||
| 1940 | #define E1000_FACTPS_IDE_ENABLE 0x00004000 | ||
| 1941 | #define E1000_FACTPS_FUNC2_AUX_EN 0x00008000 | ||
| 1942 | #define E1000_FACTPS_FUNC3_POWER_STATE_MASK 0x000C0000 | ||
| 1943 | #define E1000_FACTPS_FUNC3_POWER_STATE_SHIFT 18 | ||
| 1944 | #define E1000_FACTPS_SP_ENABLE 0x00100000 | ||
| 1945 | #define E1000_FACTPS_FUNC3_AUX_EN 0x00200000 | ||
| 1946 | #define E1000_FACTPS_FUNC4_POWER_STATE_MASK 0x03000000 | ||
| 1947 | #define E1000_FACTPS_FUNC4_POWER_STATE_SHIFT 24 | ||
| 1948 | #define E1000_FACTPS_IPMI_ENABLE 0x04000000 | ||
| 1949 | #define E1000_FACTPS_FUNC4_AUX_EN 0x08000000 | ||
| 1950 | #define E1000_FACTPS_MNGCG 0x20000000 | ||
| 1951 | #define E1000_FACTPS_LAN_FUNC_SEL 0x40000000 | ||
| 1952 | #define E1000_FACTPS_PM_STATE_CHANGED 0x80000000 | ||
| 1953 | |||
| 1471 | /* EEPROM Commands - Microwire */ | 1954 | /* EEPROM Commands - Microwire */ |
| 1472 | #define EEPROM_READ_OPCODE_MICROWIRE 0x6 /* EEPROM read opcode */ | 1955 | #define EEPROM_READ_OPCODE_MICROWIRE 0x6 /* EEPROM read opcode */ |
| 1473 | #define EEPROM_WRITE_OPCODE_MICROWIRE 0x5 /* EEPROM write opcode */ | 1956 | #define EEPROM_WRITE_OPCODE_MICROWIRE 0x5 /* EEPROM write opcode */ |
| @@ -1477,22 +1960,20 @@ struct e1000_hw { | |||
| 1477 | 1960 | ||
| 1478 | /* EEPROM Commands - SPI */ | 1961 | /* EEPROM Commands - SPI */ |
| 1479 | #define EEPROM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */ | 1962 | #define EEPROM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */ |
| 1480 | #define EEPROM_READ_OPCODE_SPI 0x3 /* EEPROM read opcode */ | 1963 | #define EEPROM_READ_OPCODE_SPI 0x03 /* EEPROM read opcode */ |
| 1481 | #define EEPROM_WRITE_OPCODE_SPI 0x2 /* EEPROM write opcode */ | 1964 | #define EEPROM_WRITE_OPCODE_SPI 0x02 /* EEPROM write opcode */ |
| 1482 | #define EEPROM_A8_OPCODE_SPI 0x8 /* opcode bit-3 = address bit-8 */ | 1965 | #define EEPROM_A8_OPCODE_SPI 0x08 /* opcode bit-3 = address bit-8 */ |
| 1483 | #define EEPROM_WREN_OPCODE_SPI 0x6 /* EEPROM set Write Enable latch */ | 1966 | #define EEPROM_WREN_OPCODE_SPI 0x06 /* EEPROM set Write Enable latch */ |
| 1484 | #define EEPROM_WRDI_OPCODE_SPI 0x4 /* EEPROM reset Write Enable latch */ | 1967 | #define EEPROM_WRDI_OPCODE_SPI 0x04 /* EEPROM reset Write Enable latch */ |
| 1485 | #define EEPROM_RDSR_OPCODE_SPI 0x5 /* EEPROM read Status register */ | 1968 | #define EEPROM_RDSR_OPCODE_SPI 0x05 /* EEPROM read Status register */ |
| 1486 | #define EEPROM_WRSR_OPCODE_SPI 0x1 /* EEPROM write Status register */ | 1969 | #define EEPROM_WRSR_OPCODE_SPI 0x01 /* EEPROM write Status register */ |
| 1970 | #define EEPROM_ERASE4K_OPCODE_SPI 0x20 /* EEPROM ERASE 4KB */ | ||
| 1971 | #define EEPROM_ERASE64K_OPCODE_SPI 0xD8 /* EEPROM ERASE 64KB */ | ||
| 1972 | #define EEPROM_ERASE256_OPCODE_SPI 0xDB /* EEPROM ERASE 256B */ | ||
| 1487 | 1973 | ||
| 1488 | /* EEPROM Size definitions */ | 1974 | /* EEPROM Size definitions */ |
| 1489 | #define EEPROM_SIZE_16KB 0x1800 | 1975 | #define EEPROM_WORD_SIZE_SHIFT 6 |
| 1490 | #define EEPROM_SIZE_8KB 0x1400 | 1976 | #define EEPROM_SIZE_SHIFT 10 |
| 1491 | #define EEPROM_SIZE_4KB 0x1000 | ||
| 1492 | #define EEPROM_SIZE_2KB 0x0C00 | ||
| 1493 | #define EEPROM_SIZE_1KB 0x0800 | ||
| 1494 | #define EEPROM_SIZE_512B 0x0400 | ||
| 1495 | #define EEPROM_SIZE_128B 0x0000 | ||
| 1496 | #define EEPROM_SIZE_MASK 0x1C00 | 1977 | #define EEPROM_SIZE_MASK 0x1C00 |
| 1497 | 1978 | ||
| 1498 | /* EEPROM Word Offsets */ | 1979 | /* EEPROM Word Offsets */ |
| @@ -1606,7 +2087,22 @@ struct e1000_hw { | |||
| 1606 | #define IFS_MIN 40 | 2087 | #define IFS_MIN 40 |
| 1607 | #define IFS_RATIO 4 | 2088 | #define IFS_RATIO 4 |
| 1608 | 2089 | ||
| 2090 | /* Extended Configuration Control and Size */ | ||
| 2091 | #define E1000_EXTCNF_CTRL_PCIE_WRITE_ENABLE 0x00000001 | ||
| 2092 | #define E1000_EXTCNF_CTRL_PHY_WRITE_ENABLE 0x00000002 | ||
| 2093 | #define E1000_EXTCNF_CTRL_D_UD_ENABLE 0x00000004 | ||
| 2094 | #define E1000_EXTCNF_CTRL_D_UD_LATENCY 0x00000008 | ||
| 2095 | #define E1000_EXTCNF_CTRL_D_UD_OWNER 0x00000010 | ||
| 2096 | #define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020 | ||
| 2097 | #define E1000_EXTCNF_CTRL_MDIO_HW_OWNERSHIP 0x00000040 | ||
| 2098 | #define E1000_EXTCNF_CTRL_EXT_CNF_POINTER 0x1FFF0000 | ||
| 2099 | |||
| 2100 | #define E1000_EXTCNF_SIZE_EXT_PHY_LENGTH 0x000000FF | ||
| 2101 | #define E1000_EXTCNF_SIZE_EXT_DOCK_LENGTH 0x0000FF00 | ||
| 2102 | #define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH 0x00FF0000 | ||
| 2103 | |||
| 1609 | /* PBA constants */ | 2104 | /* PBA constants */ |
| 2105 | #define E1000_PBA_12K 0x000C /* 12KB, default Rx allocation */ | ||
| 1610 | #define E1000_PBA_16K 0x0010 /* 16KB, default TX allocation */ | 2106 | #define E1000_PBA_16K 0x0010 /* 16KB, default TX allocation */ |
| 1611 | #define E1000_PBA_22K 0x0016 | 2107 | #define E1000_PBA_22K 0x0016 |
| 1612 | #define E1000_PBA_24K 0x0018 | 2108 | #define E1000_PBA_24K 0x0018 |
| @@ -1663,6 +2159,13 @@ struct e1000_hw { | |||
| 1663 | /* Number of milliseconds we wait for auto-negotiation to complete */ | 2159 | /* Number of milliseconds we wait for auto-negotiation to complete */ |
| 1664 | #define LINK_UP_TIMEOUT 500 | 2160 | #define LINK_UP_TIMEOUT 500 |
| 1665 | 2161 | ||
| 2162 | /* Number of 100 microseconds we wait for PCI Express master disable */ | ||
| 2163 | #define MASTER_DISABLE_TIMEOUT 800 | ||
| 2164 | /* Number of milliseconds we wait for Eeprom auto read bit done after MAC reset */ | ||
| 2165 | #define AUTO_READ_DONE_TIMEOUT 10 | ||
| 2166 | /* Number of milliseconds we wait for PHY configuration done after MAC reset */ | ||
| 2167 | #define PHY_CFG_TIMEOUT 40 | ||
| 2168 | |||
| 1666 | #define E1000_TX_BUFFER_SIZE ((uint32_t)1514) | 2169 | #define E1000_TX_BUFFER_SIZE ((uint32_t)1514) |
| 1667 | 2170 | ||
| 1668 | /* The carrier extension symbol, as received by the NIC. */ | 2171 | /* The carrier extension symbol, as received by the NIC. */ |
| @@ -1763,6 +2266,7 @@ struct e1000_hw { | |||
| 1763 | #define IGP01E1000_PHY_LINK_HEALTH 0x13 /* PHY Link Health Register */ | 2266 | #define IGP01E1000_PHY_LINK_HEALTH 0x13 /* PHY Link Health Register */ |
| 1764 | #define IGP01E1000_GMII_FIFO 0x14 /* GMII FIFO Register */ | 2267 | #define IGP01E1000_GMII_FIFO 0x14 /* GMII FIFO Register */ |
| 1765 | #define IGP01E1000_PHY_CHANNEL_QUALITY 0x15 /* PHY Channel Quality Register */ | 2268 | #define IGP01E1000_PHY_CHANNEL_QUALITY 0x15 /* PHY Channel Quality Register */ |
| 2269 | #define IGP02E1000_PHY_POWER_MGMT 0x19 | ||
| 1766 | #define IGP01E1000_PHY_PAGE_SELECT 0x1F /* PHY Page Select Core Register */ | 2270 | #define IGP01E1000_PHY_PAGE_SELECT 0x1F /* PHY Page Select Core Register */ |
| 1767 | 2271 | ||
| 1768 | /* IGP01E1000 AGC Registers - stores the cable length values*/ | 2272 | /* IGP01E1000 AGC Registers - stores the cable length values*/ |
| @@ -1771,12 +2275,20 @@ struct e1000_hw { | |||
| 1771 | #define IGP01E1000_PHY_AGC_C 0x1472 | 2275 | #define IGP01E1000_PHY_AGC_C 0x1472 |
| 1772 | #define IGP01E1000_PHY_AGC_D 0x1872 | 2276 | #define IGP01E1000_PHY_AGC_D 0x1872 |
| 1773 | 2277 | ||
| 2278 | /* IGP02E1000 AGC Registers for cable length values */ | ||
| 2279 | #define IGP02E1000_PHY_AGC_A 0x11B1 | ||
| 2280 | #define IGP02E1000_PHY_AGC_B 0x12B1 | ||
| 2281 | #define IGP02E1000_PHY_AGC_C 0x14B1 | ||
| 2282 | #define IGP02E1000_PHY_AGC_D 0x18B1 | ||
| 2283 | |||
| 1774 | /* IGP01E1000 DSP Reset Register */ | 2284 | /* IGP01E1000 DSP Reset Register */ |
| 1775 | #define IGP01E1000_PHY_DSP_RESET 0x1F33 | 2285 | #define IGP01E1000_PHY_DSP_RESET 0x1F33 |
| 1776 | #define IGP01E1000_PHY_DSP_SET 0x1F71 | 2286 | #define IGP01E1000_PHY_DSP_SET 0x1F71 |
| 1777 | #define IGP01E1000_PHY_DSP_FFE 0x1F35 | 2287 | #define IGP01E1000_PHY_DSP_FFE 0x1F35 |
| 1778 | 2288 | ||
| 1779 | #define IGP01E1000_PHY_CHANNEL_NUM 4 | 2289 | #define IGP01E1000_PHY_CHANNEL_NUM 4 |
| 2290 | #define IGP02E1000_PHY_CHANNEL_NUM 4 | ||
| 2291 | |||
| 1780 | #define IGP01E1000_PHY_AGC_PARAM_A 0x1171 | 2292 | #define IGP01E1000_PHY_AGC_PARAM_A 0x1171 |
| 1781 | #define IGP01E1000_PHY_AGC_PARAM_B 0x1271 | 2293 | #define IGP01E1000_PHY_AGC_PARAM_B 0x1271 |
| 1782 | #define IGP01E1000_PHY_AGC_PARAM_C 0x1471 | 2294 | #define IGP01E1000_PHY_AGC_PARAM_C 0x1471 |
| @@ -2060,20 +2572,30 @@ struct e1000_hw { | |||
| 2060 | #define IGP01E1000_MSE_CHANNEL_B 0x0F00 | 2572 | #define IGP01E1000_MSE_CHANNEL_B 0x0F00 |
| 2061 | #define IGP01E1000_MSE_CHANNEL_A 0xF000 | 2573 | #define IGP01E1000_MSE_CHANNEL_A 0xF000 |
| 2062 | 2574 | ||
| 2575 | #define IGP02E1000_PM_SPD 0x0001 /* Smart Power Down */ | ||
| 2576 | #define IGP02E1000_PM_D3_LPLU 0x0004 /* Enable LPLU in non-D0a modes */ | ||
| 2577 | #define IGP02E1000_PM_D0_LPLU 0x0002 /* Enable LPLU in D0a mode */ | ||
| 2578 | |||
| 2063 | /* IGP01E1000 DSP reset macros */ | 2579 | /* IGP01E1000 DSP reset macros */ |
| 2064 | #define DSP_RESET_ENABLE 0x0 | 2580 | #define DSP_RESET_ENABLE 0x0 |
| 2065 | #define DSP_RESET_DISABLE 0x2 | 2581 | #define DSP_RESET_DISABLE 0x2 |
| 2066 | #define E1000_MAX_DSP_RESETS 10 | 2582 | #define E1000_MAX_DSP_RESETS 10 |
| 2067 | 2583 | ||
| 2068 | /* IGP01E1000 AGC Registers */ | 2584 | /* IGP01E1000 & IGP02E1000 AGC Registers */ |
| 2069 | 2585 | ||
| 2070 | #define IGP01E1000_AGC_LENGTH_SHIFT 7 /* Coarse - 13:11, Fine - 10:7 */ | 2586 | #define IGP01E1000_AGC_LENGTH_SHIFT 7 /* Coarse - 13:11, Fine - 10:7 */ |
| 2587 | #define IGP02E1000_AGC_LENGTH_SHIFT 9 /* Coarse - 15:13, Fine - 12:9 */ | ||
| 2588 | |||
| 2589 | /* IGP02E1000 AGC Register Length 9-bit mask */ | ||
| 2590 | #define IGP02E1000_AGC_LENGTH_MASK 0x7F | ||
| 2071 | 2591 | ||
| 2072 | /* 7 bits (3 Coarse + 4 Fine) --> 128 optional values */ | 2592 | /* 7 bits (3 Coarse + 4 Fine) --> 128 optional values */ |
| 2073 | #define IGP01E1000_AGC_LENGTH_TABLE_SIZE 128 | 2593 | #define IGP01E1000_AGC_LENGTH_TABLE_SIZE 128 |
| 2594 | #define IGP02E1000_AGC_LENGTH_TABLE_SIZE 128 | ||
| 2074 | 2595 | ||
| 2075 | /* The precision of the length is +/- 10 meters */ | 2596 | /* The precision error of the cable length is +/- 10 meters */ |
| 2076 | #define IGP01E1000_AGC_RANGE 10 | 2597 | #define IGP01E1000_AGC_RANGE 10 |
| 2598 | #define IGP02E1000_AGC_RANGE 10 | ||
| 2077 | 2599 | ||
| 2078 | /* IGP01E1000 PCS Initialization register */ | 2600 | /* IGP01E1000 PCS Initialization register */ |
| 2079 | /* bits 3:6 in the PCS registers stores the channels polarity */ | 2601 | /* bits 3:6 in the PCS registers stores the channels polarity */ |
| @@ -2113,6 +2635,8 @@ struct e1000_hw { | |||
| 2113 | #define M88E1000_12_PHY_ID M88E1000_E_PHY_ID | 2635 | #define M88E1000_12_PHY_ID M88E1000_E_PHY_ID |
| 2114 | #define M88E1000_14_PHY_ID M88E1000_E_PHY_ID | 2636 | #define M88E1000_14_PHY_ID M88E1000_E_PHY_ID |
| 2115 | #define M88E1011_I_REV_4 0x04 | 2637 | #define M88E1011_I_REV_4 0x04 |
| 2638 | #define M88E1111_I_PHY_ID 0x01410CC0 | ||
| 2639 | #define L1LXT971A_PHY_ID 0x001378E0 | ||
| 2116 | 2640 | ||
| 2117 | /* Miscellaneous PHY bit definitions. */ | 2641 | /* Miscellaneous PHY bit definitions. */ |
| 2118 | #define PHY_PREAMBLE 0xFFFFFFFF | 2642 | #define PHY_PREAMBLE 0xFFFFFFFF |
