1 /******************************************************************************* 2 3 Copyright (c) 2001-2007, Intel Corporation 4 All rights reserved. 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions are met: 8 9 1. Redistributions of source code must retain the above copyright notice, 10 this list of conditions and the following disclaimer. 11 12 2. Redistributions in binary form must reproduce the above copyright 13 notice, this list of conditions and the following disclaimer in the 14 documentation and/or other materials provided with the distribution. 15 16 3. Neither the name of the Intel Corporation nor the names of its 17 contributors may be used to endorse or promote products derived from 18 this software without specific prior written permission. 19 20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32 *******************************************************************************/ 33 /* $FreeBSD$ */ 34 35 36 #include "ixgbe_api.h" 37 #include "ixgbe_common.h" 38 39 extern s32 ixgbe_init_shared_code_82598(struct ixgbe_hw *hw); 40 extern s32 ixgbe_init_shared_code_phy(struct ixgbe_hw *hw); 41 42 /** 43 * ixgbe_init_shared_code - Initialize the shared code 44 * @hw: pointer to hardware structure 45 * 46 * This will assign function pointers and assign the MAC type and PHY code. 47 * Does not touch the hardware. This function must be called prior to any 48 * other function in the shared code. The ixgbe_hw structure should be 49 * memset to 0 prior to calling this function. The following fields in 50 * hw structure should be filled in prior to calling this function: 51 * hw_addr, back, device_id, vendor_id, subsystem_device_id, 52 * subsystem_vendor_id, and revision_id 53 **/ 54 s32 ixgbe_init_shared_code(struct ixgbe_hw *hw) 55 { 56 s32 status; 57 58 /* 59 * Assign generic function pointers before entering adapter-specific 60 * init 61 */ 62 ixgbe_assign_func_pointers_generic(hw); 63 64 /* 65 * Set the mac type 66 */ 67 ixgbe_set_mac_type(hw); 68 69 switch (hw->mac.type) { 70 case ixgbe_mac_82598EB: 71 status = ixgbe_init_shared_code_82598(hw); 72 status = ixgbe_init_shared_code_phy(hw); 73 break; 74 default: 75 status = IXGBE_ERR_DEVICE_NOT_SUPPORTED; 76 break; 77 } 78 79 return status; 80 } 81 82 /** 83 * ixgbe_set_mac_type - Sets MAC type 84 * @hw: pointer to the HW structure 85 * 86 * This function sets the mac type of the adapter based on the 87 * vendor ID and device ID stored in the hw structure. 88 **/ 89 s32 ixgbe_set_mac_type(struct ixgbe_hw *hw) 90 { 91 s32 ret_val = IXGBE_SUCCESS; 92 93 DEBUGFUNC("ixgbe_set_mac_type"); 94 95 if (hw->vendor_id == IXGBE_INTEL_VENDOR_ID) { 96 switch (hw->device_id) { 97 case IXGBE_DEV_ID_82598AF_SINGLE_PORT: 98 case IXGBE_DEV_ID_82598AF_DUAL_PORT: 99 case IXGBE_DEV_ID_82598EB_CX4: 100 hw->mac.type = ixgbe_mac_82598EB; 101 break; 102 default: 103 ret_val = IXGBE_ERR_DEVICE_NOT_SUPPORTED; 104 break; 105 } 106 } else { 107 ret_val = IXGBE_ERR_DEVICE_NOT_SUPPORTED; 108 } 109 110 return ret_val; 111 } 112 113 /** 114 * ixgbe_init_hw - Initialize the hardware 115 * @hw: pointer to hardware structure 116 * 117 * Initialize the hardware by resetting and then starting the hardware 118 **/ 119 s32 ixgbe_init_hw(struct ixgbe_hw *hw) 120 { 121 return ixgbe_call_func(hw, ixgbe_func_init_hw, (hw), 122 IXGBE_NOT_IMPLEMENTED); 123 } 124 125 /** 126 * ixgbe_reset_hw - Performs a hardware reset 127 * @hw: pointer to hardware structure 128 * 129 * Resets the hardware by resetting the transmit and receive units, masks and 130 * clears all interrupts, performs a PHY reset, and performs a MAC reset 131 **/ 132 s32 ixgbe_reset_hw(struct ixgbe_hw *hw) 133 { 134 return ixgbe_call_func(hw, ixgbe_func_reset_hw, (hw), 135 IXGBE_NOT_IMPLEMENTED); 136 } 137 138 /** 139 * ixgbe_start_hw - Prepares hardware for TX/TX 140 * @hw: pointer to hardware structure 141 * 142 * Starts the hardware by filling the bus info structure and media type, 143 * clears all on chip counters, initializes receive address registers, 144 * multicast table, VLAN filter table, calls routine to setup link and 145 * flow control settings, and leaves transmit and receive units disabled 146 * and uninitialized. 147 **/ 148 s32 ixgbe_start_hw(struct ixgbe_hw *hw) 149 { 150 return ixgbe_call_func(hw, ixgbe_func_start_hw, (hw), 151 IXGBE_NOT_IMPLEMENTED); 152 } 153 154 /** 155 * ixgbe_clear_hw_cntrs - Clear hardware counters 156 * @hw: pointer to hardware structure 157 * 158 * Clears all hardware statistics counters by reading them from the hardware 159 * Statistics counters are clear on read. 160 **/ 161 s32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw) 162 { 163 return ixgbe_call_func(hw, ixgbe_func_clear_hw_cntrs, (hw), 164 IXGBE_NOT_IMPLEMENTED); 165 } 166 167 /** 168 * ixgbe_get_media_type - Get media type 169 * @hw: pointer to hardware structure 170 * 171 * Returns the media type (fiber, copper, backplane) 172 **/ 173 enum ixgbe_media_type ixgbe_get_media_type(struct ixgbe_hw *hw) 174 { 175 return ixgbe_call_func(hw, ixgbe_func_get_media_type, (hw), 176 ixgbe_media_type_unknown); 177 } 178 179 /** 180 * ixgbe_get_mac_addr - Get MAC address 181 * @hw: pointer to hardware structure 182 * @mac_addr: Adapter MAC address 183 * 184 * Reads the adapter's MAC address from the first Receive Address Register 185 * (RAR0) A reset of the adapter must have been performed prior to calling this 186 * function in order for the MAC address to have been loaded from the EEPROM 187 * into RAR0 188 **/ 189 s32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr) 190 { 191 return ixgbe_call_func(hw, ixgbe_func_get_mac_addr, 192 (hw, mac_addr), IXGBE_NOT_IMPLEMENTED); 193 } 194 195 /** 196 * ixgbe_get_bus_info - Set PCI bus info 197 * @hw: pointer to hardware structure 198 * 199 * Sets the PCI bus info (speed, width, type) within the ixgbe_hw structure 200 **/ 201 s32 ixgbe_get_bus_info(struct ixgbe_hw *hw) 202 { 203 return ixgbe_call_func(hw, ixgbe_func_get_bus_info, (hw), 204 IXGBE_NOT_IMPLEMENTED); 205 } 206 207 /** 208 * ixgbe_get_num_of_tx_queues - Get TX queues 209 * @hw: pointer to hardware structure 210 * 211 * Returns the number of transmit queues for the given adapter. 212 **/ 213 u32 ixgbe_get_num_of_tx_queues(struct ixgbe_hw *hw) 214 { 215 return ixgbe_call_func(hw, ixgbe_func_get_num_of_tx_queues, 216 (hw), 0); 217 } 218 219 /** 220 * ixgbe_get_num_of_rx_queues - Get RX queues 221 * @hw: pointer to hardware structure 222 * 223 * Returns the number of receive queues for the given adapter. 224 **/ 225 u32 ixgbe_get_num_of_rx_queues(struct ixgbe_hw *hw) 226 { 227 return ixgbe_call_func(hw, ixgbe_func_get_num_of_rx_queues, 228 (hw), 0); 229 } 230 231 /** 232 * ixgbe_stop_adapter - Disable TX/TX units 233 * @hw: pointer to hardware structure 234 * 235 * Sets the adapter_stopped flag within ixgbe_hw struct. Clears interrupts, 236 * disables transmit and receive units. The adapter_stopped flag is used by 237 * the shared code and drivers to determine if the adapter is in a stopped 238 * state and should not touch the hardware. 239 **/ 240 s32 ixgbe_stop_adapter(struct ixgbe_hw *hw) 241 { 242 return ixgbe_call_func(hw, ixgbe_func_stop_adapter, (hw), 243 IXGBE_NOT_IMPLEMENTED); 244 } 245 246 /** 247 * ixgbe_identify_phy - Get PHY type 248 * @hw: pointer to hardware structure 249 * 250 * Determines the physical layer module found on the current adapter. 251 **/ 252 s32 ixgbe_identify_phy(struct ixgbe_hw *hw) 253 { 254 s32 status = IXGBE_SUCCESS; 255 256 if (hw->phy.type == ixgbe_phy_unknown) { 257 status = ixgbe_call_func(hw, 258 ixgbe_func_identify_phy, 259 (hw), 260 IXGBE_NOT_IMPLEMENTED); 261 } 262 263 return status; 264 } 265 266 /** 267 * ixgbe_reset_phy - Perform a PHY reset 268 * @hw: pointer to hardware structure 269 **/ 270 s32 ixgbe_reset_phy(struct ixgbe_hw *hw) 271 { 272 s32 status = IXGBE_SUCCESS; 273 274 if (hw->phy.type == ixgbe_phy_unknown) { 275 if (ixgbe_identify_phy(hw) != IXGBE_SUCCESS) { 276 status = IXGBE_ERR_PHY; 277 } 278 } 279 280 if (status == IXGBE_SUCCESS) { 281 status = ixgbe_call_func(hw, 282 ixgbe_func_reset_phy, 283 (hw), 284 IXGBE_NOT_IMPLEMENTED); 285 } 286 return status; 287 } 288 289 /** 290 * ixgbe_read_phy_reg - Read PHY register 291 * @hw: pointer to hardware structure 292 * @reg_addr: 32 bit address of PHY register to read 293 * @phy_data: Pointer to read data from PHY register 294 * 295 * Reads a value from a specified PHY register 296 **/ 297 s32 ixgbe_read_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 298 u16 *phy_data) 299 { 300 s32 status = IXGBE_SUCCESS; 301 302 if (hw->phy.type == ixgbe_phy_unknown) { 303 if (ixgbe_identify_phy(hw) != IXGBE_SUCCESS) { 304 status = IXGBE_ERR_PHY; 305 } 306 } 307 308 if (status == IXGBE_SUCCESS) { 309 status = ixgbe_call_func(hw, 310 ixgbe_func_read_phy_reg, 311 (hw, reg_addr, device_type, phy_data), 312 IXGBE_NOT_IMPLEMENTED); 313 } 314 return status; 315 } 316 317 /** 318 * ixgbe_write_phy_reg - Write PHY register 319 * @hw: pointer to hardware structure 320 * @reg_addr: 32 bit PHY register to write 321 * @phy_data: Data to write to the PHY register 322 * 323 * Writes a value to specified PHY register 324 **/ 325 s32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 326 u16 phy_data) 327 { 328 s32 status = IXGBE_SUCCESS; 329 330 if (hw->phy.type == ixgbe_phy_unknown) { 331 if (ixgbe_identify_phy(hw) != IXGBE_SUCCESS) { 332 status = IXGBE_ERR_PHY; 333 } 334 } 335 336 if (status == IXGBE_SUCCESS) { 337 status = ixgbe_call_func(hw, 338 ixgbe_func_write_phy_reg, 339 (hw, reg_addr, device_type, phy_data), 340 IXGBE_NOT_IMPLEMENTED); 341 } 342 return status; 343 } 344 345 /** 346 * ixgbe_setup_link - Configure link settings 347 * @hw: pointer to hardware structure 348 * 349 * Configures link settings based on values in the ixgbe_hw struct. 350 * Restarts the link. Performs autonegotiation if needed. 351 **/ 352 s32 ixgbe_setup_link(struct ixgbe_hw *hw) 353 { 354 return ixgbe_call_func(hw, ixgbe_func_setup_link, (hw), 355 IXGBE_NOT_IMPLEMENTED); 356 } 357 358 /** 359 * ixgbe_check_link - Get link and speed status 360 * @hw: pointer to hardware structure 361 * 362 * Reads the links register to determine if link is up and the current speed 363 **/ 364 s32 ixgbe_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 365 bool *link_up) 366 { 367 return ixgbe_call_func(hw, ixgbe_func_check_link, (hw, speed, link_up), 368 IXGBE_NOT_IMPLEMENTED); 369 } 370 371 /** 372 * ixgbe_setup_link_speed - Set link speed 373 * @hw: pointer to hardware structure 374 * @speed: new link speed 375 * @autoneg: TRUE if autonegotiation enabled 376 * 377 * Set the link speed and restarts the link. 378 **/ 379 s32 ixgbe_setup_link_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed, 380 bool autoneg, 381 bool autoneg_wait_to_complete) 382 { 383 return ixgbe_call_func(hw, ixgbe_func_setup_link_speed, (hw, speed, 384 autoneg, autoneg_wait_to_complete), 385 IXGBE_NOT_IMPLEMENTED); 386 } 387 388 /** 389 * ixgbe_get_link_settings - Set link settings to default 390 * @hw: pointer to hardware structure 391 * 392 * Sets the default link settings based on attach type in the hw struct. 393 **/ 394 s32 ixgbe_get_link_settings(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 395 bool *autoneg) 396 { 397 return ixgbe_call_func(hw, ixgbe_func_get_link_settings, (hw, speed, 398 autoneg), IXGBE_NOT_IMPLEMENTED); 399 } 400 401 /** 402 * ixgbe_led_on - Turn on LED's 403 * @hw: pointer to hardware structure 404 * @index: led number to turn on 405 * 406 * Turns on the software controllable LEDs. 407 **/ 408 s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index) 409 { 410 return ixgbe_call_func(hw, ixgbe_func_led_on, (hw, index), 411 IXGBE_NOT_IMPLEMENTED); 412 } 413 414 /** 415 * ixgbe_led_off - Turn off LED's 416 * @hw: pointer to hardware structure 417 * @index: led number to turn off 418 * 419 * Turns off the software controllable LEDs. 420 **/ 421 s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index) 422 { 423 return ixgbe_call_func(hw, ixgbe_func_led_off, (hw, index), 424 IXGBE_NOT_IMPLEMENTED); 425 } 426 427 /** 428 * ixgbe_blink_led_start - Blink LED's 429 * @hw: pointer to hardware structure 430 * @index: led number to blink 431 * 432 * Blink LED based on index. 433 **/ 434 s32 ixgbe_blink_led_start(struct ixgbe_hw *hw, u32 index) 435 { 436 return ixgbe_call_func(hw, ixgbe_func_blink_led_start, (hw, index), 437 IXGBE_NOT_IMPLEMENTED); 438 } 439 440 /** 441 * ixgbe_blink_led_stop - Stop blinking LED's 442 * @hw: pointer to hardware structure 443 * 444 * Stop blinking LED based on index. 445 **/ 446 s32 ixgbe_blink_led_stop(struct ixgbe_hw *hw, u32 index) 447 { 448 return ixgbe_call_func(hw, ixgbe_func_blink_led_stop, (hw, index), 449 IXGBE_NOT_IMPLEMENTED); 450 } 451 452 /** 453 * ixgbe_init_eeprom_params - Initialiaze EEPROM parameters 454 * @hw: pointer to hardware structure 455 * 456 * Initializes the EEPROM parameters ixgbe_eeprom_info within the 457 * ixgbe_hw struct in order to set up EEPROM access. 458 **/ 459 s32 ixgbe_init_eeprom_params(struct ixgbe_hw *hw) 460 { 461 return ixgbe_call_func(hw, ixgbe_func_init_eeprom_params, (hw), 462 IXGBE_NOT_IMPLEMENTED); 463 } 464 465 466 /** 467 * ixgbe_write_eeprom - Write word to EEPROM 468 * @hw: pointer to hardware structure 469 * @offset: offset within the EEPROM to be written to 470 * @data: 16 bit word to be written to the EEPROM 471 * 472 * Writes 16 bit value to EEPROM. If ixgbe_eeprom_update_checksum is not 473 * called after this function, the EEPROM will most likely contain an 474 * invalid checksum. 475 **/ 476 s32 ixgbe_write_eeprom(struct ixgbe_hw *hw, u16 offset, u16 data) 477 { 478 s32 status; 479 480 /* 481 * Initialize EEPROM parameters. This will not do anything if the 482 * EEPROM structure has already been initialized 483 */ 484 ixgbe_init_eeprom_params(hw); 485 486 /* Check for invalid offset */ 487 if (offset >= hw->eeprom.word_size) { 488 status = IXGBE_ERR_EEPROM; 489 } else { 490 status = ixgbe_call_func(hw, 491 ixgbe_func_write_eeprom, 492 (hw, offset, data), 493 IXGBE_NOT_IMPLEMENTED); 494 } 495 496 return status; 497 } 498 499 /** 500 * ixgbe_read_eeprom - Read word from EEPROM 501 * @hw: pointer to hardware structure 502 * @offset: offset within the EEPROM to be read 503 * @data: read 16 bit value from EEPROM 504 * 505 * Reads 16 bit value from EEPROM 506 **/ 507 s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data) 508 { 509 s32 status; 510 511 /* 512 * Initialize EEPROM parameters. This will not do anything if the 513 * EEPROM structure has already been initialized 514 */ 515 ixgbe_init_eeprom_params(hw); 516 517 /* Check for invalid offset */ 518 if (offset >= hw->eeprom.word_size) { 519 status = IXGBE_ERR_EEPROM; 520 } else { 521 status = ixgbe_call_func(hw, 522 ixgbe_func_read_eeprom, 523 (hw, offset, data), 524 IXGBE_NOT_IMPLEMENTED); 525 } 526 527 return status; 528 } 529 530 /** 531 * ixgbe_validate_eeprom_checksum - Validate EEPROM checksum 532 * @hw: pointer to hardware structure 533 * @checksum_val: calculated checksum 534 * 535 * Performs checksum calculation and validates the EEPROM checksum 536 **/ 537 s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val) 538 { 539 return ixgbe_call_func(hw, ixgbe_func_validate_eeprom_checksum, 540 (hw, checksum_val), IXGBE_NOT_IMPLEMENTED); 541 } 542 543 /** 544 * ixgbe_eeprom_update_checksum - Updates the EEPROM checksum 545 * @hw: pointer to hardware structure 546 **/ 547 s32 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw) 548 { 549 return ixgbe_call_func(hw, ixgbe_func_update_eeprom_checksum, (hw), 550 IXGBE_NOT_IMPLEMENTED); 551 } 552 553 /** 554 * ixgbe_set_rar - Set RX address register 555 * @hw: pointer to hardware structure 556 * @addr: Address to put into receive address register 557 * @index: Receive address register to write 558 * @vind: Vind to set RAR to 559 * @enable_addr: set flag that address is active 560 * 561 * Puts an ethernet address into a receive address register. 562 **/ 563 s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vind, 564 u32 enable_addr) 565 { 566 return ixgbe_call_func(hw, ixgbe_func_set_rar, (hw, index, addr, vind, 567 enable_addr), IXGBE_NOT_IMPLEMENTED); 568 } 569 570 /** 571 * ixgbe_init_rx_addrs - Initializes receive address filters. 572 * @hw: pointer to hardware structure 573 * 574 * Places the MAC address in receive address register 0 and clears the rest 575 * of the receive addresss registers. Clears the multicast table. Assumes 576 * the receiver is in reset when the routine is called. 577 **/ 578 s32 ixgbe_init_rx_addrs(struct ixgbe_hw *hw) 579 { 580 return ixgbe_call_func(hw, ixgbe_func_init_rx_addrs, (hw), 581 IXGBE_NOT_IMPLEMENTED); 582 } 583 584 /** 585 * ixgbe_get_num_rx_addrs - Returns the number of RAR entries. 586 * @hw: pointer to hardware structure 587 **/ 588 u32 ixgbe_get_num_rx_addrs(struct ixgbe_hw *hw) 589 { 590 return ixgbe_call_func(hw, ixgbe_func_get_num_rx_addrs, (hw), 0); 591 } 592 593 /** 594 * ixgbe_update_mc_addr_list - Updates the MAC's list of multicast addresses 595 * @hw: pointer to hardware structure 596 * @mc_addr_list: the list of new multicast addresses 597 * @mc_addr_count: number of addresses 598 * @pad: number of bytes between addresses in the list 599 * 600 * The given list replaces any existing list. Clears the MC addrs from receive 601 * address registers and the multicast table. Uses unsed receive address 602 * registers for the first multicast addresses, and hashes the rest into the 603 * multicast table. 604 **/ 605 s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list, 606 u32 mc_addr_count, u32 pad) 607 { 608 return ixgbe_call_func(hw, ixgbe_func_update_mc_addr_list, (hw, 609 mc_addr_list, mc_addr_count, pad), 610 IXGBE_NOT_IMPLEMENTED); 611 } 612 613 /** 614 * ixgbe_enable_mc - Enable multicast address in RAR 615 * @hw: pointer to hardware structure 616 * 617 * Enables multicast address in RAR and the use of the multicast hash table. 618 **/ 619 s32 ixgbe_enable_mc(struct ixgbe_hw *hw) 620 { 621 return ixgbe_call_func(hw, ixgbe_func_enable_mc, (hw), 622 IXGBE_NOT_IMPLEMENTED); 623 } 624 625 /** 626 * ixgbe_disable_mc - Disable multicast address in RAR 627 * @hw: pointer to hardware structure 628 * 629 * Disables multicast address in RAR and the use of the multicast hash table. 630 **/ 631 s32 ixgbe_disable_mc(struct ixgbe_hw *hw) 632 { 633 return ixgbe_call_func(hw, ixgbe_func_disable_mc, (hw), 634 IXGBE_NOT_IMPLEMENTED); 635 } 636 637 /** 638 * ixgbe_clear_vfta - Clear VLAN filter table 639 * @hw: pointer to hardware structure 640 * 641 * Clears the VLAN filer table, and the VMDq index associated with the filter 642 **/ 643 s32 ixgbe_clear_vfta(struct ixgbe_hw *hw) 644 { 645 return ixgbe_call_func(hw, ixgbe_func_clear_vfta, (hw), 646 IXGBE_NOT_IMPLEMENTED); 647 } 648 649 /** 650 * ixgbe_set_vfta - Set VLAN filter table 651 * @hw: pointer to hardware structure 652 * @vlan: VLAN id to write to VLAN filter 653 * @vind: VMDq output index that maps queue to VLAN id in VFTA 654 * @vlan_on: boolean flag to turn on/off VLAN in VFTA 655 * 656 * Turn on/off specified VLAN in the VLAN filter table. 657 **/ 658 s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on) 659 { 660 return ixgbe_call_func(hw, ixgbe_func_set_vfta, (hw, vlan, vind, 661 vlan_on), IXGBE_NOT_IMPLEMENTED); 662 } 663 664 /** 665 * ixgbe_setup_fc - Set flow control 666 * @hw: pointer to hardware structure 667 * @packetbuf_num: packet buffer number (0-7) 668 * 669 * Configures the flow control settings based on SW configuration. 670 **/ 671 s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num) 672 { 673 return ixgbe_call_func(hw, ixgbe_func_setup_fc, (hw, packetbuf_num), 674 IXGBE_NOT_IMPLEMENTED); 675 } 676 677 678 /** 679 * ixgbe_read_analog_reg8 - Reads 8 bit analog register 680 * @hw: pointer to hardware structure 681 * @reg: analog register to read 682 * @val: read value 683 * 684 * Performs write operation to analog register specified. 685 **/ 686 s32 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val) 687 { 688 return ixgbe_call_func(hw, ixgbe_func_read_analog_reg8, (hw, reg, val), 689 IXGBE_NOT_IMPLEMENTED); 690 } 691 692 /** 693 * ixgbe_write_analog_reg8 - Writes 8 bit analog register 694 * @hw: pointer to hardware structure 695 * @reg: analog register to write 696 * @val: value to write 697 * 698 * Performs write operation to Atlas analog register specified. 699 **/ 700 s32 ixgbe_write_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 val) 701 { 702 return ixgbe_call_func(hw, ixgbe_func_write_analog_reg8, (hw, reg, val), 703 IXGBE_NOT_IMPLEMENTED); 704 } 705 706