/* cio_update_schib - Perform stsch and update schib if subchannel is valid. @sch: subchannel on which to perform stsch Return zero on success, -ENODEV otherwise.  */
int cio_update_schib(struct subchannel *sch)
/* cio_update_schib - Perform stsch and update schib if subchannel is valid. @sch: subchannel on which to perform stsch Return zero on success, -ENODEV otherwise.  */
int cio_update_schib(struct subchannel *sch)
{
	struct schib schib;
	if (stsch(sch->schid, &schib) || !css_sch_is_valid(&schib))
		return -ENODEV;
	memcpy(&sch->schib, &schib, sizeof(schib));
	return 0;
}