• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/s390/cio/

Lines Matching refs:sch

100 cio_set_options (struct subchannel *sch, int flags)
102 sch->options.suspend = (flags & DOIO_ALLOW_SUSPEND) != 0;
103 sch->options.prefetch = (flags & DOIO_DENY_PREFETCH) != 0;
104 sch->options.inter = (flags & DOIO_SUPPRESS_INTER) != 0;
109 cio_get_options (struct subchannel *sch)
114 if (sch->options.suspend)
116 if (sch->options.prefetch)
118 if (sch->options.inter)
131 struct subchannel *sch;
142 sch = (struct subchannel *)(unsigned long)tpi_info->intparm;
143 if (!sch)
147 spin_lock(sch->lock);
148 memcpy (&sch->schib.scsw, &irb->scsw, sizeof (struct scsw));
149 if (sch->driver && sch->driver->irq)
150 sch->driver->irq(&sch->dev);
151 spin_unlock(sch->lock);
158 cio_start_handle_notoper(struct subchannel *sch, __u8 lpm)
163 sch->lpm &= ~lpm;
165 sch->lpm = 0;
167 stsch (sch->schid, &sch->schib);
170 "subchannel 0.%x.%04x!\n", sch->schid.ssid,
171 sch->schid.sch_no);
172 sprintf(dbf_text, "no%s", sch->dev.bus_id);
174 CIO_HEX_EVENT(0, &sch->schib, sizeof (struct schib));
176 return (sch->lpm ? -EACCES : -ENODEV);
180 cio_start_key (struct subchannel *sch, /* subchannel structure */
189 CIO_TRACE_EVENT (4, sch->dev.bus_id);
191 /* sch is always under 2G. */
192 sch->orb.intparm = (__u32)(unsigned long)sch;
193 sch->orb.fmt = 1;
195 sch->orb.pfch = sch->options.prefetch == 0;
196 sch->orb.spnd = sch->options.suspend;
197 sch->orb.ssic = sch->options.suspend && sch->options.inter;
198 sch->orb.lpm = (lpm != 0) ? lpm : sch->lpm;
203 sch->orb.c64 = 1;
204 sch->orb.i2k = 0;
206 sch->orb.key = key >> 4;
208 sch->orb.cpa = (__u32) __pa (cpa);
209 ccode = ssch (sch->schid, &sch->orb);
220 sch->schib.scsw.actl |= SCSW_ACTL_START_PEND;
226 return cio_start_handle_notoper(sch, lpm);
231 cio_start (struct subchannel *sch, struct ccw1 *cpa, __u8 lpm)
233 return cio_start_key(sch, cpa, lpm, PAGE_DEFAULT_KEY);
240 cio_resume (struct subchannel *sch)
246 CIO_TRACE_EVENT (4, sch->dev.bus_id);
248 ccode = rsch (sch->schid);
255 sch->schib.scsw.actl |= SCSW_ACTL_RESUME_PEND;
274 cio_halt(struct subchannel *sch)
279 if (!sch)
283 CIO_TRACE_EVENT (2, sch->dev.bus_id);
288 ccode = hsch (sch->schid);
295 sch->schib.scsw.actl |= SCSW_ACTL_HALT_PEND;
309 cio_clear(struct subchannel *sch)
314 if (!sch)
318 CIO_TRACE_EVENT (2, sch->dev.bus_id);
323 ccode = csch (sch->schid);
330 sch->schib.scsw.actl |= SCSW_ACTL_CLEAR_PEND;
345 cio_cancel (struct subchannel *sch)
350 if (!sch)
354 CIO_TRACE_EVENT (2, sch->dev.bus_id);
356 ccode = xsch (sch->schid);
364 stsch (sch->schid, &sch->schib);
380 cio_modify (struct subchannel *sch)
386 ccode = msch_err (sch->schid, &sch->schib);
409 cio_enable_subchannel (struct subchannel *sch, unsigned int isc)
417 CIO_TRACE_EVENT (2, sch->dev.bus_id);
419 if (sch_is_pseudo_sch(sch))
421 ccode = stsch (sch->schid, &sch->schib);
426 sch->schib.pmcw.ena = 1;
427 sch->schib.pmcw.isc = isc;
428 sch->schib.pmcw.intparm = (__u32)(unsigned long)sch;
429 ret = cio_modify(sch);
437 sch->schib.pmcw.csense = 0;
439 stsch (sch->schid, &sch->schib);
440 if (sch->schib.pmcw.ena)
445 if (tsch(sch->schid, &irb) != 0)
458 cio_disable_subchannel (struct subchannel *sch)
466 CIO_TRACE_EVENT (2, sch->dev.bus_id);
468 if (sch_is_pseudo_sch(sch))
470 ccode = stsch (sch->schid, &sch->schib);
474 if (sch->schib.scsw.actl != 0)
482 sch->schib.pmcw.ena = 0;
483 ret = cio_modify(sch);
494 stsch (sch->schid, &sch->schib);
495 if (!sch->schib.pmcw.ena)
504 int cio_create_sch_lock(struct subchannel *sch)
506 sch->lock = kmalloc(sizeof(spinlock_t), GFP_KERNEL);
507 if (!sch->lock)
509 spin_lock_init(sch->lock);
526 cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid)
536 memset(sch, 0, sizeof(struct subchannel));
538 sch->schid = schid;
540 sch->lock = cio_get_console_lock();
542 err = cio_create_sch_lock(sch);
546 mutex_init(&sch->reg_mutex);
548 snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid,
557 ccode = stsch_err (schid, &sch->schib);
563 sch->st = sch->schib.pmcw.st;
568 if (sch->st != 0) {
572 sch->schid.ssid, sch->schid.sch_no, sch->st);
574 err = sch->st;
579 if (!sch->schib.pmcw.dnv) {
585 if (is_blacklisted (sch->schid.ssid, sch->schib.pmcw.dev)) {
592 sch->schib.pmcw.dev, sch->schid.ssid);
596 if (cio_is_console(sch->schid))
597 sch->opm = 0xff;
599 sch->opm = chp_get_sch_opm(sch);
600 sch->lpm = sch->schib.pmcw.pam & sch->opm;
605 sch->schib.pmcw.dev, sch->schid.ssid,
606 sch->schid.sch_no, sch->schib.pmcw.pim,
607 sch->schib.pmcw.pam, sch->schib.pmcw.pom);
617 sch->schib.pmcw.isc = 3; /* could be smth. else */
618 sch->schib.pmcw.csense = 1; /* concurrent sense */
619 sch->schib.pmcw.ena = 0;
620 if ((sch->lpm & (sch->lpm - 1)) != 0)
621 sch->schib.pmcw.mp = 1; /* multipath mode */
625 kfree(sch->lock);
626 sch->lock = NULL;
640 struct subchannel *sch;
668 sch = (struct subchannel *)(unsigned long)tpi_info->intparm;
669 if (sch)
670 spin_lock(sch->lock);
672 if (tsch (tpi_info->schid, irb) == 0 && sch) {
674 memcpy (&sch->schib.scsw, &irb->scsw,
677 if (sch->driver && sch->driver->irq)
678 sch->driver->irq(&sch->dev);
680 if (sch)
681 spin_unlock(sch->lock);