From: Sudarsana Reddy Kalluru Date: Mon, 1 Aug 2016 13:08:13 +0000 (-0400) Subject: qed: Fail driver load in 100g MSI mode. X-Git-Tag: v4.1.12-93~2^2~279 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=25ff7974229a11be4123a9094b2f71bc6d9fd96c;p=users%2Fjedix%2Flinux-maple.git qed: Fail driver load in 100g MSI mode. Orabug: 25477939 100g support is not available in MSI mode. Failing the driver load in this scenario. Please consider applying this to `net'. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller (cherry picked from commit 1d2c2024dcb7aeb2555db4bfd7f991d247ba0508) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c index 2ceebe84f73f3..99b3e91c4e335 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_main.c +++ b/drivers/net/ethernet/qlogic/qed/qed_main.c @@ -659,8 +659,13 @@ static int qed_slowpath_setup_int(struct qed_dev *cdev, struct qed_sb_cnt_info sb_cnt_info; int rc; int i; - memset(&cdev->int_params, 0, sizeof(struct qed_int_params)); + if ((int_mode == QED_INT_MODE_MSI) && (cdev->num_hwfns > 1)) { + DP_NOTICE(cdev, "MSI mode is not supported for CMT devices\n"); + return -EINVAL; + } + + memset(&cdev->int_params, 0, sizeof(struct qed_int_params)); cdev->int_params.in.int_mode = int_mode; for_each_hwfn(cdev, i) { memset(&sb_cnt_info, 0, sizeof(sb_cnt_info));