[S390] dasd: revalidate server for new pathgroup

If a pathgroup is established we get an event and have to revalidate
the server to propagate supported features like PAV and enable them.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Stefan Haberland 2012-01-18 18:03:41 +01:00 коммит произвёл Martin Schwidefsky
Родитель f9f8d02fae
Коммит f163303163
3 изменённых файлов: 30 добавлений и 0 удалений

Просмотреть файл

@ -3261,6 +3261,12 @@ void dasd_generic_path_event(struct ccw_device *cdev, int *path_event)
device->path_data.tbvpm |= eventlpm; device->path_data.tbvpm |= eventlpm;
dasd_schedule_device_bh(device); dasd_schedule_device_bh(device);
} }
if (path_event[chp] & PE_PATHGROUP_ESTABLISHED) {
DBF_DEV_EVENT(DBF_WARNING, device, "%s",
"Pathgroup re-established\n");
if (device->discipline->kick_validate)
device->discipline->kick_validate(device);
}
} }
dasd_put_device(device); dasd_put_device(device);
} }

Просмотреть файл

@ -1550,6 +1550,24 @@ static void dasd_eckd_validate_server(struct dasd_device *device)
"returned rc=%d", private->uid.ssid, rc); "returned rc=%d", private->uid.ssid, rc);
} }
/*
* worker to do a validate server in case of a lost pathgroup
*/
static void dasd_eckd_do_validate_server(struct work_struct *work)
{
struct dasd_device *device = container_of(work, struct dasd_device,
kick_validate);
dasd_eckd_validate_server(device);
dasd_put_device(device);
}
static void dasd_eckd_kick_validate_server(struct dasd_device *device)
{
dasd_get_device(device);
/* queue call to do_validate_server to the kernel event daemon. */
schedule_work(&device->kick_validate);
}
static u32 get_fcx_max_data(struct dasd_device *device) static u32 get_fcx_max_data(struct dasd_device *device)
{ {
#if defined(CONFIG_64BIT) #if defined(CONFIG_64BIT)
@ -1595,6 +1613,9 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
int readonly; int readonly;
unsigned long value; unsigned long value;
/* setup work queue for validate server*/
INIT_WORK(&device->kick_validate, dasd_eckd_do_validate_server);
if (!ccw_device_is_pathgroup(device->cdev)) { if (!ccw_device_is_pathgroup(device->cdev)) {
dev_warn(&device->cdev->dev, dev_warn(&device->cdev->dev,
"A channel path group could not be established\n"); "A channel path group could not be established\n");
@ -4259,6 +4280,7 @@ static struct dasd_discipline dasd_eckd_discipline = {
.restore = dasd_eckd_restore_device, .restore = dasd_eckd_restore_device,
.reload = dasd_eckd_reload_device, .reload = dasd_eckd_reload_device,
.get_uid = dasd_eckd_get_uid, .get_uid = dasd_eckd_get_uid,
.kick_validate = dasd_eckd_kick_validate_server,
}; };
static int __init static int __init

Просмотреть файл

@ -355,6 +355,7 @@ struct dasd_discipline {
int (*reload) (struct dasd_device *); int (*reload) (struct dasd_device *);
int (*get_uid) (struct dasd_device *, struct dasd_uid *); int (*get_uid) (struct dasd_device *, struct dasd_uid *);
void (*kick_validate) (struct dasd_device *);
}; };
extern struct dasd_discipline *dasd_diag_discipline_pointer; extern struct dasd_discipline *dasd_diag_discipline_pointer;
@ -455,6 +456,7 @@ struct dasd_device {
struct work_struct kick_work; struct work_struct kick_work;
struct work_struct restore_device; struct work_struct restore_device;
struct work_struct reload_device; struct work_struct reload_device;
struct work_struct kick_validate;
struct timer_list timer; struct timer_list timer;
debug_info_t *debug_area; debug_info_t *debug_area;