Message ID | 20180425130905.6385-8-chad.dupuis@cavium.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Hi Chad,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.17-rc2 next-20180426]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Chad-Dupuis/qedf-Update-driver-to-8-33-16-20/20180427-062801
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/qedf/qedf_main.c:92:6: sparse: symbol 'qedf_dcbx_no_wait' was not declared. Should it be static?
drivers/scsi/qedf/qedf_main.c:1878:18: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] prod_idx @@ got igned] [usertype] prod_idx @@
drivers/scsi/qedf/qedf_main.c:1878:18: expected unsigned short [unsigned] [usertype] prod_idx
drivers/scsi/qedf/qedf_main.c:1878:18: got restricted __le16 <noident>
drivers/scsi/qedf/qedf_main.c:1908:18: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] prod_idx @@ got igned] [usertype] prod_idx @@
drivers/scsi/qedf/qedf_main.c:1908:18: expected unsigned short [unsigned] [usertype] prod_idx
drivers/scsi/qedf/qedf_main.c:1908:18: got restricted __le16 <noident>
drivers/scsi/qedf/qedf_main.c:1926:33: sparse: restricted __le32 degrades to integer
drivers/scsi/qedf/qedf_main.c:1944:26: sparse: restricted __le32 degrades to integer
include/linux/qed/qed_if.h:988:33: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] sb_id_and_flags @@ got [usertype] sb_id_and_flags @@
include/linux/qed/qed_if.h:988:33: expected restricted __le32 [usertype] sb_id_and_flags
include/linux/qed/qed_if.h:988:33: got unsigned int
include/linux/qed/qed_if.h:995:9: sparse: cast from restricted __le32
include/linux/qed/qed_if.h:988:33: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] sb_id_and_flags @@ got [usertype] sb_id_and_flags @@
include/linux/qed/qed_if.h:988:33: expected restricted __le32 [usertype] sb_id_and_flags
include/linux/qed/qed_if.h:988:33: got unsigned int
include/linux/qed/qed_if.h:995:9: sparse: cast from restricted __le32
drivers/scsi/qedf/qedf_main.c:2160:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [unsigned] [usertype] fr_crc @@ got restrictunsigned int [unsigned] [usertype] fr_crc @@
drivers/scsi/qedf/qedf_main.c:2160:20: expected unsigned int [unsigned] [usertype] fr_crc
drivers/scsi/qedf/qedf_main.c:2160:20: got restricted __le32 [addressable] [usertype] fcoe_crc32
drivers/scsi/qedf/qedf_main.c:2346:34: sparse: restricted __le32 degrades to integer
drivers/scsi/qedf/qedf_main.c:2456:25: sparse: restricted __le32 degrades to integer
drivers/scsi/qedf/qedf_main.c:2459:18: sparse: restricted __le32 degrades to integer
drivers/scsi/qedf/qedf_main.c:2808:28: sparse: expression using sizeof(void)
drivers/scsi/qedf/qedf_main.c:2808:28: sparse: expression using sizeof(void)
include/scsi/fc/fc_fcoe.h:101:36: sparse: cast truncates bits from constant value (efc becomes fc)
include/scsi/fc/fc_fcoe.h:102:23: sparse: cast truncates bits from constant value (efc00 becomes 0)
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 1a58f4a9cdf9..8df151ec143d 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -89,6 +89,11 @@ module_param_named(retry_delay, qedf_retry_delay, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(retry_delay, " Enable/disable handling of FCP_RSP IU retry " "delay handling (default off)."); +bool qedf_dcbx_no_wait; +module_param_named(dcbx_no_wait, qedf_dcbx_no_wait, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(dcbx_no_wait, " Do not wait for DCBX convergence to start " + "sending FIP VLAN requests on link up (Default: off)."); + static uint qedf_dp_module; module_param_named(dp_module, qedf_dp_module, uint, S_IRUGO); MODULE_PARM_DESC(dp_module, " bit flags control for verbose printk passed " @@ -489,7 +494,8 @@ static void qedf_link_update(void *dev, struct qed_link_output *link) atomic_set(&qedf->link_state, QEDF_LINK_UP); qedf_update_link_speed(qedf, link); - if (atomic_read(&qedf->dcbx) == QEDF_DCBX_DONE) { + if (atomic_read(&qedf->dcbx) == QEDF_DCBX_DONE || + qedf_dcbx_no_wait) { QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "DCBx done.\n"); if (atomic_read(&qedf->link_down_tmo_valid) > 0) @@ -541,7 +547,8 @@ static void qedf_dcbx_handler(void *dev, struct qed_dcbx_get *get, u32 mib_type) atomic_set(&qedf->dcbx, QEDF_DCBX_DONE); - if (atomic_read(&qedf->link_state) == QEDF_LINK_UP) { + if (atomic_read(&qedf->link_state) == QEDF_LINK_UP && + !qedf_dcbx_no_wait) { if (atomic_read(&qedf->link_down_tmo_valid) > 0) queue_delayed_work(qedf->link_update_wq, &qedf->link_recovery, 0);
This module parameter is to work around cases where we do not receive the DCBX handler notification from qed but discovery is still possible if we send out a FIP VLAN request irregardless of the DCBX state. Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com> --- drivers/scsi/qedf/qedf_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)