s6245/s2145: Don't abort in the face of some soft errors.

This commit is contained in:
Solomon Peachy 2015-07-02 23:55:22 -04:00
parent 9b3f7cbb66
commit 49f6d85c45
2 changed files with 10 additions and 0 deletions

View File

@ -1641,6 +1641,9 @@ static int shinkos2145_main_loop(void *vctx, int copies) {
if (sts->hdr.error == ERROR_BUFFER_FULL) {
INFO("Printer Buffers full, retrying\n");
break;
} else if ((sts->hdr.status & 0xf0) == 0x30 || sts->hdr.status == 0x21) {
INFO("Printer busy (%s), retrying\n", status_str(sts->hdr.status));
break;
} else if (sts->hdr.status != ERROR_NONE)
goto printer_error;
}

View File

@ -1608,6 +1608,8 @@ static int shinkos6245_main_loop(void *vctx, int copies) {
DEBUG("last_state %d new %d\n", last_state, state);
}
// XXX Send "set time" ??
/* Send Status Query */
memset(cmdbuf, 0, CMDBUF_LEN);
cmd->cmd = cpu_to_le16(S6245_CMD_GETSTATUS);
@ -1648,6 +1650,8 @@ static int shinkos6245_main_loop(void *vctx, int copies) {
break;
case S_PRINTER_READY_CMD:
// XXX send "get eeprom backup command"
INFO("Initiating print job (internal id %d)\n", ctx->jobid);
memset(cmdbuf, 0, CMDBUF_LEN);
@ -1674,6 +1678,9 @@ static int shinkos6245_main_loop(void *vctx, int copies) {
if (sts->hdr.error == ERROR_BUFFER_FULL) {
INFO("Printer Buffers full, retrying\n");
break;
} else if ((sts->hdr.status & 0xf0) == 0x30 || sts->hdr.status == 0x21) {
INFO("Printer busy (%s), retrying\n", status_str(sts->hdr.status));
break;
} else if (sts->hdr.status != ERROR_NONE)
goto printer_error;
}