Re: [PATCH V14 1/2] scsi: ufs: set the device reference clock setting

2018-09-24 Thread Avri Altman
>+static struct ufs_ref_clk ufs_ref_clk_freqs[] = { >+ {1920, REF_CLK_FREQ_19_2_MHZ}, >+ {2600, REF_CLK_FREQ_26_MHZ}, >+ {3840, REF_CLK_FREQ_38_4_MHZ}, >+ {5200, REF_CLK_FREQ_52_MHZ}, >+ {0, REF_CLK_FREQ_INVAL}, >+}; >+ >+static inline enum ufs_ref_cl

Re: [PATCH 0/3] scsi: ufs-qcom: Remove all direct calls to qcom-ufs phy

2018-09-24 Thread Vivek Gautam
Hi all, On Tue, Sep 4, 2018 at 3:47 PM Vivek Gautam wrote: > > Cleaning up the ufs-qcom host further to remove all direct calls > into qcom-ufs driver. > Only phy-qcom-ufs-qmp-20nm phy handles these direct calls from ufs host > and this phy is not used in any supported qcom platform in current ke

Re: [PATCH V14 1/2] scsi: ufs: set the device reference clock setting

2018-09-24 Thread Sayali Lokhande
On 9/24/2018 1:28 PM, Avri Altman wrote: +static struct ufs_ref_clk ufs_ref_clk_freqs[] = { + {1920, REF_CLK_FREQ_19_2_MHZ}, + {2600, REF_CLK_FREQ_26_MHZ}, + {3840, REF_CLK_FREQ_38_4_MHZ}, + {5200, REF_CLK_FREQ_52_MHZ}, + {0, REF_CLK_FREQ_INVAL}, +}

Re: [PATCH V14 2/2] scsi: ufs: Add configfs support for UFS provisioning

2018-09-24 Thread Avri Altman
> obj-$(CONFIG_SCSI_UFS_QCOM) += ufs-qcom.o >obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o >ufshcd-core-objs := ufshcd.o ufs-sysfs.o >+obj-$(CONFIG_SCSI_UFS_PROVISION) += ufs-configfs.o Isn't ufs-configfs should be part of ufshcd-core? like ufs-sysfs ? >+static ssize_t ufs_config_desc_show(struct co

[PATCH 4.18 229/235] blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()

2018-09-24 Thread Greg Kroah-Hartman
4.18-stable review patch. If anyone has any objections, please let me know. -- From: Ming Lei [ Upstream commit 1311326cf4755c7ffefd20f576144ecf46d9906b ] SCSI probing may synchronously create and destroy a lot of request_queues for non-existent devices. Any synchronize_rcu()

[PATCH 4.14 155/173] blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()

2018-09-24 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Ming Lei [ Upstream commit 1311326cf4755c7ffefd20f576144ecf46d9906b ] SCSI probing may synchronously create and destroy a lot of request_queues for non-existent devices. Any synchronize_rcu()

[PATCH 6/7] scsi: hisi_sas: Use block layer tag instead for IPTT

2018-09-24 Thread John Garry
From: Xiang Chen Currently we use the IPTT defined in LLDD to identify IOs. Actually for IOs which are from the block layer, they have tags to identify them. So for those IOs, use tag of the block layer directly, and for IOs which is not from the block layer (such as internal IOs from libsas/LLDD

[PATCH 1/7] scsi: hisi_sas: Feed back linkrate(max/min) when re-attached

2018-09-24 Thread John Garry
From: Luo Jiaxing At directly attached situation, if the user modifies the sysfs interface of maximum_linkrate and minimum_linkrate to renegotiate the linkrate between SAS controller and target, the value of both files mentioned above should have change to user setting after renegotiate is over,

[PATCH 7/7] scsi: hisi_sas: Update v3 hw AIP_LIMIT and CFG_AGING_TIME register values

2018-09-24 Thread John Garry
From: Xiang Chen Update registers as follows: - Default value of AIP timer is 1ms, and it is easy for some expanders to cause IO error. Change the value to max value 65ms to avoid IO error for those expanders. - A CQ completion will be reported by HW when 4 CQs have occurred or the aging t

[PATCH 5/7] scsi: hisi_sas: unmask interrupts ent72 and ent74

2018-09-24 Thread John Garry
From: Xiang Chen The interrupts of ent72 and ent74 are not processed by PCIe AER handling, so we need to unmask the interrupts and process them first in the driver. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- 1 file changed, 1 inserti

[PATCH 4/7] scsi: hisi_sas: Free slot later in slot_complete_vx_hw()

2018-09-24 Thread John Garry
From: Xiang Chen If an SSP/SMP IO times out, it may be actually in reality be simultaneously processing completion of the slot in slot_complete_vx_hw(). Then if the slot is freed in slot_complete_vx_hw() (this IPTT is freed and it may be re-used by other slot), and we may abort the wrong slot in

[PATCH 3/7] scsi: hisi_sas: Fix the race between IO completion and timeout for SMP/internal IO

2018-09-24 Thread John Garry
From: Xiang Chen If SMP/internal IO times out, we will possibly free the task immediately. However if the IO actually completes at the same time, the IO completion may refer to task which have been freed. So to solve the issue, flush the tasklet to finish IO completion before free'ing slot/task

[PATCH 2/7] scsi: hisi_sas: Move evaluation of hisi_hba in hisi_sas_task_prep()

2018-09-24 Thread John Garry
From: Luo Jiaxing In evaluating hisi_hba, the sas_port may be NULL, so for safety relocate the the check to value possible NULL deference. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-

[PATCH 0/7] hisi_sas: Misc bugfixes and an optimisation patch

2018-09-24 Thread John Garry
This patchset introduces mostly more minor/obscure bugfixes for the driver. Also included is an optimisation to use the block layer tag for the IPTT indexing. This quite a nice optimisation as it means we don't have to evaluate this in the driver - it was a bit of a bottle-neck. However it does b

Re: [PATCH 1/3] phy: qcom-ufs: Remove stale methods that handle ref clk

2018-09-24 Thread Bjorn Andersson
On Tue 04 Sep 03:17 PDT 2018, Vivek Gautam wrote: > Remove ufs_qcom_phy_enable/(disable)_dev_ref_clk() that > are not being used by any code. > > Signed-off-by: Vivek Gautam Thanks for the ping Vivek, I didn't spot these when you posted them. Reviewed-by: Bjorn Andersson Regards, Bjorn > --

Re: [PATCH 2/3] scsi/ufs: qcom: Remove ufs_qcom_phy_*() calls from host

2018-09-24 Thread Bjorn Andersson
On Tue 04 Sep 03:17 PDT 2018, Vivek Gautam wrote: > The host makes direct calls into phy using ufs_qcom_phy_*() > APIs. These APIs are only defined for 20nm qcom-ufs-qmp phy > which is not being used by any architecture as yet. Future > architectures too are not going to use 20nm ufs phy. > So rem

Re: [PATCH 3/3] phy: qcom-ufs: Declare 20nm qcom ufs qmp phy as Broken

2018-09-24 Thread Bjorn Andersson
On Tue 04 Sep 03:17 PDT 2018, Vivek Gautam wrote: > Fork out separate configs for 14nm and 20nm qcom ufs qmp phys > to declare the 20nm phy as broken. > > Signed-off-by: Vivek Gautam Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/phy/qualcomm/Kconfig | 17 + >

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > > > > > Acked-by: Darren Hart (VMware) > >

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Jason Gunthorpe
On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > > On Fri, Sep 14, 2018 at 01:35:06PM -07

Re: [PATCH V14 2/2] scsi: ufs: Add configfs support for UFS provisioning

2018-09-24 Thread Evan Green
On Sun, Sep 23, 2018 at 11:29 PM Sayali Lokhande wrote: > > This patch adds configfs support to provision UFS device at > runtime. This feature can be primarily useful in factory or > assembly line as some devices may be required to be configured > multiple times during initial system development

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Mon, Sep 24, 2018 at 10:35 PM Jason Gunthorpe wrote: > On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > > On Fri, Sep 14, 2018 at 09:57:48PM +0100,

[PATCH v3 0/5] scsi: libsas: some code cleanups and bug fixes

2018-09-24 Thread Jason Yan
I split some code cleanups and bug fixes patches from my earlier series: https://lkml.org/lkml/2018/5/28/2154 These patches are separate to the subject of the earlier series and are just small fixes. Hope it is much easier to review and test. v2: fix some typos and add reviewed-by tags. v3: chang

[PATCH v3 5/5] scsi: libsas: fix a race condition when smp task timeout

2018-09-24 Thread Jason Yan
When the lldd is processing the complete sas task in interrupt and set the task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be triggered at the same time. And smp_task_timedout() will complete the task wheter the SAS_TASK_STATE_DONE is set or not. Then the sas task may freed befor

[PATCH v3 2/5] scsi: libsas: make the lldd_port_deformed method optional

2018-09-24 Thread Jason Yan
Now LLDDs have to implement lldd_port_deformed method otherwise NULL dereference will happen. Make it optional and remove the dummy implementation in hisi_sas. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams

[PATCH v3 3/5] scsi: libsas: always unregister the old device if going to discover new

2018-09-24 Thread Jason Yan
If we went into sas_rediscover_dev() the attached_sas_addr was already insured not to be zero. So it's unnecessary to check if the attached_sas_addr is zero. And although if the sas address is not changed, we always have to unregister the old device when we are going to register a new one. We cann

[PATCH v3 4/5] scsi: libsas: check the ata device status by ata_dev_enabled()

2018-09-24 Thread Jason Yan
When ata device IDENTIFY failed, the ata device status is ATA_DEV_UNKNOWN. The libata reported like: [113518.620433] ata5.00: qc timeout (cmd 0xec) [113518.653646] ata5.00: failed to IDENTIFY (I/O error, err_mask=0x4) But libsas verifies the device status by ata_dev_disabled(), which skipped ATA_

[PATCH v3 1/5] scsi: libsas: delete dead code in scsi_transport_sas.c

2018-09-24 Thread Jason Yan
This code is dead and no clue implies that it will be back again. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: John Garry Reviewed-by:

Re: [PATCH 1/3] phy: qcom-ufs: Remove stale methods that handle ref clk

2018-09-24 Thread Vivek Gautam
On 9/24/2018 10:53 PM, Bjorn Andersson wrote: On Tue 04 Sep 03:17 PDT 2018, Vivek Gautam wrote: Remove ufs_qcom_phy_enable/(disable)_dev_ref_clk() that are not being used by any code. Signed-off-by: Vivek Gautam Thanks for the ping Vivek, I didn't spot these when you posted them. Reviewe

Re: [PATCH 0/3] scsi: ufs-qcom: Remove all direct calls to qcom-ufs phy

2018-09-24 Thread Kishon Vijay Abraham I
Hi Vivek, On Tuesday 04 September 2018 03:47 PM, Vivek Gautam wrote: > Cleaning up the ufs-qcom host further to remove all direct calls > into qcom-ufs driver. > Only phy-qcom-ufs-qmp-20nm phy handles these direct calls from ufs host > and this phy is not used in any supported qcom platform in cur

Re: [PATCH V14 0/2] Add UFS provisioning support in driver

2018-09-24 Thread Avri Altman
>Configuration descriptor buffer consists of Device and Unit >descriptor configurable parameters which are parsed from vendor >specific provisioning file and then passed via configfs node at >runtime to provision ufs device. Can you describe your test setup? Will try to re-test it if not too comp

[Bug 201221] New: USB drive shows up with write protection enabled

2018-09-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=201221 Bug ID: 201221 Summary: USB drive shows up with write protection enabled Product: IO/Storage Version: 2.5 Kernel Version: 4.14.44-4.19 Hardware: All OS: Linux