]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qed: Fail driver load in 100g MSI mode.
authorSudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Mon, 1 Aug 2016 13:08:13 +0000 (09:08 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 04:59:27 +0000 (20:59 -0800)
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 <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 1d2c2024dcb7aeb2555db4bfd7f991d247ba0508)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/qlogic/qed/qed_main.c

index 2ceebe84f73f3c9ab8f3e802cf1c192a9f0e78b8..99b3e91c4e3358b4f05719f91d1ea9dba416160e 100644 (file)
@@ -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));