View | Details | Raw Unified | Return to bug 27023
Collapse All | Expand All

(-)a/backend/pixma_imageclass.c (-3 / +12 lines)
Lines 83-88 Link Here
83
#define MF8100_PID 0x2659
83
#define MF8100_PID 0x2659
84
#define MF8030_PID 0x2707
84
#define MF8030_PID 0x2707
85
85
86
#define MF4410_PID 0x2737
86
87
87
enum iclass_state_t
88
enum iclass_state_t
88
{
89
{
Lines 99-105 enum iclass_cmd_t Link Here
99
  cmd_scan_param = 0xde20,
100
  cmd_scan_param = 0xde20,
100
  cmd_status = 0xf320,
101
  cmd_status = 0xf320,
101
  cmd_abort_session = 0xef20,
102
  cmd_abort_session = 0xef20,
102
  cmd_read_image = 0xd420,
103
  cmd_read_image  = 0xd420,
104
  cmd_read_image2 = 0xd460, /* New multifunctionals, such as MF4410 */
103
  cmd_error_info = 0xff20,
105
  cmd_error_info = 0xff20,
104
106
105
  cmd_activate = 0xcf60
107
  cmd_activate = 0xcf60
Lines 264-273 request_image_block (pixma_t * s, unsigned flag, uint8_t * info, Link Here
264
  const int hlen = 2 + 6;
266
  const int hlen = 2 + 6;
265
267
266
  memset (mf->cb.buf, 0, 11);
268
  memset (mf->cb.buf, 0, 11);
267
  pixma_set_be16 (cmd_read_image, mf->cb.buf);
269
  pixma_set_be16 ( s->cfg->pid == MF4410_PID? cmd_read_image2:cmd_read_image, mf->cb.buf);
268
  mf->cb.buf[8] = flag;
270
  mf->cb.buf[8] = flag;
269
  mf->cb.buf[10] = 0x06;
271
  mf->cb.buf[10] = 0x06;
270
  expected_len = (s->cfg->pid == MF4600_PID ||
272
  expected_len = (s->cfg->pid == MF4600_PID ||
273
                  s->cfg->pid == MF4410_PID ||
271
                  s->cfg->pid == MF6500_PID ||
274
                  s->cfg->pid == MF6500_PID ||
272
                  s->cfg->pid == MF8030_PID) ? 512 : hlen;
275
                  s->cfg->pid == MF8030_PID) ? 512 : hlen;
273
  mf->cb.reslen = pixma_cmd_transaction (s, mf->cb.buf, 11, mf->cb.buf, expected_len);
276
  mf->cb.reslen = pixma_cmd_transaction (s, mf->cb.buf, 11, mf->cb.buf, expected_len);
Lines 278-283 request_image_block (pixma_t * s, unsigned flag, uint8_t * info, Link Here
278
      error = 0;
281
      error = 0;
279
282
280
      if (s->cfg->pid == MF4600_PID ||
283
      if (s->cfg->pid == MF4600_PID ||
284
          s->cfg->pid == MF4410_PID ||
281
          s->cfg->pid == MF6500_PID ||
285
          s->cfg->pid == MF6500_PID ||
282
          s->cfg->pid == MF8030_PID)
286
          s->cfg->pid == MF8030_PID)
283
        {                                         /* 32bit size */
287
        {                                         /* 32bit size */
Lines 300-305 read_image_block (pixma_t * s, uint8_t * data, unsigned size) Link Here
300
  unsigned maxchunksize, chunksize, count = 0;
304
  unsigned maxchunksize, chunksize, count = 0;
301
  
305
  
302
  maxchunksize = MAX_CHUNK_SIZE * ((s->cfg->pid == MF4600_PID || 
306
  maxchunksize = MAX_CHUNK_SIZE * ((s->cfg->pid == MF4600_PID || 
307
                                    s->cfg->pid == MF4410_PID ||
303
                                    s->cfg->pid == MF6500_PID ||
308
                                    s->cfg->pid == MF6500_PID ||
304
                                    s->cfg->pid == MF8030_PID) ? 4 : 1);
309
                                    s->cfg->pid == MF8030_PID) ? 4 : 1);
305
  while (size)
310
  while (size)
Lines 516-521 iclass_scan (pixma_t * s) Link Here
516
    error = send_scan_param (s);
521
    error = send_scan_param (s);
517
  if (error >= 0)
522
  if (error >= 0)
518
    error = request_image_block (s, 0, &ignore, &ignore2, &ignore, &ignore2);
523
    error = request_image_block (s, 0, &ignore, &ignore2, &ignore, &ignore2);
524
525
519
  if (error < 0)
526
  if (error < 0)
520
    {
527
    {
521
      iclass_finish_scan (s);
528
      iclass_finish_scan (s);
Lines 596-601 iclass_fill_buffer (pixma_t * s, pixma_imagebuf_t * ib) Link Here
596
        {
603
        {
597
          if (s->param->channels != 1 &&
604
          if (s->param->channels != 1 &&
598
	          s->cfg->pid != MF4600_PID &&
605
	          s->cfg->pid != MF4600_PID &&
606
	          s->cfg->pid != MF4410_PID &&
599
	          s->cfg->pid != MF6500_PID &&
607
	          s->cfg->pid != MF6500_PID &&
600
	          s->cfg->pid != MF8030_PID)
608
	          s->cfg->pid != MF8030_PID)
601
            {
609
            {
Lines 643-649 iclass_finish_scan (pixma_t * s) Link Here
643
      query_status (s);
651
      query_status (s);
644
      activate (s, 0);
652
      activate (s, 0);
645
      query_status (s);
653
      query_status (s);
646
      if (mf->last_block == 0x28)
654
      if (mf->last_block == 0x28 || (s->cfg->pid==MF4410_PID && mf->last_block==0x38))
647
	{
655
	{
648
	  abort_session (s);
656
	  abort_session (s);
649
	}
657
	}
Lines 714-718 const pixma_config_t pixma_iclass_devices[] = { Link Here
714
  DEV ("Canon laserBase MF5650", "MF5650", MF5650_PID, 600, 640, 877, PIXMA_CAP_ADF),
722
  DEV ("Canon laserBase MF5650", "MF5650", MF5650_PID, 600, 640, 877, PIXMA_CAP_ADF),
715
  DEV ("Canon imageCLASS MF8170c", "MF8170c", MF8100_PID, 600, 640, 877, PIXMA_CAP_ADF),
723
  DEV ("Canon imageCLASS MF8170c", "MF8170c", MF8100_PID, 600, 640, 877, PIXMA_CAP_ADF),
716
  DEV ("Canon imageClass MF8030", "MF8030", MF8030_PID, 600, 640, 877, PIXMA_CAP_ADF),  
724
  DEV ("Canon imageClass MF8030", "MF8030", MF8030_PID, 600, 640, 877, PIXMA_CAP_ADF),  
725
  DEV ("Canon imageCLASS MF4410", "MF4410", MF4410_PID, 600, 640, 877, 0),
717
  DEV (NULL, NULL, 0, 0, 0, 0, 0)
726
  DEV (NULL, NULL, 0, 0, 0, 0, 0)
718
};
727
};

Return to bug 27023