Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/sata/adapters/ahci/ahci.c
          +++ new/usr/src/uts/common/io/sata/adapters/ahci/ahci.c
↓ open down ↓ 449 lines elided ↑ open up ↑
 450  450  
 451  451          if ((ret = sata_hba_init(&modlinkage)) != 0) {
 452  452  #if AHCI_DEBUG
 453  453                  mutex_destroy(&ahci_log_mutex);
 454  454  #endif
 455  455                  ddi_soft_state_fini(&ahci_statep);
 456  456                  goto err_out;
 457  457          }
 458  458  
 459  459          /* watchdog tick */
 460      -        ahci_watchdog_tick = drv_usectohz(
 461      -            (clock_t)ahci_watchdog_timeout * 1000000);
      460 +        ahci_watchdog_tick = drv_sectohz(ahci_watchdog_timeout);
 462  461  
 463  462          ret = mod_install(&modlinkage);
 464  463          if (ret != 0) {
 465  464                  sata_hba_fini(&modlinkage);
 466  465  #if AHCI_DEBUG
 467  466                  mutex_destroy(&ahci_log_mutex);
 468  467  #endif
 469  468                  ddi_soft_state_fini(&ahci_statep);
 470  469                  goto err_out;
 471  470          }
↓ open down ↓ 1333 lines elided ↑ open up ↑
1805 1804  
1806 1805          if (spkt->satapkt_op_mode & SATA_OPMODE_POLLING) {
1807 1806                  ahci_portp->ahciport_flags |= AHCI_PORT_FLAG_POLLING;
1808 1807                  if ((rval = ahci_deliver_satapkt(ahci_ctlp, ahci_portp,
1809 1808                      addrp, spkt)) == AHCI_FAILURE) {
1810 1809                          ahci_portp->ahciport_flags &= ~AHCI_PORT_FLAG_POLLING;
1811 1810                          return (rval);
1812 1811                  }
1813 1812  
1814 1813                  pkt_timeout_ticks =
1815      -                    drv_usectohz((clock_t)spkt->satapkt_time * 1000000);
     1814 +                    drv_sectohz((clock_t)spkt->satapkt_time);
1816 1815  
1817 1816                  while (spkt->satapkt_reason == SATA_PKT_BUSY) {
1818 1817                          mutex_exit(&ahci_portp->ahciport_mutex);
1819 1818  
1820 1819                          /* Simulate the interrupt */
1821 1820                          ahci_port_intr(ahci_ctlp, ahci_portp, port);
1822 1821  
1823 1822                          drv_usecwait(AHCI_10MS_USECS);
1824 1823  
1825 1824                          mutex_enter(&ahci_portp->ahciport_mutex);
↓ open down ↓ 8499 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX