Changeset 5f97ef44 in mainline for uspace/drv/nic


Ignore:
Timestamp:
2018-07-13T14:10:15Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e3787a0
Parents:
9912f49
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-13 14:08:57)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-13 14:10:15)
Message:

Sleep is more natural as part of the fibril API.
(the implementation will move later)

Location:
uspace/drv/nic
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/ar9271/ar9271.c

    r9912f49 r5f97ef44  
    829829
    830830        /* Wait until firmware is ready - wait for 1 second to be sure. */
    831         async_sleep(1);
     831        fibril_sleep(1);
    832832
    833833        return rc;
  • uspace/drv/nic/e1k/e1k.c

    r9912f49 r5f97ef44  
    372372                fibril_mutex_unlock(&e1000->ctrl_lock);
    373373
    374                 async_usleep(10);
     374                fibril_usleep(10);
    375375
    376376                fibril_mutex_lock(&e1000->ctrl_lock);
     
    17261726
    17271727        /* Wait for the reset */
    1728         async_usleep(20);
     1728        fibril_usleep(20);
    17291729
    17301730        /* check if RST_BIT cleared */
     
    18141814         * transfers to descriptors.
    18151815         */
    1816         async_usleep(100);
     1816        fibril_usleep(100);
    18171817
    18181818        return EOK;
     
    22402240        uint32_t eerd = E1000_REG_READ(e1000, E1000_EERD);
    22412241        while ((eerd & e1000->info.eerd_done) == 0) {
    2242                 async_usleep(1);
     2242                fibril_usleep(1);
    22432243                eerd = E1000_REG_READ(e1000, E1000_EERD);
    22442244        }
  • uspace/drv/nic/ne2k/dp8390.c

    r9912f49 r5f97ef44  
    172172        /* Reset the ethernet card */
    173173        uint8_t val = pio_read_8(ne2k->port + NE2K_RESET);
    174         async_usleep(2000);
     174        fibril_usleep(2000);
    175175        pio_write_8(ne2k->port + NE2K_RESET, val);
    176         async_usleep(2000);
     176        fibril_usleep(2000);
    177177
    178178        /* Reset the DP8390 */
  • uspace/drv/nic/rtl8139/driver.c

    r9912f49 r5f97ef44  
    440440        memory_barrier();
    441441        while (pio_read_8(io_base + CR) & CR_RST) {
    442                 async_usleep(1);
     442                fibril_usleep(1);
    443443                read_barrier();
    444444        }
  • uspace/drv/nic/rtl8169/driver.c

    r9912f49 r5f97ef44  
    767767        memory_barrier();
    768768        while (pio_read_8(rtl8169->regs + CR) & CR_RST) {
    769                 async_usleep(1);
     769                fibril_usleep(1);
    770770                read_barrier();
    771771        }
     
    11801180        do {
    11811181                phyar = pio_read_32(rtl8169->regs + PHYAR);
    1182                 async_usleep(20);
     1182                fibril_usleep(20);
    11831183        } while ((phyar & PHYAR_RW_WRITE) == 0);
    11841184
     
    11981198        do {
    11991199                phyar = pio_read_32(rtl8169->regs + PHYAR);
    1200                 async_usleep(20);
     1200                fibril_usleep(20);
    12011201        } while ((phyar & PHYAR_RW_WRITE) != 0);
    12021202
    1203         async_usleep(20);
     1203        fibril_usleep(20);
    12041204}
    12051205
Note: See TracChangeset for help on using the changeset viewer.