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
56 * the station address and a 64-bit multicast hash table. The chip supports
59 * Since the maximum data transfer speed of USB is supposed to be 12Mbps,
318 err = uether_do_request(&sc->sc_ue, &req, &val, 1000); in aue_csr_read_1()
337 err = uether_do_request(&sc->sc_ue, &req, &val, 1000); in aue_csr_read_2()
355 if (uether_do_request(&sc->sc_ue, &req, &val, 1000)) { in aue_csr_write_1()
373 if (uether_do_request(&sc->sc_ue, &req, &val, 1000)) { in aue_csr_write_2()
392 if (uether_pause(&sc->sc_ue, hz / 100)) in aue_eeprom_getword()
397 device_printf(sc->sc_ue.ue_dev, "EEPROM read timed out\n"); in aue_eeprom_getword()
425 locked = mtx_owned(&sc->sc_mtx); in aue_miibus_readreg()
436 if (sc->sc_flags & AUE_FLAG_DUAL_PHY) { in aue_miibus_readreg()
450 if (uether_pause(&sc->sc_ue, hz / 100)) in aue_miibus_readreg()
455 device_printf(sc->sc_ue.ue_dev, "MII read timed out\n"); in aue_miibus_readreg()
475 locked = mtx_owned(&sc->sc_mtx); in aue_miibus_writereg()
486 if (uether_pause(&sc->sc_ue, hz / 100)) in aue_miibus_writereg()
491 device_printf(sc->sc_ue.ue_dev, "MII write timed out\n"); in aue_miibus_writereg()
505 locked = mtx_owned(&sc->sc_mtx); in aue_miibus_statchg()
510 if (IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX) in aue_miibus_statchg()
515 if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) in aue_miibus_statchg()
527 if (sc->sc_flags & AUE_FLAG_LSYS) { in aue_miibus_statchg()
544 h = ether_crc32_le(LLADDR(sdl), ETHER_ADDR_LEN) & ((1 << AUE_BITS) - 1); in aue_hash_maddr()
582 if ((sc->sc_flags & HAS_HOME_PNA) && mii_mode) in aue_reset_pegasus_II()
599 if (uether_pause(&sc->sc_ue, hz / 100)) in aue_reset()
604 device_printf(sc->sc_ue.ue_dev, "reset failed\n"); in aue_reset()
615 * power-down configuration line of the PHY at the same time in aue_reset()
621 if (sc->sc_flags & AUE_FLAG_LSYS) { in aue_reset()
627 if (sc->sc_flags & AUE_FLAG_PII) in aue_reset()
631 uether_pause(&sc->sc_ue, hz / 100); in aue_reset()
643 aue_read_mac(sc, ue->ue_eaddr); in aue_attach_post()
654 if (uaa->usb_mode != USB_MODE_HOST) in aue_probe()
656 if (uaa->info.bConfigIndex != AUE_CONFIG_INDEX) in aue_probe()
658 if (uaa->info.bIfaceIndex != AUE_IFACE_IDX) in aue_probe()
665 if (uaa->info.idVendor == USB_VENDOR_BELKIN && in aue_probe()
666 uaa->info.idProduct == USB_PRODUCT_BELKIN_F8T012 && in aue_probe()
667 uaa->info.bcdDevice == 0x0413) in aue_probe()
682 struct usb_ether *ue = &sc->sc_ue; in aue_attach()
686 sc->sc_flags = USB_GET_DRIVER_INFO(uaa); in aue_attach()
688 if (uaa->info.bcdDevice >= 0x0201) { in aue_attach()
690 sc->sc_flags |= AUE_FLAG_VER_2; in aue_attach()
694 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); in aue_attach()
697 error = usbd_transfer_setup(uaa->device, &iface_index, in aue_attach()
698 sc->sc_xfer, aue_config, AUE_N_TRANSFER, in aue_attach()
699 sc, &sc->sc_mtx); in aue_attach()
705 ue->ue_sc = sc; in aue_attach()
706 ue->ue_dev = dev; in aue_attach()
707 ue->ue_udev = uaa->device; in aue_attach()
708 ue->ue_mtx = &sc->sc_mtx; in aue_attach()
709 ue->ue_methods = &aue_ue_methods; in aue_attach()
727 struct usb_ether *ue = &sc->sc_ue; in aue_detach()
729 usbd_transfer_unsetup(sc->sc_xfer, AUE_N_TRANSFER); in aue_detach()
731 mtx_destroy(&sc->sc_mtx); in aue_detach()
740 if_t ifp = uether_getifp(&sc->sc_ue); in aue_intr_callback()
782 struct usb_ether *ue = &sc->sc_ue; in aue_bulk_read_callback()
795 if (sc->sc_flags & AUE_FLAG_VER_2) { in aue_bulk_read_callback()
805 usbd_copy_out(pc, actlen - sizeof(stat), &stat, in aue_bulk_read_callback()
809 * turn off all the non-error bits in the rx status in aue_bulk_read_callback()
818 actlen -= (sizeof(stat) + ETHER_CRC_LEN); in aue_bulk_read_callback()
847 if_t ifp = uether_getifp(&sc->sc_ue); in aue_bulk_write_callback()
864 if ((sc->sc_flags & AUE_FLAG_LINK) == 0) { in aue_bulk_write_callback()
874 if (m->m_pkthdr.len > MCLBYTES) in aue_bulk_write_callback()
875 m->m_pkthdr.len = MCLBYTES; in aue_bulk_write_callback()
876 if (sc->sc_flags & AUE_FLAG_VER_2) { in aue_bulk_write_callback()
877 usbd_xfer_set_frame_len(xfer, 0, m->m_pkthdr.len); in aue_bulk_write_callback()
879 usbd_m_copy_in(pc, 0, m, 0, m->m_pkthdr.len); in aue_bulk_write_callback()
882 usbd_xfer_set_frame_len(xfer, 0, (m->m_pkthdr.len + 2)); in aue_bulk_write_callback()
892 buf[0] = (uint8_t)(m->m_pkthdr.len); in aue_bulk_write_callback()
893 buf[1] = (uint8_t)(m->m_pkthdr.len >> 8); in aue_bulk_write_callback()
896 usbd_m_copy_in(pc, 2, m, 0, m->m_pkthdr.len); in aue_bulk_write_callback()
934 if ((sc->sc_flags & AUE_FLAG_LINK) == 0 in aue_tick()
935 && mii->mii_media_status & IFM_ACTIVE && in aue_tick()
936 IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { in aue_tick()
937 sc->sc_flags |= AUE_FLAG_LINK; in aue_tick()
950 usbd_transfer_start(sc->sc_xfer[AUE_INTR_DT_RD]); in aue_start()
951 usbd_transfer_start(sc->sc_xfer[AUE_BULK_DT_RD]); in aue_start()
952 usbd_transfer_start(sc->sc_xfer[AUE_BULK_DT_WR]); in aue_start()
984 usbd_xfer_set_stall(sc->sc_xfer[AUE_BULK_DT_WR]); in aue_init()
1018 sc->sc_flags &= ~AUE_FLAG_LINK; in aue_ifmedia_upd()
1019 LIST_FOREACH(miisc, &mii->mii_phys, mii_list) in aue_ifmedia_upd()
1026 * Report current media status.
1036 ifmr->ifm_active = mii->mii_media_active; in aue_ifmedia_sts()
1037 ifmr->ifm_status = mii->mii_media_status; in aue_ifmedia_sts()
1054 sc->sc_flags &= ~AUE_FLAG_LINK; in aue_stop()
1059 usbd_transfer_stop(sc->sc_xfer[AUE_BULK_DT_WR]); in aue_stop()
1060 usbd_transfer_stop(sc->sc_xfer[AUE_BULK_DT_RD]); in aue_stop()
1061 usbd_transfer_stop(sc->sc_xfer[AUE_INTR_DT_RD]); in aue_stop()