Hi list
        When I want to reset the hw of ixgbevf , I always get the error,
the value is IXGBE_ERR_INVALID_MAC_ADDR
        just like the below function, how to debug this error, could you
please give me some advice?
        Thanks a lot.

==========================================================
static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
{
        struct ixgbe_mbx_info *mbx = &hw->mbx;
        u32 timeout = IXGBE_VF_INIT_TIMEOUT;
        s32 ret_val = IXGBE_ERR_INVALID_MAC_ADDR;
        u32 msgbuf[IXGBE_VF_PERMADDR_MSG_LEN];
        u8 *addr = (u8 *)(&msgbuf[1]);

        /* Call adapter stop to disable tx/rx and clear interrupts */
        hw->mac.ops.stop_adapter(hw);

        IXGBE_WRITE_REG(hw, IXGBE_VFCTRL, IXGBE_CTRL_RST);
        IXGBE_WRITE_FLUSH(hw);

        /* we cannot reset while the RSTI / RSTD bits are asserted */
        while (!mbx->ops.check_for_rst(hw) && timeout) {
                timeout--;
                udelay(5);
        }

        if (!timeout)
                return IXGBE_ERR_RESET_FAILED;

        /* mailbox timeout can now become active */
        mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT;

        msgbuf[0] = IXGBE_VF_RESET;
        mbx->ops.write_posted(hw, msgbuf, 1);

        msleep(10);

        /* set our "perm_addr" based on info provided by PF */
        /* also set up the mc_filter_type which is piggy backed
         * on the mac address in word 3 */
        ret_val = mbx->ops.read_posted(hw, msgbuf,
IXGBE_VF_PERMADDR_MSG_LEN);
        if (ret_val)
                return ret_val;

        if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK))
                return IXGBE_ERR_INVALID_MAC_ADDR;

        memcpy(hw->mac.perm_addr, addr, IXGBE_ETH_LENGTH_OF_ADDRESS);
        hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];

        return 0;
}
==========================================================
------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to