/* * 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 (status < 0) { printk(KERN_ERR "Can't vary unknown chpid %x.%02x\n", chpid.cssid, chpid.id); return -EINVAL; } if (!on && !status) { printk(KERN_ERR "chpid %x.%02x is already offline\n", chpid.cssid, chpid.id); return -EINVAL; } set_chp_logically_online(chpid, on); chsc_chp_vary(chpid, on); return 0; }
/* * 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; }