aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Sadowski <filip.sadowski@intel.com>2017-08-29 05:32:37 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-10-06 11:11:31 -0400
commit9a858178ef6dfee2b6e6ec65c42b65a129b4df02 (patch)
tree4d37aa9f32dd81732f75695ae976db3ebbf1e7fd
parent7f6618226360b4aa0230a49525c81bf47d1d53c8 (diff)
i40e: Display error message if module does not meet thermal requirements
This patch causes error message to be displayed when NIC detects insertion of module that does not meet thermal requirements. Signed-off-by: Filip Sadowski <filip.sadowski@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c24
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h1
4 files changed, 22 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index c78448daa7a1..4dc6d43f8812 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -451,6 +451,7 @@ struct i40e_pf {
451#define I40E_FLAG_CLIENT_RESET BIT_ULL(54) 451#define I40E_FLAG_CLIENT_RESET BIT_ULL(54)
452#define I40E_FLAG_TEMP_LINK_POLLING BIT_ULL(55) 452#define I40E_FLAG_TEMP_LINK_POLLING BIT_ULL(55)
453#define I40E_FLAG_CLIENT_L2_CHANGE BIT_ULL(56) 453#define I40E_FLAG_CLIENT_L2_CHANGE BIT_ULL(56)
454#define I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED BIT_ULL(57)
454#define I40E_FLAG_LEGACY_RX BIT_ULL(58) 455#define I40E_FLAG_LEGACY_RX BIT_ULL(58)
455#define I40E_FLAG_SOURCE_PRUNING_DISABLED BIT_ULL(59) 456#define I40E_FLAG_SOURCE_PRUNING_DISABLED BIT_ULL(59)
456 457
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index 50c5a4c630b8..a8f65aed5421 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -1772,6 +1772,7 @@ enum i40e_aq_phy_type {
1772 I40E_PHY_TYPE_25GBASE_SR = 0x21, 1772 I40E_PHY_TYPE_25GBASE_SR = 0x21,
1773 I40E_PHY_TYPE_25GBASE_LR = 0x22, 1773 I40E_PHY_TYPE_25GBASE_LR = 0x22,
1774 I40E_PHY_TYPE_MAX, 1774 I40E_PHY_TYPE_MAX,
1775 I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD,
1775 I40E_PHY_TYPE_EMPTY = 0xFE, 1776 I40E_PHY_TYPE_EMPTY = 0xFE,
1776 I40E_PHY_TYPE_DEFAULT = 0xFF, 1777 I40E_PHY_TYPE_DEFAULT = 0xFF,
1777}; 1778};
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 628101bb08d4..3d6d6a283327 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6558,12 +6558,26 @@ static void i40e_handle_link_event(struct i40e_pf *pf,
6558 */ 6558 */
6559 i40e_link_event(pf); 6559 i40e_link_event(pf);
6560 6560
6561 /* check for unqualified module, if link is down */ 6561 /* Check if module meets thermal requirements */
6562 if ((status->link_info & I40E_AQ_MEDIA_AVAILABLE) && 6562 if (status->phy_type == I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP) {
6563 (!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) &&
6564 (!(status->link_info & I40E_AQ_LINK_UP)))
6565 dev_err(&pf->pdev->dev, 6563 dev_err(&pf->pdev->dev,
6566 "The driver failed to link because an unqualified module was detected.\n"); 6564 "Rx/Tx is disabled on this device because the module does not meet thermal requirements.\n");
6565 dev_err(&pf->pdev->dev,
6566 "Refer to the Intel(R) Ethernet Adapters and Devices User Guide for a list of supported modules.\n");
6567 } else {
6568 /* check for unqualified module, if link is down, suppress
6569 * the message if link was forced to be down.
6570 */
6571 if ((status->link_info & I40E_AQ_MEDIA_AVAILABLE) &&
6572 (!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) &&
6573 (!(status->link_info & I40E_AQ_LINK_UP)) &&
6574 (!(pf->flags & I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED))) {
6575 dev_err(&pf->pdev->dev,
6576 "Rx/Tx is disabled on this device because an unsupported SFP module type was detected.\n");
6577 dev_err(&pf->pdev->dev,
6578 "Refer to the Intel(R) Ethernet Adapters and Devices User Guide for a list of supported modules.\n");
6579 }
6580 }
6567} 6581}
6568 6582
6569/** 6583/**
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index dc6fc8b1bc79..60c892f559b9 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -1768,6 +1768,7 @@ enum i40e_aq_phy_type {
1768 I40E_PHY_TYPE_25GBASE_SR = 0x21, 1768 I40E_PHY_TYPE_25GBASE_SR = 0x21,
1769 I40E_PHY_TYPE_25GBASE_LR = 0x22, 1769 I40E_PHY_TYPE_25GBASE_LR = 0x22,
1770 I40E_PHY_TYPE_MAX, 1770 I40E_PHY_TYPE_MAX,
1771 I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD,
1771 I40E_PHY_TYPE_EMPTY = 0xFE, 1772 I40E_PHY_TYPE_EMPTY = 0xFE,
1772 I40E_PHY_TYPE_DEFAULT = 0xFF, 1773 I40E_PHY_TYPE_DEFAULT = 0xFF,
1773}; 1774};