summaryrefslogtreecommitdiffstats
path: root/backend_sinfonia.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-28 20:40:43 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-29 13:03:01 -0400
commita0d109785a7ef80efa962905aac900207e063322 (patch)
tree57b40afb9aff82c675b2412b6fec685e70915f86 /backend_sinfonia.c
parentd51faecc2fb81d940273bfbbc15d7932e123d8e4 (diff)
downloadselphy_print-a0d109785a7ef80efa962905aac900207e063322.tar.gz
selphy_print-a0d109785a7ef80efa962905aac900207e063322.tar.bz2
selphy_print-a0d109785a7ef80efa962905aac900207e063322.zip
shinkos2245: Lots of bugfixes.
Working: * status query * firmware version query * media query * eeprom dump * corrtable dump * partial errorlog dump Broken: * corrtable parsing (differs from S6145.. sigh) * print command decoding (ditto) * actual printing (after the brokenness)
Diffstat (limited to 'backend_sinfonia.c')
-rw-r--r--backend_sinfonia.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/backend_sinfonia.c b/backend_sinfonia.c
index 6daac53..e7f32dd 100644
--- a/backend_sinfonia.c
+++ b/backend_sinfonia.c
@@ -492,6 +492,7 @@ int sinfonia_getfwinfo(struct sinfonia_usbdev *usbh)
struct sinfonia_fwinfo_resp resp;
int num = 0;
int i;
+ int last = FWINFO_TARGET_PRINT_TABLES2;
cmd.hdr.cmd = cpu_to_le16(SINFONIA_CMD_FWINFO);
cmd.hdr.len = cpu_to_le16(1);
@@ -500,7 +501,10 @@ int sinfonia_getfwinfo(struct sinfonia_usbdev *usbh)
INFO("FW Information:\n");
- for (i = FWINFO_TARGET_MAIN_BOOT ; i <= FWINFO_TARGET_PRINT_TABLES2 ; i++) {
+ if (usbh->type == P_SHINKO_S6145) last = FWINFO_TARGET_PRINT_TABLES;
+ if (usbh->type == P_SHINKO_S2245) last = FWINFO_TARGET_DSP;
+
+ for (i = FWINFO_TARGET_MAIN_BOOT ; i <= last ; i++) {
int ret;
cmd.target = i;
resp.major = 0;
@@ -560,6 +564,7 @@ int sinfonia_geterrorlog(struct sinfonia_usbdev *usbh)
resp.items[i].major, resp.items[i].minor,
usbh->error_codes(resp.items[i].major, resp.items[i].minor));
}
+
return CUPS_BACKEND_OK;
}