diff options
author | Chad Dupuis <chad.dupuis@cavium.com> | 2018-04-25 16:08:50 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-05-08 07:57:10 +0300 |
commit | a93755cf7e6e822e6856113342fe26ea874c92cc (patch) | |
tree | bd3bfd835c6493190568d1364b02b530905bb7b2 /drivers | |
parent | 766639cab01ed84968524ce6ad25b03ba6b15c1a (diff) | |
download | linux-a93755cf7e6e822e6856113342fe26ea874c92cc.tar.xz |
scsi: qedf: Sanity check FCoE/FIP priority value to make sure it's between 0 and 7
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qedf/qedf_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 8dcacc5b5f60..1a58f4a9cdf9 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3405,6 +3405,13 @@ static int __init qedf_init(void) if (qedf_debug == QEDF_LOG_DEFAULT) qedf_debug = QEDF_DEFAULT_LOG_MASK; + /* Check that default prio for FIP/FCoE traffic is between 0..7 */ + if (qedf_default_prio > 7) { + qedf_default_prio = QEDF_DEFAULT_PRIO; + QEDF_ERR(NULL, "FCoE/FIP priority out of range, resetting to %d.\n", + QEDF_DEFAULT_PRIO); + } + /* Print driver banner */ QEDF_INFO(NULL, QEDF_LOG_INFO, "%s v%s.\n", QEDF_DESCR, QEDF_VERSION); |