Print this page
6064 ixgbe needs X550 support

*** 1,8 **** /****************************************************************************** ! Copyright (c) 2001-2012, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: --- 1,8 ---- /****************************************************************************** ! Copyright (c) 2001-2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*** 75,88 **** struct ixgbe_mbx_info *mbx = &hw->mbx; s32 ret_val = IXGBE_SUCCESS; DEBUGFUNC("ixgbe_write_mbx"); ! if (size > mbx->size) ret_val = IXGBE_ERR_MBX; ! ! else if (mbx->ops.write) ret_val = mbx->ops.write(hw, msg, size, mbx_id); return ret_val; } --- 75,89 ---- struct ixgbe_mbx_info *mbx = &hw->mbx; s32 ret_val = IXGBE_SUCCESS; DEBUGFUNC("ixgbe_write_mbx"); ! if (size > mbx->size) { ret_val = IXGBE_ERR_MBX; ! ERROR_REPORT2(IXGBE_ERROR_ARGUMENT, ! "Invalid mailbox message size %d", size); ! } else if (mbx->ops.write) ret_val = mbx->ops.write(hw, msg, size, mbx_id); return ret_val; }
*** 168,177 **** --- 169,182 ---- if (!countdown) break; usec_delay(mbx->usec_delay); } + if (countdown == 0) + ERROR_REPORT2(IXGBE_ERROR_POLLING, + "Polling for VF%d mailbox message timedout", mbx_id); + out: return countdown ? IXGBE_SUCCESS : IXGBE_ERR_MBX; } /**
*** 196,205 **** --- 201,214 ---- if (!countdown) break; usec_delay(mbx->usec_delay); } + if (countdown == 0) + ERROR_REPORT2(IXGBE_ERROR_POLLING, + "Polling for VF%d mailbox ack timedout", mbx_id); + out: return countdown ? IXGBE_SUCCESS : IXGBE_ERR_MBX; } /**
*** 427,442 **** ret_val = ixgbe_obtain_mbx_lock_vf(hw); if (ret_val) goto out_no_write; /* flush msg and acks as we are overwriting the message buffer */ ! ret_val = ixgbe_check_for_msg_vf(hw, 0); ! if (ret_val) ! goto out_no_write; ! ret_val = ixgbe_check_for_ack_vf(hw, 0); ! if (ret_val) ! goto out_no_write; /* copy the caller specified message to the mailbox memory buffer */ for (i = 0; i < size; i++) IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, msg[i]); --- 436,447 ---- ret_val = ixgbe_obtain_mbx_lock_vf(hw); if (ret_val) goto out_no_write; /* flush msg and acks as we are overwriting the message buffer */ ! ixgbe_check_for_msg_vf(hw, 0); ! ixgbe_check_for_ack_vf(hw, 0); /* copy the caller specified message to the mailbox memory buffer */ for (i = 0; i < size; i++) IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, msg[i]);
*** 598,607 **** --- 603,614 ---- switch (hw->mac.type) { case ixgbe_mac_82599EB: vflre = IXGBE_READ_REG(hw, IXGBE_VFLRE(reg_offset)); break; + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: case ixgbe_mac_X540: vflre = IXGBE_READ_REG(hw, IXGBE_VFLREC(reg_offset)); break; default: break;
*** 635,645 **** --- 642,656 ---- /* reserve mailbox for vf use */ p2v_mailbox = IXGBE_READ_REG(hw, IXGBE_PFMAILBOX(vf_number)); if (p2v_mailbox & IXGBE_PFMAILBOX_PFU) ret_val = IXGBE_SUCCESS; + else + ERROR_REPORT2(IXGBE_ERROR_POLLING, + "Failed to obtain mailbox lock for VF%d", vf_number); + return ret_val; } /** * ixgbe_write_mbx_pf - Places a message in the mailbox
*** 662,677 **** ret_val = ixgbe_obtain_mbx_lock_pf(hw, vf_number); if (ret_val) goto out_no_write; /* flush msg and acks as we are overwriting the message buffer */ ! ret_val = ixgbe_check_for_msg_vf(hw, 0); ! if (ret_val) ! goto out_no_write; ! ret_val = ixgbe_check_for_ack_vf(hw, 0); ! if (ret_val) ! goto out_no_write; /* copy the caller specified message to the mailbox memory buffer */ for (i = 0; i < size; i++) IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_number), i, msg[i]); --- 673,684 ---- ret_val = ixgbe_obtain_mbx_lock_pf(hw, vf_number); if (ret_val) goto out_no_write; /* flush msg and acks as we are overwriting the message buffer */ ! ixgbe_check_for_msg_pf(hw, vf_number); ! ixgbe_check_for_ack_pf(hw, vf_number); /* copy the caller specified message to the mailbox memory buffer */ for (i = 0; i < size; i++) IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_number), i, msg[i]);
*** 733,742 **** --- 740,751 ---- void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw) { struct ixgbe_mbx_info *mbx = &hw->mbx; if (hw->mac.type != ixgbe_mac_82599EB && + hw->mac.type != ixgbe_mac_X550 && + hw->mac.type != ixgbe_mac_X550EM_x && hw->mac.type != ixgbe_mac_X540) return; mbx->timeout = 0; mbx->usec_delay = 0;