sane-backends/sane-backends-mg5300.patch

50 lines
1.8 KiB
Diff

diff -up sane-backends-1.0.27/backend/pixma_mp150.c.mg5300 sane-backends-1.0.27/backend/pixma_mp150.c
--- sane-backends-1.0.27/backend/pixma_mp150.c.mg5300 2017-10-20 17:39:18.535552297 +0200
+++ sane-backends-1.0.27/backend/pixma_mp150.c 2017-10-20 17:44:48.517691957 +0200
@@ -168,6 +168,7 @@
#define MX420_PID 0x174f
#define MX880_PID 0x1750
+/* Generation 5 */
/* 2011 new devices (untested) */
#define MG2100_PID 0x1751
#define MG3100_PID 0x1752
@@ -1354,7 +1355,7 @@ mp150_check_param (pixma_t * s, pixma_sc
{
uint8_t k = 1;
- /* ADF/ADF duplex mode: max scan res is 600 dpi, at least for generation 4 */
+ /* ADF/ADF duplex mode: max scan res is 600 dpi, at least for generation 4+ */
if (mp->generation >= 4)
k = sp->xdpi / MIN (sp->xdpi, 600);
sp->x /= k;
@@ -1381,7 +1382,7 @@ mp150_scan (pixma_t * s)
if (mp->state != state_idle)
return PIXMA_EBUSY;
- /* Generation 4: send XML dialog */
+ /* Generation 4+: send XML dialog */
/* adf: first page or idle */
if (mp->generation == 4 && mp->adf_state == state_idle)
{
@@ -1423,7 +1424,7 @@ mp150_scan (pixma_t * s)
if (error < 0)
return error;
- /* Generation 4: send XML dialog */
+ /* Generation 4+: send XML dialog */
/* adf: first page or idle */
if (mp->generation == 4 && mp->adf_state == state_idle)
{
@@ -1647,8 +1648,8 @@ mp150_finish_scan (pixma_t * s)
if (error < 0)
PDBG (pixma_dbg (1, "WARNING:abort_session() failed %d\n", error));
- /* Generation 4: send XML end of scan dialog */
- if (mp->generation == 4)
+ /* Generation 4+: send XML end of scan dialog */
+ if (mp->generation >= 4)
{
if (!send_xml_dialog (s, XML_END))
PDBG (pixma_dbg (1, "WARNING:XML_END dialog failed \n"));