Lines Matching refs:error

85 	ppb->error = PPB_NO_ERROR;  in ppb_1284_reset_error()
119 (ppb->error == PPB_NO_ERROR)) { in ppb_1284_set_state()
121 ppb->error = PPB_NO_ERROR; in ppb_1284_set_state()
128 ppb_1284_set_error(device_t bus, int error, int event) in ppb_1284_set_error() argument
133 if ((ppb->error == PPB_NO_ERROR) && in ppb_1284_set_error()
135 ppb->error = error; in ppb_1284_set_error()
140 printf("ppb1284: error=%d status=0x%x event=%d\n", error, in ppb_1284_set_error()
201 int spin, request_mode, error = 0; in ppb_peripheral_negociate() local
217 error = ENODEV; in ppb_peripheral_negociate()
218 goto error; in ppb_peripheral_negociate()
240 error = EINVAL; in ppb_peripheral_negociate()
241 goto error; in ppb_peripheral_negociate()
268 error = EINVAL; in ppb_peripheral_negociate()
269 goto error; in ppb_peripheral_negociate()
274 error: in ppb_peripheral_negociate()
276 return (error); in ppb_peripheral_negociate()
289 int error = 0; in ppb_peripheral_terminate() local
298 if ((error = do_peripheral_wait(bus, SELECT | nBUSY, 0))) { in ppb_peripheral_terminate()
300 goto error; in ppb_peripheral_terminate()
307 if ((error = do_peripheral_wait(bus, nBUSY, nBUSY))) { in ppb_peripheral_terminate()
309 goto error; in ppb_peripheral_terminate()
319 if ((error = do_peripheral_wait(bus, nBUSY, 0))) { in ppb_peripheral_terminate()
321 goto error; in ppb_peripheral_terminate()
324 error: in ppb_peripheral_terminate()
339 int error = 0; in byte_peripheral_outbyte() local
342 if ((error = do_1284_wait(bus, nBUSY, nBUSY))) { in byte_peripheral_outbyte()
344 goto error; in byte_peripheral_outbyte()
350 goto error; in byte_peripheral_outbyte()
363 if ((error = do_peripheral_wait(bus, nBUSY, 0))) { in byte_peripheral_outbyte()
365 goto error; in byte_peripheral_outbyte()
377 if ((error = do_peripheral_wait(bus, nACK | nBUSY, 0))) { in byte_peripheral_outbyte()
379 goto error; in byte_peripheral_outbyte()
386 goto error; in byte_peripheral_outbyte()
389 error: in byte_peripheral_outbyte()
390 return (error); in byte_peripheral_outbyte()
401 int error = 0, i; in byte_peripheral_write() local
420 error = ppb_poll_bus(bus, PPB_FOREVER, nBUSY, nBUSY, in byte_peripheral_write()
423 if (error && error != EWOULDBLOCK) in byte_peripheral_write()
424 goto error; in byte_peripheral_write()
429 if ((error = byte_peripheral_outbyte(bus, buffer+i, (i == len-1)))) in byte_peripheral_write()
430 goto error; in byte_peripheral_write()
432 error: in byte_peripheral_write()
433 if (!error) in byte_peripheral_write()
437 return (error); in byte_peripheral_write()
448 int error = 0; in byte_1284_inbyte() local
454 if ((error = do_1284_wait(bus, nACK, 0))) { in byte_1284_inbyte()
456 goto error; in byte_1284_inbyte()
466 if ((error = do_1284_wait(bus, nACK, nACK))) { in byte_1284_inbyte()
468 goto error; in byte_1284_inbyte()
476 error: in byte_1284_inbyte()
477 return (error); in byte_1284_inbyte()
489 int i, error; in nibble_1284_inbyte() local
499 if ((error = do_1284_wait(bus, nACK, 0))) { in nibble_1284_inbyte()
501 goto error; in nibble_1284_inbyte()
511 if ((error = do_1284_wait(bus, nACK, nACK))) { in nibble_1284_inbyte()
513 goto error; in nibble_1284_inbyte()
520 error: in nibble_1284_inbyte()
521 return (error); in nibble_1284_inbyte()
532 int error = 0, len = 0; in spp_1284_read() local
542 if ((error = ppb_1284_negociate(bus, mode, 0))) in spp_1284_read()
543 return (error); in spp_1284_read()
552 if ((error = ppb_1284_negociate(bus, mode, 0))) in spp_1284_read()
553 return (error); in spp_1284_read()
576 error = EINVAL; in spp_1284_read()
583 if (!error) in spp_1284_read()
588 if (terminate_after_transfer || error) in spp_1284_read()
591 return (error); in spp_1284_read()
602 int error = 0; in ppb_1284_read_id() local
610 if ((error = ppb_1284_negociate(bus, PPB_NIBBLE, PPB_REQUEST_ID))) in ppb_1284_read_id()
611 return (error); in ppb_1284_read_id()
612 error = spp_1284_read(bus, PPB_NIBBLE, buffer, max, read); in ppb_1284_read_id()
615 if ((error = ppb_1284_negociate(bus, PPB_BYTE, PPB_REQUEST_ID))) in ppb_1284_read_id()
616 return (error); in ppb_1284_read_id()
617 error = spp_1284_read(bus, PPB_BYTE, buffer, max, read); in ppb_1284_read_id()
624 return (error); in ppb_1284_read_id()
636 int error = 0; in ppb_1284_read() local
641 error = spp_1284_read(bus, mode, buffer, max, read); in ppb_1284_read()
647 return (error); in ppb_1284_read()
662 int error; in ppb_1284_negociate() local
717 error = ENODEV; in ppb_1284_negociate()
718 goto error; in ppb_1284_negociate()
725 error = ENODEV; in ppb_1284_negociate()
726 goto error; in ppb_1284_negociate()
740 error = EBUSY; in ppb_1284_negociate()
741 goto error; in ppb_1284_negociate()
756 error = ENODEV; in ppb_1284_negociate()
757 goto error; in ppb_1284_negociate()
762 error = ENODEV; in ppb_1284_negociate()
763 goto error; in ppb_1284_negociate()
783 error = ENODEV; in ppb_1284_negociate()
784 goto error; in ppb_1284_negociate()
790 error = ENODEV; in ppb_1284_negociate()
791 goto error; in ppb_1284_negociate()
809 error: in ppb_1284_negociate()
812 return (error); in ppb_1284_negociate()
845 goto error; in ppb_1284_terminate()
861 error: in ppb_1284_terminate()