| @@ -21,27 +21,27 @@ | | | @@ -21,27 +21,27 @@ |
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | | 23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 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 | | 27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 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 | | 29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
30 | POSSIBILITY OF SUCH DAMAGE. | | 30 | POSSIBILITY OF SUCH DAMAGE. |
31 | | | 31 | |
32 | ******************************************************************************/ | | 32 | ******************************************************************************/ |
33 | /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/ | | 33 | /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/ |
34 | /*$NetBSD: ixv.c,v 1.36 2017/02/07 04:20:59 msaitoh Exp $*/ | | 34 | /*$NetBSD: ixv.c,v 1.37 2017/02/07 04:26:07 msaitoh Exp $*/ |
35 | | | 35 | |
36 | #include "opt_inet.h" | | 36 | #include "opt_inet.h" |
37 | #include "opt_inet6.h" | | 37 | #include "opt_inet6.h" |
38 | | | 38 | |
39 | #include "ixgbe.h" | | 39 | #include "ixgbe.h" |
40 | #include "vlan.h" | | 40 | #include "vlan.h" |
41 | | | 41 | |
42 | /********************************************************************* | | 42 | /********************************************************************* |
43 | * Driver version | | 43 | * Driver version |
44 | *********************************************************************/ | | 44 | *********************************************************************/ |
45 | char ixv_driver_version[] = "1.4.6-k"; | | 45 | char ixv_driver_version[] = "1.4.6-k"; |
46 | | | 46 | |
47 | /********************************************************************* | | 47 | /********************************************************************* |
| @@ -773,26 +773,27 @@ ixv_init_locked(struct adapter *adapter) | | | @@ -773,26 +773,27 @@ ixv_init_locked(struct adapter *adapter) |
773 | ixv_configure_ivars(adapter); | | 773 | ixv_configure_ivars(adapter); |
774 | | | 774 | |
775 | /* Set up auto-mask */ | | 775 | /* Set up auto-mask */ |
776 | IXGBE_WRITE_REG(hw, IXGBE_VTEIAM, IXGBE_EICS_RTX_QUEUE); | | 776 | IXGBE_WRITE_REG(hw, IXGBE_VTEIAM, IXGBE_EICS_RTX_QUEUE); |
777 | | | 777 | |
778 | /* Set moderation on the Link interrupt */ | | 778 | /* Set moderation on the Link interrupt */ |
779 | IXGBE_WRITE_REG(hw, IXGBE_VTEITR(adapter->vector), IXGBE_LINK_ITR); | | 779 | IXGBE_WRITE_REG(hw, IXGBE_VTEITR(adapter->vector), IXGBE_LINK_ITR); |
780 | | | 780 | |
781 | /* Stats init */ | | 781 | /* Stats init */ |
782 | ixv_init_stats(adapter); | | 782 | ixv_init_stats(adapter); |
783 | | | 783 | |
784 | /* Config/Enable Link */ | | 784 | /* Config/Enable Link */ |
785 | ixv_config_link(adapter); | | 785 | ixv_config_link(adapter); |
| | | 786 | hw->mac.get_link_status = TRUE; |
786 | | | 787 | |
787 | /* Start watchdog */ | | 788 | /* Start watchdog */ |
788 | callout_reset(&adapter->timer, hz, ixv_local_timer, adapter); | | 789 | callout_reset(&adapter->timer, hz, ixv_local_timer, adapter); |
789 | | | 790 | |
790 | /* And now turn on interrupts */ | | 791 | /* And now turn on interrupts */ |
791 | ixv_enable_intr(adapter); | | 792 | ixv_enable_intr(adapter); |
792 | | | 793 | |
793 | /* Now inform the stack we're ready */ | | 794 | /* Now inform the stack we're ready */ |
794 | ifp->if_flags |= IFF_RUNNING; | | 795 | ifp->if_flags |= IFF_RUNNING; |
795 | ifp->if_flags &= ~IFF_OACTIVE; | | 796 | ifp->if_flags &= ~IFF_OACTIVE; |
796 | | | 797 | |
797 | return; | | 798 | return; |
798 | } | | 799 | } |
| @@ -1680,30 +1681,29 @@ ixv_setup_interface(device_t dev, struct | | | @@ -1680,30 +1681,29 @@ ixv_setup_interface(device_t dev, struct |
1680 | */ | | 1681 | */ |
1681 | ifmedia_init(&adapter->media, IFM_IMASK, ixv_media_change, | | 1682 | ifmedia_init(&adapter->media, IFM_IMASK, ixv_media_change, |
1682 | ixv_media_status); | | 1683 | ixv_media_status); |
1683 | ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL); | | 1684 | ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL); |
1684 | ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); | | 1685 | ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); |
1685 | | | 1686 | |
1686 | return; | | 1687 | return; |
1687 | } | | 1688 | } |
1688 | | | 1689 | |
1689 | static void | | 1690 | static void |
1690 | ixv_config_link(struct adapter *adapter) | | 1691 | ixv_config_link(struct adapter *adapter) |
1691 | { | | 1692 | { |
1692 | struct ixgbe_hw *hw = &adapter->hw; | | 1693 | struct ixgbe_hw *hw = &adapter->hw; |
1693 | u32 autoneg; | | | |
1694 | | | 1694 | |
1695 | if (hw->mac.ops.check_link) | | 1695 | if (hw->mac.ops.check_link) |
1696 | hw->mac.ops.check_link(hw, &autoneg, | | 1696 | hw->mac.ops.check_link(hw, &adapter->link_speed, |
1697 | &adapter->link_up, FALSE); | | 1697 | &adapter->link_up, FALSE); |
1698 | } | | 1698 | } |
1699 | | | 1699 | |
1700 | | | 1700 | |
1701 | /********************************************************************* | | 1701 | /********************************************************************* |
1702 | * | | 1702 | * |
1703 | * Enable transmit unit. | | 1703 | * Enable transmit unit. |
1704 | * | | 1704 | * |
1705 | **********************************************************************/ | | 1705 | **********************************************************************/ |
1706 | static void | | 1706 | static void |
1707 | ixv_initialize_transmit_units(struct adapter *adapter) | | 1707 | ixv_initialize_transmit_units(struct adapter *adapter) |
1708 | { | | 1708 | { |
1709 | struct tx_ring *txr = adapter->tx_rings; | | 1709 | struct tx_ring *txr = adapter->tx_rings; |