Lines Matching +full:report +full:- +full:speed +full:- +full:hz

1 /*-
2 * SPDX-License-Identifier: BSD-4-Clause
21 * 4. Neither the name of the author nor the names of any co-contributors
57 * the station address and a 64-bit multicast hash table. The chip supports
60 * Since the maximum data transfer speed of USB is supposed to be 12Mbps,
319 err = uether_do_request(&sc->sc_ue, &req, &val, 1000); in aue_csr_read_1()
338 err = uether_do_request(&sc->sc_ue, &req, &val, 1000); in aue_csr_read_2()
356 if (uether_do_request(&sc->sc_ue, &req, &val, 1000)) { in aue_csr_write_1()
374 if (uether_do_request(&sc->sc_ue, &req, &val, 1000)) { in aue_csr_write_2()
393 if (uether_pause(&sc->sc_ue, hz / 100)) in aue_eeprom_getword()
398 device_printf(sc->sc_ue.ue_dev, "EEPROM read timed out\n"); in aue_eeprom_getword()
426 locked = mtx_owned(&sc->sc_mtx); in aue_miibus_readreg()
437 if (sc->sc_flags & AUE_FLAG_DUAL_PHY) { in aue_miibus_readreg()
451 if (uether_pause(&sc->sc_ue, hz / 100)) in aue_miibus_readreg()
456 device_printf(sc->sc_ue.ue_dev, "MII read timed out\n"); in aue_miibus_readreg()
476 locked = mtx_owned(&sc->sc_mtx); in aue_miibus_writereg()
487 if (uether_pause(&sc->sc_ue, hz / 100)) in aue_miibus_writereg()
492 device_printf(sc->sc_ue.ue_dev, "MII write timed out\n"); in aue_miibus_writereg()
506 locked = mtx_owned(&sc->sc_mtx); in aue_miibus_statchg()
511 if (IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX) in aue_miibus_statchg()
516 if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) in aue_miibus_statchg()
528 if (sc->sc_flags & AUE_FLAG_LSYS) { in aue_miibus_statchg()
545 h = ether_crc32_le(LLADDR(sdl), ETHER_ADDR_LEN) & ((1 << AUE_BITS) - 1); in aue_hash_maddr()
583 if ((sc->sc_flags & HAS_HOME_PNA) && mii_mode) in aue_reset_pegasus_II()
600 if (uether_pause(&sc->sc_ue, hz / 100)) in aue_reset()
605 device_printf(sc->sc_ue.ue_dev, "reset failed\n"); in aue_reset()
616 * power-down configuration line of the PHY at the same time in aue_reset()
622 if (sc->sc_flags & AUE_FLAG_LSYS) { in aue_reset()
628 if (sc->sc_flags & AUE_FLAG_PII) in aue_reset()
632 uether_pause(&sc->sc_ue, hz / 100); in aue_reset()
644 aue_read_mac(sc, ue->ue_eaddr); in aue_attach_post()
655 if (uaa->usb_mode != USB_MODE_HOST) in aue_probe()
657 if (uaa->info.bConfigIndex != AUE_CONFIG_INDEX) in aue_probe()
659 if (uaa->info.bIfaceIndex != AUE_IFACE_IDX) in aue_probe()
666 if (uaa->info.idVendor == USB_VENDOR_BELKIN && in aue_probe()
667 uaa->info.idProduct == USB_PRODUCT_BELKIN_F8T012 && in aue_probe()
668 uaa->info.bcdDevice == 0x0413) in aue_probe()
683 struct usb_ether *ue = &sc->sc_ue; in aue_attach()
687 sc->sc_flags = USB_GET_DRIVER_INFO(uaa); in aue_attach()
689 if (uaa->info.bcdDevice >= 0x0201) { in aue_attach()
691 sc->sc_flags |= AUE_FLAG_VER_2; in aue_attach()
695 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); in aue_attach()
698 error = usbd_transfer_setup(uaa->device, &iface_index, in aue_attach()
699 sc->sc_xfer, aue_config, AUE_N_TRANSFER, in aue_attach()
700 sc, &sc->sc_mtx); in aue_attach()
706 ue->ue_sc = sc; in aue_attach()
707 ue->ue_dev = dev; in aue_attach()
708 ue->ue_udev = uaa->device; in aue_attach()
709 ue->ue_mtx = &sc->sc_mtx; in aue_attach()
710 ue->ue_methods = &aue_ue_methods; in aue_attach()
728 struct usb_ether *ue = &sc->sc_ue; in aue_detach()
730 usbd_transfer_unsetup(sc->sc_xfer, AUE_N_TRANSFER); in aue_detach()
732 mtx_destroy(&sc->sc_mtx); in aue_detach()
741 if_t ifp = uether_getifp(&sc->sc_ue); in aue_intr_callback()
783 struct usb_ether *ue = &sc->sc_ue; in aue_bulk_read_callback()
796 if (sc->sc_flags & AUE_FLAG_VER_2) { in aue_bulk_read_callback()
806 usbd_copy_out(pc, actlen - sizeof(stat), &stat, in aue_bulk_read_callback()
810 * turn off all the non-error bits in the rx status in aue_bulk_read_callback()
819 actlen -= (sizeof(stat) + ETHER_CRC_LEN); in aue_bulk_read_callback()
848 if_t ifp = uether_getifp(&sc->sc_ue); in aue_bulk_write_callback()
865 if ((sc->sc_flags & AUE_FLAG_LINK) == 0) { in aue_bulk_write_callback()
875 if (m->m_pkthdr.len > MCLBYTES) in aue_bulk_write_callback()
876 m->m_pkthdr.len = MCLBYTES; in aue_bulk_write_callback()
877 if (sc->sc_flags & AUE_FLAG_VER_2) { in aue_bulk_write_callback()
878 usbd_xfer_set_frame_len(xfer, 0, m->m_pkthdr.len); in aue_bulk_write_callback()
880 usbd_m_copy_in(pc, 0, m, 0, m->m_pkthdr.len); in aue_bulk_write_callback()
883 usbd_xfer_set_frame_len(xfer, 0, (m->m_pkthdr.len + 2)); in aue_bulk_write_callback()
893 buf[0] = (uint8_t)(m->m_pkthdr.len); in aue_bulk_write_callback()
894 buf[1] = (uint8_t)(m->m_pkthdr.len >> 8); in aue_bulk_write_callback()
897 usbd_m_copy_in(pc, 2, m, 0, m->m_pkthdr.len); in aue_bulk_write_callback()
935 if ((sc->sc_flags & AUE_FLAG_LINK) == 0 in aue_tick()
936 && mii->mii_media_status & IFM_ACTIVE && in aue_tick()
937 IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { in aue_tick()
938 sc->sc_flags |= AUE_FLAG_LINK; in aue_tick()
951 usbd_transfer_start(sc->sc_xfer[AUE_INTR_DT_RD]); in aue_start()
952 usbd_transfer_start(sc->sc_xfer[AUE_BULK_DT_RD]); in aue_start()
953 usbd_transfer_start(sc->sc_xfer[AUE_BULK_DT_WR]); in aue_start()
985 usbd_xfer_set_stall(sc->sc_xfer[AUE_BULK_DT_WR]); in aue_init()
1019 sc->sc_flags &= ~AUE_FLAG_LINK; in aue_ifmedia_upd()
1020 LIST_FOREACH(miisc, &mii->mii_phys, mii_list) in aue_ifmedia_upd()
1027 * Report current media status.
1037 ifmr->ifm_active = mii->mii_media_active; in aue_ifmedia_sts()
1038 ifmr->ifm_status = mii->mii_media_status; in aue_ifmedia_sts()
1055 sc->sc_flags &= ~AUE_FLAG_LINK; in aue_stop()
1060 usbd_transfer_stop(sc->sc_xfer[AUE_BULK_DT_WR]); in aue_stop()
1061 usbd_transfer_stop(sc->sc_xfer[AUE_BULK_DT_RD]); in aue_stop()
1062 usbd_transfer_stop(sc->sc_xfer[AUE_INTR_DT_RD]); in aue_stop()