Lines Matching refs:sch
57 static void chsc_subchannel_irq(struct subchannel *sch)
59 struct chsc_private *private = dev_get_drvdata(&sch->dev);
69 CHSC_MSG(0, "Interrupt on sch 0.%x.%04x with no request\n",
70 sch->schid.ssid, sch->schid.sch_no);
75 cio_update_schib(sch);
77 put_device(&sch->dev);
80 static int chsc_subchannel_probe(struct subchannel *sch)
86 sch->schid.ssid, sch->schid.sch_no);
87 sch->isc = CHSC_SCH_ISC;
91 dev_set_drvdata(&sch->dev, private);
92 ret = cio_enable_subchannel(sch, (u32)(unsigned long)sch);
95 sch->schid.ssid, sch->schid.sch_no, ret);
96 dev_set_drvdata(&sch->dev, NULL);
99 if (dev_get_uevent_suppress(&sch->dev)) {
100 dev_set_uevent_suppress(&sch->dev, 0);
101 kobject_uevent(&sch->dev.kobj, KOBJ_ADD);
107 static int chsc_subchannel_remove(struct subchannel *sch)
111 cio_disable_subchannel(sch);
112 private = dev_get_drvdata(&sch->dev);
113 dev_set_drvdata(&sch->dev, NULL);
116 put_device(&sch->dev);
122 static void chsc_subchannel_shutdown(struct subchannel *sch)
124 cio_disable_subchannel(sch);
127 static int chsc_subchannel_prepare(struct subchannel *sch)
136 cc = stsch_err(sch->schid, &schib);
142 static int chsc_subchannel_freeze(struct subchannel *sch)
144 return cio_disable_subchannel(sch);
147 static int chsc_subchannel_restore(struct subchannel *sch)
149 return cio_enable_subchannel(sch, (u32)(unsigned long)sch);
213 struct subchannel *sch = to_subchannel(dev);
215 return sch->schib.pmcw.ena && !scsw_fctl(&sch->schib.scsw);
218 static struct subchannel *chsc_get_next_subchannel(struct subchannel *sch)
223 sch ? &sch->dev : NULL, NULL,
247 struct subchannel *sch = NULL;
252 while ((sch = chsc_get_next_subchannel(sch))) {
253 spin_lock(sch->lock);
254 private = dev_get_drvdata(&sch->dev);
256 spin_unlock(sch->lock);
260 chsc_area->header.sid = sch->schid;
262 CHSC_LOG_HEX(2, &sch->schid, sizeof(sch->schid));
271 sch->schib.scsw.cmd.fctl |= SCSW_FCTL_START_FUNC;
281 spin_unlock(sch->lock);
283 sch->schid.ssid, sch->schid.sch_no, cc);
286 put_device(&sch->dev);