public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390/cio: Remove the invalid condition on IO_SCH_UNREG
@ 2021-04-23 10:08 Vineeth Vijayan
  2021-04-26  6:03 ` Julian Wiedmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vineeth Vijayan @ 2021-04-23 10:08 UTC (permalink / raw)
  To: oberpar, christian.ehrhardt, borntraeger, linux-s390

The condition to check the cdev pointer validity on
css_sch_device_unregister() is a leftover from the 'commit c97cd8c81d4a
("s390/cio: Remove pm support from ccw bus driver")'. This could lead to a
situation, where detaching the disk is not happening completely. Remove
this invalid condition in the IO_SCH_UNREG case.

Fixes: 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver")
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Suggested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
---
 drivers/s390/cio/device.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 3f026021e95e..84f659cafe76 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1532,8 +1532,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
 	switch (action) {
 	case IO_SCH_ORPH_UNREG:
 	case IO_SCH_UNREG:
-		if (!cdev)
-			css_sch_device_unregister(sch);
+		css_sch_device_unregister(sch);
 		break;
 	case IO_SCH_ORPH_ATTACH:
 	case IO_SCH_UNREG_ATTACH:
-- 
2.25.1


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

* Re: [PATCH] s390/cio: Remove the invalid condition on IO_SCH_UNREG
  2021-04-23 10:08 [PATCH] s390/cio: Remove the invalid condition on IO_SCH_UNREG Vineeth Vijayan
@ 2021-04-26  6:03 ` Julian Wiedmann
  2021-04-26 12:38 ` Peter Oberparleiter
  2021-04-26 16:24 ` Christian Ehrhardt
  2 siblings, 0 replies; 4+ messages in thread
From: Julian Wiedmann @ 2021-04-26  6:03 UTC (permalink / raw)
  To: Vineeth Vijayan, oberpar, christian.ehrhardt, borntraeger,
	linux-s390
  Cc: Karsten Graul

On 23.04.21 12:08, Vineeth Vijayan wrote:
> The condition to check the cdev pointer validity on
> css_sch_device_unregister() is a leftover from the 'commit c97cd8c81d4a
> ("s390/cio: Remove pm support from ccw bus driver")'. This could lead to a
> situation, where detaching the disk is not happening completely. Remove

s/disk/device

> this invalid condition in the IO_SCH_UNREG case.
> 
> Fixes: 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver")
> Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> Suggested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

Thanks! This seems to fix the hot-unplug troubles with qeth devices.

Tested-by: Julian Wiedmann <jwi@linux.ibm.com>

> Cc: <stable@vger.kernel.org>
> Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
> ---
>  drivers/s390/cio/device.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
> index 3f026021e95e..84f659cafe76 100644
> --- a/drivers/s390/cio/device.c
> +++ b/drivers/s390/cio/device.c
> @@ -1532,8 +1532,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
>  	switch (action) {
>  	case IO_SCH_ORPH_UNREG:
>  	case IO_SCH_UNREG:
> -		if (!cdev)
> -			css_sch_device_unregister(sch);
> +		css_sch_device_unregister(sch);
>  		break;
>  	case IO_SCH_ORPH_ATTACH:
>  	case IO_SCH_UNREG_ATTACH:
> 


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

* Re: [PATCH] s390/cio: Remove the invalid condition on IO_SCH_UNREG
  2021-04-23 10:08 [PATCH] s390/cio: Remove the invalid condition on IO_SCH_UNREG Vineeth Vijayan
  2021-04-26  6:03 ` Julian Wiedmann
@ 2021-04-26 12:38 ` Peter Oberparleiter
  2021-04-26 16:24 ` Christian Ehrhardt
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Oberparleiter @ 2021-04-26 12:38 UTC (permalink / raw)
  To: Vineeth Vijayan, christian.ehrhardt, borntraeger, linux-s390

On 23.04.2021 12:08, Vineeth Vijayan wrote:
> The condition to check the cdev pointer validity on
> css_sch_device_unregister() is a leftover from the 'commit c97cd8c81d4a
> ("s390/cio: Remove pm support from ccw bus driver")'. This could lead to a
> situation, where detaching the disk is not happening completely. Remove

This applies to all devices types, not just disks. So replace "disk"
with either "device" or "subchannel".

> this invalid condition in the IO_SCH_UNREG case.
> 
> Fixes: 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver")
> Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> Suggested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>

Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>


-- 
Peter Oberparleiter
Linux on Z Development - IBM Germany

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

* Re: [PATCH] s390/cio: Remove the invalid condition on IO_SCH_UNREG
  2021-04-23 10:08 [PATCH] s390/cio: Remove the invalid condition on IO_SCH_UNREG Vineeth Vijayan
  2021-04-26  6:03 ` Julian Wiedmann
  2021-04-26 12:38 ` Peter Oberparleiter
@ 2021-04-26 16:24 ` Christian Ehrhardt
  2 siblings, 0 replies; 4+ messages in thread
From: Christian Ehrhardt @ 2021-04-26 16:24 UTC (permalink / raw)
  To: Vineeth Vijayan; +Cc: oberpar, Christian Borntraeger, linux-s390

On Fri, Apr 23, 2021 at 12:08 PM Vineeth Vijayan <vneethv@linux.ibm.com> wrote:
>
> The condition to check the cdev pointer validity on
> css_sch_device_unregister() is a leftover from the 'commit c97cd8c81d4a
> ("s390/cio: Remove pm support from ccw bus driver")'. This could lead to a
> situation, where detaching the disk is not happening completely. Remove
> this invalid condition in the IO_SCH_UNREG case.
>
> Fixes: 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver")
> Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> Suggested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

Thanks, and if you want for a hattrick now also
  Tested-by Christian Ehrhardt <christian.ehrhardt@canonical.com>

> Cc: <stable@vger.kernel.org>
> Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
> ---
>  drivers/s390/cio/device.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
> index 3f026021e95e..84f659cafe76 100644
> --- a/drivers/s390/cio/device.c
> +++ b/drivers/s390/cio/device.c
> @@ -1532,8 +1532,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
>         switch (action) {
>         case IO_SCH_ORPH_UNREG:
>         case IO_SCH_UNREG:
> -               if (!cdev)
> -                       css_sch_device_unregister(sch);
> +               css_sch_device_unregister(sch);
>                 break;
>         case IO_SCH_ORPH_ATTACH:
>         case IO_SCH_UNREG_ATTACH:
> --
> 2.25.1
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

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

end of thread, other threads:[~2021-04-26 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-23 10:08 [PATCH] s390/cio: Remove the invalid condition on IO_SCH_UNREG Vineeth Vijayan
2021-04-26  6:03 ` Julian Wiedmann
2021-04-26 12:38 ` Peter Oberparleiter
2021-04-26 16:24 ` Christian Ehrhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox