- 04 Apr, 2019 38 commits
-
-
YueHaibing authored
The memory return by kzalloc() has already be set to zero, so remove useless memset(0). Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Gustavo A. R. Silva authored
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/message/fusion/mptscsih.c: In function mptscsih_io_done : drivers/message/fusion/mptscsih.c:741:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if ( ioc->bus_type == SAS ) { ^ drivers/message/fusion/mptscsih.c:790:3: note: here case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */ ^~~~ drivers/message/fusion/mptscsih.c:884:4: warning: this statement may fall through [-Wimplicit-fallthrough=] scsi_set_resid(sc, 0); ^~~~~~~~~~~~~~~~~~~~~ drivers/message/fusion/mptscsih.c:885:3: note: here case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */ ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
Add VCC supply for ufs-mediatek driver to provide power-saving operation during low-power modes. For example VCC can be turned-off during system suspend and turned-on after system is resumed. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
Custom device tree property "<name>-fixed-regulator" can be removed because, 1) It is not used anywhere in tree. 2) All handlings for "<name>-fixed-regulator" have been removed in UFS driver. 3) There is no issue if an existed regulator defined "<name>-fixed-regulator" property in device tree. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Jan Kotas authored
This patch adds an additional PHY initialization, required for M31 PHY when used with Cadence UFS HC. A new compatible string has been added for this purpose. [mkp: nuke superfluous status return] Signed-off-by: Jan Kotas <jank@cadence.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Jan Kotas authored
This patch adds a new compatible string description for CDNS UFS HCD + M31 16nm PHY. Signed-off-by: Jan Kotas <jank@cadence.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Zeng Guangyue authored
The pointer value is initialized as &hba->vreg_info, and it's never changed. It's not necessary to check the pointer is null or not. Signed-off-by: Zeng Guangyue <zengguangyue@hisilicon.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
YueHaibing authored
Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/qedf/qedf_fip.c: In function 'qedf_fcoe_send_vlan_req': drivers/scsi/qedf/qedf_fip.c:22:6: warning: variable 'fr_len' set but not used [-Wunused-but-set-variable] It's never used since introduction and can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Colin Ian King authored
Rename the functions pm8001_chip_is_our_interupt, pm80xx_chip_is_our_interupt and function pointer is_our_interrupt to fix spelling mistakes. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Colin Ian King authored
When macro PM8001_USE_MSIX is defined there are redundant dead code calls to pm8001_chip_intx_interrupt_{enable|disable} and pm8001_cr32. Clean this up for the defined PM8001_USE_MSIX and undefined PM8001_USE_MSIX cases. [mkp: squashed two patches] Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Himanshu Madhani authored
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Giridhar Malavali authored
This patch converts driver wait time from using msleep to wair_event_timeout to prevent race condition. Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Giridhar Malavali authored
This patch allows driver to unload using "modprobe -r" when FC-NVMe LUNs are connected. Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Anil Gurumurthy authored
This patch removes redundant qla2x00_abort_all_cmds() during driver unload. Signed-off-by: Anil Gurumurthy <agurumurthy@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Giridhar Malavali authored
This patch sets remote_port_devloss value to 0. This indicates to FC-NVMe transport that driver is unloading and transport should not retry. Fixes: e476fe8a ("scsi: qla2xxx: Fix unload when NVMe devices are configured") Cc: stable@vger.kernel.org Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
Clean up fcport list and loopid in one place and iterate through for loop. Signed-off-by: Quinn Tran <qtran@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
Add mutex protection to prevent driver from freeing the FW dump buffer while the extraction is in progress. [mkp: commit desc] Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
If fw dump buffer size changes and there is an existing fw dump, then save the old dump in the newly allocated buffer. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Andrew Vasquez authored
Recent ISPs have larger and more complex flash-write semantics (secure-access and signing). The BSG interfaces support these semantics for all ISPs and is exclusively used by QLogic user-space tools. Limit flash-write operations to ISPs <= 25xx. Signed-off-by: Andrew Vasquez <andrewv@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Andrew Vasquez authored
Commit e6f77540 ("scsi: qla2xxx: Fix an integer overflow in sysfs code") incorrectly set 'optrom_region_size' to 'start+size', which can overflow option-rom boundaries when 'start' is non-zero. Continue setting optrom_region_size to the proper adjusted value of 'size'. Fixes: e6f77540 ("scsi: qla2xxx: Fix an integer overflow in sysfs code") Cc: stable@vger.kernel.org Signed-off-by: Andrew Vasquez <andrewv@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Giridhar Malavali authored
With FC-NVMe enabled, driver does not support T10 DIF/DIX. This patch disables T10-PI information when ql2xnvmeenable is set. Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Giridhar Malavali authored
This patch increases max_sgl_segments value from 128 to the maximum supported which is 1024. Increasing max_sgl_segments will allow the driver to support larger I/O sizes [mkp: commit desc tweak] Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Giridhar Malavali authored
Driver maintains state machine for processing and completing switch commands. This patch resets FCF_ASYNC_{SENT|ACTIVE} flag to indicate if the previous command is active or sent, in order for next GPSC command to advance the state machine. [mkp: commit desc typo] Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Giridhar Malavali authored
This patch sets QPair pointer to NULL to prevent abort command racing ahead of normal command completion handling during scsi_done call. Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Giridhar Malavali authored
This patch tries to address race condition between abort handler and completion handler. When scsi command result is set by both abort and completion handler, scsi_done() is only called after refcount on SRB structure goes to zero. The abort handler sets this result prematurely even when the refcount is non-zero value. Fix this by setting SCSI cmd->result before scsi_done() is called. Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
This patch avoids that a kernel warning appears when smp_processor_id() is called with preempt debugging enabled. Cc: James Smart <james.smart@broadcom.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
Remove those functions that are not called from outside the removed functions. Cc: James Smart <james.smart@broadcom.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
This patch does not change any functionality but avoids that the compiler complains about set-but-not-used variables when building with W=1. Cc: James Smart <james.smart@broadcom.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
Arrays should be defined in .c files instead of in a header file. This patch reduces the size of the lpfc kernel module. Cc: James Smart <james.smart@broadcom.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
This patch avoids that the compiler warns about missing fall-through annotation when building with W=1. Cc: James Smart <james.smart@broadcom.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
This patch avoid that smatch complains about misleading indentation. Cc: James Smart <james.smart@broadcom.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
This patch avoids that the compiler complains about missing declarations when building with W=1. Cc: James Smart <james.smart@broadcom.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
"<name>-fixed-regulator" device tree property can be safely removed because below things are fixed or resolved, 1. "<name>-max-microamp" becomes optional property: Undefined "<name>-max-microamp" will not cause initialization fail if "<name>-fixed-regulator" is not defined. 2. Current switching operation (by regulator_set_load) now has rules: Regulators will have undefined current limit if "<name>-fixed-regulator" is not defined. But this is safe because only regulator which has configured current limit from "<name>-max-microamp" property is allowed to change its load. Although "<name>-fixed-regulator" is not used in any dt-bindings in tree, this patch is still safe for regulators already defined "<name>-fixed-regulator". To be more clear, if a regulator defined "<name>-fixed-regulator" before, the behavior difference after this patch is, 1. "<name>-max-microamp": If a regulator defined "<name>-fixed-regulator", it is not necessary to define "<name>-max-microamp" property in device tree and it is expected to have an undefined current limit, i.e., "max_uA" field is zero in struct ufs_vreg. This is exactly the same as patched. 2. "vcc-supply-1p8" or volatge range settings: * For vcc, vccq or vccq2, these three regulators shall not define "<name>-fixed-regulator" because defining it will lead to undefined voltage range and thus voltage switching will be unexpected. * For other regulators with undefined voltage range, voltage range will be still undefined after patched. Therefore this patch is safe for all existed regulators with "<name>-fixed-regulator" property already defined. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
In dt-bindings for ufs, "<name>-max-microamp" property indicates current limit and is mandatory if "<name>-fixed-regulator" is not defined on a specified regulator. However, in some platforms, regulators without "<name>-fixed-regulator" property may not need to define their current limit because they may want to define voltage range only for proper voltage switching in different power modes, especially for vcc, vccq or vccq2. Currently missing "<name>-max-microamp" property in device tree will lead initialization to fail, thus such limitation shall be resolved to tolerate this kind of regulators. After resolving this, regulators without "<name>-max-microamp" property will have undefined "max current" value, i.e., zero value in "max_uA" field in struct ufs_vreg. Because we do bypass current switching operation (by regulator_set_load) in case of undefined current limit, this patch shall be safe. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
Currently if a regulator has "<name>-fixed-regulator" property in device tree, it will skip current limit initialization. This lead to a zero "max_uA" value in struct ufs_vreg. However, "regulator_set_load" operation shall be required on regulators which have valid current limits, otherwise a zero "max_uA" set by "regulator_set_load" may cause unexpected behavior when this regulator is enabled or set as high power mode. Similarly, in device's icc_level configuration flow, the target icc_level shall be updated if regulator also has valid current limit, otherwise a wrong icc_level will be calculated by zero "max_uA" and thus causes unexpected results after it is written to device. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
For regulators used by UFS, vcc, vccq and vccq2 will have voltage range initialized by ufshcd_populate_vreg(), however other regulators may have undefined voltage range if dt-bindings have no such definition. In above undefined case, both "min_uV" and "max_uV" fields in ufs_vreg struct will be zero values and these values will be configured on regulators in different power modes. Currently this may have no harm if both "min_uV" and "max_uV" always keep "zero values" because regulator_set_voltage() will always bypass such invalid values and return "good" results. However improper values shall be fixed to avoid potential bugs. Simply bypass voltage configuration if voltage range is not defined. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
There are two fields related to regulator current limit in struct ufs_vreg: "min_uA" and "max_uA". "max_uA" is probed by "<name>-max-microamp" property from device tree and used for - regulator_set_load operations - icc_level configuration in device However "min_uA" field is not used anywhere, thus we can remove it. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Marc Gonzalez <marc.w.gonzalez@free.fr> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Ding Xiang authored
The rc variable is not needed in bnx2fc_abts_cleanup(). Remove it and just return SUCCESS. [mkp: commit desc] Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com> Acked-by: Manish Rangankar <mrangankar@marvell.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
- 28 Mar, 2019 2 commits
-
-
Saurav Kashyap authored
- Update the driver version. Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Saurav Kashyap authored
- lport was getting used without initialization, initialize it to fix a warning. Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-