linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] slimbus: fixes for 5.10
@ 2020-09-25  9:55 Srinivas Kandagatla
  2020-09-25  9:55 ` [PATCH 1/3] slimbus: core: check get_addr before removing laddr ida Srinivas Kandagatla
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2020-09-25  9:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla

Hi Greg, 

Here are few fixes found recently while testing Qualcomm SSR (SubSystem Restart)
feature on SDM845 SoC. Mostly the fixes are around when device absense is reported.

If its not too late, can you take them for 5.10.

Many thanks,
Srini


Srinivas Kandagatla (3):
  slimbus: core: check get_addr before removing laddr ida
  slimbus: core: do not enter to clock pause mode in core
  slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback

 drivers/slimbus/core.c          | 6 ++----
 drivers/slimbus/qcom-ngd-ctrl.c | 4 ++++
 2 files changed, 6 insertions(+), 4 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] slimbus: core: check get_addr before removing laddr ida
  2020-09-25  9:55 [PATCH 0/3] slimbus: fixes for 5.10 Srinivas Kandagatla
@ 2020-09-25  9:55 ` Srinivas Kandagatla
  2020-09-25 12:41   ` Greg KH
  2020-09-25  9:55 ` [PATCH 2/3] slimbus: core: do not enter to clock pause mode in core Srinivas Kandagatla
  2020-09-25  9:55 ` [PATCH 3/3] slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback Srinivas Kandagatla
  2 siblings, 1 reply; 6+ messages in thread
From: Srinivas Kandagatla @ 2020-09-25  9:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla

logical address can be either assigned by the SLIMBus controller or the core.
Core uses IDA in cases where get_addr callback is not provided by the
controller.
Core already has this check while allocating IDR, however during absence
reporting this is not checked. This patch fixes this issue.

Fixes: 46a2bb5a7f7ea("slimbus: core: Add slim controllers support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/slimbus/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index ae1e248a8fb8..58b63ae0e75a 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -326,8 +326,8 @@ void slim_report_absent(struct slim_device *sbdev)
 	mutex_lock(&ctrl->lock);
 	sbdev->is_laddr_valid = false;
 	mutex_unlock(&ctrl->lock);
-
-	ida_simple_remove(&ctrl->laddr_ida, sbdev->laddr);
+	if (!ctrl->get_laddr)
+		ida_simple_remove(&ctrl->laddr_ida, sbdev->laddr);
 	slim_device_update_status(sbdev, SLIM_DEVICE_STATUS_DOWN);
 }
 EXPORT_SYMBOL_GPL(slim_report_absent);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] slimbus: core: do not enter to clock pause mode in core
  2020-09-25  9:55 [PATCH 0/3] slimbus: fixes for 5.10 Srinivas Kandagatla
  2020-09-25  9:55 ` [PATCH 1/3] slimbus: core: check get_addr before removing laddr ida Srinivas Kandagatla
@ 2020-09-25  9:55 ` Srinivas Kandagatla
  2020-09-25  9:55 ` [PATCH 3/3] slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback Srinivas Kandagatla
  2 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2020-09-25  9:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla

Let the controller logic decide when to enter into clock pause mode!
Entering in to pause mode during unregistration does not really make
sense as the controller is totally going down at that point in time.

Fixes: 4b14e62ad3c9e ("slimbus: Add support for 'clock-pause' feature")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/slimbus/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index 58b63ae0e75a..1d2bc181da05 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -301,8 +301,6 @@ int slim_unregister_controller(struct slim_controller *ctrl)
 {
 	/* Remove all clients */
 	device_for_each_child(ctrl->dev, NULL, slim_ctrl_remove_device);
-	/* Enter Clock Pause */
-	slim_ctrl_clk_pause(ctrl, false, 0);
 	ida_simple_remove(&ctrl_ida, ctrl->id);
 
 	return 0;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback
  2020-09-25  9:55 [PATCH 0/3] slimbus: fixes for 5.10 Srinivas Kandagatla
  2020-09-25  9:55 ` [PATCH 1/3] slimbus: core: check get_addr before removing laddr ida Srinivas Kandagatla
  2020-09-25  9:55 ` [PATCH 2/3] slimbus: core: do not enter to clock pause mode in core Srinivas Kandagatla
@ 2020-09-25  9:55 ` Srinivas Kandagatla
  2 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2020-09-25  9:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla

In QMI new server notification we enable the NGD however during
delete server notification we do not disable the NGD.

This can lead to multiple instances of NGD being enabled, so make
sure that we disable NGD in delete server callback to fix this issue!

Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 743ee7b4e63f..218aefc3531c 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1277,9 +1277,13 @@ static void qcom_slim_ngd_qmi_del_server(struct qmi_handle *hdl,
 {
 	struct qcom_slim_ngd_qmi *qmi =
 		container_of(hdl, struct qcom_slim_ngd_qmi, svc_event_hdl);
+	struct qcom_slim_ngd_ctrl *ctrl =
+		container_of(qmi, struct qcom_slim_ngd_ctrl, qmi);
 
 	qmi->svc_info.sq_node = 0;
 	qmi->svc_info.sq_port = 0;
+
+	qcom_slim_ngd_enable(ctrl, false);
 }
 
 static struct qmi_ops qcom_slim_ngd_qmi_svc_event_ops = {
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] slimbus: core: check get_addr before removing laddr ida
  2020-09-25  9:55 ` [PATCH 1/3] slimbus: core: check get_addr before removing laddr ida Srinivas Kandagatla
@ 2020-09-25 12:41   ` Greg KH
  2020-09-25 12:42     ` Srinivas Kandagatla
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2020-09-25 12:41 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: linux-kernel

On Fri, Sep 25, 2020 at 10:55:18AM +0100, Srinivas Kandagatla wrote:
> logical address can be either assigned by the SLIMBus controller or the core.
> Core uses IDA in cases where get_addr callback is not provided by the
> controller.
> Core already has this check while allocating IDR, however during absence
> reporting this is not checked. This patch fixes this issue.
> 
> Fixes: 46a2bb5a7f7ea("slimbus: core: Add slim controllers support")

Nit, you need a ' ' before the '(' character...

Also, you don't need all of those characters, you have 1 more than
necessary :)

I'll go fix it up.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] slimbus: core: check get_addr before removing laddr ida
  2020-09-25 12:41   ` Greg KH
@ 2020-09-25 12:42     ` Srinivas Kandagatla
  0 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2020-09-25 12:42 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel



On 25/09/2020 13:41, Greg KH wrote:
> On Fri, Sep 25, 2020 at 10:55:18AM +0100, Srinivas Kandagatla wrote:
>> logical address can be either assigned by the SLIMBus controller or the core.
>> Core uses IDA in cases where get_addr callback is not provided by the
>> controller.
>> Core already has this check while allocating IDR, however during absence
>> reporting this is not checked. This patch fixes this issue.
>>
>> Fixes: 46a2bb5a7f7ea("slimbus: core: Add slim controllers support")
> 
> Nit, you need a ' ' before the '(' character...
> 
Not sure how I missed that :-)

> Also, you don't need all of those characters, you have 1 more than
> necessary :)
> 
> I'll go fix it up.
Thankyou very much for fixing this up!

--srini
> 
> greg k-h
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-25 12:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25  9:55 [PATCH 0/3] slimbus: fixes for 5.10 Srinivas Kandagatla
2020-09-25  9:55 ` [PATCH 1/3] slimbus: core: check get_addr before removing laddr ida Srinivas Kandagatla
2020-09-25 12:41   ` Greg KH
2020-09-25 12:42     ` Srinivas Kandagatla
2020-09-25  9:55 ` [PATCH 2/3] slimbus: core: do not enter to clock pause mode in core Srinivas Kandagatla
2020-09-25  9:55 ` [PATCH 3/3] slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).