[S390] cio: make not operational handling consistent
When a ccw device appears not operational, inform the associated device driver and act according to the response: if the driver wants to keep the device, put it into the disconnected state. If not, or if there is no driver or if the device is not online, unregister it. This approach is consistent with no-path event handling. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
9a33211694
commit
6afcc775d9
@ -1609,7 +1609,7 @@ int ccw_purge_blacklisted(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void device_set_disconnected(struct ccw_device *cdev)
|
void ccw_device_set_disconnected(struct ccw_device *cdev)
|
||||||
{
|
{
|
||||||
if (!cdev)
|
if (!cdev)
|
||||||
return;
|
return;
|
||||||
@ -1705,7 +1705,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int slow)
|
|||||||
ccw_device_trigger_reprobe(cdev);
|
ccw_device_trigger_reprobe(cdev);
|
||||||
break;
|
break;
|
||||||
case DISC:
|
case DISC:
|
||||||
device_set_disconnected(cdev);
|
ccw_device_set_disconnected(cdev);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -125,6 +125,7 @@ int ccw_device_stlck(struct ccw_device *);
|
|||||||
void ccw_device_trigger_reprobe(struct ccw_device *);
|
void ccw_device_trigger_reprobe(struct ccw_device *);
|
||||||
void ccw_device_kill_io(struct ccw_device *);
|
void ccw_device_kill_io(struct ccw_device *);
|
||||||
int ccw_device_notify(struct ccw_device *, int);
|
int ccw_device_notify(struct ccw_device *, int);
|
||||||
|
void ccw_device_set_disconnected(struct ccw_device *cdev);
|
||||||
void ccw_device_set_notoper(struct ccw_device *cdev);
|
void ccw_device_set_notoper(struct ccw_device *cdev);
|
||||||
|
|
||||||
/* qdio needs this. */
|
/* qdio needs this. */
|
||||||
|
@ -400,6 +400,8 @@ ccw_device_done(struct ccw_device *cdev, int state)
|
|||||||
cdev->private->dev_id.devno, sch->schid.sch_no);
|
cdev->private->dev_id.devno, sch->schid.sch_no);
|
||||||
if (!ccw_device_notify(cdev, CIO_GONE))
|
if (!ccw_device_notify(cdev, CIO_GONE))
|
||||||
ccw_device_schedule_sch_unregister(cdev);
|
ccw_device_schedule_sch_unregister(cdev);
|
||||||
|
else
|
||||||
|
ccw_device_set_disconnected(cdev);
|
||||||
cdev->private->flags.donotify = 0;
|
cdev->private->flags.donotify = 0;
|
||||||
break;
|
break;
|
||||||
case DEV_STATE_DISCONNECTED:
|
case DEV_STATE_DISCONNECTED:
|
||||||
@ -744,11 +746,10 @@ ccw_device_recog_notoper(struct ccw_device *cdev, enum dev_event dev_event)
|
|||||||
static void ccw_device_generic_notoper(struct ccw_device *cdev,
|
static void ccw_device_generic_notoper(struct ccw_device *cdev,
|
||||||
enum dev_event dev_event)
|
enum dev_event dev_event)
|
||||||
{
|
{
|
||||||
struct subchannel *sch;
|
if (!ccw_device_notify(cdev, CIO_GONE))
|
||||||
|
ccw_device_schedule_sch_unregister(cdev);
|
||||||
ccw_device_set_notoper(cdev);
|
else
|
||||||
sch = to_subchannel(cdev->dev.parent);
|
ccw_device_set_disconnected(cdev);
|
||||||
css_schedule_eval(sch->schid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user