aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-04-25scsi: sd: sd_zbc: Return early in sd_zbc_check_zoned_characteristics()Damien Le Moal1-6/+7
Return early in sd_zbc_check_zoned_characteristics() for host-aware disks. This patch does not change any functionality but makes a later patch easier to read. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> [ bvanassche: extracted this change from a larger patch ] Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: sd: sd_zbc: Introduce struct zoned_disk_infoBart Van Assche2-30/+41
Deriving the meaning of the nr_zones, rev_nr_zones, zone_blocks and rev_zone_blocks member variables requires careful analysis of the source code. Make the meaning of these member variables easier to understand by introducing struct zoned_disk_info. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: sd: sd_zbc: Use logical blocks as unit when querying zonesDamien Le Moal1-6/+5
When querying zones, track the position in logical blocks instead of in sectors. This change slightly simplifies sd_zbc_report_zones(). Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> [ bvanassche: extracted this change from a larger patch ] Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: sd: sd_zbc: Verify that the zone size is a power of twoBart Van Assche1-0/+7
The following check in sd_zbc_cmnd_checks() can only work correctly if the zone size is a power of two: if (sector & (sd_zbc_zone_sectors(sdkp) - 1)) /* Unaligned request */ return BLK_STS_IOERR; Hence this patch that verifies that the zone size is a power of two. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: sd: sd_zbc: Improve source code documentationBart Van Assche2-6/+54
Add several kernel-doc headers. Declare input arrays const. Specify the array size in function declarations. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Move the ufs_is_valid_unit_desc_lun() definitionBart Van Assche2-19/+19
Move the definition of this function from a public into a private header file since it is only used inside the UFS core. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Move the struct ufs_ref_clk definitionBart Van Assche2-5/+5
Move the definition of this data structure since it is only used in a single source file. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Split the ufshcd.h header fileBart Van Assche9-225/+287
Split the ufshcd.h header file into a header file that defines the interface used by UFS drivers and another header file with declarations and data structures only used by the UFS core. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Minimize #include directivesBart Van Assche23-38/+56
Follow the convention that is used elsewhere in the Linux kernel source code and only include those headers of which the declarations are used directly. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Fix kernel-doc syntax in ufshcd.hBart Van Assche1-21/+68
This patch fixes all the warnings and errors reported by the following command: scripts/kernel-doc -none drivers/scsi/ufs/ufshcd.h Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove unnecessary ufshcd-crypto.h include directivesBart Van Assche3-2/+1
ufshcd-crypto.h declares functions that must only be called by the UFS core. Hence remove the #include "ufshcd-crypto.h" directive from UFS drivers. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Eric Biggers <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: qcom: Fix ufs_qcom_resume()Bart Van Assche1-6/+1
Clearing hba->is_sys_suspended if ufs_qcom_resume() succeeds is wrong. That variable must only be cleared if all actions involved in a resume succeed. Hence remove the statement that clears hba->is_sys_suspended from ufs_qcom_resume(). Link: https://lore.kernel.org/r/[email protected] Fixes: 81c0fc51b7a7 ("ufs-qcom: add support for Qualcomm Technologies Inc platforms") Tested-by: Bean Huo <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Introduce ufshcd_clkgate_delay_set()Bart Van Assche3-9/+16
Since the code to modify delay_ms while holding the host lock occurs twice, introduce a function that performs this action. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove locking from around single register writesBart Van Assche2-12/+0
Single register writes are atomic and hence do not need to be surrounded by locking. Additionally, MMIO writes are typically posted asynchronously. Hence, there is no guarantee that these have finished by the time the spin_unlock*() call has finished. See also the nonposted-mmio property of the Open Firmware tree. See also pci_iomap(). Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove the TRUE and FALSE definitionsBart Van Assche4-24/+10
In the Linux kernel coding style document (Documentation/process/coding-style.rst) it is recommended to use the type 'bool' and also the values 'true' and 'false'. Hence this patch that removes the definitions and uses of TRUE and FALSE from the UFS driver. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove paths from source code commentsBart Van Assche3-4/+0
Since specifying the path in a source file is redundant, remove the paths from source code comments. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Use an SPDX license identifier in the Kconfig fileBart Van Assche1-24/+1
As requested in Documentation/process/license-rules.rst, use an SPDX license identifier. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Rename sdev_ufs_device into ufs_device_wlunBart Van Assche2-35/+32
The new name reflects the role of this member variable better: a WLUN through which the power mode of the UFS device is controlled. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove the driver versionBart Van Assche5-5/+0
The current version number is 0.2. That driver version was assigned more than nine years ago. A version number that is not updated while the driver is updated is not useful. Hence remove the driver version number from the UFS driver. See also commit e0eca63e3421 ("[SCSI] ufs: Separate PCI code into glue driver"). Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Make the config_scaling_param calls type safeBart Van Assche2-15/+9
Pass the actual type to config_scaling_param callback as the third argment instead of a void pointer. Remove a superfluous NULL pointer check from ufs_qcom_config_scaling_param(). Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Switch to aggregate initializationBart Van Assche1-12/+14
Make it easier to verify for humans that ufshcd_init_pwr_dev_param() initializes all structure members. This patch does not change any functionality. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove unused constants and codeBart Van Assche2-37/+3
Commit 5b44a07b6bb2 ("scsi: ufs: Remove pre-defined initial voltage values of device power") removed the code that uses the UFS_VREG_VCC* constants and also the code that sets the min_uV and max_uV member variables. Hence also remove these constants and that member variable. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Stanley Chu <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Invert the return value of ufshcd_is_hba_active()Bart Van Assche1-5/+4
It is confusing that ufshcd_is_hba_active() returns 'true' if the HBA is not active. Clear up this confusion by inverting the return value of ufshcd_is_hba_active(). This patch does not change any functionality. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Declare the quirks array constBart Van Assche4-6/+8
Declare the quirks array and also its 'model' member const to make it explicit that these are not modified. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Rename struct ufs_dev_fix into ufs_dev_quirkBart Van Assche4-7/+7
Since struct ufs_dev_fix contains quirk information, rename it into struct ufs_dev_quirk. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove the UFS_FIX() and END_FIX() macrosBart Van Assche3-32/+32
Since these two macros reduce code readability, remove them. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Use get_unaligned_be16() instead of be16_to_cpup()Bart Van Assche1-1/+1
Use get_unaligned_be16(...) instead of the equivalent but harder to read be16_to_cpup((__be16 *)...). Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove ufshcd_lrb.sense_bufferBart Van Assche2-7/+4
ufshcd_lrb.sense_buffer is NULL if ufshcd_lrb.cmd is NULL and ufshcd_lrb.sense_buffer points at cmd->sense_buffer if ufshcd_lrb.cmd is set. In other words, the ufshcd_lrb.sense_buffer member is identical to cmd->sense_buffer. Hence this patch that removes the ufshcd_lrb.sense_buffer structure member. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove ufshcd_lrb.sense_bufflenBart Van Assche2-5/+0
ufshcd_lrb.sense_bufflen is set but never read. Hence remove this struct member. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Keoseong Park <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Simplify statements that return a booleanBart Van Assche3-27/+8
Convert "if (expr) return true; else return false;" into "return expr;" if either 'expr' is a boolean expression or the return type of the function is 'bool'. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Keoseong Park <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Remove superfluous boolean conversionsBart Van Assche3-8/+6
Remove "? true : false" if the preceding expression yields a boolean or if the result of the expression is assigned to a boolean since in these two cases the "? true : false" part is superfluous. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Declare ufshcd_wait_for_register() staticBart Van Assche2-4/+1
Declare this function static since it is only used inside the ufshcd.c source file. Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: Fix a spelling error in a source code commentBart Van Assche1-1/+1
Change one occurrence of "adpater" into "adapter". Link: https://lore.kernel.org/r/[email protected] Tested-by: Bean Huo <[email protected]> Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: ufs: core: Increase fDeviceInit poll frequencyKonstantin Vyshetsky1-1/+1
UFS devices are expected to clear fDeviceInit flag in single digit milliseconds. Current values of 5 to 10 millisecond sleep add to increased latency during the initialization and resume path. This CL lowers the sleep range to 500 to 1000 microseconds. Link: https://lore.kernel.org/r/[email protected] Acked-by: Avri Altman <[email protected]> Signed-off-by: Konstantin Vyshetsky <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: iscsi: Fix harmless double shift bugDan Carpenter1-3/+3
These flags are supposed to be bit numbers. Right now they cause a double shift bug where we use BIT(BIT(2)) instead of BIT(2). Fortunately, the bit numbers are small and it's done consistently so it does not cause an issue at run time. Link: https://lore.kernel.org/r/YmFyWHf8nrrx+SHa@kili Fixes: 5bd856256f8c ("scsi: iscsi: Merge suspend fields") Reviewed-by: Mike Christie <[email protected]> Reviewed-by: Lee Duncan <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: target: core: Silence the message about unknown VPD pagesKonstantin Shelekhin1-1/+1
Target does not support some VPD pages and is very verbose about it. Sometimes initiators don't bother and just keep sending the same request from time to time, filling up the logs. This patch lowers the message priority to debug. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Konstantin Shelekhin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: mpt3sas: Fix adapter replyPostRegisterIndex declarationDamien Le Moal2-5/+6
The replyPostRegisterIndex array of struct MPT3SAS_ADAPTER stores iomem resource addresses. Fix its declaration to annotate it with __iomem to avoid sparse warnings for writel() calls using the stored addresses. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: mpt3sas: Fix event callback log_code value handlingDamien Le Moal1-3/+3
In mpt3sas_scsih_event_callback(), fix a sparse warning when testing the event log code value by replacing the use of a pointer to the address storing the event log code with a log code local variable. Doing so, le32_to_cpu() is used when the log code value is assigned, avoiding a sparse warning. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: mpt3sas: Fix ioc->base_readl() useDamien Le Moal1-7/+6
The functions _base_readl_aero() and _base_readl() used for an adapter base_readl() method are implemented using a regular readl() call which internally performs a conversion to CPU endianness (le32_to_cpu()) of the values read. The users of the ioc base_readl() method should thus not convert again the values read using le16_to_cpu(). Fixing this removes sparse warnings. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: mpt3sas: Fix writel() useDamien Le Moal1-5/+5
writel() internally executes cpu_to_le32() to convert the value being written to little endian. The caller should thus not use this conversion function for the value passed to writel(). Remove the cpu_to_le32() calls in _base_put_smid_scsi_io_atomic(), _base_put_smid_fast_path_atomic(), _base_put_smid_hi_priority_atomic() _base_put_smid_default_atomic() and _base_handshake_req_reply_wait(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: mpt3sas: Fix _ctl_set_task_mid() TaskMID checkDamien Le Moal1-5/+6
The TaskMID field of struct Mpi2SCSITaskManagementRequest_t is a 16-bit little endian value. Fix the search loop in _ctl_set_task_mid() to add a cpu_to_le16() conversion before checking the value of TaskMID to avoid sparse warnings. While at it, simplify the search loop code to remove an unnecessarily complicated if condition. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-25scsi: qla2xxx: Remove free_sg command flagGleb Chesnokov2-3/+0
The use of the free_sg command flag was dropped in commit 2c39b5ca2a8c ("qla2xxx: Remove SRR code"). Hence remove this flag and its check. Link: https://lore.kernel.org/r/AS8PR10MB4952747D20B76DC8FE793CCA9DEE9@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COM Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Gleb Chesnokov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18scsi: core: Increase max device queue_depth to 4096Sumit Saxena1-2/+2
The maximum SCSI device queue depth of 1024 is not sufficient for RAID volumes configured behind Broadcom RAID controllers. For a 16-drive RAID volume with a device queue depth limit of 1024, only 64 I/Os (1024/16) can be issued per drive. That is not sufficient to saturate the device. Link: https://lore.kernel.org/r/[email protected] Cc: Ming Lei <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Bart Van Assche <[email protected]> Cc: Sumanesh Samanta <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18scsi: fcoe: Simplify if-if to if-elseYihao Han1-1/+1
Replace 'if (!is_zero_ether_addr(mac))' with 'else' for simplification and add curly brackets according to the kernel coding style: "Do not unnecessarily use braces where a single statement will do." ... "This does not apply if only one branch of a conditional statement is a single statement; in the latter case use braces in both branches" Please refer to: https://www.kernel.org/doc/html/v5.17-rc8/process/coding-style.html Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Yihao Han <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18scsi: pmcraid: Remove unneeded semicolonJiapeng Chong1-1/+1
Fix the following coccicheck warning: ./drivers/scsi/pmcraid.c:4593:2-3: Unneeded semicolon. Link: https://lore.kernel.org/r/[email protected] Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18scsi: lpfc: Copyright updates for 14.2.0.2 patchesJames Smart4-4/+4
Update copyrights to 2022 for files modified in the 14.2.0.2 patch set. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18scsi: lpfc: Update lpfc version to 14.2.0.2James Smart1-1/+1
Update lpfc version to 14.2.0.2. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18scsi: lpfc: Expand setting ELS_ID field in ELS_REQUEST64_WQEJames Smart2-15/+37
ELS_ID field for ELS_REQUEST64_WQE is not filled out when FIP is not supported by the HBA. Move setting ELS_ID logic into __lpfc_sli_prep_els_req_rsp_s4(), and remove ELS_ID FIP dependency logic from lpfc_sli_prep_wqe(). Introduce PLOGI ELS_ID and as a result update wqe_els_id_MASK because PLOGI ELS_ID = 0x4 occupies up to 3 bits. While in __lpfc_sli_prep_els_req_rsp_s4() routine, remove SLI3-isms. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18scsi: lpfc: Update stat accounting for READ_STATUS mbox commandJames Smart2-20/+52
READ_STATUS tx/rx byte count fields are now expanded to 64 bit wide counters. This patch updates logic for the READ_STATUS mbox command when displaying tx_word and rx_word statistics in sysfs. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18scsi: lpfc: Change FA-PWWN detection methodologyJames Smart8-26/+86
Do not rely on vendor version field of the CSPs to determine if we are in a FA-PWWN environment. Instead, use the following procedure: First, during HBA initialization, driver does a READ_CONFIG to determine if FA-PWWN is configured on the HBA. A LPFC_FAWWPN_CONFIG hba_flag is set accordingly. Next, when the link comes up before the driver gets a link up event, the firmware logs into the fabric with FA-PWWN. If the fabric port does not support FA-PWWN, the driver will get a Misconfigured FA-WWN async event before the link up. A LPFC_FAWWPN_FABRIC hba_flag will be set accordingly. Finally, if the fabric supports FA-PWWN, the firmware will replace its CSPs WWN with the Fabric Assigned ones. Then after link up, the driver will retrieve the Fabric Assigned WWN when it does a READ_SPARAM mbox command. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>