Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ecpp.c
          +++ new/usr/src/uts/common/io/ecpp.c
↓ open down ↓ 767 lines elided ↑ open up ↑
 768  768                  mutex_enter(&pp->umutex);
 769  769                  ASSERT(pp->suspended == FALSE);
 770  770  
 771  771                  pp->suspended = TRUE;   /* prevent new transfers */
 772  772  
 773  773                  /*
 774  774                   * Wait if there's any activity on the port
 775  775                   */
 776  776                  if ((pp->e_busy == ECPP_BUSY) || (pp->e_busy == ECPP_FLUSH)) {
 777  777                          (void) cv_reltimedwait(&pp->pport_cv, &pp->umutex,
 778      -                            SUSPEND_TOUT * drv_usectohz(1000000),
      778 +                            drv_sectohz(SUSPEND_TOUT),
 779  779                              TR_CLOCK_TICK);
 780  780                          if ((pp->e_busy == ECPP_BUSY) ||
 781  781                              (pp->e_busy == ECPP_FLUSH)) {
 782  782                                  pp->suspended = FALSE;
 783  783                                  mutex_exit(&pp->umutex);
 784  784                                  ecpp_error(pp->dip,
 785  785                                      "ecpp_detach: suspend timeout\n");
 786  786                                  return (DDI_FAILURE);
 787  787                          }
 788  788                  }
↓ open down ↓ 2008 lines elided ↑ open up ↑
2797 2797  
2798 2798                  if (ecpp_init_dma_xfer(pp, addr, len) == FAILURE) {
2799 2799                          return;
2800 2800                  }
2801 2801  
2802 2802                  break;
2803 2803          }
2804 2804  
2805 2805          /* schedule transfer timeout */
2806 2806          pp->timeout_id = timeout(ecpp_xfer_timeout, (caddr_t)pp,
2807      -            pp->xfer_parms.write_timeout * drv_usectohz(1000000));
     2807 +            drv_sectohz(pp->xfer_parms.write_timeout));
2808 2808  }
2809 2809  
2810 2810  /*
2811 2811   * Transfer a PIO "block" a byte at a time.
2812 2812   * The block is starts at addr and ends at pp->last_byte
2813 2813   */
2814 2814  static uint8_t
2815 2815  ecpp_prep_pio_xfer(struct ecppunit *pp, caddr_t addr, size_t len)
2816 2816  {
2817 2817          pp->next_byte = addr;
↓ open down ↓ 3567 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX