s390/cio: Remove the invalid condition on IO_SCH_UNREG
Subsystems (2)
Vineeth Vijayan
maintainerPATCH 1/1 s390/cio: Remove the invalid condition on IO_SCH_UNREG
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.
--- drivers/s390/cio/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/s390/cio/device.c +1 -2
@@ -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 :
Signature · 1 line
2.25.1
Quoted 4 lines · Vineeth Vijayan
The condition to check the cdev pointer validity on
css_sch_device_unregister()is a leftover from the 'commitc97cd8c81d4a("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
Quoted 5 lines
this invalid condition in the
IO_SCH_UNREGcase.Fixes 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver")Reported-by Christian Ehrhardt <[email protected]>Suggested-by Christian Ehrhardt <[email protected]>
Thanks! This seems to fix the hot-unplug troubles with qeth devices.
Quoted 21 lines
Cc <[email protected]>Signed-off-by Vineeth Vijayan <[email protected]>--- drivers/s390/cio/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/s390/cio/device.c +1
-2@@ -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 :
Quoted 4 lines · Vineeth Vijayan
The condition to check the cdev pointer validity on
css_sch_device_unregister()is a leftover from the 'commitc97cd8c81d4a("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".
Quoted 7 lines
this invalid condition in the
IO_SCH_UNREGcase.Fixes 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver")Reported-by Christian Ehrhardt <[email protected]>Suggested-by Christian Ehrhardt <[email protected]>Cc <[email protected]>Signed-off-by Vineeth Vijayan <[email protected]>
Signature · 2 lines
Peter Oberparleiter Linux on Z Development - IBM Germany
Quoted 10 lines · Vineeth Vijayan
The condition to check the cdev pointer validity on
css_sch_device_unregister()is a leftover from the 'commitc97cd8c81d4a("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 theIO_SCH_UNREGcase.Fixes 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver")Reported-by Christian Ehrhardt <[email protected]>Suggested-by Christian Ehrhardt <[email protected]>
Thanks, and if you want for a hattrick now also
Tested-by Christian Ehrhardt <[email protected]>
Quoted 23 lines
Cc <[email protected]>Signed-off-by Vineeth Vijayan <[email protected]>--- drivers/s390/cio/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/s390/cio/device.c +1
-3@@ -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
Signature · 3 lines
Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd