Re: [PATCH v20 1/2] scsi: ufs: Enable power management for wlun

2021-04-19 Thread Asutosh Das (asd)
On 4/19/2021 11:37 AM, Adrian Hunter wrote: On 16/04/21 10:49 pm, Asutosh Das wrote: Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- I came across 3 issues while testing. See comments below. Hi Adrian Thanks for the comments. @@ -5794,7 +5839,7

[PATCH v20 2/2] ufs: sysfs: Resume the proper scsi device

2021-04-16 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Adrian Hunter Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 24 1 file changed, 12 insertions(+), 12 deletions

[PATCH v20 1/2] scsi: ufs: Enable power management for wlun

2021-04-16 Thread Asutosh Das
Carpenter Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs-debugfs.c | 6 +- drivers/scsi/ufs/ufs-debugfs.h | 2 +- drivers/scsi/ufs/ufs

Re: [PATCH v18 1/2] scsi: ufs: Enable power management for wlun

2021-04-16 Thread Asutosh Das (asd)
On 4/15/2021 4:11 PM, Bart Van Assche wrote: On 4/14/21 11:58 AM, Asutosh Das wrote: [ ... ] Hi Bart, Thanks for the comments. I will fix the comments in the next version. The following code is executed before ufshcd_async_scan() is called: dev = hba->

[PATCH v19 1/2] scsi: ufs: Enable power management for wlun

2021-04-15 Thread Asutosh Das
suspend. Fixed smatch warnings: Reported-by: kernel test robot Reported-by: Dan Carpenter Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs-debugfs.c

[PATCH v19 2/2] ufs: sysfs: Resume the proper scsi device

2021-04-15 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Adrian Hunter Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 24 1 file changed, 12 insertions(+), 12 deletions

[PATCH v18 2/2] ufs: sysfs: Resume the proper scsi device

2021-04-14 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/scsi

[PATCH v18 1/2] scsi: ufs: Enable power management for wlun

2021-04-14 Thread Asutosh Das
this as a supplier for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2

Re: [PATCH v17 1/2] scsi: ufs: Enable power management for wlun

2021-04-09 Thread Asutosh Das (asd)
On 4/9/2021 3:07 AM, Adrian Hunter wrote: On 9/04/21 5:27 am, Daejun Park wrote: Hi Asutosh Das, During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU (START_STOP_UNIT) to wlun during its runtime

[PATCH v17 2/2] ufs: sysfs: Resume the proper scsi device

2021-04-08 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH v17 1/2] scsi: ufs: Enable power management for wlun

2021-04-08 Thread Asutosh Das
this as a supplier for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2

[PATCH v16 1/2] scsi: ufs: Enable power management for wlun

2021-04-07 Thread Asutosh Das
this as a supplier for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2

[PATCH v16 2/2] ufs: sysfs: Resume the proper scsi device

2021-04-07 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers

Re: [PATCH v15 1/2] scsi: ufs: Enable power management for wlun

2021-04-07 Thread Asutosh Das (asd)
On 4/7/2021 3:21 AM, Adrian Hunter wrote: On 6/04/21 8:52 pm, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU (START_STOP_UNIT) to wlun during its runtime-suspend. During

[PATCH v15 2/2] ufs: sysfs: Resume the proper scsi device

2021-04-06 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH v15 1/2] scsi: ufs: Enable power management for wlun

2021-04-06 Thread Asutosh Das
this as a supplier for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2

Re: [PATCH v14 1/2] scsi: ufs: Enable power management for wlun

2021-03-31 Thread Asutosh Das (asd)
On 3/31/2021 11:19 AM, Adrian Hunter wrote: On 31/03/21 1:31 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU (START_STOP_UNIT) to wlun during its runtime-suspend. During

Re: [PATCH V2 2/3] scsi: ufs: add a vops to configure VCC voltage level

2021-03-31 Thread Asutosh Das (asd)
On 3/21/2021 2:57 PM, Nitin Rawat wrote: Add a vops to configure VCC voltage VCC voltage level for platform supporting both ufs2.x and ufs 3.x devices. Suggested-by: Stanley Chu Suggested-by: Asutosh Das Suggested-by: Bjorn Andersson Signed-off-by: Nitin Rawat Signed-off-by: Veerabhadrarao

[PATCH v14 1/2] scsi: ufs: Enable power management for wlun

2021-03-30 Thread Asutosh Das
this as a supplier for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2

[PATCH v14 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-30 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-24 Thread Asutosh Das (asd)
On 3/23/2021 12:19 PM, Adrian Hunter wrote: On 23/03/21 5:13 pm, Asutosh Das (asd) wrote: On 3/22/2021 11:12 PM, Adrian Hunter wrote: On 22/03/21 9:53 pm, Asutosh Das (asd) wrote: On 3/19/2021 10:47 AM, Adrian Hunter wrote: On 19/03/21 2:35 am, Asutosh Das wrote: During runtime-suspend

[PATCH v13 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-24 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH v13 1/2] scsi: ufs: Enable power management for wlun

2021-03-24 Thread Asutosh Das
this as a supplier for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-23 Thread Asutosh Das (asd)
On 3/22/2021 11:12 PM, Adrian Hunter wrote: On 22/03/21 9:53 pm, Asutosh Das (asd) wrote: On 3/19/2021 10:47 AM, Adrian Hunter wrote: On 19/03/21 2:35 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-22 Thread Asutosh Das (asd)
On 3/19/2021 10:47 AM, Adrian Hunter wrote: On 19/03/21 2:35 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During the process

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-19 Thread Asutosh Das (asd)
On 3/18/2021 8:12 PM, Bart Van Assche wrote: On 3/18/21 5:35 PM, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During the process

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-18 Thread Asutosh Das (asd)
On 3/18/2021 12:16 PM, Adrian Hunter wrote: On 18/03/21 7:58 pm, Asutosh Das (asd) wrote: On 3/18/2021 10:54 AM, Rafael J. Wysocki wrote: On Thu, Mar 18, 2021 at 6:33 PM Asutosh Das (asd) wrote: On 3/18/2021 7:00 AM, Rafael J. Wysocki wrote: On Wed, Mar 17, 2021 at 7:37 AM Adrian Hunter

[PATCH v12 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-18 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-18 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs

Re: [PATCH v11 1/2] scsi: ufs: Enable power management for wlun

2021-03-18 Thread Asutosh Das (asd)
On 3/15/2021 7:29 AM, Adrian Hunter wrote: On 12/03/21 12:19 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During the process

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-18 Thread Asutosh Das (asd)
On 3/18/2021 10:54 AM, Rafael J. Wysocki wrote: On Thu, Mar 18, 2021 at 6:33 PM Asutosh Das (asd) wrote: On 3/18/2021 7:00 AM, Rafael J. Wysocki wrote: On Wed, Mar 17, 2021 at 7:37 AM Adrian Hunter wrote: On 16/03/21 10:35 pm, Asutosh Das (asd) wrote: On 3/16/2021 12:48 AM, Adrian Hunter

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-18 Thread Asutosh Das (asd)
On 3/18/2021 7:00 AM, Rafael J. Wysocki wrote: On Wed, Mar 17, 2021 at 7:37 AM Adrian Hunter wrote: On 16/03/21 10:35 pm, Asutosh Das (asd) wrote: On 3/16/2021 12:48 AM, Adrian Hunter wrote: On 16/03/21 12:22 am, Asutosh Das (asd) wrote: On 3/14/2021 1:11 AM, Adrian Hunter wrote: On 10/03

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-16 Thread Asutosh Das (asd)
On 3/16/2021 12:48 AM, Adrian Hunter wrote: On 16/03/21 12:22 am, Asutosh Das (asd) wrote: On 3/14/2021 1:11 AM, Adrian Hunter wrote: On 10/03/21 5:04 am, Asutosh Das (asd) wrote: On 3/9/2021 7:56 AM, Asutosh Das (asd) wrote: On 3/8/2021 9:17 AM, Rafael J. Wysocki wrote: On Mon, Mar 8, 2021

Re: [PATCH v11 1/2] scsi: ufs: Enable power management for wlun

2021-03-15 Thread Asutosh Das (asd)
On 3/15/2021 7:29 AM, Adrian Hunter wrote: On 12/03/21 12:19 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During the process

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-15 Thread Asutosh Das (asd)
On 3/14/2021 1:11 AM, Adrian Hunter wrote: On 10/03/21 5:04 am, Asutosh Das (asd) wrote: On 3/9/2021 7:56 AM, Asutosh Das (asd) wrote: On 3/8/2021 9:17 AM, Rafael J. Wysocki wrote: On Mon, Mar 8, 2021 at 5:21 PM Rafael J. Wysocki wrote: On Sat, Mar 6, 2021 at 5:17 PM Alan Stern wrote

[PATCH v11 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-11 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/ufs/ufs-sysfs.c b

[PATCH v11 1/2] scsi: ufs: Enable power management for wlun

2021-03-11 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-10 Thread Asutosh Das (asd)
On 3/10/2021 8:27 AM, Alan Stern wrote: On Tue, Mar 09, 2021 at 08:04:53PM -0800, Asutosh Das (asd) wrote: On 3/9/2021 7:14 PM, Alan Stern wrote: On Tue, Mar 09, 2021 at 07:04:34PM -0800, Asutosh Das (asd) wrote: Hello I & Can (thanks CanG) debugged this further: Looks like this issue

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-09 Thread Asutosh Das (asd)
On 3/9/2021 7:14 PM, Alan Stern wrote: On Tue, Mar 09, 2021 at 07:04:34PM -0800, Asutosh Das (asd) wrote: Hello I & Can (thanks CanG) debugged this further: Looks like this issue can occur if the sd probe is asynchronous. Essentially, the sd_probe() is done asynchrono

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-09 Thread Asutosh Das (asd)
On 3/9/2021 7:56 AM, Asutosh Das (asd) wrote: On 3/8/2021 9:17 AM, Rafael J. Wysocki wrote: On Mon, Mar 8, 2021 at 5:21 PM Rafael J. Wysocki wrote: On Sat, Mar 6, 2021 at 5:17 PM Alan Stern wrote: On Fri, Mar 05, 2021 at 06:54:24PM -0800, Asutosh Das (asd) wrote: Now during my testing

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-09 Thread Asutosh Das (asd)
On 3/8/2021 9:17 AM, Rafael J. Wysocki wrote: On Mon, Mar 8, 2021 at 5:21 PM Rafael J. Wysocki wrote: On Sat, Mar 6, 2021 at 5:17 PM Alan Stern wrote: On Fri, Mar 05, 2021 at 06:54:24PM -0800, Asutosh Das (asd) wrote: Now during my testing I see a weird issue sometimes (1 in 7). Scenario

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-05 Thread Asutosh Das (asd)
On 3/4/2021 7:35 AM, Adrian Hunter wrote: On 3/03/21 12:52 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During the process

Re: [PATCH v10 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-04 Thread Asutosh Das
On Thu, Mar 04 2021 at 23:45 -0800, Adrian Hunter wrote: On 3/03/21 12:52 am, Asutosh Das wrote: Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Since "scsi: ufs: ufs-debugfs: Add user-defined exception_event_mask" is now in

[PATCH v10 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-03 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/ufs/ufs-sysfs.c b

[PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-03 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs

Re: [PATCH v9 1/2] scsi: ufs: Enable power management for wlun

2021-03-02 Thread Asutosh Das
On Tue, Mar 02 2021 at 06:14 -0800, Adrian Hunter wrote: On 2/03/21 5:21 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During

[PATCH v9 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-01 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufs-sysfs.c b

[PATCH v9 1/2] scsi: ufs: Enable power management for wlun

2021-03-01 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs

Re: [PATCH] scsi: ufs: Fix incorrect ufshcd_state after ufshcd_reset_and_restore()

2021-03-01 Thread Asutosh Das
, ufshcd_reset_and_restore() will change the state to UFSHCD_STATE_ERROR, otherwise ufshcd_probe_hba() will have set the state appropriately. Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths") Signed-off-by: Adrian Hunter --- Reviewed-by: A

Re: [PATCH v8 1/2] scsi: ufs: Enable power management for wlun

2021-03-01 Thread Asutosh Das
On Mon, Mar 01 2021 at 05:23 -0800, Adrian Hunter wrote: Hi A couple of minor things, but also a potential issue with when link state transitions are done. Please see comments below. On 26/02/21 1:37 am, Asutosh Das wrote: Hi Adrian Thanks for your comments. During runtime-suspend of ufs

[PATCH v8 2/2] ufs: sysfs: Resume the proper scsi device

2021-02-25 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufs-sysfs.c b

[PATCH v8 1/2] scsi: ufs: Enable power management for wlun

2021-02-25 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs

Re: [PATCH v7 1/2] scsi: ufs: Enable power management for wlun

2021-02-25 Thread Asutosh Das
On Thu, Feb 25 2021 at 07:55 -0800, Adrian Hunter wrote: On 25/02/21 5:00 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During

[PATCH v7 1/2] scsi: ufs: Enable power management for wlun

2021-02-24 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs

[PATCH v7 2/2] ufs: sysfs: Resume the proper scsi device

2021-02-24 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufs-sysfs.c b

[PATCH v6 1/2] scsi: ufs: Enable power management for wlun

2021-02-24 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/cdns-pltfrm.c | 2 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 2 + drivers/scsi/ufs/ufs

[PATCH v6 2/2] ufs: sysfs: Resume the proper scsi device

2021-02-24 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufs-sysfs.c b

Re: [PATCH v5 1/2] scsi: ufs: Enable power management for wlun

2021-02-24 Thread Asutosh Das
On Wed, Feb 24 2021 at 06:34 -0800, Adrian Hunter wrote: On 24/02/21 7:13 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During

[PATCH v5 2/2] ufs: sysfs: Resume the proper scsi device

2021-02-23 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufs-sysfs.c b

[PATCH v5 1/2] scsi: ufs: Enable power management for wlun

2021-02-23 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-qcom.c | 2 + drivers/scsi/ufs/ufshcd-pci.c| 24 -- drivers/scsi/ufs/ufshcd

Re: [PATCH v4 1/2] scsi: ufs: Enable power management for wlun

2021-02-23 Thread Asutosh Das
On Tue, Feb 23 2021 at 12:23 -0800, Adrian Hunter wrote: On 23/02/21 1:04 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During

Re: [PATCH v4 1/2] scsi: ufs: Enable power management for wlun

2021-02-23 Thread Asutosh Das
On Tue, Feb 23 2021 at 12:23 -0800, Adrian Hunter wrote: On 23/02/21 1:04 am, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During

[PATCH v4 2/2] ufs: sysfs: Resume the proper scsi device

2021-02-22 Thread Asutosh Das
Resumes the actual scsi device the unit descriptor of which is being accessed instead of the hba alone. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-sysfs.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufs-sysfs.c b

[PATCH v4 1/2] scsi: ufs: Enable power management for wlun

2021-02-22 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 455 +++-- drivers/scsi/ufs/ufshcd.h

Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun

2021-02-19 Thread Asutosh Das
On Fri, Feb 19 2021 at 00:35 -0800, Adrian Hunter wrote: On 11/02/21 9:18 pm, Asutosh Das wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. During

Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun

2021-02-17 Thread Asutosh Das
On Tue, Feb 16 2021 at 09:44 -0800, Asutosh Das wrote: On Sat, Feb 13 2021 at 13:37 -0800, Avri Altman wrote: + } else { Is it possible to get here? Scsi_scan_host is called only after successful add_wluns It looks so. scsi 0:0:0:49488: Link setup for lun - ufshcd_setup_links

Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun

2021-02-16 Thread Asutosh Das
On Fri, Feb 12 2021 at 19:25 -0800, Bart Van Assche wrote: On 2/11/21 11:18 AM, Asutosh Das wrote: +static inline bool is_rpmb_wlun(struct scsi_device *sdev) +{ + return (sdev->lun == ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_RPMB_WLUN)); +} + +static inline bool is_device_wlun(str

Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun

2021-02-16 Thread Asutosh Das
On Sat, Feb 13 2021 at 13:37 -0800, Avri Altman wrote: + } else { Is it possible to get here? Scsi_scan_host is called only after successful add_wluns It looks so. scsi 0:0:0:49488: Link setup for lun - ufshcd_setup_links [...] Call trace: dump_backtrace+0x0/0x1d4 show_stack+0x18/0x24

[RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun

2021-02-11 Thread Asutosh Das
for all other luns. That way, this device wlun suspends after all the consumers and resumes after hba resumes. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 415 + drivers/scsi/ufs/ufshcd.h

Re: [RFC PATCH v2 2/2] scsi: ufs: Fix deadlock while suspending ufs host

2021-01-28 Thread Asutosh Das
On Thu, Jan 28 2021 at 04:21 -0800, Avri Altman wrote: During runtime-suspend of ufs host, the scsi devices are already suspended and so are the queues associated with them. But the ufs host sends SSU to wlun during its runtime-suspend. Do you possible meant: "sends request-sense while

[RFC PATCH v2 2/2] scsi: ufs: Fix deadlock while suspending ufs host

2021-01-27 Thread Asutosh Das
/0x18 Signed-off-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Bao D. Nguyen --- drivers/scsi/ufs/ufshcd.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 9c691e4..b7e7f81 100644

[RFC PATCH v2 1/2] block: bsg: resume platform device before accessing

2021-01-27 Thread Asutosh Das
It may happen that the underlying device's runtime-pm is not controlled by block-pm. So it's possible that when commands are sent to the device, it's suspended and may not be resumed by blk-pm. Hence explicitly resume the parent which is the platform device. Signed-off-by: Asutosh Das Signed-off

[RFC PATCH v1 2/2] scsi: ufs: Fix deadlock while suspending ufs host

2021-01-26 Thread Asutosh Das
/0x18 Change-Id: Id777fd52493c8b5522d1ebcad73cd30dac33e8a4 Signed-off-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Bao D. Nguyen --- drivers/scsi/ufs/ufshcd.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi

[RFC PATCH v1 1/2] block: bsg: resume scsi device before accessing

2021-01-26 Thread Asutosh Das
Resumes the scsi device before accessing it. Change-Id: I2929af60f2a92c89704a582fcdb285d35b429fde Signed-off-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Bao D. Nguyen --- block/bsg.c | 8 1 file changed, 8 insertions(+) diff --git a/block/bsg.c b/block/bsg.c index d7bae94

Re: [PATCH v1] scsi: ufs-mediatek: Enable UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL

2020-12-27 Thread Asutosh Das (asd)
On 12/24/2020 5:47 AM, Stanley Chu wrote: Hi Avri, Bean, On Thu, 2020-12-24 at 13:01 +0100, Bean Huo wrote: On Thu, 2020-12-24 at 11:03 +, Avri Altman wrote: Do you see any substantial benefit of having fWriteBoosterBufferFlushEn disabled? 1. The definition of fWriteBoosterBufferFlushEn

Re: [PATCH v2 2/2] scsi: ufs: Uninline ufshcd_vops_device_reset function

2020-12-15 Thread Asutosh Das (asd)
On 12/8/2020 5:56 AM, Stanley Chu wrote: Since more and more statements showing up in ufshcd_vops_device_reset(), uninline it to allow compiler making possibly better optimization. Signed-off-by: Stanley Chu --- Reviewed-by: Asutosh Das drivers/scsi/ufs/ufshcd.c | 27

Re: [PATCH v1 0/3] Refine error history and introduce notify_event vop

2020-12-04 Thread Asutosh Das (asd)
history functions scsi: ufs: Introduce notify_event variant function drivers/scsi/ufs/ufshcd.c | 122 ++ drivers/scsi/ufs/ufshcd.h | 82 - 2 files changed, 112 insertions(+), 92 deletions(-) Hi Stanley, Reviewed-by: Asutosh Das

Re: [PATCH 1/3] scsi: ufs: Add "wb_on" sysfs node to control WB on/off

2020-12-02 Thread Asutosh Das (asd)
On 12/2/2020 8:20 AM, Bean Huo wrote: On Mon, 2020-11-30 at 15:19 -0800, Asutosh Das (asd) wrote: + return -EINVAL; + + pm_runtime_get_sync(hba->dev); + res = ufshcd_wb_ctrl(hba, wb_enable); Say, a platform supports clock-scaling and this bit is toggled. The control g

Re: [PATCH v3 1/2] scsi: ufs: Refactor ufshcd_setup_clocks() to remove skip_ref_clk

2020-12-01 Thread Asutosh Das (asd)
On 11/30/2020 7:11 PM, Can Guo wrote: On 2020-12-01 07:01, Asutosh Das (asd) wrote: On 11/25/2020 6:01 PM, Can Guo wrote: Remove the param skip_ref_clk from __ufshcd_setup_clocks(), but keep a flag in struct ufs_clk_info to tell whether a clock can be disabled or not while the link is active

Re: [PATCH v2] scsi: ufs: Remove pre-defined initial voltage values of device powers

2020-12-01 Thread Asutosh Das (asd)
Reviewed-by: Bjorn Andersson Signed-off-by: Stanley Chu --- Reviewed-by: Asutosh Das drivers/scsi/ufs/ufshcd-pltfrm.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c index a6f76399b3ae..09e2f04bf4f6 10064

Re: [RFC PATCH v1] scsi: ufs: Remove pre-defined initial VCC voltage values

2020-11-30 Thread Asutosh Das (asd)
On 11/30/2020 6:53 PM, Bjorn Andersson wrote: On Mon 30 Nov 17:54 CST 2020, Asutosh Das (asd) wrote: On 11/30/2020 3:14 PM, Bjorn Andersson wrote: On Mon 30 Nov 16:51 CST 2020, Asutosh Das (asd) wrote: On 11/30/2020 1:16 AM, Stanley Chu wrote: UFS specficication allows different VCC

Re: [RFC PATCH v1] scsi: ufs: Remove pre-defined initial VCC voltage values

2020-11-30 Thread Asutosh Das (asd)
On 11/30/2020 5:25 PM, Stanley Chu wrote: On Mon, 2020-11-30 at 15:54 -0800, Asutosh Das (asd) wrote: On 11/30/2020 3:14 PM, Bjorn Andersson wrote: On Mon 30 Nov 16:51 CST 2020, Asutosh Das (asd) wrote: On 11/30/2020 1:16 AM, Stanley Chu wrote: UFS specficication allows different VCC

Re: [PATCH v3 2/3] scsi: ufs: Fix a racing problem between ufshcd_abort and eh_work

2020-11-30 Thread Asutosh Das (asd)
in_use shall evetually be cleared in __ufshcd_transfer_req_compl() invoked by the full reset and restore from err_handler. Signed-off-by: Can Guo --- Reviewed-by: Asutosh Das drivers/scsi/ufs/ufshcd.c | 55 --- drivers/scsi/ufs/ufshcd.h | 2 ++ 2

Re: [PATCH v3 1/3] scsi: ufs: Serialize eh_work with system PM events and async scan

2020-11-30 Thread Asutosh Das (asd)
On 11/16/2020 11:04 PM, Can Guo wrote: Serialize eh_work with system PM events and async scan to make sure eh_work does not run in parallel with them. Signed-off-by: Can Guo --- Reviewed-by: Asutosh Das drivers/scsi/ufs/ufshcd.c | 64

Re: [PATCH v3 2/2] scsi: ufs-qcom: Keep core_clk_unipro ON while link is active

2020-11-30 Thread Asutosh Das (asd)
On 11/25/2020 6:01 PM, Can Guo wrote: If we want to disable clocks to save power but still keep the link active, core_clk_unipro, as same as ref_clk, should not be the one being disabled. Reviewed-by: Hongwu Su Signed-off-by: Can Guo --- Reviewed-by: Asutosh Das drivers/scsi/ufs/ufs

Re: [RFC PATCH v1] scsi: ufs: Remove pre-defined initial VCC voltage values

2020-11-30 Thread Asutosh Das (asd)
On 11/30/2020 3:14 PM, Bjorn Andersson wrote: On Mon 30 Nov 16:51 CST 2020, Asutosh Das (asd) wrote: On 11/30/2020 1:16 AM, Stanley Chu wrote: UFS specficication allows different VCC configurations for UFS devices, for example, (1). 2.70V - 3.60V (By default) (2). 1.70V

Re: [PATCH 1/3] scsi: ufs: Add "wb_on" sysfs node to control WB on/off

2020-11-30 Thread Asutosh Das (asd)
On 11/30/2020 10:11 AM, Bean Huo wrote: From: Bean Huo Currently we let UFS WriteBooster driver use clock scaling up/down to set WB on/off, for the platform which doesn't support UFSHCD_CAP_CLK_SCALING, WB will be always on. Provide a sysfs attribute to enable/disable WB during runtime.

Re: [PATCH v3 1/2] scsi: ufs: Refactor ufshcd_setup_clocks() to remove skip_ref_clk

2020-11-30 Thread Asutosh Das (asd)
On 11/25/2020 6:01 PM, Can Guo wrote: Remove the param skip_ref_clk from __ufshcd_setup_clocks(), but keep a flag in struct ufs_clk_info to tell whether a clock can be disabled or not while the link is active. Reviewed-by: Hongwu Su Reviewed-by: Bean Huo Reviewed-by: Stanley Chu

Re: [PATCH 1/1] scsi: ufs: Remove scale down gear hard code

2020-11-30 Thread Asutosh Das (asd)
On 11/26/2020 5:58 PM, Can Guo wrote: Instead of making the scale down gear a hard code, make it a member of ufs_clk_scaling struct. Signed-off-by: Can Guo --- Reviewed-by: Asutosh Das drivers/scsi/ufs/ufshcd.c | 12 +++- drivers/scsi/ufs/ufshcd.h | 2 ++ 2 files changed, 9

Re: [RFC PATCH v1] scsi: ufs: Remove pre-defined initial VCC voltage values

2020-11-30 Thread Asutosh Das (asd)
On 11/30/2020 1:16 AM, Stanley Chu wrote: UFS specficication allows different VCC configurations for UFS devices, for example, (1). 2.70V - 3.60V (By default) (2). 1.70V - 1.95V (Activated if "vcc-supply-1p8" is declared in device tree) (3).

Re: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens

2020-11-17 Thread Asutosh Das (asd)
On 11/16/2020 11:04 PM, Can Guo wrote: When AH8 error happens, all the regs and states are dumped in err handler. Sometime we need to look into host regs right after AH8 error happens, which is before leaving the IRQ handler. Signed-off-by: Can Guo --- Reviewed-by: Asutosh Das drivers

Re: [PATCH v1 1/2] scsi: ufs: Fix unbalanced scsi_block_reqs_cnt caused by ufshcd_hold()

2020-11-11 Thread Asutosh Das (asd)
ungate work is queued. To make sure scsi_block_reqs_cnt is handled by ufshcd_hold() and ufshcd_ungate_work() in a paired way, increase it only if queue_work() returns true. Signed-off-by: Can Guo Reviewed-by: Hongwu Su --- Reviewed-by: Asutosh Das drivers/scsi/ufs/ufshcd.c | 6 +++--- 1

Re: [PATCH v2 1/1] scsi: ufs: Fix unexpected values get from ufshcd_read_desc_param()

2020-11-10 Thread Asutosh Das (asd)
their corrsponding sysfs entries. Fix it by adding a sanity check of parameter offset against the actual decriptor length. Signed-off-by: Can Guo --- Reviewed-by: Asutosh Das drivers/scsi/ufs/ufshcd.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git

Re: [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue()

2020-11-10 Thread Asutosh Das (asd)
vri Altman Signed-off-by: Qinglang Miao --- Reviewed-by: Asutosh Das v2: consider missing destroy_workqueue ufshcd_remove either. drivers/scsi/ufs/ufshcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index b8f573a02713..ad

Re: [PATCH V4 1/2] scsi: ufs: Add DeepSleep feature

2020-11-04 Thread Asutosh Das (asd)
med that UFS devices with wspecversion >= 0x310 support DeepSleep. Signed-off-by: Adrian Hunter --- Reviewed-by: Asutosh Das Documentation/ABI/testing/sysfs-driver-ufs | 34 +++ drivers/scsi/ufs/ufs-sysfs.c | 7 drivers/scsi/ufs

Re: [PATCH V4 2/2] scsi: ufs: Allow an error return value from ->device_reset()

2020-11-04 Thread Asutosh Das (asd)
rovide the callback, but do not do the reset operation should return -EOPNOTSUPP. Signed-off-by: Adrian Hunter Reviewed-by: Asutosh Das --- drivers/scsi/ufs/ufs-mediatek.c | 4 +++- drivers/scsi/ufs/ufs-qcom.c | 6 -- drivers/scsi/ufs/ufshcd.h | 11 +++ 3 files chang

[PATCH v2 2/2] ufs: qcom: Enable aggressive power collapse for ufs hba

2020-10-27 Thread Asutosh Das
Enabling this capability to let hba power-collapse more often to save power. Reviewed-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index f9d6ef3..9a19c6d

[PATCH v2 1/2] scsi: ufs: Put hba into LPM during clk gating

2020-10-27 Thread Asutosh Das
From: Can Guo During clock gating, after clocks are disabled, put hba into LPM to save more power. Acked-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 9 +++-- drivers/scsi/ufs/ufshcd.h | 13 + 2 files changed, 20

[PATCH v1 2/2] ufs: qcom: Enable aggressive power collapse for ufs hba

2020-10-26 Thread Asutosh Das
Enabling this capability to let hba power-collapse more often to save power. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index f9d6ef3..9a19c6d 100644 --- a/drivers/scsi

[PATCH v1 1/2] scsi: ufs: Put hba into LPM during clk gating

2020-10-26 Thread Asutosh Das
From: Can Guo During clock gating, after clocks are disabled, put hba into LPM to save more power. Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 7 +-- drivers/scsi/ufs/ufshcd.h | 13 + 2 files changed, 18 insertions(+), 2 deletions

  1   2   3   >