Home
last modified time | relevance | path

Searched refs:sc_state (Results 1 – 25 of 143) sorted by relevance

123456

/netbsd-src/sys/arch/x86/x86/
H A Dpowernow.c110 struct powernow_cpu_state *sc_state; member
190 sc->sc_state = NULL; in powernow_attach()
238 if (sc->sc_state != NULL) in powernow_detach()
239 kmem_free(sc->sc_state, sizeof(*sc->sc_state)); in powernow_detach()
328 if (sc->sc_state == NULL) in powernow_sysctl_helper()
384 sc->sc_state = kmem_alloc(sizeof(*sc->sc_state), KM_SLEEP); in powernow_k7_init()
395 sc->sc_state->fsb = mhz / (powernow_k7_fidtomult[currentfid] / 10); in powernow_k7_init()
402 if (sc->sc_state->n_states == 0) { in powernow_k7_init()
407 sc->sc_freqs_len = sc->sc_state->n_states * (sizeof("9999 ") - 1) + 1; in powernow_k7_init()
410 for (i = 0; i < sc->sc_state->n_states; i++) { in powernow_k7_init()
[all …]
/netbsd-src/sys/dev/qbus/
H A Drf.c180 int sc_state; /* state of drive */ member
461 rf_sc->sc_state = 0; in rf_attach()
580 if ((rf_sc->sc_state & (1 << (DISKPART(buf->b_dev) + RFS_OPEN_SHIFT))) in rfstrategy()
636 RFS_SETCMD(rf_sc->sc_state, RFS_IDLE); in get_new_buf()
666 switch (rf_sc->sc_state & RFS_CMDS) { in rfc_intr()
671 RFS_SETCMD(rf_sc->sc_state, RFS_IDLE); in rfc_intr()
675 && (rf_sc->sc_state & RFS_DENS) == 0 in rfc_intr()
676 && (rf_sc->sc_state & RFS_AD) != 0) { in rfc_intr()
678 rf_sc->sc_state |= RFS_DENS; in rfc_intr()
686 RFS_SETCMD(rf_sc->sc_state, in rfc_intr()
[all …]
/netbsd-src/sys/arch/vax/vax/
H A Dctu.c67 int sc_state; member
168 if (tu_sc.sc_state != TU_IDLE) in ctuopen()
171 tu_sc.sc_state = TU_RESET; in ctuopen()
181 tu_sc.sc_state = TU_RUNNING; in ctuopen()
198 tu_sc.sc_state = TU_IDLE; in ctuclose()
255 tu_sc.sc_state = TU_WORKING; in ctustart()
287 switch (tu_sc.sc_state) { in cturintr()
330 tu_sc.sc_state = TU_ENDPACKET; in cturintr()
347 tu_sc.sc_state, tu_sc.sc_xbytes, status); in cturintr()
394 tu_sc.sc_state = TU_ENDPACKET; in cturintr()
[all …]
/netbsd-src/sys/dev/i2c/
H A Dpcf8574.c74 uint8_t sc_state; member
161 if (pcf8574_read(sc, &sc->sc_state)) { in pcf8574_attach()
167 aprint_normal(": GPIO: state = 0x%02x\n", sc->sc_state); in pcf8574_attach()
349 u_int8_t prev_state = sc->sc_state; in pcf8574_refresh()
351 pcf8574_read(sc, &sc->sc_state); in pcf8574_refresh()
353 edata->value_cur = sc->sc_state & 1 << pin ? TRUE : FALSE; in pcf8574_refresh()
355 edata->value_cur = sc->sc_state & 1 << pin ? FALSE : TRUE; in pcf8574_refresh()
359 if (sc->sc_state != prev_state) { in pcf8574_refresh()
361 device_xname(sc->sc_dev), prev_state, sc->sc_state); in pcf8574_refresh()
362 pcf8574_check_alert(sc, prev_state, sc->sc_state); in pcf8574_refresh()
[all …]
H A Dpcagpio.c80 uint32_t sc_state; member
164 sc->sc_state = pcagpio_readreg(sc, PCAGPIO_OUTPUT); in pcagpio_attach()
171 out = sc->sc_state; in pcagpio_attach()
243 if (out != sc->sc_state || dir != sc->sc_dir || in != sc->sc_in) { in pcagpio_timeout()
245 o_out = sc->sc_state; in pcagpio_timeout()
251 sc->sc_state = out; in pcagpio_timeout()
282 if (reg == PCAGPIO_OUTPUT) sc->sc_state = val; in pcagpio_writereg()
332 return ((sc->sc_state & l->mask) == l->v_on); in pcagpio_get()
342 newstate = sc->sc_state & ~l->mask; in pcagpio_set()
345 sc->sc_state, newstate, l->mask, l->v_on, l->v_off); in pcagpio_set()
[all …]
/netbsd-src/sys/arch/vax/boot/boot/
H A Dctu.c51 enum tu_state sc_state; member
66 tu_sc.sc_state = SC_INIT; in ctuopen()
70 tu_sc.sc_state = SC_READY; in ctuopen()
93 tu_sc.sc_state = SC_SEND_CMD; in ctustrategy()
94 while (tu_sc.sc_state != SC_GET_RESP) in ctustrategy()
96 while (tu_sc.sc_state != SC_READY) in ctustrategy()
112 switch (tu_sc.sc_state) { in cturintr()
121 tu_sc.sc_state = SC_READY; in cturintr()
154 tu_sc.sc_state = SC_GET_RESP; in ctutintr()
/netbsd-src/sys/dev/ic/
H A Dsunscpal.c265 sc->sc_state |= SUNSCPAL_DOINGDMA; in sunscpal_dma_start()
270 __func__, sc->sc_state); in sunscpal_dma_start()
290 if (sc->sc_state & SUNSCPAL_ABORTING) in sunscpal_dma_poll()
326 if ((sc->sc_state & SUNSCPAL_DOINGDMA) == 0) { in sunscpal_dma_stop()
332 sc->sc_state &= ~SUNSCPAL_DOINGDMA; in sunscpal_dma_stop()
361 sc->sc_state |= SUNSCPAL_ABORTING; in sunscpal_dma_stop()
366 if (sc->sc_state & SUNSCPAL_ABORTING) in sunscpal_dma_stop()
388 sc->sc_state |= SUNSCPAL_ABORTING; in sunscpal_dma_stop()
512 sc->sc_state = SUNSCPAL_IDLE; in sunscpal_init()
562 SUNSCPAL_TRACE("intr: top, state=%d\n", sc->sc_state); in sunscpal_intr()
[all …]
H A Dlpt.c124 sc->sc_state = 0; in lpt_attach_subr()
172 if (sc->sc_state) in lptopen()
174 sc->sc_state); in lptopen()
177 if (sc->sc_state) in lptopen()
180 sc->sc_state = LPT_INIT; in lptopen()
199 sc->sc_state = 0; in lptopen()
206 sc->sc_state = 0; in lptopen()
220 sc->sc_state = LPT_OPEN; in lptopen()
238 if (sc->sc_state & LPT_OPEN) { in lptnotready()
285 sc->sc_state = 0; in lptclose()
[all …]
H A Dncr5380sbc.c368 sc->sc_state = NCR_IDLE; in ncr5380_init()
414 if (sr && (sc->sc_state & NCR_ABORTING) == 0)
434 NCR_TRACE("intr: top, state=%d\n", sc->sc_state); in ncr5380_intr()
436 if (sc->sc_state == NCR_IDLE) { in ncr5380_intr()
460 if (sc->sc_state & NCR_WORKING) { in ncr5380_intr()
471 if (sc->sc_state == NCR_IDLE) { in ncr5380_intr()
502 sc->sc_state |= NCR_ABORTING; in ncr5380_abort()
503 if ((sc->sc_state & NCR_DOINGDMA) == 0) { in ncr5380_abort()
571 if (sc->sc_state == NCR_IDLE) { in ncr5380_cmd_timeout()
631 if (sc->sc_state ! in ncr5380_scsipi_request()
[all...]
H A Dncr53c9x.c292 sc->sc_state = 0; in ncr53c9x_attach()
452 sc->sc_state = NCR_CLEANING; in ncr53c9x_clear()
496 NCR_MISC(("[NCR_INIT(%d) %d] ", doreset, sc->sc_state)); in ncr53c9x_init()
507 if (sc->sc_state == 0) { in ncr53c9x_init()
552 sc->sc_state = NCR_SBR; in ncr53c9x_init()
558 sc->sc_state = NCR_IDLE; in ncr53c9x_init()
685 sc->sc_state = NCR_SELECTING; in ncr53c9x_select()
915 if (sc->sc_state == NCR_IDLE) in ncr53c9x_scsipi_request()
1025 if (sc->sc_state == NCR_IDLE) { in ncr53c9x_poll()
1078 if (sc->sc_state != NCR_IDLE) in ncr53c9x_sched()
[all …]
H A Dmb89352.c259 sc->sc_state = SPC_INIT; in spc_attach()
401 if (sc->sc_state == SPC_INIT) { in spc_init()
416 sc->sc_state = SPC_CLEANING; in spc_init()
449 sc->sc_state = SPC_IDLE; in spc_init()
562 if (sc->sc_state == SPC_IDLE) in spc_scsipi_request()
703 sc->sc_state = SPC_SELECTING; in spc_select()
751 sc->sc_state = SPC_CONNECTED; in spc_reselect()
874 sc->sc_state = SPC_IDLE; in spc_done()
1040 switch (sc->sc_state) { in spc_msgin()
1062 sc->sc_state = SPC_CMDCOMPLETE; in spc_msgin()
[all …]
/netbsd-src/sys/dev/mvme/
H A Dlpt_mvme.c151 sc->sc_state = 0; in lpt_attach_subr()
173 if (sc->sc_state) in lptopen()
175 sc->sc_state); in lptopen()
178 if (sc->sc_state) in lptopen()
181 sc->sc_state = LPT_INIT; in lptopen()
199 sc->sc_state = 0; in lptopen()
205 sc->sc_state = 0; in lptopen()
212 sc->sc_state = LPT_OPEN; in lptopen()
256 sc->sc_state = 0; in lptclose()
300 if ((sc->sc_state & LPT_OBUSY) == 0) { in pushbytes()
[all …]
/netbsd-src/sys/arch/atari/dev/
H A Dlpt.c102 u_char sc_state; member
173 sc->sc_state = 0; in lpattach()
202 if (sc->sc_state) in lpopen()
204 sc->sc_state); in lpopen()
207 if (sc->sc_state) in lpopen()
210 sc->sc_state = LPT_INIT; in lpopen()
217 sc->sc_state = 0; in lpopen()
224 sc->sc_state = 0; in lpopen()
231 sc->sc_state = LPT_OPEN; in lpopen()
277 sc->sc_state = 0; in lpclose()
[all …]
/netbsd-src/sys/arch/next68k/stand/boot/
H A Dscsi.c112 sc->sc_state = SCSI_IDLE; in scsi_init()
165 if (sc->sc_state != SCSI_IDLE) { in scsiicmd()
179 sc->sc_state = SCSI_SELECTING; in scsiicmd()
181 while(sc->sc_state != SCSI_DONE) { in scsiicmd()
185 if (sc->sc_state == SCSI_DMA) in scsiicmd()
217 switch(sc->sc_state) in scsiicmd()
222 sc->sc_state = SCSI_IDLE; in scsiicmd()
232 sc->sc_state = SCSI_HASBUS; in scsiicmd()
259 sc->sc_state = SCSI_DONE; in scsiicmd()
263 sc->sc_state = SCSI_DONE; /* maybe ... */ in scsiicmd()
[all …]
/netbsd-src/sys/dev/acpi/
H A Dacpi_ec.c158 enum ec_state_t sc_state; member
195 if ((sc)->sc_state < __arraycount(acpiec_state_names)) { \
196 state = acpiec_state_names[(sc)->sc_state]; \
199 (sc)->sc_state); \
394 sc->sc_state = EC_STATE_FREE; in acpiec_common_attach()
686 if (sc->sc_state == EC_STATE_FREE) in acpiec_wait_timeout()
695 while (sc->sc_state != EC_STATE_FREE && timeo-- > 0) { in acpiec_wait_timeout()
699 if (sc->sc_state != EC_STATE_FREE) { in acpiec_wait_timeout()
701 sc->sc_state); in acpiec_wait_timeout()
708 while (sc->sc_state != EC_STATE_FREE && in acpiec_wait_timeout()
[all …]
/netbsd-src/sys/arch/hpcarm/dev/
H A Dj720pwr.c69 volatile int sc_state; member
130 sc->sc_state = 0; in j720pwr_attach()
173 while (sc->sc_state & J720PWR_POWEROFF) { in j720pwr_sleep()
179 (void)tsleep(&sc->sc_state, PWAIT, "j720slp", 0); in j720pwr_sleep()
195 if ((sc->sc_state & (J720PWR_POWEROFF | J720PWR_SLEEPING)) == 0) { in j720pwr_suspend_hook()
196 sc->sc_state |= J720PWR_POWEROFF; in j720pwr_suspend_hook()
197 } else if ((sc->sc_state & (J720PWR_POWEROFF | J720PWR_SLEEPING)) == in j720pwr_suspend_hook()
199 sc->sc_state &= ~J720PWR_POWEROFF; in j720pwr_suspend_hook()
200 wakeup(&sc->sc_state); in j720pwr_suspend_hook()
224 sc->sc_state |= (J720PWR_SLEEPING | J720PWR_POWEROFF); in j720pwr_event_hook()
[all …]
/netbsd-src/sys/dev/ppbus/
H A Dlpt.c209 if(lpt->sc_state & HAVEBUS) { in lpt_detach()
222 lpt->sc_state &= ~HAVEBUS; in lpt_detach()
250 lpt->sc_state |= HAVEBUS; in lpt_request_ppbus()
267 if(lpt->sc_state & HAVEBUS) { in lpt_release_ppbus()
270 lpt->sc_state &= ~HAVEBUS; in lpt_release_ppbus()
457 lpt->sc_state |= LPTINIT; in lptopen()
473 lpt->sc_state &= ~LPTINIT; in lptopen()
483 lpt->sc_state &= ~LPTINIT; in lptopen()
505 lpt->sc_state |= OPEN; in lptopen()
528 sc->sc_state = 0; in lptclose()
[all …]
/netbsd-src/sys/dev/gpio/
H A Dgpiosim.c50 uint64_t sc_state; member
155 sc->sc_state = 0; in gpiosim_attach()
274 val = sc->sc_state; in gpiosim_sysctl()
280 previous_val = sc->sc_state; in gpiosim_sysctl()
281 sc->sc_state = val; in gpiosim_sysctl()
285 if ((previous_val & (1LL << i)) == 0 && (sc->sc_state & (1LL << i)) && in gpiosim_sysctl()
291 if ((previous_val & (1LL << i)) && (sc->sc_state & (1LL << i)) == 0 && in gpiosim_sysctl()
298 if ((sc->sc_state & (1LL << i)) && irq->sc_gpio_irqfunc != NULL && in gpiosim_sysctl()
302 if ((sc->sc_state & (1LL << i)) == 0 && irq->sc_gpio_irqfunc != NULL && in gpiosim_sysctl()
306 if ((sc->sc_state & (1LL << i)) && irq->sc_gpio_irqfunc != NULL && in gpiosim_sysctl()
[all …]
/netbsd-src/sys/modules/examples/pollpal/
H A Dpollpal.c104 } sc_state; member
139 pl->sc_state = READ_WAITING; in pollpal_open()
182 switch (pl->sc_state) { in pollpal_write()
184 pl->sc_state = WRITE_WAITING; in pollpal_write()
186 while (pl->sc_state == WRITE_WAITING) { in pollpal_write()
227 switch (pl->sc_state) { in pollpal_read()
233 pl->sc_state = READ_WAITING; in pollpal_read()
235 while (pl->sc_state == READ_WAITING) { in pollpal_read()
273 switch (pl->sc_state) { in pollpal_poll()
/netbsd-src/sys/dev/usb/
H A Duhidev.c99 uint8_t sc_state; member
581 rep, scd, scd->sc_state)); in uhidev_intr()
582 if (!(atomic_load_acquire(&scd->sc_state) & UHIDEV_OPEN)) in uhidev_intr()
867 scd->sc_state, in uhidev_open()
871 if (scd->sc_state & UHIDEV_OPEN) { in uhidev_open()
877 atomic_store_release(&scd->sc_state, scd->sc_state | UHIDEV_OPEN); in uhidev_open()
888 KASSERTMSG(scd->sc_state & UHIDEV_OPEN, in uhidev_open()
891 atomic_store_relaxed(&scd->sc_state, in uhidev_open()
892 scd->sc_state & ~UHIDEV_OPEN); in uhidev_open()
919 atomic_store_relaxed(&scd->sc_state, scd->sc_state | UHIDEV_STOPPED); in uhidev_stop()
[all …]
/netbsd-src/sys/dev/bluetooth/
H A Dbthidev.c73 uint16_t sc_state; member
206 sc->sc_state = BTHID_CLOSED; in bthidev_attach()
452 switch (sc->sc_state) { in bthidev_timeout()
541 sc->sc_state = BTHID_WAIT_CTL; in bthidev_listen()
588 sc->sc_state = BTHID_WAIT_CTL; in bthidev_connect()
627 if (sc->sc_state != BTHID_OPEN) in bthidev_process_one()
731 if (sc->sc_state != BTHID_WAIT_CTL) in bthidev_ctl_connected()
763 sc->sc_state = BTHID_WAIT_INT; in bthidev_ctl_connected()
778 if (sc->sc_state != BTHID_WAIT_INT) in bthidev_int_connected()
786 sc->sc_state = BTHID_OPEN; in bthidev_int_connected()
[all …]
/netbsd-src/sys/arch/ews4800mips/dev/
H A Dewsms.c87 u_int sc_state; member
170 sc->sc_state = EWSMS_STATE_SYNC; in ewsms_zsc_attach()
276 switch (sc->sc_state) { in ewsms_zsc_softint()
283 sc->sc_state = EWSMS_STATE_X1; in ewsms_zsc_softint()
289 sc->sc_state = EWSMS_STATE_Y1; in ewsms_zsc_softint()
294 sc->sc_state = EWSMS_STATE_X2; in ewsms_zsc_softint()
299 sc->sc_state = EWSMS_STATE_Y2; in ewsms_zsc_softint()
308 sc->sc_state = EWSMS_STATE_SYNC; in ewsms_zsc_softint()
361 sc->sc_state = EWSMS_STATE_SYNC; in ewsms_wsmouse_enable()
/netbsd-src/sys/dev/pci/
H A Doboe.c100 int sc_state; member
198 sc->sc_state = 0; in oboe_attach()
263 sc->sc_state = 0; in oboe_open()
283 sc->sc_state |= OBOE_CLOSING; in oboe_close()
284 error = tsleep(&sc->sc_state, PZERO | PCATCH, "oboecl", hz/10); in oboe_close()
310 sc->sc_state |= OBOE_RSLP; in oboe_read()
315 sc->sc_state &= ~OBOE_RSLP; in oboe_read()
356 sc->sc_state |= OBOE_WSLP; in oboe_write()
361 sc->sc_state &= ~OBOE_WSLP; in oboe_write()
566 if (sc->sc_state & OBOE_RSLP) { in oboe_intr()
[all …]
H A Dvio9p.c101 int sc_state; member
228 if (sc->sc_state == VIO9P_S_INIT) { in vio9p_read()
234 if (sc->sc_state == VIO9P_S_CONSUMING) { in vio9p_read()
252 while (sc->sc_state == VIO9P_S_REQUESTING) { in vio9p_read()
257 if (sc->sc_state == VIO9P_S_REPLIED) in vio9p_read()
258 sc->sc_state = VIO9P_S_CONSUMING; in vio9p_read()
302 sc->sc_state = VIO9P_S_INIT; in vio9p_read()
325 if (sc->sc_state != VIO9P_S_INIT) { in vio9p_write()
381 sc->sc_state = VIO9P_S_REQUESTING; in vio9p_write()
416 rv = (kn->kn_data > 0) || sc->sc_state != VIO9P_S_INIT; in filt_vio9p_read()
[all …]
/netbsd-src/sys/arch/arc/dev/
H A Dopms.c214 sc->sc_state = 0; in opms_common_attach()
226 if (sc->sc_state & PMS_OPEN) in opmsopen()
232 sc->sc_state |= PMS_OPEN; in opmsopen()
262 sc->sc_state &= ~PMS_OPEN; in opmsclose()
286 sc->sc_state |= PMS_ASLP; in opmsread()
289 sc->sc_state &= ~PMS_ASLP; in opmsread()
377 if ((sc->sc_state & PMS_OPEN) == 0) { in opmsintr()
425 if (sc->sc_state & PMS_ASLP) { in opmsintr()
426 sc->sc_state &= ~PMS_ASLP; in opmsintr()

123456