Print this page
re #6892 rb1796 no ENXIO after clock validation in todpc_rtcget

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/io/todpc_subr.c
          +++ new/usr/src/uts/i86pc/io/todpc_subr.c
↓ open down ↓ 366 lines elided ↑ open up ↑
 367  367          for (;;) {
 368  368                  if (vrt_try-- < 0)
 369  369                          return (ENXIO);
 370  370                  outb(RTC_ADDR, RTC_D);          /* check if clock valid */
 371  371                  reg = inb(RTC_DATA);
 372  372                  if ((reg & RTC_VRT) != 0)
 373  373                          break;
 374  374                  drv_usecwait(5000);             /* Delay for 5000 us */
 375  375          }
 376  376  
 377      -
 378  377  checkuip:
 379  378          if (uip_try-- < 0)
 380  379                  return (EAGAIN);
 381  380          outb(RTC_ADDR, RTC_A);          /* check if update in progress */
 382  381          reg = inb(RTC_DATA);
 383  382          if (reg & RTC_UIP) {
 384  383                  tenmicrosec();
 385  384                  goto checkuip;
 386  385          }
 387  386  
↓ open down ↓ 91 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX