Skip to content
Permalink
Daejun-Park/sc…
Switch branches/tags

Commits on Apr 20, 2021

  1. scsi: ufs: Add batched WB buffer flush

    Currently, WriteBooster (WB) buffer is always flushed during hibern8. However,
    this is inefficient because data in the WB buffer can be invalid due to
    spatial locality of IO workload.
    If the WB buffer flush is flushed in a batched manner, the amount of data
    migration and power consumption can be reduced because the overwritten data
    of the WB buffer may be invalid due to spatial locality.
    
    This patch supports batched flush of WB buffer. When batched flush is enabled,
    fWriteBoosterBufferFlushDuringHibernate is set only when
    b_rpm_dev_flush_capable is true during runtime suspend. When the device is
    resumed, fWriteBoosterBufferFlushDuringHibernate is cleared to stop flush
    during hibern8.
    
    Co-developed-by: Keoseong Park <keosung.park@samsung.com>
    Signed-off-by: Keoseong Park <keosung.park@samsung.com>
    Signed-off-by: Daejun Park <daejun7.park@samsung.com>
    Daejun Park authored and intel-lab-lkp committed Apr 20, 2021

Commits on Apr 16, 2021

  1. scsi: target: tcm_fc: Fix a kernel-doc header

    Fix the function name in the kernel-doc header above ft_prli().
    
    Link: https://lore.kernel.org/r/20210415220826.29438-21-bvanassche@acm.org
    Cc: Hannes Reinecke <hare@suse.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  2. scsi: target: Shorten ALUA error messages

    Do not print tg_pt_gp->tg_pt_gp_valid_id if we already know that it is zero.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-20-bvanassche@acm.org
    Cc: Mike Christie <michael.christie@oracle.com>
    Reviewed-by: Mike Christie <michael.christie@oracle.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  3. scsi: target: Fix two format specifiers

    Use format specifier '%u' to format the u32 data type instead of '%hu'.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-19-bvanassche@acm.org
    Cc: Mike Christie <michael.christie@oracle.com>
    Reviewed-by: Mike Christie <michael.christie@oracle.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  4. scsi: target: Compare explicitly with SAM_STAT_GOOD

    Instead of leaving it implicit that SAM_STAT_GOOD == 0, compare explicitly
    with SAM_STAT_GOOD.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-18-bvanassche@acm.org
    Reviewed-by: Mike Christie <michael.christie@oracle.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  5. scsi: sd: Introduce a new local variable in sd_check_events()

    Instead of using 'retval' to represent first a SCSI status and later
    whether or not a disk change event occurred, introduce a new variable for
    the latter purpose.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-17-bvanassche@acm.org
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Daniel Wagner <dwagner@suse.de>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  6. scsi: dc395x: Open-code status_byte(u8) calls

    The dc395x driver is one of the two drivers that passes an u8 argument to
    status_byte() instead of an s32 argument. Open-code status_byte() in
    preparation of changing SCSI status values into a structure.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-16-bvanassche@acm.org
    Cc: Hannes Reinecke <hare@suse.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  7. scsi: 53c700: Open-code status_byte(u8) calls

    The 53c700 driver is one of the two drivers that passes an u8 argument to
    status_byte() instead of an s32 argument. Open-code status_byte in
    preparation of changing SCSI status values into a structure.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-15-bvanassche@acm.org
    Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  8. scsi: smartpqi: Remove unused functions

    This was detected by building the kernel with clang and W=1.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-14-bvanassche@acm.org
    Cc: Don Brace <don.brace@microchip.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  9. scsi: qla4xxx: Remove an unused function

    This was detected by building the kernel with clang and W=1.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-13-bvanassche@acm.org
    Cc: Nilesh Javali <njavali@marvell.com>
    Acked-by: Manish Rangankar <mrangankar@marvell.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  10. scsi: myrs: Remove unused functions

    This was detected by building the kernel with clang and W=1.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-12-bvanassche@acm.org
    Cc: Hannes Reinecke <hare@kernel.org>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  11. scsi: myrb: Remove unused functions

    This was detected by building the kernel with clang and W=1.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-11-bvanassche@acm.org
    Cc: Hannes Reinecke <hare@kernel.org>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  12. scsi: mpt3sas: Fix two kernel-doc headers

    Fix the following warnings:
    
    drivers/scsi/mpt3sas/mpt3sas_base.c:5430: warning: Excess function parameter 'ct' description in '_base_allocate_pcie_sgl_pool'
    drivers/scsi/mpt3sas/mpt3sas_base.c:5493: warning: Excess function parameter 'ctr' description in '_base_allocate_chain_dma_pool'
    
    Link: https://lore.kernel.org/r/20210415220826.29438-10-bvanassche@acm.org
    Fixes: d6adc25 ("scsi: mpt3sas: Force PCIe scatterlist allocations to be within same 4 GB region")
    Fixes: 7dd847d ("scsi: mpt3sas: Force chain buffer allocations to be within same 4 GB region")
    Cc: Sathya Prakash <sathya.prakash@broadcom.com>
    Cc: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
    Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  13. scsi: fcoe: Suppress a compiler warning

    Suppress the following compiler warning:
    
    warning: cast to smaller integer type
          'enum fip_mode' from 'void *' [-Wvoid-pointer-to-enum-cast]
            enum fip_mode fip_mode = (enum fip_mode)kp->arg;
                                     ^~~~~~~~~~~~~~~~~~~~~~
    
    Link: https://lore.kernel.org/r/20210415220826.29438-9-bvanassche@acm.org
    Cc: Hannes Reinecke <hare@suse.de>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  14. scsi: libfc: Fix a format specifier

    Since the 'mfs' member has been declared as 'u32' in include/scsi/libfc.h,
    use the %u format specifier instead of %hu. This patch fixes the following
    clang compiler warning:
    
    warning: format specifies type
          'unsigned short' but the argument has type 'u32' (aka 'unsigned int')
          [-Wformat]
                                 "lport->mfs:%hu\n", mfs, lport->mfs);
                                             ~~~          ^~~~~~~~~~
                                             %u
    
    Link: https://lore.kernel.org/r/20210415220826.29438-8-bvanassche@acm.org
    Cc: Hannes Reinecke <hare@suse.de>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  15. scsi: aacraid: Remove an unused function

    This was detected by building the kernel with clang and W=1.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-7-bvanassche@acm.org
    Cc: aacraid@microsemi.com
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  16. scsi: core: Introduce enum scsi_disposition

    Improve readability of the code in the SCSI core by introducing an
    enumeration type for the values used internally that decide how to continue
    processing a SCSI command. The eh_*_handler return values have not been
    changed because that would involve modifying all SCSI drivers.
    
    The output of the following command has been inspected to verify that no
    out-of-range values are assigned to a variable of type enum
    scsi_disposition:
    
    KCFLAGS=-Wassign-enum make CC=clang W=1 drivers/scsi/
    
    Link: https://lore.kernel.org/r/20210415220826.29438-6-bvanassche@acm.org
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Daniel Wagner <dwagner@suse.de>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  17. scsi: core: Modify the scsi_send_eh_cmnd() return value for the SDEV_…

    …BLOCK case
    
    The comment above scsi_send_eh_cmnd() says: "Returns SUCCESS or FAILED or
    NEEDS_RETRY". This patch makes all values returned by scsi_send_eh_cmnd()
    match the documentation of this function. This change does not affect the
    behavior of scsi_eh_tur() nor of scsi_eh_try_stu() nor of the
    scsi_request_sense() callers.
    
    See also commit bbe9fb0 ("scsi: Avoid that .queuecommand() gets called
    for a blocked SCSI device"; v5.3).
    
    Link: https://lore.kernel.org/r/20210415220826.29438-5-bvanassche@acm.org
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Daniel Wagner <dwagner@suse.de>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  18. scsi: core: Rename scsi_softirq_done() into scsi_complete()

    Commit 320ae51 ("blk-mq: new multi-queue block IO queueing mechanism";
    v3.13) introduced a code path that calls the blk-mq completion function
    from interrupt context. scsi-mq was introduced by commit d285203
    ("scsi: add support for a blk-mq based I/O path."; v3.17).
    
    Since the introduction of scsi-mq, scsi_softirq_done() can be called from
    interrupt context. That made the name of the function misleading, rename it
    to scsi_complete().
    
    Link: https://lore.kernel.org/r/20210415220826.29438-4-bvanassche@acm.org
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Daniel Wagner <dwagner@suse.de>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  19. scsi: core: Remove an incorrect comment

    scsi_device.sdev_target is used in more code than the single_lun code,
    hence remove the comment next to the definition of the sdev_target member.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-3-bvanassche@acm.org
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Daniel Wagner <dwagner@suse.de>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  20. scsi: core: Make the scsi_alloc_sgtables() documentation more accurate

    The current scsi_alloc_sgtables() documentation does not accurately explain
    what this function does. Hence improve the documentation of this function.
    
    Link: https://lore.kernel.org/r/20210415220826.29438-2-bvanassche@acm.org
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Daniel Wagner <dwagner@suse.de>
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    bvanassche authored and martinkpetersen committed Apr 16, 2021
  21. scsi: pm80xx: Remove global lock from outbound queue processing

    Introduce spin lock for outbound queue. With this, driver need not acquire
    HBA global lock for outbound queue processing.
    
    Link: https://lore.kernel.org/r/20210415103352.3580-9-Viswas.G@microchip.com
    Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
    Signed-off-by: Viswas G <Viswas.G@microchip.com>
    Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
    Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Viswas G authored and martinkpetersen committed Apr 16, 2021
  22. scsi: pm80xx: Reset PI and CI memory during re-initialization

    Producer index(PI) outbound queue and consumer index(CI) for Outbound queue
    are in DMA memory. During resume(), the stale PI and CI Values will lead to
    unexpected behavior. These values should be reset to 0 during driver
    reinitialization.
    
    Link: https://lore.kernel.org/r/20210415103352.3580-8-Viswas.G@microchip.com
    Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
    Signed-off-by: Viswas G <Viswas.G@microchip.com>
    Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
    Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Viswas G authored and martinkpetersen committed Apr 16, 2021
  23. scsi: pm80xx: Completing pending I/O after fatal error

    When controller runs into fatal error, I/Os get stuck with no response,
    handler event is defined to complete the pending I/Os (SAS task and
    internal task) and also perform the cleanup for the drives.
    
    Link: https://lore.kernel.org/r/20210415103352.3580-7-Viswas.G@microchip.com
    Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
    Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
    Signed-off-by: Viswas G <Viswas.G@microchip.com>
    Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Ruksar Devadi authored and martinkpetersen committed Apr 16, 2021
  24. scsi: pm80xx: Add sysfs attribute to track iop1 count

    A new sysfs variable 'ctl_iop1_count' is being introduced that tells if
    the controller is alive by indicating controller ticks. If on subsequent
    run we see the ticks changing that indicates that controller is not
    dead.
    
    Using the 'ctl_iop1_count' sysfs variable we can see ticks incrementing:
    
        linux-9saw:~# cat  /sys/class/scsi_host/host*/ctl_iop1_count
        0x00000069
        0x0000006b
        0x0000006d
        0x00000072
    
    Link: https://lore.kernel.org/r/20210415103352.3580-6-Viswas.G@microchip.com
    Acked-by: Jack Wang <jinpu.wang@ionos.com>
    Signed-off-by: Vishakha Channapattan <vishakhavc@google.com>
    Signed-off-by: Viswas G <Viswas.G@microchip.com>
    Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
    Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com>
    Signed-off-by: Radha Ramachandran <radha@google.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Vishakha Channapattan authored and martinkpetersen committed Apr 16, 2021
  25. scsi: pm80xx: Add sysfs attribute to track iop0 count

    A new sysfs variable 'ctl_iop0_count' is being introduced that tells if
    the controller is alive by indicating controller ticks. If on subsequent
    run we see the ticks changing that indicates that controller is not
    dead.
    
    Using the 'ctl_iop0_count' sysfs variable we can see ticks incrementing:
    
        linux-9saw:~# cat /sys/class/scsi_host/host*/ctl_iop0_count
        0x000000a3
        0x000001db
        0x000001e4
        0x000001e7
    
    Link: https://lore.kernel.org/r/20210415103352.3580-5-Viswas.G@microchip.com
    Acked-by: Jack Wang <jinpu.wang@ionos.com>
    Signed-off-by: Vishakha Channapattan <vishakhavc@google.com>
    Signed-off-by: Viswas G <Viswas.G@microchip.com>
    Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
    Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com>
    Signed-off-by: Radha Ramachandran <radha@google.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Vishakha Channapattan authored and martinkpetersen committed Apr 16, 2021
  26. scsi: pm80xx: Add sysfs attribute to track RAAE count

    A new sysfs variable 'ctl_raae_count' is being introduced that tells if the
    controller is alive by indicating controller ticks. If on subsequent run we
    see the ticks changing in RAAE count that indicates that controller is not
    dead.
    
    Using the 'ctl_raae_count' sysfs variable we can see ticks incrementing:
    
        linux-9saw:~# cat /sys/class/scsi_host/host*/ctl_raae_count
        0x00002245
        0x00002253
        0x0000225e
    
    Link: https://lore.kernel.org/r/20210415103352.3580-4-Viswas.G@microchip.com
    Acked-by: Jack Wang <jinpu.wang@ionos.com>
    Signed-off-by: Vishakha Channapattan <vishakhavc@google.com>
    Signed-off-by: Viswas G <Viswas.G@microchip.com>
    Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
    Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com>
    Signed-off-by: Radha Ramachandran <radha@google.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Vishakha Channapattan authored and martinkpetersen committed Apr 16, 2021
  27. scsi: pm80xx: Add sysfs attribute to check controller hmi error

    A new sysfs variable 'ctl_hmi_error' is being introduced to give the error
    details if the MPI initialization fails
    
    Using the 'ctl_hmi_error' sysfs variable we can check the error details:
    
        linux-2dq0:~# cat /sys/class/scsi_host/host*/ctl_hmi_error
        0x00000000
        0x00000000
        0x00000000
    
    Link: https://lore.kernel.org/r/20210415103352.3580-3-Viswas.G@microchip.com
    Signed-off-by: Vishakha Channapattan <vishakhavc@google.com>
    Signed-off-by: Viswas G <Viswas.G@microchip.com>
    Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Vishakha Channapattan authored and martinkpetersen committed Apr 16, 2021
  28. scsi: pm80xx: Add sysfs attribute to check MPI state

    A new sysfs variable 'ctl_mpi_state' is being introduced to check the state
    of MPI.
    
    Using the 'ctl_mpi_state' sysfs variable we can check the MPI state:
    
        linux-2dq0:~# cat /sys/class/scsi_host/host*/ctl_mpi_state
        MPI is successfully initialized
    
    Link: https://lore.kernel.org/r/20210415103352.3580-2-Viswas.G@microchip.com
    Reported-by: kernel test robot <lkp@intel.com>
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Vishakha Channapattan <vishakhavc@google.com>
    Signed-off-by: Viswas G <Viswas.G@microchip.com>
    Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
    Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com>
    Signed-off-by: Radha Ramachandran <radha@google.com>
    Signed-off-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Vishakha Channapattan authored and martinkpetersen committed Apr 16, 2021
  29. scsi: zfcp: Lift Request Queue tasklet & timer from qdio

    The qdio layer currently provides its own infrastructure to scan for
    Request Queue completions & to report them to the device driver.  This
    comes with several drawbacks - having an async tasklet & timer construct in
    qdio introduces additional lifetime complexity, and makes it harder to
    integrate them with the rest of the device driver. The timeouts are also
    currently hard-coded, and can't be tweaked without affecting other qdio
    drivers (ie. qeth).
    
    But due to recent enhancements to the qdio layer, zfcp can actually take
    full control of the Request Queue completion processing. It merely needs to
    opt-out from the qdio layer mechanisms by setting the scan_threshold to 0,
    and then use qdio_inspect_queue() to scan for completions.
    
    So re-implement the tasklet & timer mechanism in zfcp, while initially
    copying the scan conditions from qdio's handle_outbound() and
    qdio_outbound_tasklet(). One minor behavioural change is that
    zfcp_qdio_send() will unconditionally reduce the timeout to 1 HZ, rather
    than leaving it at 10 Hz if it was last armed by the tasklet. This just
    makes things more consistent. Also note that we can drop a lot of the
    accumulated cruft in qdio_outbound_tasklet(), as zfcp doesn't even use PCI
    interrupt requests any longer.
    
    This also slightly touches the Response Queue processing, as
    qdio_get_next_buffers() will no longer implicitly scan for Request Queue
    completions. So complete the migration to qdio_inspect_queue() here as well
    and make the tasklet_schedule() visible.
    
    Link: https://lore.kernel.org/r/018d3ddd029f8d6ac00cf4184880288c637c4fd1.1618417667.git.bblock@linux.ibm.com
    Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
    Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    julianwiedmann authored and martinkpetersen committed Apr 16, 2021
  30. scsi: zfcp: Move the position of put_device()

    Place the put_device() call after device_unregister() in both
    zfcp_unit_remove() and zfcp_sysfs_port_remove_store() to make it more
    natural. put_device() ought to be the last time we touch the object in both
    functions.
    
    Add comments after put_device() to make code clearer.
    
    Link: https://lore.kernel.org/r/0a568c7733ba0f1dde28b0c663b90270d44dd540.1618417667.git.bblock@linux.ibm.com
    Suggested-by: Steffen Maier <maier@linux.ibm.com>
    Suggested-by: Benjamin Block <bblock@linux.ibm.com>
    Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
    Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Qinglang Miao authored and martinkpetersen committed Apr 16, 2021
  31. scsi: zfcp: Clean up sysfs code for SFP diagnostics

    The error path from zfcp_adapter_enqueue() no longer attempts to remove the
    diagnostics attributes if they haven't been created yet.
    
    So remove the manual 'sysfs_established' guard for this case, and use
    device_add_groups() to add all adapter-related sysfs attributes in one go.
    
    Link: https://lore.kernel.org/r/37a97537f675d643006271f37723c346189b6eec.1618417667.git.bblock@linux.ibm.com
    Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
    Reviewed-by: Steffen Maier <maier@linux.ibm.com>
    Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    julianwiedmann authored and martinkpetersen committed Apr 16, 2021
  32. scsi: zfcp: Fix sysfs roll-back on error in zfcp_adapter_enqueue()

    When zfcp_adapter_enqueue() fails to create the zfcp_sysfs_adapter_attrs
    group, it calls zfcp_adapter_unregister() to tear down the adapter state
    again. This then unconditionally attempts to remove the
    zfcp_sysfs_adapter_attrs group, resulting in a "group not found" WARN from
    sysfs code.
    
    Avoid this by copying most of zfcp_adapter_unregister() into the error
    path, allowing for more fine-granular roll-back. Then skip the sysfs
    tear-down steps if we haven't progressed this far in the initialization.
    
    Link: https://lore.kernel.org/r/790922cc3af075795fff9a4b787e6bda19bdb3be.1618417667.git.bblock@linux.ibm.com
    Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
    Reviewed-by: Steffen Maier <maier@linux.ibm.com>
    Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    julianwiedmann authored and martinkpetersen committed Apr 16, 2021
  33. scsi: zfcp: Fix indentation coding style issue

    Code indentation should use tabs where possible.
    
    Link: https://lore.kernel.org/r/e8a15a2f3d64e2e76a214647cfd4fe23d370b165.1618417667.git.bblock@linux.ibm.com
    Signed-off-by: Yevhen Viktorov <yevhen.viktorov@virginmedia.com>
    Signed-off-by: Steffen Maier <maier@linux.ibm.com>
    Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    yevgenko authored and martinkpetersen committed Apr 16, 2021
  34. scsi: zfcp: Remove unneeded INIT_LIST_HEAD() for FSF requests

    INIT_LIST_HEAD() is only needed for actual list heads, while req->list is
    used as a list entry.
    
    Note that when the error path in zfcp_fsf_req_send() removes the request
    from the adapter's list of pending requests, it actually looks up the
    request from the zfcp_reqlist - rather than just calling list_del().  So
    there's no risk of us calling list_del() on a request that hasn't been
    added to any list yet.
    
    Link: https://lore.kernel.org/r/254dc0ae28dccc43ab0b1079ef2c8dcb5fe1d2e4.1618417667.git.bblock@linux.ibm.com
    Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
    Reviewed-by: Steffen Maier <maier@linux.ibm.com>
    Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    julianwiedmann authored and martinkpetersen committed Apr 16, 2021
Older