*** pixma_imageclass.c	2014-10-16 08:35:04.904198000 -0400
--- pixma_imageclass-patched.c	2014-10-17 01:21:15.669433000 -0400
***************
*** 96,101 ****
--- 96,102 ----
  #define MF8030_PID 0x2707
  #define IR1133_PID 0x2742
  #define MF8500_PID 0x277a
+ #define D530_PID   0x2775
  
  
  enum iclass_state_t
***************
*** 414,421 ****
      return error;
    if (s->param->source == PIXMA_SOURCE_ADF && !has_paper (s))
      return PIXMA_ENO_PAPER;
!   /* activate only seen for generation 1 scanners */
!   if (mf->generation == 1)
      {
        if (error >= 0)
          error = activate (s, 0);
--- 415,423 ----
      return error;
    if (s->param->source == PIXMA_SOURCE_ADF && !has_paper (s))
      return PIXMA_ENO_PAPER;
!   /* activate only seen for generation 1 scanners
!    * but not for D530 */
!   if (mf->generation == 1 && s->cfg->pid != D530_PID)
      {
        if (error >= 0)
          error = activate (s, 0);
***************
*** 474,482 ****
  
    /* set generation = 2 for new multifunctionals
     * some new scanners use generation 1 protocol */
!   mf->generation = (s->cfg->pid >= MF8030_PID &&
!                     s->cfg->pid != MF8200_PID &&
!                     s->cfg->pid != MF8500_PID) ? 2 : 1;
    PDBG (pixma_dbg (3, "*iclass_open***** This is a generation %d scanner.  *****\n", mf->generation));
  
    PDBG (pixma_dbg (3, "Trying to clear the interrupt buffer...\n"));
--- 476,487 ----
  
    /* set generation = 2 for new multifunctionals
     * some new scanners use generation 1 protocol */
!   /* set generation = 2 for new multifunctionals
!    * except D530 is a generation 1 scanner */
!  mf->generation = (s->cfg->pid >= MF8030_PID && 
!                    s->cfg->pid != MF8200_PID &&
!                    s->cfg->pid != MF8500_PID &&
!                    s->cfg->pid != D530_PID) ? 2 : 1;
    PDBG (pixma_dbg (3, "*iclass_open***** This is a generation %d scanner.  *****\n", mf->generation));
  
    PDBG (pixma_dbg (3, "Trying to clear the interrupt buffer...\n"));
***************
*** 570,575 ****
--- 575,582 ----
    if (error >= 0)
      error = send_scan_param (s);
    if (error >= 0)
+     error = query_status (s);
+   if (error >= 0)
      error = request_image_block (s, 0, &ignore, &ignore2, &ignore, &ignore2);
    if (error < 0)
      {
***************
*** 794,798 ****
--- 801,806 ----
    DEV ("Canon i-SENSYS MF6680dn", "MF6680", MF6680_PID, 600, 640, 877, PIXMA_CAP_ADFDUP),
    DEV ("Canon imageRUNNER 1133", "iR1133", IR1133_PID, 600, 637, 877, PIXMA_CAP_ADFDUP),
    DEV ("Canon i-SENSYS MF8500C Series", "MF8500C", MF8500_PID, 600, 640, 1050, PIXMA_CAP_ADFDUP),
+   DEV ("Canon imageCLASS D530", "D530", D530_PID, 600, 640, 877, 0),
    DEV (NULL, NULL, 0, 0, 0, 0, 0)
  };
