/* Function: s390_vary_chpid Varies the specified chpid online or offline  */
static int s390_vary_chpid(struct chp_id chpid, int on)
/* Function: s390_vary_chpid Varies the specified chpid online or offline  */
static int s390_vary_chpid(struct chp_id chpid, int on)
{
	char dbf_text[15];
	int status;
	sprintf(dbf_text, on?"varyon%x.%02x":"varyoff%x.%02x", chpid.cssid,
		chpid.id);
	CIO_TRACE_EVENT(2, dbf_text);
	status = chp_get_status(chpid);
	if (!on && !status)
		return 0;
	set_chp_logically_online(chpid, on);
	chsc_chp_vary(chpid, on);
	return 0;
}