linux-2.6-microblaze.git
3 years agoscsi: aacraid: Add descriptions for missing parameters
Lee Jones [Tue, 21 Jul 2020 16:41:15 +0000 (17:41 +0100)]
scsi: aacraid: Add descriptions for missing parameters

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p2' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p3' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p4' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p5' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p6' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'status' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'r1' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'r2' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'r3' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'r4' not described in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:203: warning: Excess function parameter 'ret' description in 'src_sync_cmd'
 drivers/scsi/aacraid/src.c:609: warning: Function parameter or member 'dev' not described in 'aac_src_ioremap'
 drivers/scsi/aacraid/src.c:639: warning: Function parameter or member 'dev' not described in 'aac_srcv_ioremap'

Link: https://lore.kernel.org/r/20200721164148.2617584-8-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic94xx: Fix a couple of kerneldoc formatting issues
Lee Jones [Tue, 21 Jul 2020 16:41:14 +0000 (17:41 +0100)]
scsi: aic94xx: Fix a couple of kerneldoc formatting issues

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic94xx/aic94xx_dev.c:246: warning: Function parameter or member 'dev' not described in 'asd_init_sata_pm_port_ddb'
 drivers/scsi/aic94xx/aic94xx_dev.c:290: warning: Function parameter or member 'dev' not described in 'asd_init_sata_pm_ddb'

Link: https://lore.kernel.org/r/20200721164148.2617584-7-lee.jones@linaro.org
Cc: Luben Tuikov <luben_tuikov@adaptec.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Add missing description for 'dev'
Lee Jones [Tue, 21 Jul 2020 16:41:13 +0000 (17:41 +0100)]
scsi: aacraid: Add missing description for 'dev'

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/nark.c:31: warning: Function parameter or member 'dev' not described in 'aac_nark_ioremap'

Link: https://lore.kernel.org/r/20200721164148.2617584-6-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Add missing description for 'dev'
Lee Jones [Tue, 21 Jul 2020 16:41:12 +0000 (17:41 +0100)]
scsi: aacraid: Add missing description for 'dev'

And clean-up a couple of whitespace issues while we're here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/rkt.c:64: warning: Function parameter or member 'dev' not described in 'aac_rkt_ioremap'

Link: https://lore.kernel.org/r/20200721164148.2617584-5-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Add descriptions for missing parameters
Lee Jones [Tue, 21 Jul 2020 16:41:11 +0000 (17:41 +0100)]
scsi: aacraid: Add descriptions for missing parameters

Also clean-up some white space issues while we're here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p2' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p3' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p4' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p5' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p6' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'r1' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'r2' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'r3' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'r4' not described in 'sa_sync_cmd'
 drivers/scsi/aacraid/sa.c:290: warning: Function parameter or member 'dev' not described in 'aac_sa_ioremap'

Link: https://lore.kernel.org/r/20200721164148.2617584-4-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic7xxx: aic79xx_core: Remove a bunch of unused variables
Lee Jones [Tue, 21 Jul 2020 16:41:10 +0000 (17:41 +0100)]
scsi: aic7xxx: aic79xx_core: Remove a bunch of unused variables

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_dump_sglist’:
 drivers/scsi/aic7xxx/aic79xx_core.c:1738:14: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
 1738 | uint32_t len;
 | ^~~
 drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_handle_seqint’:
 drivers/scsi/aic7xxx/aic79xx_core.c:1911:26: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable]
 1911 | struct ahd_transinfo *tinfo;
 | ^~~~~
 drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_handle_transmission_error’:
 drivers/scsi/aic7xxx/aic79xx_core.c:2672:8: warning: variable ‘lqistat2’ set but not used [-Wunused-but-set-variable]
 2672 | u_int lqistat2;
 | ^~~~~~~~
 drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_update_pending_scbs’:
 drivers/scsi/aic7xxx/aic79xx_core.c:4221:31: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable]
 4221 | struct ahd_initiator_tinfo *tinfo;
 | ^~~~~

Link: https://lore.kernel.org/r/20200721164148.2617584-3-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: arcmsr: arcmsr_hba: Remove statement with no effect
Lee Jones [Tue, 21 Jul 2020 16:41:09 +0000 (17:41 +0100)]
scsi: arcmsr: arcmsr_hba: Remove statement with no effect

According to LKP, commit 18bc435e0a1d ("scsi: arcmsr: Remove some set but
unused variables") can be furthered to remove the entire statement and not
just the unused variable read into.

Snipped LKP report:

 config: x86_64-randconfig-m001-20200719
 compiler: gcc-9 (Debian 9.3.0-14) 9.3.0

 New smatch warnings:
  drivers/scsi/arcmsr/arcmsr_hba.c:1490 arcmsr_done4abort_postqueue() warn: statement has no effect 8
  drivers/scsi/arcmsr/arcmsr_hba.c:2459 arcmsr_hbaD_postqueue_isr() warn: statement has no effect 8
  drivers/scsi/arcmsr/arcmsr_hba.c:3526 arcmsr_hbaD_polling_ccbdone() warn: statement has no effect 8

 1a4f550a09f89e Nick Cheng  2007-09-13  1401  static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
 1a4f550a09f89e Nick Cheng  2007-09-13  1402  {
 [...]
 18bc435e0a1de2 Lee Jones   2020-07-13 @1490                             pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Delete this line.
 [...]

Link: https://lore.kernel.org/r/20200721164148.2617584-2-lee.jones@linaro.org
Cc: support@areca.com.tw
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: dpt_i2o: Remove superfluous memset()
Wang Hai [Sat, 18 Jul 2020 12:32:24 +0000 (20:32 +0800)]
scsi: dpt_i2o: Remove superfluous memset()

Fixes coccicheck warning:

./drivers/scsi/dpt_i2o.c:3070:11-29: WARNING:
 dma_alloc_coherent use in sys_tbl already zeroes out memory, so memset is not needed
./drivers/scsi/dpt_i2o.c:2780:10-28: WARNING:
 dma_alloc_coherent use in status already zeroes out memory, so memset is not needed
./drivers/scsi/dpt_i2o.c:2834:20-38: WARNING:
 dma_alloc_coherent use in pHba -> reply_pool already zeroes out memory, so memset is not needed
./drivers/scsi/dpt_i2o.c:1328:10-28: WARNING:
 dma_alloc_coherent use in status already zeroes out memory, so memset is not needed

Link: https://lore.kernel.org/r/20200718123224.1202-1-wanghai38@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: core: Delete unnecessary buffer allocation for every loop iteration
Ye Bin [Fri, 17 Jul 2020 09:09:21 +0000 (17:09 +0800)]
scsi: core: Delete unnecessary buffer allocation for every loop iteration

No need to allocate buffer every loop iteration. Allocate buffer once and
reuse it.

Link: https://lore.kernel.org/r/20200717090921.29243-2-yebin10@huawei.com
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: core: Add missing scsi_device_put() in scsi_host_block()
Ye Bin [Fri, 17 Jul 2020 09:09:20 +0000 (17:09 +0800)]
scsi: core: Add missing scsi_device_put() in scsi_host_block()

The scsi_host_block() case was missing in commit 4dea170f4fb2 ("scsi: core:
Fix incorrect usage of shost_for_each_device").

Link: https://lore.kernel.org/r/20200717090921.29243-1-yebin10@huawei.com
Fixes: 2bb955840c1d ("scsi: core: add scsi_host_(block,unblock) helper function")
Fixes: 4dea170f4fb2 ("scsi: core: Fix incorrect usage of shost_for_each_device")
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: core: Only return started requests from scsi_host_find_tag()
Hannes Reinecke [Mon, 22 Jun 2020 06:30:22 +0000 (08:30 +0200)]
scsi: core: Only return started requests from scsi_host_find_tag()

scsi_host_find_tag() is used by the drivers to return a scsi command based
on the command tag. Typically it's used from the interrupt handler to fetch
the command associated with a value returned from hardware. Some drivers
like fnic or qla4xxx, however, also use it also to traverse outstanding
commands.  With the current implementation scsi_host_find_tag() will return
commands even if they are not started (i.e. passed to the driver).  This
will result in random errors with those drivers.  With this patch
scsi_host_find_tag() will only return 'started' commands (i.e. commands
which have been passed to the drivers) thus avoiding the above issue.  The
other use cases will be unaffected as the interrupt handler naturally will
only ever return 'started' requests.

Link: https://lore.kernel.org/r/20200622063022.67891-1-hare@suse.de
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: fcoe: Use eth_zero_addr() to clear mac address
Miaohe Lin [Mon, 20 Jul 2020 08:39:04 +0000 (16:39 +0800)]
scsi: fcoe: Use eth_zero_addr() to clear mac address

Use eth_zero_addr() to clear mac address insetad of memset().

Link: https://lore.kernel.org/r/1595234344-13955-1-git-send-email-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: fnic: Use eth_broadcast_addr() to assign broadcast address
Miaohe Lin [Mon, 20 Jul 2020 08:24:58 +0000 (16:24 +0800)]
scsi: fnic: Use eth_broadcast_addr() to assign broadcast address

Use eth_broadcast_addr() to assign broadcast address insetad of memset().

Link: https://lore.kernel.org/r/1595233498-13628-1-git-send-email-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: isci: Remove redundant initialization of variable 'status'
Colin Ian King [Thu, 23 Jul 2020 14:26:14 +0000 (15:26 +0100)]
scsi: isci: Remove redundant initialization of variable 'status'

The variable 'status' is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

Link: https://lore.kernel.org/r/20200723142614.991416-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Unused value")

3 years agoscsi: libcxgbi: Remove unnecessary NULL checks for 'tdata' pointer
Varun Prakash [Thu, 23 Jul 2020 11:56:31 +0000 (17:26 +0530)]
scsi: libcxgbi: Remove unnecessary NULL checks for 'tdata' pointer

'tdata' pointer will never be NULL so remove NULL checks.

Link: https://lore.kernel.org/r/1595505391-3335-1-git-send-email-varun@chelsio.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: mesh: Fix panic after host or bus reset
Finn Thain [Wed, 22 Jul 2020 23:25:51 +0000 (09:25 +1000)]
scsi: mesh: Fix panic after host or bus reset

Booting Linux with a Conner CP3200 drive attached to the MESH SCSI bus
results in EH measures and a panic:

[   25.499838] mesh: configured for synchronous 5 MB/s
[   25.787154] mesh: performing initial bus reset...
[   29.867115] scsi host0: MESH
[   29.929527] mesh: target 0 synchronous at 3.6 MB/s
[   29.998763] scsi 0:0:0:0: Direct-Access     CONNER   CP3200-200mb-3.5 4040 PQ: 0 ANSI: 1 CCS
[   31.989975] sd 0:0:0:0: [sda] 415872 512-byte logical blocks: (213 MB/203 MiB)
[   32.070975] sd 0:0:0:0: [sda] Write Protect is off
[   32.137197] sd 0:0:0:0: [sda] Mode Sense: 5b 00 00 08
[   32.209661] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   32.332708]  sda: [mac] sda1 sda2 sda3
[   32.417733] sd 0:0:0:0: [sda] Attached SCSI disk
... snip ...
[   76.687067] mesh_abort((ptrval))
[   76.743606] mesh: state at (ptrval), regs at (ptrval), dma at (ptrval)
[   76.810798]     ct=6000 seq=86 bs=4017 fc= 0 exc= 0 err= 0 im= 7 int= 0 sp=85
[   76.880720]     dma stat=84e0 cmdptr=1f73d000
[   76.941387]     phase=4 msgphase=0 conn_tgt=0 data_ptr=24576
[   77.005567]     dma_st=1 dma_ct=0 n_msgout=0
[   77.065456]     target 0: req=(ptrval) goes_out=0 saved_ptr=0
[   77.130512] mesh_abort((ptrval))
[   77.187670] mesh: state at (ptrval), regs at (ptrval), dma at (ptrval)
[   77.255594]     ct=6000 seq=86 bs=4017 fc= 0 exc= 0 err= 0 im= 7 int= 0 sp=85
[   77.325778]     dma stat=84e0 cmdptr=1f73d000
[   77.387239]     phase=4 msgphase=0 conn_tgt=0 data_ptr=24576
[   77.453665]     dma_st=1 dma_ct=0 n_msgout=0
[   77.515900]     target 0: req=(ptrval) goes_out=0 saved_ptr=0
[   77.582902] mesh_host_reset
[   88.187083] Kernel panic - not syncing: mesh: double DMA start !
[   88.254510] CPU: 0 PID: 358 Comm: scsi_eh_0 Not tainted 5.6.13-pmac #1
[   88.323302] Call Trace:
[   88.378854] [e16ddc58] [c0027080] panic+0x13c/0x308 (unreliable)
[   88.446221] [e16ddcb8] [c02b2478] mesh_start.part.12+0x130/0x414
[   88.513298] [e16ddcf8] [c02b2fc8] mesh_queue+0x54/0x70
[   88.577097] [e16ddd18] [c02a1848] scsi_send_eh_cmnd+0x374/0x384
[   88.643476] [e16dddc8] [c02a1938] scsi_eh_tur+0x5c/0xb8
[   88.707878] [e16dddf8] [c02a1ab8] scsi_eh_test_devices+0x124/0x178
[   88.775663] [e16dde28] [c02a2094] scsi_eh_ready_devs+0x588/0x8a8
[   88.843124] [e16dde98] [c02a31d8] scsi_error_handler+0x344/0x520
[   88.910697] [e16ddf08] [c00409c8] kthread+0xe4/0xe8
[   88.975166] [e16ddf38] [c000f234] ret_from_kernel_thread+0x14/0x1c
[   89.044112] Rebooting in 180 seconds..

In theory, a panic can happen after a bus or host reset with dma_started
flag set. Fix this by halting the DMA before reinitializing the host.
Don't assume that ms->current_req is set when halt_dma() is invoked as it
may not hold for bus or host reset.

BTW, this particular Conner drive can be made to work by inhibiting
disconnect/reselect with 'mesh.resel_targets=0'.

Link: https://lore.kernel.org/r/3952bc691e150a7128b29120999b6092071b039a.1595460351.git.fthain@telegraphics.com.au
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: Paul Mackerras <paulus@ozlabs.org>
Reported-and-tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: libsas: Remove redundant assignment to variable res
Colin Ian King [Wed, 22 Jul 2020 15:44:04 +0000 (16:44 +0100)]
scsi: libsas: Remove redundant assignment to variable res

The variable 'res' is being initialized with a value that is never read and
it is being updated later with a new value. The initialization is redundant
and can be removed.

Link: https://lore.kernel.org/r/20200722154404.959267-1-colin.king@canonical.com
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Unused value")

3 years agoscsi: libsas: Check link status in ATA prereset()
Luo Jiaxing [Wed, 22 Jul 2020 09:04:03 +0000 (17:04 +0800)]
scsi: libsas: Check link status in ATA prereset()

libata currently attempts to reset even if the SATA disk is unplugged.  To
avoid the meaningless reset of a missing disk, libsas should report offline
status to libata. libata already provides a .prereset callback for this
purpose. This is called by ata_eh_reset() and can be used to influence
whether a reset attempt should be made.

Add sas_ata_preset callback to check status of phy and disk. If the disk is
already offline or phy is disabled, we return -ENOENT to libata to avoid
the reset.

Link: https://lore.kernel.org/r/1595408643-63011-3-git-send-email-luojiaxing@huawei.com
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: libsas: Remove postreset from sas_sata_ops
Luo Jiaxing [Wed, 22 Jul 2020 09:04:02 +0000 (17:04 +0800)]
scsi: libsas: Remove postreset from sas_sata_ops

sas_sata_ops uses ata_std_postreset as .postreset callback. However,
ata_std_postreset() calls sata_scr_read()/sata_scr_write() which need to
access the ATA SCR register. This register not available in the libsas case
and the functions always return -EOPNOTSUPP.

Drop the .postreset callback.

Link: https://lore.kernel.org/r/1595408643-63011-2-git-send-email-luojiaxing@huawei.com
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: lpfc: Add dependency on CPU_FREQ
Guenter Roeck [Wed, 22 Jul 2020 02:30:27 +0000 (19:30 -0700)]
scsi: lpfc: Add dependency on CPU_FREQ

Since commit 317aeb83c92b ("scsi: lpfc: Add blk_io_poll support for latency
improvment"), the lpfc driver depends on CPUFREQ. Without it, builds fail
with

drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_init_idle_stat_hb':
drivers/scsi/lpfc/lpfc_sli.c:7329:26: error:
implicit declaration of function 'get_cpu_idle_time'

Add the missing dependency.

Link: https://lore.kernel.org/r/20200722023027.36866-1-linux@roeck-us.net
Fixes: 317aeb83c92b ("scsi: lpfc: Add blk_io_poll support for latency improvment")
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Cc: James Smart <jsmart2021@gmail.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: ppa: Remove superfluous breaks
Liao Pingfang [Tue, 14 Jul 2020 10:59:31 +0000 (18:59 +0800)]
scsi: ppa: Remove superfluous breaks

Remove superfluous breaks, as there is a "return" before them.

Link: https://lore.kernel.org/r/1594724371-11677-1-git-send-email-wang.yi59@zte.com.cn
Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: imm: Remove superfluous breaks
Liao Pingfang [Tue, 14 Jul 2020 10:59:27 +0000 (18:59 +0800)]
scsi: imm: Remove superfluous breaks

Remove superfluous breaks, as there is a "return" before them.

Link: https://lore.kernel.org/r/1594724367-11593-1-git-send-email-wang.yi59@zte.com.cn
Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: block: pm: Simplify resume handling
Alan Stern [Mon, 6 Jul 2020 15:14:36 +0000 (11:14 -0400)]
scsi: block: pm: Simplify resume handling

Commit 05d18ae1cc8a ("scsi: pm: Balance pm_only counter of request queue
during system resume") fixed a problem in the block layer's runtime-PM
code: blk_set_runtime_active() failed to call blk_clear_pm_only().
However, the commit's implementation was awkward; it forced the SCSI
system-resume handler to choose whether to call blk_post_runtime_resume()
or blk_set_runtime_active(), depending on whether or not the SCSI device
had previously been runtime suspended.

This patch simplifies the situation considerably by adding the missing
function call directly into blk_set_runtime_active() (under the condition
that the queue is not already in the RPM_ACTIVE state).  This allows the
SCSI routine to revert back to its original form.  Furthermore, making this
change reveals that blk_post_runtime_resume() (in its success pathway) does
exactly the same thing as blk_set_runtime_active().  The duplicate code is
easily removed by making one routine call the other.

No functional changes are intended.

Link: https://lore.kernel.org/r/20200706151436.GA702867@rowland.harvard.edu
CC: Can Guo <cang@codeaurora.org>
CC: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: ufs-qcom: Add Inline Crypto Engine support
Eric Biggers [Fri, 10 Jul 2020 07:20:12 +0000 (00:20 -0700)]
scsi: ufs-qcom: Add Inline Crypto Engine support

Add support for Qualcomm Inline Crypto Engine (ICE) to ufs-qcom.

The standards-compliant parts, such as querying the crypto capabilities and
enabling crypto for individual UFS requests, are already handled by
ufshcd-crypto.c, which itself is wired into the blk-crypto framework.
However, ICE requires vendor-specific init, enable, and resume logic, and
it requires that keys be programmed and evicted by vendor-specific SMC
calls.  Make the ufs-qcom driver handle these details.

I tested this on Dragonboard 845c, which is a publicly available
development board that uses the Snapdragon 845 SoC and runs the upstream
Linux kernel.  This is the same SoC used in the Pixel 3 and Pixel 3 XL
phones.  This testing included (among other things) verifying that the
expected ciphertext was produced, both manually using ext4 encryption and
automatically using a block layer self-test I've written.

I've also tested that this driver works nearly as-is on the Snapdragon 765
and Snapdragon 865 SoCs.  And others have tested it on Snapdragon 850,
Snapdragon 855, and Snapdragon 865 (see the Tested-by tags).

This is based very loosely on the vendor-provided driver in the kernel
source code for the Pixel 3, but I've greatly simplified it.  Also, for now
I've only included support for major version 3 of ICE, since that's all I
have the hardware to test with the mainline kernel.  Plus it appears that
version 3 is easier to use than older versions of ICE.

For now, only allow using AES-256-XTS.  The hardware also declares support
for AES-128-XTS, AES-{128,256}-ECB, and AES-{128,256}-CBC (BitLocker
variant).  But none of these others are really useful, and they'd need to
be individually tested to be sure they worked properly.

This commit also changes the name of the loadable module from "ufs-qcom" to
"ufs_qcom", as this is necessary to compile it from multiple source files
(unless we were to rename ufs-qcom.c).

Link: https://lore.kernel.org/r/20200710072013.177481-6-ebiggers@kernel.org
Tested-by: Steev Klimaszewski <steev@kali.org> # Lenovo Yoga C630
Tested-by: Thara Gopinath <thara.gopinath@linaro.org> # db845c, sm8150-mtp, sm8250-mtp
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: ufs: Add program_key() variant op
Eric Biggers [Fri, 10 Jul 2020 07:20:11 +0000 (00:20 -0700)]
scsi: ufs: Add program_key() variant op

On Snapdragon SoCs, the Linux kernel isn't permitted to directly access the
standard UFS crypto configuration registers.  Instead, programming and
evicting keys must be done through vendor-specific SMC calls.

To support this hardware, add a ->program_key() method to 'struct
ufs_hba_variant_ops'.  This allows overriding the UFS standard key
programming / eviction procedure.

Link: https://lore.kernel.org/r/20200710072013.177481-5-ebiggers@kernel.org
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: ufs-qcom: Name the dev_ref_clk_ctrl registers
Eric Biggers [Fri, 10 Jul 2020 07:20:09 +0000 (00:20 -0700)]
scsi: ufs-qcom: Name the dev_ref_clk_ctrl registers

In preparation for adding another optional register range to the ufs-qcom
driver, name the existing optional register range "dev_ref_clk_ctrl_mem".
This allows the driver to refer to the optional register ranges by name
rather than index.

No device-tree files actually have to be updated due to this change, since
none of them actually declares these registers.

Link: https://lore.kernel.org/r/20200710072013.177481-3-ebiggers@kernel.org
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: firmware: qcom_scm: Add support for programming inline crypto keys
Eric Biggers [Fri, 10 Jul 2020 07:20:08 +0000 (00:20 -0700)]
scsi: firmware: qcom_scm: Add support for programming inline crypto keys

Add support for the Inline Crypto Engine (ICE) key programming interface
that's needed for the ufs-qcom driver to use inline encryption on
Snapdragon SoCs.  This interface consists of two SCM calls: one to program
a key into a keyslot, and one to invalidate a keyslot.

Although the UFS specification defines a standard way to do this, on these
SoCs the Linux kernel isn't permitted to access the needed crypto
configuration registers directly; these SCM calls must be used instead.

Link: https://lore.kernel.org/r/20200710072013.177481-2-ebiggers@kernel.org
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic79xx: Restore modes when exiting ahd_linux_queue_abort_cmd()
Hannes Reinecke [Tue, 14 Jul 2020 16:03:01 +0000 (18:03 +0200)]
scsi: aic79xx: Restore modes when exiting ahd_linux_queue_abort_cmd()

ahd_linux_queue_abort_cmd() calls ahd_save_modes() without calling
ahd_restore_modes() before exiting.

Link: https://lore.kernel.org/r/20200714160301.4482-1-hare@suse.de
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: megaraid_sas: Clear affinity hint
Tomas Henzl [Thu, 9 Jul 2020 13:31:44 +0000 (15:31 +0200)]
scsi: megaraid_sas: Clear affinity hint

To avoid a warning in free_irq, clear the affinity hint.

Link: https://lore.kernel.org/r/20200709133144.8363-1-thenzl@redhat.com
Fixes: f0b9e7bdc309 ("scsi: megaraid_sas: Set affinity for high IOPS reply queues")
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: hpsa: Bump version
Don Brace [Mon, 20 Jul 2020 21:53:09 +0000 (16:53 -0500)]
scsi: hpsa: Bump version

Link: https://lore.kernel.org/r/159528198909.24772.9189002306398058371.stgit@brunhilda
Reviewed-by: Gerry Morong <gerry.morong@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: hpsa: Increase controller error handling timeout
Don Brace [Mon, 20 Jul 2020 21:53:03 +0000 (16:53 -0500)]
scsi: hpsa: Increase controller error handling timeout

The controller can become slow to respond to SCSI INQUIRY requests
resulting in the SCSI midlayer offlining the controller device.

Increase the timeout value for commands sent to the controller device.

Link: https://lore.kernel.org/r/159528198335.24772.7963614374905470122.stgit@brunhilda
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: hpsa: Increase queue depth for external LUNs
Don Brace [Mon, 20 Jul 2020 21:52:57 +0000 (16:52 -0500)]
scsi: hpsa: Increase queue depth for external LUNs

Increase queue_depth for PTRAID devices to improve performance.

Link: https://lore.kernel.org/r/159528197765.24772.15623281371636788406.stgit@brunhilda
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: hpsa: Correct rare oob condition
Don Brace [Mon, 20 Jul 2020 21:52:51 +0000 (16:52 -0500)]
scsi: hpsa: Correct rare oob condition

There are some rare conditions where a spare is first in the device list
causing an array out-of-bounds condition.

Link: https://lore.kernel.org/r/159528197176.24772.14659026352708896249.stgit@brunhilda
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: scsi_transport_iscsi: Drop a duplicated word
Randy Dunlap [Sun, 19 Jul 2020 00:32:32 +0000 (17:32 -0700)]
scsi: scsi_transport_iscsi: Drop a duplicated word

Drop the repeated word "the" in a comment.

Link: https://lore.kernel.org/r/20200719003232.21301-1-rdunlap@infradead.org
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: scsi_transport_sas: Add missing newline in sysfs 'enable' attribute
Xiongfeng Wang [Fri, 17 Jul 2020 08:44:32 +0000 (16:44 +0800)]
scsi: scsi_transport_sas: Add missing newline in sysfs 'enable' attribute

Add newline when formatting SAS transport class phy 'enable' attribute.

[root@localhost ~]# cat /sys/devices/pci0000:00/0000:00:0d.0/0000:0f:00.0/host3/phy-3:2/sas_phy/phy-3:2/enable
1[root@localhost ~]#

Link: https://lore.kernel.org/r/1594975472-12486-1-git-send-email-wangxiongfeng2@huawei.com
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Bart van Assche <bvanassche@acm.org>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: sd_zbc: Don't limit max_zone_append sectors to max_hw_sectors
Johannes Thumshirn [Thu, 16 Jul 2020 09:16:06 +0000 (18:16 +0900)]
scsi: sd_zbc: Don't limit max_zone_append sectors to max_hw_sectors

Don't clamp the maximum number of zone append sectors to the maximum number
of hardware sectors in sd as the block layer is already enforcing this
limit when setting max_zone_append_sectors.

Link: https://lore.kernel.org/r/20200716091606.38316-1-johannes.thumshirn@wdc.com
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic7xxx: Fix 'amount_xferred' set but not used issue
Lee Jones [Mon, 13 Jul 2020 08:00:00 +0000 (09:00 +0100)]
scsi: aic7xxx: Fix 'amount_xferred' set but not used issue

'amount_xferred' is used, but only in certain circumstances.  Place
the same stipulations on the defining/allocating of 'amount_xferred'
as is placed when using it.

We've been careful not to change any of the ordering semantics here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_done’:
 drivers/scsi/aic7xxx/aic79xx_osm.c:1796:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20200713080001.128044-24-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic7xxx: Remove unused variables 'wait' and 'paused'
Lee Jones [Mon, 13 Jul 2020 07:59:59 +0000 (08:59 +0100)]
scsi: aic7xxx: Remove unused variables 'wait' and 'paused'

It looks like they have never actually been used.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_dev_reset’:
 drivers/scsi/aic7xxx/aic79xx_osm.c:782:9: warning: variable ‘wait’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/aic7xxx/aic79xx_osm.c:781:9: warning: variable ‘paused’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20200713080001.128044-23-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic7xxx: Remove unused variable 'ahd'
Lee Jones [Mon, 13 Jul 2020 07:59:58 +0000 (08:59 +0100)]
scsi: aic7xxx: Remove unused variable 'ahd'

Hasn't been used since 2005.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_slave_configure’:
 drivers/scsi/aic7xxx/aic79xx_osm.c:703:20: warning: variable ‘ahd’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20200713080001.128044-22-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: lpfc: Correct some pretty obvious misdocumentation
Lee Jones [Mon, 13 Jul 2020 07:59:57 +0000 (08:59 +0100)]
scsi: lpfc: Correct some pretty obvious misdocumentation

Either due to API slippage before the driver was mainlined or copy/paste
errors.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/lpfc/lpfc_nvme.c:254: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_create_queue'
 drivers/scsi/lpfc/lpfc_nvme.c:254: warning: Function parameter or member 'qsize' not described in 'lpfc_nvme_create_queue'
 drivers/scsi/lpfc/lpfc_nvme.c:254: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_create_queue'
 drivers/scsi/lpfc/lpfc_nvme.c:311: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_delete_queue'
 drivers/scsi/lpfc/lpfc_nvme.c:311: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_delete_queue'
 drivers/scsi/lpfc/lpfc_nvme.c:689: warning: Function parameter or member 'gen_req_cmp' not described in '__lpfc_nvme_ls_req'
 drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_ls_req'
 drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_ls_req'
 drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Function parameter or member 'pnvme_lsreq' not described in 'lpfc_nvme_ls_req'
 drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_ls_req'
 drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_ls_req'
 drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_ls_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_ls_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Function parameter or member 'pnvme_lsreq' not described in 'lpfc_nvme_ls_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_ls_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_ls_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Function parameter or member 'phba' not described in 'lpfc_nvme_io_cmd_wqe_cmpl'
 drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Function parameter or member 'pwqeIn' not described in 'lpfc_nvme_io_cmd_wqe_cmpl'
 drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Function parameter or member 'wcqe' not described in 'lpfc_nvme_io_cmd_wqe_cmpl'
 drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_io_cmd_wqe_cmpl'
 drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_io_cmd_wqe_cmpl'
 drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_io_cmd_wqe_cmpl'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Function parameter or member 'lpfc_ncmd' not described in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Function parameter or member 'pnode' not described in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Function parameter or member 'cstat' not described in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'hw_queue_handle' description in 'lpfc_nvme_prep_io_cmd'
 drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_prep_io_dma'
 drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Function parameter or member 'lpfc_ncmd' not described in 'lpfc_nvme_prep_io_dma'
 drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_prep_io_dma'
 drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_prep_io_dma'
 drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_prep_io_dma'
 drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_prep_io_dma'
 drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'hw_queue_handle' description in 'lpfc_nvme_prep_io_dma'
 drivers/scsi/lpfc/lpfc_nvme.c:1598: warning: bad line:  indicated in @lpfc_nvme_rport.
 drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_fcp_io_submit'
 drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_fcp_io_submit'
 drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Function parameter or member 'pnvme_fcreq' not described in 'lpfc_nvme_fcp_io_submit'
 drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_fcp_io_submit'
 drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_fcp_io_submit'
 drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_fcp_io_submit'
 drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_fcp_io_submit'
 drivers/scsi/lpfc/lpfc_nvme.c:1856: warning: Function parameter or member 'abts_cmpl' not described in 'lpfc_nvme_abort_fcreq_cmpl'
 drivers/scsi/lpfc/lpfc_nvme.c:1856: warning: Excess function parameter 'rspiocb' description in 'lpfc_nvme_abort_fcreq_cmpl'
 drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_fcp_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_fcp_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Function parameter or member 'pnvme_fcreq' not described in 'lpfc_nvme_fcp_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_fcp_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_fcp_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_fcp_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_fcp_abort'
 drivers/scsi/lpfc/lpfc_nvme.c:2093: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_nvme_buf'
 drivers/scsi/lpfc/lpfc_nvme.c:2093: warning: Function parameter or member 'idx' not described in 'lpfc_get_nvme_buf'
 drivers/scsi/lpfc/lpfc_nvme.c:2093: warning: Function parameter or member 'expedite' not described in 'lpfc_get_nvme_buf'
 drivers/scsi/lpfc/lpfc_nvme.c:2197: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_create_localport'
 drivers/scsi/lpfc/lpfc_nvme.c:2330: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_destroy_localport'
 drivers/scsi/lpfc/lpfc_nvme.c:2330: warning: Excess function parameter 'pnvme' description in 'lpfc_nvme_destroy_localport'
 drivers/scsi/lpfc/lpfc_nvme.c:2543: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_rescan_port'
 drivers/scsi/lpfc/lpfc_nvme.c:2543: warning: Function parameter or member 'ndlp' not described in 'lpfc_nvme_rescan_port'

Link: https://lore.kernel.org/r/20200713080001.128044-21-lee.jones@linaro.org
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: be2iscsi: Add missing function parameter description
Lee Jones [Mon, 13 Jul 2020 07:59:56 +0000 (08:59 +0100)]
scsi: be2iscsi: Add missing function parameter description

Also promote fully documented function header to kerneldoc.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/be2iscsi/be_mgmt.c:112: warning: Function parameter or member 'phba' not described in 'mgmt_open_connection'

Link: https://lore.kernel.org/r/20200713080001.128044-20-lee.jones@linaro.org
Cc: Subbu Seetharaman <subbu.seetharaman@broadcom.com>
Cc: Ketan Mukadam <ketan.mukadam@broadcom.com>
Cc: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Cc: linux-drivers@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: be2iscsi: Fix misdocumentation of 'pcontext'
Lee Jones [Mon, 13 Jul 2020 07:59:55 +0000 (08:59 +0100)]
scsi: be2iscsi: Fix misdocumentation of 'pcontext'

Also demote unintentional kerneldoc header.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/be2iscsi/be_main.c:986: warning: Function parameter or member 'pcontext' not described in 'alloc_wrb_handle'
 drivers/scsi/be2iscsi/be_main.c:986: warning: Excess function parameter 'pwrb_context' description in 'alloc_wrb_handle'
 drivers/scsi/be2iscsi/be_main.c:1409: warning: Function parameter or member 'beiscsi_conn' not described in 'beiscsi_complete_pdu'
 drivers/scsi/be2iscsi/be_main.c:1409: warning: Function parameter or member 'phdr' not described in 'beiscsi_complete_pdu'
 drivers/scsi/be2iscsi/be_main.c:1409: warning: Function parameter or member 'pdata' not described in 'beiscsi_complete_pdu'
 drivers/scsi/be2iscsi/be_main.c:1409: warning: Function parameter or member 'dlen' not described in 'beiscsi_complete_pdu'

Link: https://lore.kernel.org/r/20200713080001.128044-19-lee.jones@linaro.org
Cc: Subbu Seetharaman <subbu.seetharaman@broadcom.com>
Cc: Ketan Mukadam <ketan.mukadam@broadcom.com>
Cc: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Cc: linux-drivers@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: be2iscsi: Fix API/documentation slip
Lee Jones [Mon, 13 Jul 2020 07:59:54 +0000 (08:59 +0100)]
scsi: be2iscsi: Fix API/documentation slip

And add descriptions for a couple of missing function parameters.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/be2iscsi/be_iscsi.c:38: warning: Function parameter or member 'ep' not described in 'beiscsi_session_create'
 drivers/scsi/be2iscsi/be_iscsi.c:173: warning: Function parameter or member 'is_leading' not described in 'beiscsi_conn_bind'
 drivers/scsi/be2iscsi/be_iscsi.c:998: warning: Function parameter or member 'beiscsi_ep' not described in 'beiscsi_free_ep'
 drivers/scsi/be2iscsi/be_iscsi.c:998: warning: Excess function parameter 'ep' description in 'beiscsi_free_ep'
 drivers/scsi/be2iscsi/be_iscsi.c:1039: warning: Function parameter or member 'non_blocking' not described in 'beiscsi_open_conn'
 drivers/scsi/be2iscsi/be_iscsi.c:1135: warning: Function parameter or member 'shost' not described in 'beiscsi_ep_connect'
 drivers/scsi/be2iscsi/be_iscsi.c:1135: warning: Excess function parameter 'scsi_host' description in 'beiscsi_ep_connect'
 drivers/scsi/be2iscsi/be_iscsi.c:1236: warning: Function parameter or member 'beiscsi_ep' not described in 'beiscsi_conn_close'
 drivers/scsi/be2iscsi/be_iscsi.c:1236: warning: Excess function parameter 'ep' description in 'beiscsi_conn_close'

Link: https://lore.kernel.org/r/20200713080001.128044-18-lee.jones@linaro.org
Cc: Subbu Seetharaman <subbu.seetharaman@broadcom.com>
Cc: Ketan Mukadam <ketan.mukadam@broadcom.com>
Cc: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Cc: linux-drivers@broadcom.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: myrs: Demote obvious misuse of kerneldoc to standard comment blocks
Lee Jones [Mon, 13 Jul 2020 07:59:52 +0000 (08:59 +0100)]
scsi: myrs: Demote obvious misuse of kerneldoc to standard comment blocks

No attempt has been made to document any of the demoted functions here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/myrs.c:94: warning: Function parameter or member 'cmd_blk' not described in 'myrs_reset_cmd'
 drivers/scsi/myrs.c:105: warning: Function parameter or member 'cs' not described in 'myrs_qcmd'
 drivers/scsi/myrs.c:105: warning: Function parameter or member 'cmd_blk' not described in 'myrs_qcmd'
 drivers/scsi/myrs.c:130: warning: Function parameter or member 'cs' not described in 'myrs_exec_cmd'
 drivers/scsi/myrs.c:130: warning: Function parameter or member 'cmd_blk' not described in 'myrs_exec_cmd'
 drivers/scsi/myrs.c:149: warning: Function parameter or member 'cs' not described in 'myrs_report_progress'
 drivers/scsi/myrs.c:149: warning: Function parameter or member 'ldev_num' not described in 'myrs_report_progress'
 drivers/scsi/myrs.c:149: warning: Function parameter or member 'msg' not described in 'myrs_report_progress'
 drivers/scsi/myrs.c:149: warning: Function parameter or member 'blocks' not described in 'myrs_report_progress'
 drivers/scsi/myrs.c:149: warning: Function parameter or member 'size' not described in 'myrs_report_progress'
 drivers/scsi/myrs.c:160: warning: Function parameter or member 'cs' not described in 'myrs_get_ctlr_info'
 drivers/scsi/myrs.c:222: warning: Function parameter or member 'cs' not described in 'myrs_get_ldev_info'
 drivers/scsi/myrs.c:222: warning: Function parameter or member 'ldev_num' not described in 'myrs_get_ldev_info'
 drivers/scsi/myrs.c:222: warning: Function parameter or member 'ldev_info' not described in 'myrs_get_ldev_info'
 drivers/scsi/myrs.c:310: warning: Function parameter or member 'cs' not described in 'myrs_get_pdev_info'
 drivers/scsi/myrs.c:310: warning: Function parameter or member 'channel' not described in 'myrs_get_pdev_info'
 drivers/scsi/myrs.c:310: warning: Function parameter or member 'target' not described in 'myrs_get_pdev_info'
 drivers/scsi/myrs.c:310: warning: Function parameter or member 'lun' not described in 'myrs_get_pdev_info'
 drivers/scsi/myrs.c:310: warning: Function parameter or member 'pdev_info' not described in 'myrs_get_pdev_info'
 drivers/scsi/myrs.c:353: warning: Function parameter or member 'cs' not described in 'myrs_dev_op'
 drivers/scsi/myrs.c:353: warning: Function parameter or member 'opcode' not described in 'myrs_dev_op'
 drivers/scsi/myrs.c:353: warning: Function parameter or member 'opdev' not described in 'myrs_dev_op'
 drivers/scsi/myrs.c:379: warning: Function parameter or member 'cs' not described in 'myrs_translate_pdev'
 drivers/scsi/myrs.c:379: warning: Function parameter or member 'channel' not described in 'myrs_translate_pdev'
 drivers/scsi/myrs.c:379: warning: Function parameter or member 'target' not described in 'myrs_translate_pdev'
 drivers/scsi/myrs.c:379: warning: Function parameter or member 'lun' not described in 'myrs_translate_pdev'
 drivers/scsi/myrs.c:379: warning: Function parameter or member 'devmap' not described in 'myrs_translate_pdev'
 drivers/scsi/myrs.c:422: warning: Function parameter or member 'cs' not described in 'myrs_get_event'
 drivers/scsi/myrs.c:422: warning: Function parameter or member 'event_num' not described in 'myrs_get_event'
 drivers/scsi/myrs.c:422: warning: Function parameter or member 'event_buf' not described in 'myrs_get_event'
 drivers/scsi/myrs.c:484: warning: Function parameter or member 'cs' not described in 'myrs_enable_mmio_mbox'
 drivers/scsi/myrs.c:484: warning: Function parameter or member 'enable_mbox_fn' not described in 'myrs_enable_mmio_mbox'
 drivers/scsi/myrs.c:584: warning: Function parameter or member 'cs' not described in 'myrs_get_config'
 drivers/scsi/myrs.c:688: warning: cannot understand function prototype: 'struct '
 drivers/scsi/myrs.c:1967: warning: Function parameter or member 'dev' not described in 'myrs_is_raid'
 drivers/scsi/myrs.c:1980: warning: Function parameter or member 'dev' not described in 'myrs_get_resync'
 drivers/scsi/myrs.c:2005: warning: Function parameter or member 'dev' not described in 'myrs_get_state'
 drivers/scsi/myrs.c:2343: warning: bad line:   the Error Status Register when the driver performs the BIOS handshaking.
 drivers/scsi/myrs.c:2344: warning: bad line:   It returns true for fatal errors and false otherwise.
 drivers/scsi/myrs.c:2349: warning: Function parameter or member 'cs' not described in 'myrs_err_status'
 drivers/scsi/myrs.c:2349: warning: Function parameter or member 'status' not described in 'myrs_err_status'
 drivers/scsi/myrs.c:2349: warning: Function parameter or member 'parm0' not described in 'myrs_err_status'
 drivers/scsi/myrs.c:2349: warning: Function parameter or member 'parm1' not described in 'myrs_err_status'

Link: https://lore.kernel.org/r/20200713080001.128044-16-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@kernel.org>
Cc: Linux GmbH <hare@suse.com>
Cc: "Leonard N. Zubkoff" <lnz@dandelion.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: ipr: Fix struct packed-not-aligned issues
Lee Jones [Mon, 13 Jul 2020 07:59:51 +0000 (08:59 +0100)]
scsi: ipr: Fix struct packed-not-aligned issues

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/ipr.h:1687:1: warning: alignment 1 of ‘struct ipr_dump_location_entry’ is less than 4 [-Wpacked-not-aligned]
 1687 | }__attribute__((packed));
 | ^
 drivers/scsi/ipr.h:1711:1: warning: alignment 1 of ‘struct ipr_driver_dump’ is less than 4 [-Wpacked-not-aligned]
 1711 | }__attribute__((packed));
 | ^

Link: https://lore.kernel.org/r/20200713080001.128044-15-lee.jones@linaro.org
Cc: Brian King <brking@us.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: ipr: Remove a bunch of set but checked variables
Lee Jones [Mon, 13 Jul 2020 07:59:50 +0000 (08:59 +0100)]
scsi: ipr: Remove a bunch of set but checked variables

Fixes the following W=1 kernel build warning(s):

In file included from  drivers/scsi/ipr.c:73:
 drivers/scsi/ipr.c: In function ‘ipr_mask_and_clear_interrupts’:
 drivers/scsi/ipr.c:740:15: warning: variable ‘int_reg’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/ipr.c: In function ‘ipr_cancel_op’:
 drivers/scsi/ipr.c:5497:13: warning: variable ‘int_reg’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/ipr.c: In function ‘ipr_iopoll’:
 drivers/scsi/ipr.c:5765:22: warning: variable ‘ioa_cfg’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/ipr.c: In function ‘ipr_reset_restore_cfg_space’:
 drivers/scsi/ipr.c:8662:6: warning: variable ‘int_reg’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/ipr.c: In function ‘ipr_test_msi’:

Link: https://lore.kernel.org/r/20200713080001.128044-14-lee.jones@linaro.org
Cc: Brian King <brking@us.ibm.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: virtio_scsi: Demote seemingly unintentional kerneldoc header
Lee Jones [Mon, 13 Jul 2020 07:59:49 +0000 (08:59 +0100)]
scsi: virtio_scsi: Demote seemingly unintentional kerneldoc header

This is the only use of kerneldoc in the sourcefile and no descriptions are
provided.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/virtio_scsi.c:109: warning: Function parameter or member 'vscsi' not described in 'virtscsi_complete_cmd'
 drivers/scsi/virtio_scsi.c:109: warning: Function parameter or member 'buf' not described in 'virtscsi_complete_cmd'

Link: https://lore.kernel.org/r/20200713080001.128044-13-lee.jones@linaro.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: ipr: Fix a mountain of kerneldoc misdemeanours
Lee Jones [Mon, 13 Jul 2020 07:59:48 +0000 (08:59 +0100)]
scsi: ipr: Fix a mountain of kerneldoc misdemeanours

Mainly misspellings and/or missing function parameter descriptions.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/ipr.c:10100:15: warning: variable ‘int_reg’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/ipr.c:679: warning: Function parameter or member 'fast_done' not described in 'ipr_init_ipr_cmnd'
 drivers/scsi/ipr.c:697: warning: Function parameter or member 'hrrq' not described in '__ipr_get_free_ipr_cmnd'
 drivers/scsi/ipr.c:697: warning: Excess function parameter 'ioa_cfg' description in '__ipr_get_free_ipr_cmnd'
 drivers/scsi/ipr.c:1297: warning: Function parameter or member 'buffer' not described in '__ipr_format_res_path'
 drivers/scsi/ipr.c:1297: warning: Excess function parameter 'buf' description in '__ipr_format_res_path'
 drivers/scsi/ipr.c:1321: warning: Function parameter or member 'buffer' not described in 'ipr_format_res_path'
 drivers/scsi/ipr.c:1321: warning: Excess function parameter 'buf' description in 'ipr_format_res_path'
 drivers/scsi/ipr.c:1400: warning: Excess function parameter 'cfgtew' description in 'ipr_clear_res_target'
 drivers/scsi/ipr.c:2679: warning: Function parameter or member 't' not described in 'ipr_timeout'
 drivers/scsi/ipr.c:2679: warning: Excess function parameter 'ipr_cmd' description in 'ipr_timeout'
 drivers/scsi/ipr.c:2712: warning: Function parameter or member 't' not described in 'ipr_oper_timeout'
 drivers/scsi/ipr.c:2712: warning: Excess function parameter 'ipr_cmd' description in 'ipr_oper_timeout'
 drivers/scsi/ipr.c:3494: warning: Function parameter or member 'attr' not described in 'ipr_show_fw_version'
 drivers/scsi/ipr.c:3528: warning: Function parameter or member 'attr' not described in 'ipr_show_log_level'
 drivers/scsi/ipr.c:3551: warning: Function parameter or member 'attr' not described in 'ipr_store_log_level'
 drivers/scsi/ipr.c:3551: warning: Function parameter or member 'count' not described in 'ipr_store_log_level'
 drivers/scsi/ipr.c:3586: warning: Function parameter or member 'attr' not described in 'ipr_store_diagnostics'
 drivers/scsi/ipr.c:3642: warning: Function parameter or member 'dev' not described in 'ipr_show_adapter_state'
 drivers/scsi/ipr.c:3642: warning: Function parameter or member 'attr' not described in 'ipr_show_adapter_state'
 drivers/scsi/ipr.c:3642: warning: Excess function parameter 'class_dev' description in 'ipr_show_adapter_state'
 drivers/scsi/ipr.c:3671: warning: Function parameter or member 'attr' not described in 'ipr_store_adapter_state'
 drivers/scsi/ipr.c:3722: warning: Function parameter or member 'attr' not described in 'ipr_store_reset_adapter'
 drivers/scsi/ipr.c:3783: warning: Function parameter or member 'attr' not described in 'ipr_store_iopoll_weight'
 drivers/scsi/ipr.c:3783: warning: Function parameter or member 'count' not described in 'ipr_store_iopoll_weight'
 drivers/scsi/ipr.c:3883: warning: Function parameter or member 'sglist' not described in 'ipr_free_ucode_buffer'
 drivers/scsi/ipr.c:3883: warning: Excess function parameter 'p_dnld' description in 'ipr_free_ucode_buffer'
 drivers/scsi/ipr.c:4074: warning: Function parameter or member 'dev' not described in 'ipr_store_update_fw'
 drivers/scsi/ipr.c:4074: warning: Function parameter or member 'attr' not described in 'ipr_store_update_fw'
 drivers/scsi/ipr.c:4074: warning: Excess function parameter 'class_dev' description in 'ipr_store_update_fw'
 drivers/scsi/ipr.c:4149: warning: Function parameter or member 'attr' not described in 'ipr_show_fw_type'
 drivers/scsi/ipr.c:4489: warning: Excess function parameter 'reason' description in 'ipr_change_queue_depth'
 drivers/scsi/ipr.c:4660: warning: Function parameter or member 'attr' not described in 'ipr_show_raw_mode'
 drivers/scsi/ipr.c:4688: warning: Function parameter or member 'attr' not described in 'ipr_store_raw_mode'
 drivers/scsi/ipr.c:4688: warning: Function parameter or member 'count' not described in 'ipr_store_raw_mode'
 drivers/scsi/ipr.c:5069: warning: Function parameter or member 'ipr_cmd' not described in 'ipr_cmnd_is_free'
 drivers/scsi/ipr.c:5108: warning: Function parameter or member 'ioa_cfg' not described in 'ipr_wait_for_ops'
 drivers/scsi/ipr.c:5108: warning: Excess function parameter 'ipr_cmd' description in 'ipr_wait_for_ops'
 drivers/scsi/ipr.c:5272: warning: Function parameter or member 'deadline' not described in 'ipr_sata_reset'
 drivers/scsi/ipr.c:5453: warning: Function parameter or member 't' not described in 'ipr_abort_timeout'
 drivers/scsi/ipr.c:5453: warning: Excess function parameter 'ipr_cmd' description in 'ipr_abort_timeout'
 drivers/scsi/ipr.c:5578: warning: Function parameter or member 'shost' not described in 'ipr_scan_finished'
 drivers/scsi/ipr.c:5578: warning: Function parameter or member 'elapsed_time' not described in 'ipr_scan_finished'
 drivers/scsi/ipr.c:5578: warning: Excess function parameter 'scsi_cmd' description in 'ipr_scan_finished'
 drivers/scsi/ipr.c:5704: warning: Function parameter or member 'number' not described in 'ipr_isr_eh'
 drivers/scsi/ipr.c:6278: warning: Function parameter or member 'ipr_cmd' not described in 'ipr_gen_sense'
 drivers/scsi/ipr.c:6278: warning: Excess function parameter 'ioasa' description in 'ipr_gen_sense'
 drivers/scsi/ipr.c:6278: warning: Excess function parameter 'sense_buf' description in 'ipr_gen_sense'
 drivers/scsi/ipr.c:6711: warning: Function parameter or member 'host' not described in 'ipr_ioa_info'
 drivers/scsi/ipr.c:6711: warning: Excess function parameter 'scsi_host' description in 'ipr_ioa_info'
 drivers/scsi/ipr.c:7606: warning: Function parameter or member 'res_handle' not described in 'ipr_build_mode_sense'
 drivers/scsi/ipr.c:7606: warning: Excess function parameter 'res' description in 'ipr_build_mode_sense'
 drivers/scsi/ipr.c:7947: warning: Function parameter or member 'ipr_cmd' not described in 'ipr_ioafp_set_caching_parameters'
 drivers/scsi/ipr.c:7986: warning: Function parameter or member 'flags' not described in 'ipr_ioafp_inquiry'
 drivers/scsi/ipr.c:7986: warning: Function parameter or member 'page' not described in 'ipr_ioafp_inquiry'
 drivers/scsi/ipr.c:7986: warning: Function parameter or member 'dma_addr' not described in 'ipr_ioafp_inquiry'
 drivers/scsi/ipr.c:7986: warning: Function parameter or member 'xfer_len' not described in 'ipr_ioafp_inquiry'
 drivers/scsi/ipr.c:8280: warning: Function parameter or member 't' not described in 'ipr_reset_timer_done'
 drivers/scsi/ipr.c:8280: warning: Excess function parameter 'ipr_cmd' description in 'ipr_reset_timer_done'
 drivers/scsi/ipr.c:9486: warning: bad line:
 drivers/scsi/ipr.c:9609: warning: Function parameter or member 'ioa_cfg' not described in 'ipr_free_all_resources'
 drivers/scsi/ipr.c:9609: warning: Excess function parameter 'ipr_cmd' description in 'ipr_free_all_resources'
 drivers/scsi/ipr.c:10071: warning: Function parameter or member 'irq' not described in 'ipr_test_intr'
 drivers/scsi/ipr.c:10071: warning: Function parameter or member 'devp' not described in 'ipr_test_intr'
 drivers/scsi/ipr.c:10071: warning: Excess function parameter 'pdev' description in 'ipr_test_intr'
 drivers/scsi/ipr.c:10098: warning: Function parameter or member 'ioa_cfg' not described in 'ipr_test_msi'
 drivers/scsi/ipr.c:10538: warning: Function parameter or member 'pdev' not described in 'ipr_probe'
 drivers/scsi/ipr.c:10538: warning: Function parameter or member 'dev_id' not described in 'ipr_probe'
 drivers/scsi/ipr.c:10794: warning: Function parameter or member 'ipr_cmd' not described in 'ipr_halt_done'
 drivers/scsi/ipr.c:10805: warning: Function parameter or member 'nb' not described in 'ipr_halt'
 drivers/scsi/ipr.c:10805: warning: Function parameter or member 'event' not described in 'ipr_halt'
 drivers/scsi/ipr.c:10805: warning: Function parameter or member 'buf' not described in 'ipr_halt'

Link: https://lore.kernel.org/r/20200713080001.128044-12-lee.jones@linaro.org
Cc: Brian King <brking@us.ibm.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: pm8001: Provide descriptions for the many undocumented 'attr's
Lee Jones [Mon, 13 Jul 2020 07:59:47 +0000 (08:59 +0100)]
scsi: pm8001: Provide descriptions for the many undocumented 'attr's

... even if they are completely unused.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/pm8001/pm8001_ctl.c:56: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_mpi_interface_rev_show'
 drivers/scsi/pm8001/pm8001_ctl.c:81: warning: Function parameter or member 'attr' not described in 'controller_fatal_error_show'
 drivers/scsi/pm8001/pm8001_ctl.c:100: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_fw_version_show'
 drivers/scsi/pm8001/pm8001_ctl.c:130: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_ila_version_show'
 drivers/scsi/pm8001/pm8001_ctl.c:155: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_inactive_fw_version_show'
 drivers/scsi/pm8001/pm8001_ctl.c:181: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_max_out_io_show'
 drivers/scsi/pm8001/pm8001_ctl.c:204: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_max_devices_show'
 drivers/scsi/pm8001/pm8001_ctl.c:230: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_max_sg_list_show'
 drivers/scsi/pm8001/pm8001_ctl.c:274: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_sas_spec_support_show'
 drivers/scsi/pm8001/pm8001_ctl.c:303: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_host_sas_address_show'
 drivers/scsi/pm8001/pm8001_ctl.c:322: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_logging_level_show'
 drivers/scsi/pm8001/pm8001_ctl.c:355: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_aap_log_show'
 drivers/scsi/pm8001/pm8001_ctl.c:390: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_ib_queue_log_show'
 drivers/scsi/pm8001/pm8001_ctl.c:423: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_ob_queue_log_show'
 drivers/scsi/pm8001/pm8001_ctl.c:454: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_bios_version_show'
 drivers/scsi/pm8001/pm8001_ctl.c:492: warning: Function parameter or member 'attr' not described in 'event_log_size_show'
 drivers/scsi/pm8001/pm8001_ctl.c:510: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_iop_log_show'
 drivers/scsi/pm8001/pm8001_ctl.c:548: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_fatal_log_show'
 drivers/scsi/pm8001/pm8001_ctl.c:566: warning: Function parameter or member 'attr' not described in 'non_fatal_log_show'
 drivers/scsi/pm8001/pm8001_ctl.c:609: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_gsm_log_show'

Link: https://lore.kernel.org/r/20200713080001.128044-11-lee.jones@linaro.org
Cc: Jack Wang <jinpu.wang@cloud.ionos.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Fill in the very parameter descriptions for rx_sync_cmd()
Lee Jones [Mon, 13 Jul 2020 07:59:46 +0000 (08:59 +0100)]
scsi: aacraid: Fill in the very parameter descriptions for rx_sync_cmd()

... and document aac_rx_ioremap() 'dev' param.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p2' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p3' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p4' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p5' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p6' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'status' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'r1' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'r2' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'r3' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'r4' not described in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:156: warning: Excess function parameter 'ret' description in 'rx_sync_cmd'
 drivers/scsi/aacraid/rx.c:450: warning: Function parameter or member 'dev' not described in 'aac_rx_ioremap'

Link: https://lore.kernel.org/r/20200713080001.128044-10-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic94xx: Fix a couple of formatting and bitrot issues
Lee Jones [Mon, 13 Jul 2020 07:59:45 +0000 (08:59 +0100)]
scsi: aic94xx: Fix a couple of formatting and bitrot issues

Kerneldoc format should be '@.*: ', else the checker gets confused.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic94xx/aic94xx_scb.c:137: warning: Function parameter or member 'phy' not described in 'asd_get_attached_sas_addr'
 drivers/scsi/aic94xx/aic94xx_scb.c:137: warning: Function parameter or member 'sas_addr' not described in 'asd_get_attached_sas_addr'
 drivers/scsi/aic94xx/aic94xx_scb.c:860: warning: Function parameter or member 't' not described in 'asd_ascb_timedout'
 drivers/scsi/aic94xx/aic94xx_scb.c:860: warning: Excess function parameter 'data' description in 'asd_ascb_timedout'

Link: https://lore.kernel.org/r/20200713080001.128044-9-lee.jones@linaro.org
Cc: Luben Tuikov <luben_tuikov@adaptec.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Fix a bunch of function header issues
Lee Jones [Mon, 13 Jul 2020 07:59:44 +0000 (08:59 +0100)]
scsi: aacraid: Fix a bunch of function header issues

Some parameters not documented.  Others misspelled.

Also, functions must follow directly after the header that documents them.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/commsup.c:223: warning: Function parameter or member 'scmd' not described in 'aac_fib_alloc_tag'
 drivers/scsi/aacraid/commsup.c:421: warning: Function parameter or member 'qid' not described in 'aac_queue_get'
 drivers/scsi/aacraid/commsup.c:421: warning: Function parameter or member 'hw_fib' not described in 'aac_queue_get'
 drivers/scsi/aacraid/commsup.c:421: warning: Excess function parameter 'priority' description in 'aac_queue_get'
 drivers/scsi/aacraid/commsup.c:421: warning: Excess function parameter 'fib' description in 'aac_queue_get'
 drivers/scsi/aacraid/commsup.c:943: warning: Function parameter or member 'fibptr' not described in 'aac_fib_complete'
 drivers/scsi/aacraid/commsup.c:943: warning: Excess function parameter 'fib' description in 'aac_fib_complete'
 drivers/scsi/aacraid/commsup.c:1061: warning: Excess function parameter 'dev' description in 'AIF_SNIFF_TIMEOUT'
 drivers/scsi/aacraid/commsup.c:1061: warning: Excess function parameter 'fibptr' description in 'AIF_SNIFF_TIMEOUT'
 drivers/scsi/aacraid/commsup.c:2428: warning: Function parameter or member 'data' not described in 'aac_command_thread'
 drivers/scsi/aacraid/commsup.c:2428: warning: Excess function parameter 'dev' description in 'aac_command_thread'

Link: https://lore.kernel.org/r/20200713080001.128044-8-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic94xx: Document 'lseq' and repair asd_update_port_links() header
Lee Jones [Mon, 13 Jul 2020 07:59:43 +0000 (08:59 +0100)]
scsi: aic94xx: Document 'lseq' and repair asd_update_port_links() header

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic94xx/aic94xx_seq.c:587: warning: Function parameter or member 'lseq' not described in 'asd_init_lseq_mip'
 drivers/scsi/aic94xx/aic94xx_seq.c:674: warning: Function parameter or member 'lseq' not described in 'asd_init_lseq_mdp'
 drivers/scsi/aic94xx/aic94xx_seq.c:958: warning: Function parameter or member 'lseq' not described in 'asd_init_lseq_cio'
 drivers/scsi/aic94xx/aic94xx_seq.c:1364: warning: Function parameter or member 'asd_ha' not described in 'asd_update_port_links'
 drivers/scsi/aic94xx/aic94xx_seq.c:1364: warning: Function parameter or member 'phy' not described in 'asd_update_port_links'
 drivers/scsi/aic94xx/aic94xx_seq.c:1364: warning: Excess function parameter 'sas_phy' description in 'asd_update_port_links'

Link: https://lore.kernel.org/r/20200713080001.128044-7-lee.jones@linaro.org
Cc: Luben Tuikov <luben_tuikov@adaptec.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Demote partially documented function header
Lee Jones [Mon, 13 Jul 2020 07:59:42 +0000 (08:59 +0100)]
scsi: aacraid: Demote partially documented function header

This should be populated by someone who knows the meaning of all the
params.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/dpcsup.c:272: warning: Function parameter or member 'isAif' not described in 'aac_intr_normal'
 drivers/scsi/aacraid/dpcsup.c:272: warning: Function parameter or member 'isFastResponse' not described in 'aac_intr_normal'
 drivers/scsi/aacraid/dpcsup.c:272: warning: Function parameter or member 'aif_fib' not described in 'aac_intr_normal'

Link: https://lore.kernel.org/r/20200713080001.128044-6-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Remove unused variable 'status'
Lee Jones [Mon, 13 Jul 2020 07:59:41 +0000 (08:59 +0100)]
scsi: aacraid: Remove unused variable 'status'

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/dpcsup.c: In function ‘aac_aif_callback’:
 drivers/scsi/aacraid/dpcsup.c:232:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
 232 | int status;
 | ^~~~~~

Link: https://lore.kernel.org/r/20200713080001.128044-5-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Fix logical bug when !DBG
Lee Jones [Mon, 13 Jul 2020 07:59:40 +0000 (08:59 +0100)]
scsi: aacraid: Fix logical bug when !DBG

When DBG is not enabled FIB_COUNTER_INCREMENT() results in an empty
statement, leaving the contents of if() and else() empty.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/dpcsup.c: In function ‘aac_response_normal’:
 drivers/scsi/aacraid/dpcsup.c:105:50: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
 105 | FIB_COUNTER_INCREMENT(aac_config.AsyncRecved);
 | ^
 drivers/scsi/aacraid/dpcsup.c: In function ‘aac_intr_normal’:
 drivers/scsi/aacraid/dpcsup.c:411:30: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
 411 | aac_config.AsyncRecved);
 | ^

Link: https://lore.kernel.org/r/20200713080001.128044-4-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Fix a few kerneldoc issues
Lee Jones [Mon, 13 Jul 2020 07:59:39 +0000 (08:59 +0100)]
scsi: aacraid: Fix a few kerneldoc issues

Functions must follow imediately after the header documenting them and all
parameters must be present.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/commctrl.c:43: warning: Excess function parameter 'dev' description in 'AAC_DEBUG_PREAMBLE'
 drivers/scsi/aacraid/commctrl.c:43: warning: Excess function parameter 'arg' description in 'AAC_DEBUG_PREAMBLE'
 drivers/scsi/aacraid/commctrl.c:167: warning: Function parameter or member 'dev' not described in 'open_getadapter_fib'
 drivers/scsi/aacraid/commctrl.c:167: warning: Function parameter or member 'arg' not described in 'open_getadapter_fib'
 drivers/scsi/aacraid/commctrl.c:458: warning: Cannot understand  *
 on line 458 - I thought it was a doc line

Link: https://lore.kernel.org/r/20200713080001.128044-3-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Repair two kerneldoc headers
Lee Jones [Mon, 13 Jul 2020 07:59:38 +0000 (08:59 +0100)]
scsi: aacraid: Repair two kerneldoc headers

The function headers for aac_get_config_status() and aac_get_containers()
have suffered bitrot where the documentation hasn't kept up with the API.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' not described in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'commit_flag' not described in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:358: warning: Excess function parameter 'common' description in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:450: warning: Function parameter or member 'dev' not described in 'aac_get_containers'
 drivers/scsi/aacraid/aachba.c:450: warning: Excess function parameter 'common' description in 'aac_get_containers'

Link: https://lore.kernel.org/r/20200713080001.128044-2-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: qla2xxx: Address a set of sparse warnings
Shyam Sundar [Wed, 15 Jul 2020 04:33:58 +0000 (21:33 -0700)]
scsi: qla2xxx: Address a set of sparse warnings

Fix the following sparse warnings:

drivers/scsi/qla2xxx/qla_isr.c:881:23: warning: restricted __le16 degrades to integer
drivers/scsi/qla2xxx/qla_isr.c:881:23: warning: cast to restricted __le16

Link: https://lore.kernel.org/r/20200715043358.21668-1-njavali@marvell.com
Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: sd_zbc: Remove unused inline functions
YueHaibing [Wed, 15 Jul 2020 02:55:23 +0000 (10:55 +0800)]
scsi: sd_zbc: Remove unused inline functions

These are no longer used and can be removed.

Link: https://lore.kernel.org/r/20200715025523.34620-1-yuehaibing@huawei.com
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: lpfc: NVMe remote port devloss_tmo from lldd
James Smart [Tue, 14 Jul 2020 21:14:12 +0000 (14:14 -0700)]
scsi: lpfc: NVMe remote port devloss_tmo from lldd

nvme-fc allows the driver to specify a default devloss_tmo value when
registering the remote port. The lpfc driver is currently not doing so,
although it is implementing a driver internal node loss value of 30s which
also is used on the SCSI FC remote port. As no devloss_tmo is set, the
nvme-fc transport defaults to 60s. So there are competing timers.

Additionally, due to the competing timers, it is possible the NVMe rport is
removed but the SCSI rport remains. It is possible that the SCSI FC rport,
which was registered for the NVMe port even if it doesn't utilize the SCSI
protocol, had been tuned to not match either the 60s (nvme-fc default) or
30s (lldd default), it gets out of whack. The lldd will defer to the SCSI
FC rport as long as the SCSI FC rport has not had its devloss_tmo expire.

Correct the situation by specifying a default devloss_tmo to the nvme-fc
transport when registering the rport.  Take the value from the SCSI FC
rport if it exists, otherwise use the driver default.

Link: https://lore.kernel.org/r/20200714211412.11773-1-jsmart2021@gmail.com
Tested-by: Martin George <Martin.George@netapp.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: cxgb4i: Remove an unnecessary NULL check for 'cconn' pointer
Varun Prakash [Tue, 14 Jul 2020 15:49:11 +0000 (21:19 +0530)]
scsi: cxgb4i: Remove an unnecessary NULL check for 'cconn' pointer

'cconn' will never be NULL in cxgbi_conn_alloc_pdu() so remove NULL check.

Link: https://lore.kernel.org/r/1594741751-3323-1-git-send-email-varun@chelsio.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: lpfc: Quieten some printks
Anton Blanchard [Mon, 13 Jul 2020 08:39:08 +0000 (18:39 +1000)]
scsi: lpfc: Quieten some printks

On a big box the lpfc driver emits a few thousand "Set Affinity" lines to
the console. Reduce the priority of these from KERN_ERR to KERN_INFO, and
also fix a few printks that had no log level.

Link: https://lore.kernel.org/r/20200713083908.1104927-1-anton@ozlabs.org
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: qla4xxx: Provide a missing function param description and fix formatting
Lee Jones [Mon, 13 Jul 2020 07:46:45 +0000 (08:46 +0100)]
scsi: qla4xxx: Provide a missing function param description and fix formatting

Kerneldoc function parameter references need to be in the format '@.*: ',
else the kerneldoc checker gets confused.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/qla4xxx/ql4_init.c: In function ‘ql4xxx_set_mac_number’:
 drivers/scsi/qla4xxx/ql4_init.c:17:10: warning: variable ‘func_number’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’:
 drivers/scsi/qla4xxx/ql4_init.c:664:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
from  drivers/scsi/qla4xxx/ql4_init.c:9:
from  drivers/scsi/qla4xxx/ql4_init.c:9:
 drivers/scsi/qla4xxx/ql4_init.c:953: warning: Function parameter or member 'is_reset' not described in 'qla4xxx_initialize_adapter'
 drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'ha' not described in 'qla4xxx_process_ddb_changed'
 drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'fw_ddb_index' not described in 'qla4xxx_process_ddb_changed'
 drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'state' not described in 'qla4xxx_process_ddb_changed'
 drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'conn_err' not described in 'qla4xxx_process_ddb_changed'

Link: https://lore.kernel.org/r/20200713074645.126138-30-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@qlogic.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Fix a bunch of function doc formatting errors
Lee Jones [Mon, 13 Jul 2020 07:46:44 +0000 (08:46 +0100)]
scsi: aacraid: Fix a bunch of function doc formatting errors

And a few missing/excessive parameter descriptions.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' not described in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'commit_flag' not described in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:358: warning: Excess function parameter 'common' description in 'aac_get_config_status'
 drivers/scsi/aacraid/aachba.c:450: warning: Function parameter or member 'dev' not described in 'aac_get_containers'
 drivers/scsi/aacraid/aachba.c:450: warning: Excess function parameter 'common' description in 'aac_get_containers'
 drivers/scsi/aacraid/aachba.c:568: warning: Function parameter or member 'scsicmd' not described in 'aac_get_container_name'
 drivers/scsi/aacraid/aachba.c:796: warning: Function parameter or member 'scsicmd' not described in 'aac_probe_container_callback1'
 drivers/scsi/aacraid/aachba.c:796: warning: Excess function parameter 'dev' description in 'aac_probe_container_callback1'
 drivers/scsi/aacraid/aachba.c:796: warning: Excess function parameter 'cid' description in 'aac_probe_container_callback1'
 drivers/scsi/aacraid/aachba.c:1105: warning: Function parameter or member 'scsicmd' not described in 'aac_get_container_serial'
 drivers/scsi/aacraid/aachba.c:1961: warning: Excess function parameter 'phys_luns' description in 'aac_set_safw_attr_all_targets'
 drivers/scsi/aacraid/aachba.c:1961: warning: Excess function parameter 'rescan' description in 'aac_set_safw_attr_all_targets'
 drivers/scsi/aacraid/aachba.c:3394: warning: Cannot understand  *
 on line 3394 - I thought it was a doc line
 drivers/scsi/aacraid/aachba.c:3687: warning: Cannot understand  *
 on line 3687 - I thought it was a doc line
 drivers/scsi/aacraid/aachba.c:3752: warning: Cannot understand  *
 on line 3752 - I thought it was a doc line
 drivers/scsi/aacraid/aachba.c:3795: warning: Cannot understand  *
 on line 3795 - I thought it was a doc line

Link: https://lore.kernel.org/r/20200713074645.126138-29-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic94xx: Repair kerneldoc formatting error and remove extra param
Lee Jones [Mon, 13 Jul 2020 07:46:43 +0000 (08:46 +0100)]
scsi: aic94xx: Repair kerneldoc formatting error and remove extra param

Function parameters need to be documented with format '@.*: '.

'to' is not longer asd_start_timers()'s function parameter.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic94xx/aic94xx_hwi.c:589: warning: Function parameter or member 'asd_ha' not described in 'asd_init_ctxmem'
 drivers/scsi/aic94xx/aic94xx_hwi.c:1157: warning: Excess function parameter 'to' description in 'asd_start_scb_timers'

Link: https://lore.kernel.org/r/20200713074645.126138-28-lee.jones@linaro.org
Cc: Luben Tuikov <luben_tuikov@adaptec.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: pm8001: Demote obvious misuse of kerneldoc and update others
Lee Jones [Mon, 13 Jul 2020 07:46:42 +0000 (08:46 +0100)]
scsi: pm8001: Demote obvious misuse of kerneldoc and update others

More bitrot issues with function documentation not keeping up with API changes.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/pm8001/pm8001_init.c:64: warning: cannot understand function prototype: 'const struct pm8001_chip_info pm8001_chips[] = '
 drivers/scsi/pm8001/pm8001_init.c:86: warning: cannot understand function prototype: 'struct scsi_host_template pm8001_sht = '
 drivers/scsi/pm8001/pm8001_init.c:115: warning: cannot understand function prototype: 'struct sas_domain_function_template pm8001_transport_ops = '
 drivers/scsi/pm8001/pm8001_init.c:212: warning: Function parameter or member 'irq' not described in 'pm8001_interrupt_handler_msix'
 drivers/scsi/pm8001/pm8001_init.c:237: warning: Function parameter or member 'irq' not described in 'pm8001_interrupt_handler_intx'
 drivers/scsi/pm8001/pm8001_init.c:265: warning: Function parameter or member 'ent' not described in 'pm8001_alloc'
 drivers/scsi/pm8001/pm8001_init.c:624: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_init_sas_add'
 drivers/scsi/pm8001/pm8001_init.c:624: warning: Excess function parameter 'chip_info' description in 'pm8001_init_sas_add'
 drivers/scsi/pm8001/pm8001_init.c:900: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_setup_msix'
 drivers/scsi/pm8001/pm8001_init.c:900: warning: Excess function parameter 'chip_info' description in 'pm8001_setup_msix'
 drivers/scsi/pm8001/pm8001_init.c:900: warning: Excess function parameter 'irq_handler' description in 'pm8001_setup_msix'
 drivers/scsi/pm8001/pm8001_init.c:981: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_request_irq'
 drivers/scsi/pm8001/pm8001_init.c:981: warning: Excess function parameter 'chip_info' description in 'pm8001_request_irq'

Link: https://lore.kernel.org/r/20200713074645.126138-27-lee.jones@linaro.org
Cc: Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>
Cc: Sangeetha Gnanasekaran <Sangeetha.Gnanasekaran@pmcs.com>
Cc: Nikith Ganigarakoppal <Nikith.Ganigarakoppal@pmcs.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic94xx: Demote seemingly unintentional kerneldoc header
Lee Jones [Mon, 13 Jul 2020 07:46:41 +0000 (08:46 +0100)]
scsi: aic94xx: Demote seemingly unintentional kerneldoc header

This is the only use of kerneldoc in the sourcefile and no
descriptions are provided.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic94xx/aic94xx_init.c:538: warning: Function parameter or member 'asd_ha' not described in 'asd_free_edbs'

Link: https://lore.kernel.org/r/20200713074645.126138-26-lee.jones@linaro.org
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Luben Tuikov <luben_tuikov@adaptec.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Fix a couple of small kerneldoc issues
Lee Jones [Mon, 13 Jul 2020 07:46:40 +0000 (08:46 +0100)]
scsi: aacraid: Fix a couple of small kerneldoc issues

Most likely caused by bitrot (docs not keeping in sync with API).

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’:
 drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
 drivers/scsi/aacraid/linit.c:243: warning: Function parameter or member 'shost' not described in 'aac_queuecommand'
 drivers/scsi/aacraid/linit.c:243: warning: Excess function parameter 'done' description in 'aac_queuecommand'
 drivers/scsi/aacraid/linit.c:1176: warning: Excess function parameter 'inode' description in 'aac_cfg_ioctl'

Link: https://lore.kernel.org/r/20200713074645.126138-25-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aacraid: Provide suggested curly braces around empty body of if()
Lee Jones [Mon, 13 Jul 2020 07:46:39 +0000 (08:46 +0100)]
scsi: aacraid: Provide suggested curly braces around empty body of if()

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’:
 drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
 368 | param->heads, param->sectors, num));
 | ^

Link: https://lore.kernel.org/r/20200713074645.126138-24-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks
Lee Jones [Mon, 13 Jul 2020 07:46:38 +0000 (08:46 +0100)]
scsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks

No attempt has been made to document any of the demoted functions here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'qedf' not described in 'qedf_dbg_host_init'
 drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'dops' not described in 'qedf_dbg_host_init'
 drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'fops' not described in 'qedf_dbg_host_init'
 drivers/scsi/qedf/qedf_debugfs.c:25: warning: Excess function parameter 'pf' description in 'qedf_dbg_host_init'
 drivers/scsi/qedf/qedf_debugfs.c:51: warning: Function parameter or member 'qedf_dbg' not described in 'qedf_dbg_host_exit'
 drivers/scsi/qedf/qedf_debugfs.c:51: warning: Excess function parameter 'pf' description in 'qedf_dbg_host_exit'
 drivers/scsi/qedf/qedf_debugfs.c:64: warning: Function parameter or member 'drv_name' not described in 'qedf_dbg_init'

Link: https://lore.kernel.org/r/20200713074645.126138-23-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic7xxx: Fix 'amount_xferred' set but not used issue
Lee Jones [Mon, 13 Jul 2020 07:46:37 +0000 (08:46 +0100)]
scsi: aic7xxx: Fix 'amount_xferred' set but not used issue

'amount_xferred' is used, but only in certain circumstances.  Place the
same stipulations on the defining/allocating of 'amount_xferred' as is
placed when using it.

We've been careful not to change any of the ordering semantics here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_done’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:1725:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable]
 1725 | uint32_t amount_xferred;
 | ^~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200713074645.126138-22-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic7xxx: Remove unused variable 'targ'
Lee Jones [Mon, 13 Jul 2020 07:46:36 +0000 (08:46 +0100)]
scsi: aic7xxx: Remove unused variable 'targ'

Looks like checking the 'targ' was removed in 2005.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:1604:28: warning: variable ‘targ’ set but not used [-Wunused-but-set-variable]
 1604 | struct ahc_linux_target *targ;
 | ^~~~

Link: https://lore.kernel.org/r/20200713074645.126138-21-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic7xxx: Remove unused variable 'ahc'
Lee Jones [Mon, 13 Jul 2020 07:46:35 +0000 (08:46 +0100)]
scsi: aic7xxx: Remove unused variable 'ahc'

Looks as though 'ahc' hasn't been used since 2005.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set but not used [-Wunused-but-set-variable]
 674 | struct ahc_softc *ahc;
 | ^~~

Link: https://lore.kernel.org/r/20200713074645.126138-20-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: aic7xxx: Remove unused variable 'tinfo'
Lee Jones [Mon, 13 Jul 2020 07:46:34 +0000 (08:46 +0100)]
scsi: aic7xxx: Remove unused variable 'tinfo'

Looks like none of the artifact from ahc_fetch_transinfo() are used anymore.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_target_alloc’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable]
 567 | struct ahc_initiator_tinfo *tinfo;
 | ^~~~~

Link: https://lore.kernel.org/r/20200713074645.126138-19-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: bnx2fc: Demote obvious misuse of kerneldoc to standard comment blocks
Lee Jones [Mon, 13 Jul 2020 07:46:33 +0000 (08:46 +0100)]
scsi: bnx2fc: Demote obvious misuse of kerneldoc to standard comment blocks

No attempt has been made to document either of the demoted functions here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'lport' not described in 'bnx2fc_rport_event_handler'
 drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'rdata' not described in 'bnx2fc_rport_event_handler'
 drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'event' not described in 'bnx2fc_rport_event_handler'
 drivers/scsi/bnx2fc/bnx2fc_tgt.c:665: warning: Function parameter or member 'hba' not described in 'bnx2fc_alloc_session_resc'
 drivers/scsi/bnx2fc/bnx2fc_tgt.c:665: warning: Function parameter or member 'tgt' not described in 'bnx2fc_alloc_session_resc'

Link: https://lore.kernel.org/r/20200713074645.126138-18-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@qlogic.com
Cc: Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: qedf: Remove a whole host of unused variables
Lee Jones [Mon, 13 Jul 2020 07:46:32 +0000 (08:46 +0100)]
scsi: qedf: Remove a whole host of unused variables

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_cmd_timeout’:
 drivers/scsi/qedf/qedf_io.c:25:5: warning: variable ‘op’ set but not used [-Wunused-but-set-variable]
 25 | u8 op = 0;
 | ^~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_map_sg’:
 drivers/scsi/qedf/qedf_io.c:490:12: warning: variable ‘end_addr’ set but not used [-Wunused-but-set-variable]
 490 | u64 addr, end_addr;
 | ^~~~~~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_post_io_req’:
 drivers/scsi/qedf/qedf_io.c:863:22: warning: variable ‘req_type’ set but not used [-Wunused-but-set-variable]
 863 | enum fcoe_task_type req_type = 0;
 | ^~~~~~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_scsi_completion’:
 drivers/scsi/qedf/qedf_io.c:1134:31: warning: variable ‘task_ctx’ set but not used [-Wunused-but-set-variable]
 1134 | struct e4_fcoe_task_context *task_ctx;
 | ^~~~~~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_scsi_done’:
 drivers/scsi/qedf/qedf_io.c:1345:6: warning: variable ‘xid’ set but not used [-Wunused-but-set-variable]
 1345 | u16 xid;
 | ^~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_initiate_abts’:
 drivers/scsi/qedf/qedf_io.c:1866:6: warning: variable ‘r_a_tov’ set but not used [-Wunused-but-set-variable]
 1866 | u32 r_a_tov = 0;
 | ^~~~~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_process_abts_compl’:
 drivers/scsi/qedf/qedf_io.c:1967:11: warning: variable ‘xid’ set but not used [-Wunused-but-set-variable]
 1967 | uint16_t xid;
 | ^~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_initiate_cleanup’:
 drivers/scsi/qedf/qedf_io.c:2163:31: warning: variable ‘task’ set but not used [-Wunused-but-set-variable]
 2163 | struct e4_fcoe_task_context *task;
 | ^~~~
 drivers/scsi/qedf/qedf_io.c: In function ‘qedf_process_unsol_compl’:
 drivers/scsi/qedf/qedf_io.c:2534:11: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]
 2534 | uint16_t tmp;
 | ^~~

Link: https://lore.kernel.org/r/20200713074645.126138-17-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: arcmsr: Remove some set but unused variables
Lee Jones [Mon, 13 Jul 2020 07:46:30 +0000 (08:46 +0100)]
scsi: arcmsr: Remove some set but unused variables

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_remap_pciregion’:
 drivers/scsi/arcmsr/arcmsr_hba.c:286:30: warning: variable ‘flags’ set but not used [-Wunused-but-set-variable]
 286 | unsigned long addr, range, flags;
 | ^~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_suspend’:
 drivers/scsi/arcmsr/arcmsr_hba.c:1070:11: warning: variable ‘intmask_org’ set but not used [-Wunused-but-set-variable]
 1070 | uint32_t intmask_org;
 | ^~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_done4abort_postqueue’:
 drivers/scsi/arcmsr/arcmsr_hba.c:1410:29: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 1410 | unsigned long ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_postqueue_isr’:
 drivers/scsi/arcmsr/arcmsr_hba.c:2448:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 2448 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_polling_ccbdone’:
 drivers/scsi/arcmsr/arcmsr_hba.c:3498:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 3498 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200713074645.126138-15-lee.jones@linaro.org
Cc: support@areca.com.tw
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: bnx2fc: Fix a couple of bitrotted function documentation headers
Lee Jones [Mon, 13 Jul 2020 07:46:29 +0000 (08:46 +0100)]
scsi: bnx2fc: Fix a couple of bitrotted function documentation headers

Likely a result of documentation not keeping up with API updates (a.k.a. bitrot).

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/bnx2fc/bnx2fc_hwi.c:493: warning: Function parameter or member 'hba' not described in 'bnx2fc_send_session_destroy_req'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:493: warning: Excess function parameter 'port' description in 'bnx2fc_send_session_destroy_req'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Function parameter or member 'context' not described in 'bnx2fc_indicate_kcqe'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Function parameter or member 'kcq' not described in 'bnx2fc_indicate_kcqe'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Excess function parameter 'hba' description in 'bnx2fc_indicate_kcqe'
 drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Excess function parameter 'kcqe' description in 'bnx2fc_indicate_kcqe'

Link: https://lore.kernel.org/r/20200713074645.126138-14-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@qlogic.com
Cc: Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: libfc: Provide missing and repair existing function documentation
Lee Jones [Mon, 13 Jul 2020 07:46:28 +0000 (08:46 +0100)]
scsi: libfc: Provide missing and repair existing function documentation

Mostly due to descriptions not keeping up with API changes.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/libfc/fc_fcp.c:299: warning: Function parameter or member 'status_code' not described in 'fc_fcp_retry_cmd'
 drivers/scsi/libfc/fc_fcp.c:595: warning: Function parameter or member 'seq' not described in 'fc_fcp_send_data'
 drivers/scsi/libfc/fc_fcp.c:595: warning: Excess function parameter 'sp' description in 'fc_fcp_send_data'
 drivers/scsi/libfc/fc_fcp.c:1289: warning: Function parameter or member 't' not described in 'fc_lun_reset_send'
 drivers/scsi/libfc/fc_fcp.c:1289: warning: Excess function parameter 'data' description in 'fc_lun_reset_send'
 drivers/scsi/libfc/fc_fcp.c:1422: warning: Function parameter or member 't' not described in 'fc_fcp_timeout'
 drivers/scsi/libfc/fc_fcp.c:1422: warning: Excess function parameter 'data' description in 'fc_fcp_timeout'
 drivers/scsi/libfc/fc_fcp.c:1696: warning: Function parameter or member 'code' not described in 'fc_fcp_recovery'
 drivers/scsi/libfc/fc_fcp.c:1716: warning: Function parameter or member 'offset' not described in 'fc_fcp_srr'
 drivers/scsi/libfc/fc_fcp.c:1859: warning: Function parameter or member 'sc_cmd' not described in 'fc_queuecommand'
 drivers/scsi/libfc/fc_fcp.c:1859: warning: Excess function parameter 'cmd' description in 'fc_queuecommand'

Link: https://lore.kernel.org/r/20200713074645.126138-13-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: libfc: Fix a couple of misdocumented function parameters
Lee Jones [Mon, 13 Jul 2020 07:46:27 +0000 (08:46 +0100)]
scsi: libfc: Fix a couple of misdocumented function parameters

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/libfc/fc_rport.c:129: warning: Function parameter or member 'port_id' not described in 'fc_rport_create'
 drivers/scsi/libfc/fc_rport.c:129: warning: Excess function parameter 'ids' description in 'fc_rport_create'
 drivers/scsi/libfc/fc_rport.c:1452: warning: Function parameter or member 'rdata_arg' not described in 'fc_rport_logo_resp'
 drivers/scsi/libfc/fc_rport.c:1452: warning: Excess function parameter 'lport_arg' description in 'fc_rport_logo_resp'

Link: https://lore.kernel.org/r/20200713074645.126138-12-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: libfc: Repair function parameter documentation
Lee Jones [Mon, 13 Jul 2020 07:46:26 +0000 (08:46 +0100)]
scsi: libfc: Repair function parameter documentation

Either misdocumentation and/or bitrot.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/libfc/fc_lport.c:412: warning: Function parameter or member 'in_fp' not described in 'fc_lport_recv_echo_req'
 drivers/scsi/libfc/fc_lport.c:412: warning: Excess function parameter 'fp' description in 'fc_lport_recv_echo_req'
 drivers/scsi/libfc/fc_lport.c:447: warning: Function parameter or member 'in_fp' not described in 'fc_lport_recv_rnid_req'
 drivers/scsi/libfc/fc_lport.c:447: warning: Excess function parameter 'fp' description in 'fc_lport_recv_rnid_req'
 drivers/scsi/libfc/fc_lport.c:1330: warning: Function parameter or member 'state' not described in 'fc_lport_enter_ns'
 drivers/scsi/libfc/fc_lport.c:1428: warning: Function parameter or member 'state' not described in 'fc_lport_enter_ms'
 drivers/scsi/libfc/fc_lport.c:1939: warning: Function parameter or member 'tov' not described in 'fc_lport_els_request'

Link: https://lore.kernel.org/r/20200713074645.126138-11-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: qedf: Remove set but not checked variable 'tmp'
Lee Jones [Mon, 13 Jul 2020 07:46:25 +0000 (08:46 +0100)]
scsi: qedf: Remove set but not checked variable 'tmp'

Looks like the return value of readw() has never been checked.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/qedf/qedf_main.c: In function ‘__qedf_probe’:
 drivers/scsi/qedf/qedf_main.c:3203:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20200713074645.126138-10-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks
Lee Jones [Mon, 13 Jul 2020 07:46:24 +0000 (08:46 +0100)]
scsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks

No attempt has been made to document either of the demoted functions here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/qedf/qedf_main.c:1027: warning: Function parameter or member 'lport' not described in 'qedf_xmit'
 drivers/scsi/qedf/qedf_main.c:1027: warning: Function parameter or member 'fp' not described in 'qedf_xmit'
 drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'lport' not described in 'qedf_rport_event_handler'
 drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'rdata' not described in 'qedf_rport_event_handler'
 drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'event' not described in 'qedf_rport_event_handler'

Link: https://lore.kernel.org/r/20200713074645.126138-9-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: bnx2fc: Repair a range of kerneldoc issues
Lee Jones [Mon, 13 Jul 2020 07:46:23 +0000 (08:46 +0100)]
scsi: bnx2fc: Repair a range of kerneldoc issues

>From bitrotted and missing function parameters to misuse of kerneldoc format.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Function parameter or member 'lport' not described in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Function parameter or member 'addr' not described in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'fip' description in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'old' description in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'new' description in 'bnx2fc_update_src_mac'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Function parameter or member 'netdev' not described in 'bnx2fc_destroy'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Excess function parameter 'buffer' description in 'bnx2fc_destroy'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Excess function parameter 'kp' description in 'bnx2fc_destroy'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2108: warning: Function parameter or member 'netdev' not described in 'bnx2fc_disable'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2236: warning: Function parameter or member 'netdev' not described in 'bnx2fc_enable'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2529: warning: Function parameter or member 'dev' not described in 'bnx2fc_ulp_exit'
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2962: warning: cannot understand function prototype: 'struct scsi_host_template bnx2fc_shost_template = '
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2996: warning: cannot understand function prototype: 'struct cnic_ulp_ops bnx2fc_cnic_cb = '

Link: https://lore.kernel.org/r/20200713074645.126138-8-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@qlogic.com
Cc: Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: fcoe: Correct some kernel-doc issues
Lee Jones [Mon, 13 Jul 2020 07:46:22 +0000 (08:46 +0100)]
scsi: fcoe: Correct some kernel-doc issues

Mainly due to misdocumentation or bitrotted descriptions.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/fcoe/fcoe_transport.c:396: warning: Function parameter or member 'skb' not described in 'fcoe_check_wait_queue'
 drivers/scsi/fcoe/fcoe_transport.c:447: warning: Function parameter or member 't' not described in 'fcoe_queue_timer'
 drivers/scsi/fcoe/fcoe_transport.c:447: warning: Excess function parameter 'lport' description in 'fcoe_queue_timer'
 drivers/scsi/fcoe/fcoe_transport.c:682: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_map_lookup'

Link: https://lore.kernel.org/r/20200713074645.126138-7-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: fcoe: Fix a myriad of documentation issues
Lee Jones [Mon, 13 Jul 2020 07:46:21 +0000 (08:46 +0100)]
scsi: fcoe: Fix a myriad of documentation issues

Mostly missing or incorrect (bitrotted) function parameters.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/fcoe/fcoe_ctlr.c:139: warning: Function parameter or member 'mode' not described in 'fcoe_ctlr_init'
 drivers/scsi/fcoe/fcoe_ctlr.c:604: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_encaps'
 drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_recv_clr_vlink'
 drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Excess function parameter 'fh' description in 'fcoe_ctlr_recv_clr_vlink'
 drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Function parameter or member 't' not described in 'fcoe_ctlr_timeout'
 drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Excess function parameter 'arg' description in 'fcoe_ctlr_timeout'
 drivers/scsi/fcoe/fcoe_ctlr.c:1904: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_recv_flogi'
 drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_locked'
 drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_locked'
 drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop'
 drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop'
 drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_final'
 drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_final'
 drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vn_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vn_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vlan_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vlan_parse'
 drivers/scsi/fcoe/fcoe_ctlr.c:2900: warning: Excess function parameter 'min_len' description in 'fcoe_ctlr_vlan_send'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'fip' not described in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'lport' description in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'fp' description in 'fcoe_ctlr_vlan_recv'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'callback' not described in 'fcoe_ctlr_disc_start'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_start'
 drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_start'

[mkp: fixed function name in comment]

Link: https://lore.kernel.org/r/20200713074645.126138-6-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: fcoe: Fix various kernel-doc infringements
Lee Jones [Mon, 13 Jul 2020 07:46:20 +0000 (08:46 +0100)]
scsi: fcoe: Fix various kernel-doc infringements

A couple of headers make no attempt to document their associated function
parameters.  Others looks as if they are suffering with a little bitrot.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'lport' not described in 'fcoe_netdev_features_change'
 drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_features_change'
 drivers/scsi/fcoe/fcoe.c:2039: warning: Function parameter or member 'ctlr_dev' not described in 'fcoe_ctlr_mode'
 drivers/scsi/fcoe/fcoe.c:2039: warning: Excess function parameter 'cdev' description in 'fcoe_ctlr_mode'
 drivers/scsi/fcoe/fcoe.c:2144: warning: Function parameter or member 'fcoe' not described in 'fcoe_dcb_create'
 drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'netdev' description in 'fcoe_dcb_create'
 drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'port' description in 'fcoe_dcb_create'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'lport' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'did' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'fp' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'op' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'resp' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'arg' not described in 'fcoe_elsct_send'
 drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'timeout' not described in 'fcoe_elsct_send'

Link: https://lore.kernel.org/r/20200713074645.126138-5-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: libfc: trivial: Fix spelling mistake of 'discovery'
Lee Jones [Mon, 13 Jul 2020 07:46:19 +0000 (08:46 +0100)]
scsi: libfc: trivial: Fix spelling mistake of 'discovery'

This is my fault (can't even blame copy/paste).

Link: https://lore.kernel.org/r/20200713074645.126138-4-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.de>
Reported-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions
Lee Jones [Mon, 13 Jul 2020 07:46:18 +0000 (08:46 +0100)]
scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions

According to 'include/scsi/scsi_transport_fc.h':

 "Attributes are based on HBAAPI V2.0 definitions"

... so it seems sane to match the 'HBA Attribute Length' to them.

If we don't, the compiler complains that the copied data will be truncated.

Fixes the following W=1 kernel build warning(s):

 In file included from include/linux/bitmap.h:9,
 from include/linux/cpumask.h:12,
 from include/linux/smp.h:13,
 from include/linux/percpu.h:7,
 from include/scsi/libfc.h:13,
 from drivers/scsi/libfc/fc_elsct.c:17:
 In function ‘strncpy’,
 inlined from ‘fc_ct_ms_fill.constprop’ at include/scsi/fc_encode.h:263:3:
 include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length  79 [-Wstringop-truncation]
 297 | #define __underlying_strncpy __builtin_strncpy
 | ^
 include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
 307 | return __underlying_strncpy(p, q, size);
 | ^~~~~~~~~~~~~~~~~~~~
 In function ‘strncpy’,
 inlined from ‘fc_ct_ms_fill.constprop’ at include/scsi/fc_encode.h:275:3:
 include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation]
 297 | #define __underlying_strncpy __builtin_strncpy
 | ^
 include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
 307 | return __underlying_strncpy(p, q, size);
 | ^~~~~~~~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200713074645.126138-3-lee.jones@linaro.org
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: libfc: Supply some missing kerneldoc struct/function attributes/params
Lee Jones [Mon, 13 Jul 2020 07:46:17 +0000 (08:46 +0100)]
scsi: libfc: Supply some missing kerneldoc struct/function attributes/params

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/libfc/fc_exch.c:66: warning: Function parameter or member 'left' not described in 'fc_exch_pool'
 drivers/scsi/libfc/fc_exch.c:66: warning: Function parameter or member 'right' not described in 'fc_exch_pool'
 drivers/scsi/libfc/fc_exch.c:100: warning: Function parameter or member 'lport' not described in 'fc_exch_mgr'
 drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'ep' not described in 'fc_invoke_resp'
 drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'sp' not described in 'fc_invoke_resp'
 drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'fp' not described in 'fc_invoke_resp'

Link: https://lore.kernel.org/r/20200713074645.126138-2-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: scsi_debug: Update documentation url and bump version
Douglas Gilbert [Sun, 12 Jul 2020 18:29:27 +0000 (14:29 -0400)]
scsi: scsi_debug: Update documentation url and bump version

This driver maintains a version number which is cross-referenced in the
documentation (e.g. to indicate when features are added or changed) and
exposed through the responses to various SCSI commands. For example the
version number is use as the Product Revision number in standard SCSI
INQUIRY responses issued by this driver. The version date string is placed
in a vendor specific area in each standard SCSI INQUIRY response. This
patch bumps both.

Update the driver documentation URL that appears at the top of the driver
source file.

Link: https://lore.kernel.org/r/20200712182927.72044-3-dgilbert@interlog.com
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: scsi_debug: every_nth triggered error injection
Douglas Gilbert [Sun, 12 Jul 2020 18:29:26 +0000 (14:29 -0400)]
scsi: scsi_debug: every_nth triggered error injection

This patch simplifies, or at least makes more consistent, the way setting
the every_nth parameter injects errors. Here is a list of 'opts' flags and
in which cases they inject errors when abs(every_nth)%command_count == 0 is
reached:

  - OPT_RECOVERED_ERR: issued on READ(*)s, WRITE(*)s and
                       WRITE_SCATTEREDs
  - OPT_DIF_ERR:       issued on READ(*)s, WRITE(*)s and
                       WRITE_SCATTEREDs
  - OPT_DIX_ERR:       issued on READ(*)s, WRITE(*)s and
                       WRITE_SCATTEREDs
  - OPT_SHORT_TRANSFER: issued on READ(*)s
  - OPT_TRANSPORT_ERR: issued on all commands
  - OPT_CMD_ABORT:     issued on all commands

The other uses of every_nth were not modified.

Previously if, for example, OPT_SHORT_TRANSFER was armed then if
(abs(every_nth) % command_count == 0) occurred during a command that was
_not_ a READ, then no error injection occurred. This behaviour puzzled
several testers. Now a global "inject_pending" flag is set and the _next_
READ will get hit and that flag is cleared. OPT_RECOVERED_ERR, OPT_DIF_ERR
and OPT_DIX_ERR have similar behaviour. A downside of this is that there
might be a hang-over pending injection that gets triggered by a following
test.

Also expand the every_nth runtime parameter so that it can take hex value
(i.e. with a leading '0x') as well as a decimal value. Now both the 'opts'
and the 'every_nth' runtime parameters can take hexadecimal values.

Link: https://lore.kernel.org/r/20200712182927.72044-2-dgilbert@interlog.com
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: scsi_debug: Support hostwide tags
John Garry [Thu, 9 Jul 2020 12:23:20 +0000 (20:23 +0800)]
scsi: scsi_debug: Support hostwide tags

Many SCSI HBAs support a hostwide tagset, whereby each command submitted to
the HW from all submission queues must have a unique tag identifier.

Normally this unique tag will be in the range [0, max queue], where "max
queue" is the depth of each of the submission queues.

Add support for this hostwide tag feature, via module parameter
"host_max_queue". A non-zero value means that the feature is enabled. In
this case, the submission queues are not exposed to upper layer, i.e. from
blk-mq prespective, the device has a single hw queue. There are 2 reasons
for this:

 a. It is assumed that the host can support nr_hw_queues * can_queue
    commands, but this is not true for hostwide tags

 b. For nr_hw_queues != 0, the request tag is not unique over all HW
    queues, and some HBA drivers want to use this tag for the hostwide tag

However, like many SCSI HBA drivers today - megaraid sas being an example -
the full set of HW submission queues are still used in the LLDD driver. So
instead of using a complicated "reply_map" to create a per-CPU submission
queue mapping like megaraid_sas (as it depends on a PCI device + MSIs) -
use a simple algorithm:

    hwq = cpu % queue count

If the host_max_queue param is set non-zero, then the max queue depth is
fixed at this value also.

If and when hostwide shared tags are supported in blk-mq/scsi mid-layer,
then the policy to set nr_hw_queues = 0 for hostwide tags can be revised.

Link: https://lore.kernel.org/r/1594297400-24756-3-git-send-email-john.garry@huawei.com
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: scsi_debug: Add check for sdebug_max_queue during module init
John Garry [Thu, 9 Jul 2020 12:23:19 +0000 (20:23 +0800)]
scsi: scsi_debug: Add check for sdebug_max_queue during module init

sdebug_max_queue should not exceed SDEBUG_CANQUEUE, otherwise crashes like
this can be triggered by passing an out-of-range value:

Hardware name: Huawei D06 /D06, BIOS Hisilicon D06 UEFI RC0 - V1.16.01 03/15/2019
 pstate: 20400009 (nzCv daif +PAN -UAO BTYPE=--)
 pc : schedule_resp+0x2a4/0xa70 [scsi_debug]
 lr : schedule_resp+0x52c/0xa70 [scsi_debug]
 sp : ffff800022ab36f0
 x29: ffff800022ab36f0 x28: ffff0023a935a610
 x27: ffff800008e0a648 x26: 0000000000000003
 x25: ffff0023e84f3200 x24: 00000000003d0900
 x23: 0000000000000000 x22: 0000000000000000
 x21: ffff0023be60a320 x20: ffff0023be60b538
 x19: ffff800008e13000 x18: 0000000000000000
 x17: 0000000000000000 x16: 0000000000000000
 x15: 0000000000000000 x14: 0000000000000000
 x13: 0000000000000000 x12: 0000000000000000
 x11: 0000000000000000 x10: 0000000000000000
 x9 : 0000000000000001 x8 : 0000000000000000
 x7 : 0000000000000000 x6 : 00000000000000c1
 x5 : 0000020000200000 x4 : dead0000000000ff
 x3 : 0000000000000200 x2 : 0000000000000200
 x1 : ffff800008e13d88 x0 : 0000000000000000
 Call trace:
schedule_resp+0x2a4/0xa70 [scsi_debug]
scsi_debug_queuecommand+0x2c4/0x9e0 [scsi_debug]
scsi_queue_rq+0x698/0x840
__blk_mq_try_issue_directly+0x108/0x228
blk_mq_request_issue_directly+0x58/0x98
blk_mq_try_issue_list_directly+0x5c/0xf0
blk_mq_sched_insert_requests+0x18c/0x200
blk_mq_flush_plug_list+0x11c/0x190
blk_flush_plug_list+0xdc/0x110
blk_finish_plug+0x38/0x210
blkdev_direct_IO+0x450/0x4d8
generic_file_read_iter+0x84/0x180
blkdev_read_iter+0x3c/0x50
aio_read+0xc0/0x170
io_submit_one+0x5c8/0xc98
__arm64_sys_io_submit+0x1b0/0x258
el0_svc_common.constprop.3+0x68/0x170
do_el0_svc+0x24/0x90
el0_sync_handler+0x13c/0x1a8
el0_sync+0x158/0x180
 Code: 528847e0 72a001e0 6b00003f 540018cd (3941c340)

In addition, it should not be less than 1.

So add checks for these, and fail the module init for those cases.

[mkp: changed if condition to match error message]

Link: https://lore.kernel.org/r/1594297400-24756-2-git-send-email-john.garry@huawei.com
Fixes: c483739430f1 ("scsi_debug: add multiple queue support")
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: hisi_sas: Remove one kerneldoc comment
John Garry [Mon, 13 Jul 2020 08:04:31 +0000 (16:04 +0800)]
scsi: hisi_sas: Remove one kerneldoc comment

The comment for interrupt_init_v2_hw() should not be a kerneldoc
comment. Remove it.

Link: https://lore.kernel.org/r/1594627471-235395-3-git-send-email-john.garry@huawei.com
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: hisi_sas: Directly trigger SCSI error handling for completion errors
Luo Jiaxing [Mon, 13 Jul 2020 08:04:30 +0000 (16:04 +0800)]
scsi: hisi_sas: Directly trigger SCSI error handling for completion errors

Abort failed commands in completion path. This avoids having to wait for
block layer timeouts and triggering the SCSI error handling thread.

Link: https://lore.kernel.org/r/1594627471-235395-2-git-send-email-john.garry@huawei.com
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: ufs-mediatek: Add inline encryption support
Stanley Chu [Sun, 12 Jul 2020 00:32:26 +0000 (08:32 +0800)]
scsi: ufs-mediatek: Add inline encryption support

Add inline encryption support to ufs-mediatek.

The standards-compliant parts, such as querying the crypto capabilities and
enabling crypto for individual UFS requests, are already handled by
ufshcd-crypto.c, which itself is wired into the blk-crypto framework.

However MediaTek UFS host requires a vendor-specific hce_enable operation
to allow crypto-related registers being accessed normally in kernel.  After
this step, MediaTek UFS host can work as standard-compliant host for
inline-encryption related functions.

Link: https://lore.kernel.org/r/20200712003226.7593-1-stanley.chu@mediatek.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: cxgb4i: Clean up a debug printk
Dan Carpenter [Mon, 13 Jul 2020 10:51:00 +0000 (10:51 +0000)]
scsi: cxgb4i: Clean up a debug printk

The pr_fmt() at the top of the file already includes the __func__ so we can
remove the duplicative "cxgbi_conn_init_pdu:" from the string here.  Now it
all fits on one line as well.

Link: https://lore.kernel.org/r/20200713105100.GA251988@mwanda
Acked-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 years agoscsi: virtio_scsi: Remove unnecessary condition check
Xianting Tian [Thu, 9 Jul 2020 15:06:07 +0000 (11:06 -0400)]
scsi: virtio_scsi: Remove unnecessary condition check

kmem_cache_destroy() and mempool_destroy() both correctly handle null
pointer parameters. There is no need to check if the parameter is null
before calling these functions.

Link: https://lore.kernel.org/r/1594307167-8807-1-git-send-email-xianting_tian@126.com
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Xianting Tian <xianting_tian@126.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>