Jason Yan
7dfdcc393d
scsi: ufs: Use true for bool variables in ufshcd_complete_dev_init()
...
Fix the following coccicheck warning:
drivers/scsi/ufs/ufshcd.c:4140:6-14: WARNING: Assignment of 0/1 to bool
variable.
Link: https://lore.kernel.org/r/20200426094305.24083-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-27 18:39:54 -04:00
Bart Van Assche
655da8e57a
scsi: sr: Use {get,put}_unaligned_be*() instead of open-coding these functions
...
This patch makes the sr code slightly easier to read.
Link: https://lore.kernel.org/r/20200427014844.12109-1-bvanassche@acm.org
Cc: Merlijn Wajer <merlijn@archive.org >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-27 18:39:54 -04:00
Christophe JAILLET
f7854c3822
scsi: aacraid: Fix error handling paths in aac_probe_one()
...
If 'scsi_host_alloc()' or 'kcalloc()' fail, 'error' is known to be 0. Set
it explicitly to -ENOMEM before branching to the error handling path.
While at it, remove 2 useless assignments to 'error'. These values are
overwridden a few lines later.
Link: https://lore.kernel.org/r/20200412094039.8822-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-27 18:39:53 -04:00
Jason Yan
f371d53453
scsi: sgiwd93: Remove unneeded semicolon in sgiwd93.c
...
Fix the following coccicheck warning:
drivers/scsi/sgiwd93.c:190:2-3: Unneeded semicolon
Link: https://lore.kernel.org/r/20200421034029.28030-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:29 -04:00
Jason Yan
9b77c9da6a
scsi: qla4xxx: Remove unneeded semicolon in ql4_os.c
...
Fix the following coccicheck warning:
drivers/scsi/qla4xxx/ql4_os.c:969:3-4: Unneeded semicolon
Link: https://lore.kernel.org/r/20200421034038.28113-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:16 -04:00
Jason Yan
8d5e202802
scsi: isci: Use true, false for bool variables
...
Fix the following coccicheck warning:
drivers/scsi/isci/isci.h:515:1-12: WARNING: Assignment of 0/1 to bool
variable
drivers/scsi/isci/isci.h:503:1-12: WARNING: Assignment of 0/1 to bool
variable
drivers/scsi/isci/isci.h:509:1-12: WARNING: Assignment of 0/1 to bool
variable
Link: https://lore.kernel.org/r/20200421034050.28193-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Jason Yan
acfcb728bd
scsi: bnx2fc: Remove unneeded semicolon in bnx2fc_fcoe.c
...
Fix the following coccicheck warning:
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:948:4-5: Unneeded semicolon
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:968:4-5: Unneeded semicolon
Link: https://lore.kernel.org/r/20200421034019.27949-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Jason Yan
f71ded01cc
scsi: bfa: Remove unneeded semicolon in bfa_fcs_rport.c
...
Fix the following coccicheck warning:
drivers/scsi/bfa/bfa_fcs_rport.c:2452:2-3: Unneeded semicolon
drivers/scsi/bfa/bfa_fcs_rport.c:1578:3-4: Unneeded semicolon
Link: https://lore.kernel.org/r/20200421033957.27783-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
YueHaibing
0745c834f7
scsi: bfa: Remove set but not used variable 'fchs'
...
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/bfa/bfa_svc.c: In function 'uf_recv':
drivers/scsi/bfa/bfa_svc.c:5520:17: warning:
variable 'fchs' set but not used [-Wunused-but-set-variable]
struct fchs_s *fchs;
^
Link: https://lore.kernel.org/r/20200418071057.96699-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Jason Yan
6942d531e2
scsi: snic: Make snic_io_exch_ver_cmpl_handler() return void
...
This function does not need a return value since no callers depend on
it. Make it return void.
This also fixes the coccicheck warning:
drivers/scsi/snic/snic_ctl.c:163:5-8: Unneeded variable: "ret". Return
"0" on line 228
Link: https://lore.kernel.org/r/20200418070615.11603-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Jason Yan
baf3fbf26c
scsi: mpt3sas: Remove NULL check before freeing function
...
Fix the following coccicheck warning:
drivers/scsi/mpt3sas/mpt3sas_base.c:4906:3-19: WARNING: NULL check
before some freeing functions is not needed.
Link: https://lore.kernel.org/r/20200418095850.34883-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Jason Yan
2e9ef0fcac
scsi: ipr: Remove NULL check before freeing function
...
Fix the following coccicheck warning:
drivers/scsi/ipr.c:9533:2-18: WARNING: NULL check before some freeing
functions is not needed.
Link: https://lore.kernel.org/r/20200418095903.35118-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Jason Yan
f166021c0f
scsi: bfa: Remove unneeded semicolon in bfa_fcs_lport_ns_sm_online()
...
Fix the following coccicheck warning:
drivers/scsi/bfa/bfa_fcs_lport.c:4361:3-4: Unneeded semicolon
Link: https://lore.kernel.org/r/20200418070553.11262-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Wu Bo
f8f794a15a
scsi: pmcraid: Replace dma_pool_malloc with dma_pool_zalloc
...
Replace dma_pool_malloc with dma_pool_zalloc to make the code more concise
in pmcraid_allocate_control_blocks() function.
Link: https://lore.kernel.org/r/1587197241-274646-1-git-send-email-wubo40@huawei.com
Signed-off-by: Wu Bo <wubo40@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Maurizio Lombardi
7c59dace7e
scsi: target: iscsi: Remove the iscsi_data_count structure
...
This patch removes the iscsi_data_count structure and the
iscsit_do_rx_data() function because they are used only by rx_data()
Link: https://lore.kernel.org/r/20200424113913.17237-1-mlombard@redhat.com
Reviewed-by: Mike Christie <mchristi@redhat.com >
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Ming Lei
f983622ae6
scsi: core: Avoid calling synchronize_rcu() for each device in scsi_host_block()
...
scsi_host_block() calls scsi_internal_device_block() for each scsi_device and
scsi_internal_device_block() calls blk_mq_quiesce_queue() for each LUN.
Since synchronize_rcu() is called from blk_mq_quiesce_queue(), this can cause
substantial slowdowns on systems with many LUNs.
Use scsi_internal_device_block_nowait() to implement scsi_host_block() so it
is sufficient to run synchronize_rcu() once. This is safe since SCSI does not
set the BLK_MQ_F_BLOCKING flag.
[mkp: commit desc and comment tweaks]
Link: https://lore.kernel.org/r/20200423020713.332743-1-ming.lei@redhat.com
Cc: Steffen Maier <maier@linux.ibm.com >
Cc: Bart Van Assche <bvanassche@acm.org >
Cc: Christoph Hellwig <hch@lst.de >
Cc: Dexuan Cui <decui@microsoft.com >
Cc: Hannes Reinecke <hare@suse.de >
Reviewed-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Ming Lei <ming.lei@redhat.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:15 -04:00
Jason Yan
3fa65812c2
scsi: BusLogic: Remove conversion to bool in blogic_inquiry()
...
The '!=' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:
drivers/scsi/BusLogic.c:2240:46-51: WARNING: conversion to bool not
needed here
Link: https://lore.kernel.org/r/20200421034120.28433-1-yanaijie@huawei.com
Acked-by: Khalid Aziz <khalid@gonehiking.org >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:14 -04:00
Jason Yan
1a5d1d940b
scsi: megaraid: Use true, false for bool variables
...
Fix the following coccicheck warning:
drivers/scsi/megaraid/megaraid_sas_fusion.c:4242:6-16: WARNING:
Assignment of 0/1 to bool variable
drivers/scsi/megaraid/megaraid_sas_fusion.c:4786:1-29: WARNING:
Assignment of 0/1 to bool variable
drivers/scsi/megaraid/megaraid_sas_fusion.c:4791:1-29: WARNING:
Assignment of 0/1 to bool variable
drivers/scsi/megaraid/megaraid_sas_fusion.c:4716:1-29: WARNING:
Assignment of 0/1 to bool variable
drivers/scsi/megaraid/megaraid_sas_fusion.c:4721:1-29: WARNING:
Assignment of 0/1 to bool variable
Link: https://lore.kernel.org/r/20200421034111.28353-1-yanaijie@huawei.com
Acked-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 18:21:08 -04:00
Suganath Prabu
ce4c43065c
scsi: mpt3sas: Update mpt3sas version to 33.101.00.00
...
Update mpt3sas driver version from 33.100.00.00 to 33.101.00.00.
Link: https://lore.kernel.org/r/1587626596-1044-6-git-send-email-suganath-prabu.subramani@broadcom.com
Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 13:08:18 -04:00
Suganath Prabu
8012209eb2
scsi: mpt3sas: Handle RDPQ DMA allocation in same 4G region
...
For INVADER_SERIES, each set of 8 reply queues (0 - 7, 8 - 15,..), and for
VENTURA_SERIES, each set of 16 reply queues (0 - 15, 16 - 31,..) need to be
within the same 4 GB boundary. Driver uses limitation of VENTURA_SERIES to
manage INVADER_SERIES as well. The driver is allocating the DMA able
memory for RDPQs accordingly.
1) At driver load, set DMA mask to 64 and allocate memory for RDPQs
2) Check if allocated resources for RDPQ are in the same 4GB range
3) If #2 is true, continue with 64 bit DMA and go to #6
4) If #2 is false, then free all the resources from #1
5) Set DMA mask to 32 and allocate RDPQs
6) Proceed with driver loading and other allocations
Link: https://lore.kernel.org/r/1587626596-1044-5-git-send-email-suganath-prabu.subramani@broadcom.com
Reviewed-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 13:08:18 -04:00
Suganath Prabu
85896421df
scsi: mpt3sas: Separate out RDPQ allocation to new function
...
For readability separate out RDPQ allocations to new function
base_alloc_rdpq_dma_pool().
Link: https://lore.kernel.org/r/1587626596-1044-4-git-send-email-suganath-prabu.subramani@broadcom.com
Reviewed-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 13:08:17 -04:00
Suganath Prabu
550dc875cf
scsi: mpt3sas: Rename function name is_MSB_are_same
...
Rename is_MSB_are_same() to mpt3sas_check_same_4gb_region() for better
readability.
Link: https://lore.kernel.org/r/1587626596-1044-3-git-send-email-suganath-prabu.subramani@broadcom.com
Reviewed-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 13:08:16 -04:00
Christoph Hellwig
ba27c5cf28
scsi: mpt3sas: Don't change the DMA coherent mask after allocations
...
The DMA layer does not allow changing the DMA coherent mask after there are
outstanding allocations.
Link: https://lore.kernel.org/r/1587626596-1044-2-git-send-email-suganath-prabu.subramani@broadcom.com
Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 13:08:15 -04:00
Jules Irenge
bc834e074e
scsi: bnx2fc: Add missing annotation for bnx2fc_abts_cleanup()
...
Sparse reports the following warning:
warning: context imbalance in bnx2fc_abts_cleanup() - unexpected unlock
The root cause is the missing annotation at bnx2fc_abts_cleanup(). Add the
missing __must_hold(&tgt->tgt_lock) annotation.
Link: https://lore.kernel.org/r/20200411001933.10072-8-jbi.octave@gmail.com
Signed-off-by: Jules Irenge <jbi.octave@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 12:56:37 -04:00
Alex Dewar
d1ec20a55f
scsi: aic7xxx: Remove unnecessary NULL checks before kfree
...
There are a number of places in the aic7xxx driver where a NULL check is
performed before a kfree(). However, kfree() already performs NULL checks
so this is unnecessary. Remove the checks.
Issue identified with Coccinelle.
Link: https://lore.kernel.org/r/20200403164712.49579-1-alex.dewar@gmx.co.uk
Signed-off-by: Alex Dewar <alex.dewar@gmx.co.uk >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 12:48:48 -04:00
Alex Dewar
9cd7d494bd
scsi: aic7xxx: Use kzalloc() instead of kmalloc()+memset()
...
There are a couple of places where kzalloc() could be used directly instead
of calling kmalloc() then memset(). Replace them.
Link: https://lore.kernel.org/r/20200403163611.46756-1-alex.dewar@gmx.co.uk
Signed-off-by: Alex Dewar <alex.dewar@gmx.co.uk >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 12:48:06 -04:00
Xu Wang
f8e25f9740
scsi: cxgb4i: Remove superfluous null check
...
In do_abort_rpl_rss, the null check of 'clk' is not needed.
Link: https://lore.kernel.org/r/20200402110832.12712-1-vulab@iscas.ac.cn
Signed-off-by: Xu Wang <vulab@iscas.ac.cn >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 12:38:44 -04:00
Arun Easi
cbb01c2f2f
scsi: qla2xxx: Fix MPI failure AEN (8200) handling
...
Today, upon an MPI failure AEN, on top of collecting an MPI dump, a regular
firmware dump is also taken and then chip reset. This is disruptive to IOs
and not required. Make the firmware dump collection, followed by chip
reset, optional (not done by default).
Firmware dump buffer and MPI dump buffer are independent of each
other with this change and each can have dump that was taken at two
different times for two different issues. The MPI dump is saved in a
separate buffer and is retrieved differently from firmware dump.
To collect full dump on MPI failure AEN, a module parameter is
introduced:
ql2xfulldump_on_mpifail (default: 0)
Link: https://lore.kernel.org/r/20200331104015.24868-2-njavali@marvell.com
Reported-by: kbuild test robot <lkp@intel.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-24 12:15:47 -04:00
James Smart
e304142c30
scsi: lpfc: remove duplicate unloading checks
...
During code reviews several instances of duplicate module unloading checks
were found.
Remove the duplicate checks.
Link: https://lore.kernel.org/r/20200421203354.49420-1-jsmart2021@gmail.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: James Smart <jsmart2021@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-22 00:11:48 -04:00
Jason Yan
355f46b97d
scsi: mpt3sas: use true,false for bool variables
...
Fix the following coccicheck warning:
drivers/scsi/mpt3sas/mpt3sas_base.c:416:6-14: WARNING: Assignment of 0/1
to bool variable
drivers/scsi/mpt3sas/mpt3sas_base.c:485:2-10: WARNING: Assignment of 0/1
to bool variable
Link: https://lore.kernel.org/r/20200421034101.28273-1-yanaijie@huawei.com
Acked-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-22 00:08:31 -04:00
Jason Yan
b7a9d0c660
scsi: fcoe: remove unneeded semicolon in fcoe.c
...
Fix the following coccicheck warning:
drivers/scsi/fcoe/fcoe.c:1918:3-4: Unneeded semicolon
drivers/scsi/fcoe/fcoe.c:1930:3-4: Unneeded semicolon
Link: https://lore.kernel.org/r/20200421034008.27865-1-yanaijie@huawei.com
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-22 00:07:40 -04:00
Jason Yan
f336c7003c
scsi: ufs-qcom: remove unneeded variable 'ret'
...
Fix the following coccicheck warning:
drivers/scsi/ufs/ufs-qcom.c:575:5-8: Unneeded variable: "ret". Return
"0" on line 590
Link: https://lore.kernel.org/r/20200418070625.11756-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-22 00:06:31 -04:00
Jason Yan
ec34143912
scsi: st: remove unneeded variable 'result' in st_release()
...
Also remove a strange '^L' after this function.
Fix the following coccicheck warning:
drivers/scsi/st.c:1460:5-11: Unneeded variable: "result". Return "0" on
line 1473
Link: https://lore.kernel.org/r/20200418070605.11450-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-22 00:05:29 -04:00
Saurav Kashyap
7109cb5151
scsi: qedf: Get dev info after updating the params
...
An update to pf params can change the devinfo. Get updated device
information.
[mkp: updated error message spotted by Sergei Shtylyov]
Link: https://lore.kernel.org/r/20200416084314.18851-10-skashyap@marvell.com
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:29 -04:00
Chad Dupuis
ad40f52560
scsi: qedf: Fix crash when MFW calls for protocol stats while function is still probing
...
The MFW may make a call to qed and then to qedf for protocol statistics
while the function is still probing. If this happens it's possible that
some members of the struct qedf_ctx may not be fully initialized which can
result in a NULL pointer dereference or general protection fault.
To prevent this, add a new flag call QEDF_PROBING and set it when the
__qedf_probe() function is active. Then in the qedf_get_protocol_tlv_data()
function we can check if the function is still probing and return
immediantely before any uninitialized structures can be touched.
Link: https://lore.kernel.org/r/20200416084314.18851-9-skashyap@marvell.com
Signed-off-by: Chad Dupuis <cdupuis@marvell.com >
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:29 -04:00
Chad Dupuis
f6b172f219
scsi: qedf: Add schedule recovery handler
...
Implement recovery handler to be used by QED to signal the need for
recovery to come out of an error condition like ramrod struck and firmware
context reset.
Link: https://lore.kernel.org/r/20200416084314.18851-8-skashyap@marvell.com
Signed-off-by: Chad Dupuis <cdupuis@marvell.com >
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:28 -04:00
Saurav Kashyap
6e7c8eea92
scsi: qedf: Implement callback for bw_update
...
Add support for the common qed bw_update callback to qedf. This function
is called whenever there is a reported change in the bandwidth and updates
corresponding values in sysfs.
Link: https://lore.kernel.org/r/20200416084314.18851-7-skashyap@marvell.com
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:27 -04:00
Sudarsana Reddy Kalluru
699fed4a2d
scsi: qed: Send BW update notifications to the protocol drivers
...
Management firmware (MFW) sends a notification whenever there is a change
in the bandwidth values. Add driver support for sending this notification
to the upper layer drivers (e.g., qedf).
Link: https://lore.kernel.org/r/20200416084314.18851-6-skashyap@marvell.com
Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com >
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:26 -04:00
Javed Hasan
fedc173e46
scsi: qedf: Honor status qualifier in FCP_RSP per spec
...
Handle scope and qualifier on SAM_STAT_TASK_SET_FULL or SAM_STAT_BUSY
[mkp: added braces to fix sparse complaint]
Link: https://lore.kernel.org/r/20200416084314.18851-5-skashyap@marvell.com
Signed-off-by: Javed Hasan <jhasan@marvell.com >
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:25 -04:00
Javed Hasan
334b4f988f
scsi: qedf: Acquire rport_lock for resetting the delay_timestamp
...
Retry delay timestamp is updated in queuecommand as well as in
qedf_scsi_completion routine. Protect it using lock.
Link: https://lore.kernel.org/r/20200416084314.18851-4-skashyap@marvell.com
Signed-off-by: Javed Hasan <jhasan@marvell.com >
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:25 -04:00
Javed Hasan
b0c4187e26
scsi: qedf: Increase the upper limit of retry delay
...
Max time to hold the IO in case of SAM_STAT_TASK_SET_FULL or SAM_STAT_BUSY.
Link: https://lore.kernel.org/r/20200416084314.18851-3-skashyap@marvell.com
Signed-off-by: Javed Hasan <jhasan@marvell.com >
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:24 -04:00
Saurav Kashyap
ab0a82991f
scsi: qedf: Keep track of num of pending flogi
...
If a port is brought down for an extended period of time, the fipvlan
counter gets exhausted and the driver will fall back to default VLAN 1002
and call fcoe_ctlr_link_up to log in. However, the switch will discard the
FLOGI attempt because the VLAN is now different.
Keep track of the number of FLOGI attempts and if a threshold of
QEDF_FLOGI_RETRY_CNT is exceeded, perform a context soft reset.
Link: https://lore.kernel.org/r/20200416084314.18851-2-skashyap@marvell.com
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:55:23 -04:00
Jason Yan
d214819940
scsi: mvsas: remove unused symbol 'mvs_th'
...
This symbol has no users so remove it.
Link: https://lore.kernel.org/r/20200415085053.7633-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:29:03 -04:00
Jason Yan
a677ab35a9
scsi: mvsas: make mvst_host_attrs static
...
Fix the following sparse warning:
drivers/scsi/mvsas/mv_init.c:28:25: warning: symbol 'mvst_host_attrs' was
not declared. Should it be static?
Link: https://lore.kernel.org/r/20200415085044.7460-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:28:37 -04:00
Jason Yan
44578ecef7
scsi: qedi: make qedi_ll2_buf_size static
...
Fix the following sparse warning:
drivers/scsi/qedi/qedi_main.c:44:6: warning: symbol 'qedi_ll2_buf_size' was
not declared. Should it be static?
Link: https://lore.kernel.org/r/20200415085029.7170-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:27:36 -04:00
Asutosh Das
089f5b64b8
scsi: ufs: full reinit upon resume if link was off
...
During suspend, if the link is put to off, it would require a full
initialization during resume. This patch resets and restores both the host
and the card during initialization, otherwise host-only reset and restore
would fail occasionally.
Link: https://lore.kernel.org/r/1586844892-22720-1-git-send-email-cang@codeaurora.org
Reviewed-by: Bean Huo <beanhuo@micron.com >
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com >
Acked-by: Stanley Chu <stanley.chu@mediatek.com >
Acked-by: Avri Altman <Avri.Altman@wdc.com >
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org >
Signed-off-by: Can Guo <cang@codeaurora.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 17:24:46 -04:00
Jason Yan
9ae583804a
scsi: fnic: make vnic_wq_get_ctrl and vnic_wq_alloc_ring static
...
Fix the following sparse warning:
drivers/scsi/fnic/vnic_wq.c:28:5: warning: symbol 'vnic_wq_get_ctrl' was
not declared. Should it be static?
drivers/scsi/fnic/vnic_wq.c:40:5: warning: symbol 'vnic_wq_alloc_ring'
was not declared. Should it be static?
Link: https://lore.kernel.org/r/20200415093809.9365-3-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 13:48:05 -04:00
Jason Yan
1d8baf9ed0
scsi: fnic: make fnic_list and fnic_list_lock static
...
Fix the following sparse warning:
drivers/scsi/fnic/fnic_main.c:52:1: warning: symbol 'fnic_list' was not
declared. Should it be static?
drivers/scsi/fnic/fnic_main.c:53:1: warning: symbol 'fnic_list_lock' was
not declared. Should it be static?
Link: https://lore.kernel.org/r/20200415093809.9365-2-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 13:48:04 -04:00
Jason Yan
363f4d9375
scsi: fnic: make some symbols static
...
Fix the following sparse warning:
drivers/scsi/fnic/vnic_dev.c:257:5: warning: symbol 'vnic_dev_cmd1' was
not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:319:5: warning: symbol 'vnic_dev_cmd2' was
not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:414:5: warning: symbol
'vnic_dev_init_devcmd1' was not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:425:5: warning: symbol
'vnic_dev_init_devcmd2' was not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:495:6: warning: symbol
'vnic_dev_deinit_devcmd2' was not declared. Should it be static?
drivers/scsi/fnic/vnic_dev.c:506:5: warning: symbol
'vnic_dev_cmd_no_proxy' was not declared. Should it be static?
Link: https://lore.kernel.org/r/20200415093809.9365-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-17 13:48:03 -04:00
Jules Irenge
1e4ffb8344
scsi: libsas: Add missing annotation for sas_ata_qc_issue()
...
Sparse reports a warning at sas_ata_qc_issue()
warning: context imbalance in sas_ata_qc_issue() - unexpected unlock
The root cause is the missing annotation at sas_ata_qc_issue()
Add the missing __must_hold(ap->lock) annotation
Link: https://lore.kernel.org/r/20200411001933.10072-7-jbi.octave@gmail.com
Reviewed-by: John Garry <john.garry@huawei.com >
Signed-off-by: Jules Irenge <jbi.octave@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2020-04-14 21:46:15 -04:00