Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun/io/fd.c
          +++ new/usr/src/uts/sun/io/fd.c
↓ open down ↓ 3781 lines elided ↑ open up ↑
3782 3782  
3783 3783          }
3784 3784  
3785 3785  
3786 3786          /*
3787 3787           * Start watchdog timer on data transfer type commands - required
3788 3788           * in case a diskette is not present or is unformatted
3789 3789           */
3790 3790          if (csb->csb_opflags & CSB_OFTIMEIT) {
3791 3791                  fdc->c_timeid = timeout(fdwatch, a,
3792      -                    tosec * drv_usectohz(1000000));
     3792 +                    drv_sectohz(tosec));
3793 3793          }
3794 3794  
3795 3795          FDERRPRINT(FDEP_L1, FDEM_EXEC,
3796 3796              (C, "fdexec: cmd sent, Msr 0x%x\n", Msr(fdc)));
3797 3797  
3798 3798          /* If the operation has no results - then just return */
3799 3799          if (csb->csb_opflags & CSB_OFNORESULTS) {
3800 3800                  if (fdc->c_fdtype & FDCTYPE_82077) {
3801 3801                          if (fdc->c_mtimeid == 0) {
3802 3802                                  fdc->c_mtimeid = timeout(fdmotoff, a,
↓ open down ↓ 1032 lines elided ↑ open up ↑
4835 4835                   * interrupts.
4836 4836                   */
4837 4837                  /* LINTED */
4838 4838                  Set_dor(fdc, DMAGATE|RESET, 1);
4839 4839  
4840 4840                  FDERRPRINT(FDEP_L1, FDEM_ATTA,
4841 4841                      (C, "fdattach: Dor 0x%x\n", Dor(fdc)));
4842 4842  
4843 4843                  local_lbolt = ddi_get_lbolt();
4844 4844                  if (cv_timedwait(&fdc->c_iocv, &fdc->c_lolock,
4845      -                    local_lbolt + drv_usectohz(1000000)) == -1) {
     4845 +                    local_lbolt + drv_sectohz(1)) == -1) {
4846 4846                          return (-1);
4847 4847                  }
4848 4848                  break;
4849 4849  
4850 4850          default:
4851 4851                  fdc->c_flags |= FDCFLG_WAITING;
4852 4852  
4853 4853                  /*
4854 4854                   * A timed wait is not used because it's possible for the timer
4855 4855                   * to go off before the controller has a chance to interrupt.
↓ open down ↓ 1725 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX