Lines Matching +full:0 +full:x8200

122  *	0	2048 bytes
137 static int axe_debug = 0;
139 static SYSCTL_NODE(_hw_usb, OID_AUTO, axe, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
141 SYSCTL_INT(_hw_usb_axe, OID_AUTO, debug, CTLFLAG_RWTUN, &axe_debug, 0,
150 AXE_DEV(ABOCOM, UF200, 0),
151 AXE_DEV(ACERCM, EP1427X2, 0),
153 AXE_DEV(ASIX, AX88172, 0),
159 AXE_DEV(ATEN, UC210T, 0),
161 AXE_DEV(BILLIONTON, USB2AR, 0),
163 AXE_DEV(COREGA, FETHER_USB2_TX, 0),
164 AXE_DEV(DLINK, DUBE100, 0),
167 AXE_DEV(GOODWAY, GWUSB2E, 0),
169 AXE_DEV(JVC, MP_PRX1, 0),
171 AXE_DEV(LINKSYS2, USB200M, 0),
174 AXE_DEV(MELCO, LUAU2KTX, 0),
176 AXE_DEV(NETGEAR, FA120, 0),
179 AXE_DEV(SITECOM, LN029, 0),
182 AXE_DEV(SYSTEMTALKS, SGCX2UL, 0),
240 .timeout = 0, /* no timeout */
245 { 0x8000, 0x8001, 2048 },
246 { 0x8100, 0x8147, 4096},
247 { 0x8200, 0x81EB, 6144},
248 { 0x8300, 0x83D7, 8192},
249 { 0x8400, 0x851E, 16384},
250 { 0x8500, 0x8666, 20480},
251 { 0x8600, 0x87AE, 24576},
252 { 0x8700, 0x8A3D, 32768}
276 DRIVER_MODULE(miibus, axe, miibus_driver, 0, 0);
329 axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL); in axe_miibus_readreg()
331 axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL); in axe_miibus_readreg()
360 axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL); in axe_miibus_writereg()
362 axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL); in axe_miibus_writereg()
366 return (0); in axe_miibus_writereg()
384 (if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) in axe_miibus_statchg()
396 if ((sc->sc_flags & AXE_FLAG_178) == 0) in axe_miibus_statchg()
406 if ((sc->sc_flags & AXE_FLAG_LINK) == 0) in axe_miibus_statchg()
409 val = 0; in axe_miibus_statchg()
410 if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { in axe_miibus_statchg()
414 IFM_ETH_TXPAUSE) != 0) in axe_miibus_statchg()
417 IFM_ETH_RXPAUSE) != 0) in axe_miibus_statchg()
423 if ((sc->sc_flags & AXE_FLAG_178) != 0) in axe_miibus_statchg()
437 err = axe_cmd(sc, AXE_CMD_WRITE_MEDIA, 0, val, NULL); in axe_miibus_statchg()
498 uint8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; in axe_setmulti()
502 axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, &rxmode); in axe_setmulti()
507 axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL); in axe_setmulti()
514 axe_cmd(sc, AXE_CMD_WRITE_MCAST, 0, 0, (void *)&hashtbl); in axe_setmulti()
515 axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL); in axe_setmulti()
543 axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, (x), NULL); \
545 } while (0)
555 axe_cmd(sc, AXE_CMD_SROM_WR_ENABLE, 0, 0, NULL); in axe_ax88178_init()
557 axe_cmd(sc, AXE_CMD_SROM_READ, 0, 0x0017, &eeprom); in axe_ax88178_init()
559 axe_cmd(sc, AXE_CMD_SROM_WR_DISABLE, 0, 0, NULL); in axe_ax88178_init()
562 if (eeprom == 0xffff) { in axe_ax88178_init()
565 ledmode = 0; in axe_ax88178_init()
567 phymode = eeprom & 0x7f; in axe_ax88178_init()
568 gpio0 = (eeprom & 0x80) ? 0 : 1; in axe_ax88178_init()
574 "EEPROM data : 0x%04x, phymode : 0x%02x\n", eeprom, in axe_ax88178_init()
634 0x1F, 0x0005); in axe_ax88178_init()
636 0x0C, 0x0000); in axe_ax88178_init()
638 0x0001); in axe_ax88178_init()
640 0x01, val | 0x0080); in axe_ax88178_init()
642 0x1F, 0x0000); in axe_ax88178_init()
651 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_CLEAR, NULL); in axe_ax88178_init()
654 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, in axe_ax88178_init()
658 axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, 0, NULL); in axe_ax88178_init()
661 axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, 0, NULL); in axe_ax88178_init()
667 axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x00b0, NULL); in axe_ax88772_init()
672 axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, 0x01, NULL); in axe_ax88772_init()
676 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, in axe_ax88772_init()
681 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, in axe_ax88772_init()
686 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_PRL, NULL); in axe_ax88772_init()
689 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, in axe_ax88772_init()
693 axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, 0x00, NULL); in axe_ax88772_init()
697 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, in axe_ax88772_init()
702 axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, 0, NULL); in axe_ax88772_init()
710 axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, AXE_SW_PHY_SELECT_SS_ENB | in axe_ax88772_phywake()
719 axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, AXE_SW_PHY_SELECT_SS_ENB | in axe_ax88772_phywake()
724 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_IPPD | in axe_ax88772_phywake()
727 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_IPRL, NULL); in axe_ax88772_phywake()
729 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_CLEAR, NULL); in axe_ax88772_phywake()
731 axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_IPRL, NULL); in axe_ax88772_phywake()
745 axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, 0, NULL); in axe_ax88772a_init()
763 axe_cmd(sc, AXE_CMD_SROM_READ, 0, AXE_EEPROM_772B_PHY_PWRCFG, &eeprom); in axe_ax88772b_init()
764 sc->sc_pwrcfg = le16toh(eeprom) & 0xFF00; in axe_ax88772b_init()
772 for (i = 0; i < ETHER_ADDR_LEN / 2; i++) { in axe_ax88772b_init()
773 axe_cmd(sc, AXE_CMD_SROM_READ, 0, AXE_EEPROM_772B_NODE_ID + i, in axe_ax88772b_init()
776 *eaddr++ = (uint8_t)(eeprom & 0xFF); in axe_ax88772b_init()
777 *eaddr++ = (uint8_t)((eeprom >> 8) & 0xFF); in axe_ax88772b_init()
782 axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, 0, NULL); in axe_ax88772b_init()
822 axe_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, sc->sc_phyaddrs); in axe_attach_post()
824 device_printf(sc->sc_ue.ue_dev, "PHYADDR 0x%02x:0x%02x\n", in axe_attach_post()
825 sc->sc_phyaddrs[0], sc->sc_phyaddrs[1]); in axe_attach_post()
831 "no valid PHY address found, assuming PHY address 0\n"); in axe_attach_post()
832 sc->sc_phyno = 0; in axe_attach_post()
838 axe_cmd(sc, AXE_178_CMD_READ_NODEID, 0, 0, ue->ue_eaddr); in axe_attach_post()
841 axe_cmd(sc, AXE_178_CMD_READ_NODEID, 0, 0, ue->ue_eaddr); in axe_attach_post()
844 axe_cmd(sc, AXE_178_CMD_READ_NODEID, 0, 0, ue->ue_eaddr); in axe_attach_post()
848 axe_cmd(sc, AXE_172_CMD_READ_NODEID, 0, 0, ue->ue_eaddr); in axe_attach_post()
855 sc->sc_ipgs[0] = 0x15; in axe_attach_post()
856 sc->sc_ipgs[1] = 0x16; in axe_attach_post()
857 sc->sc_ipgs[2] = 0x1A; in axe_attach_post()
859 axe_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, sc->sc_ipgs); in axe_attach_post()
880 if_setcapabilitiesbit(ifp, IFCAP_VLAN_MTU, 0); in axe_attach_post_sub()
882 if_setcapabilitiesbit(ifp, IFCAP_TXCSUM | IFCAP_RXCSUM, 0); in axe_attach_post_sub()
898 adv_pause = 0; in axe_attach_post_sub()
964 return (0); /* success */ in axe_attach()
981 return (0); in axe_detach()
984 #if (AXE_BULK_BUF_SIZE >= 0x10000)
1000 pc = usbd_xfer_get_frame(xfer, 0); in axe_bulk_read_callback()
1006 usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); in axe_bulk_read_callback()
1032 pos = 0; in axe_rx_frame()
1033 len = 0; in axe_rx_frame()
1034 error = 0; in axe_rx_frame()
1035 if ((sc->sc_flags & AXE_FLAG_STD_FRAME) != 0) { in axe_rx_frame()
1059 } else if ((sc->sc_flags & AXE_FLAG_CSUM_FRAME) != 0) { in axe_rx_frame()
1095 axe_rxeof(ue, pc, 0, actlen, NULL); in axe_rx_frame()
1097 if (error != 0) in axe_rx_frame()
1130 AXE_CSUM_HDR_L3_CSUM_ERR)) == 0) { in axe_rxeof()
1139 m->m_pkthdr.csum_data = 0xffff; in axe_rxeof()
1145 return (0); in axe_rxeof()
1148 #if ((AXE_BULK_BUF_SIZE >= 0x10000) || (AXE_BULK_BUF_SIZE < (MCLBYTES+4)))
1165 if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); in axe_bulk_write_callback()
1169 if ((sc->sc_flags & AXE_FLAG_LINK) == 0 || in axe_bulk_write_callback()
1170 (if_getdrvflags(ifp) & IFF_DRV_OACTIVE) != 0) { in axe_bulk_write_callback()
1178 for (nframes = 0; nframes < 16 && in axe_bulk_write_callback()
1185 pos = 0; in axe_bulk_write_callback()
1198 AXE_CSUM_FEATURES) != 0) in axe_bulk_write_callback()
1207 usbd_m_copy_in(pc, pos, m, 0, m->m_pkthdr.len); in axe_bulk_write_callback()
1209 if ((pos % 512) == 0) { in axe_bulk_write_callback()
1210 hdr.len = 0; in axe_bulk_write_callback()
1211 hdr.ilen = 0xffff; in axe_bulk_write_callback()
1217 usbd_m_copy_in(pc, pos, m, 0, m->m_pkthdr.len); in axe_bulk_write_callback()
1243 if (nframes != 0) { in axe_bulk_write_callback()
1246 if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); in axe_bulk_write_callback()
1255 if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); in axe_bulk_write_callback()
1275 if ((sc->sc_flags & AXE_FLAG_LINK) == 0) { in axe_tick()
1277 if ((sc->sc_flags & AXE_FLAG_LINK) != 0) in axe_tick()
1304 if ((sc->sc_flags & AXE_FLAG_772B) != 0) { in axe_csum_cfg()
1306 csum1 = 0; in axe_csum_cfg()
1307 csum2 = 0; in axe_csum_cfg()
1308 if ((if_getcapenable(ifp) & IFCAP_TXCSUM) != 0) in axe_csum_cfg()
1312 csum1 = 0; in axe_csum_cfg()
1313 csum2 = 0; in axe_csum_cfg()
1314 if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) in axe_csum_cfg()
1331 if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) in axe_init()
1341 axe_cmd(sc, AXE_178_CMD_WRITE_NODEID, 0, 0, if_getlladdr(ifp)); in axe_init()
1343 (sc->sc_ipgs[1] << 8) | (sc->sc_ipgs[0]), NULL); in axe_init()
1345 axe_cmd(sc, AXE_172_CMD_WRITE_NODEID, 0, 0, if_getlladdr(ifp)); in axe_init()
1346 axe_cmd(sc, AXE_172_CMD_WRITE_IPG0, 0, sc->sc_ipgs[0], NULL); in axe_init()
1347 axe_cmd(sc, AXE_172_CMD_WRITE_IPG1, 0, sc->sc_ipgs[1], NULL); in axe_init()
1348 axe_cmd(sc, AXE_172_CMD_WRITE_IPG2, 0, sc->sc_ipgs[2], NULL); in axe_init()
1353 if ((sc->sc_flags & AXE_FLAG_772B) != 0 && in axe_init()
1354 (if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) { in axe_init()
1388 if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) in axe_init()
1408 axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL); in axe_init()
1415 if_setdrvflagbits(ifp, IFF_DRV_RUNNING, 0); in axe_init()
1427 axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, &rxmode); in axe_setpromisc()
1437 axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL); in axe_setpromisc()
1450 if_setdrvflagbits(ifp, 0, (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)); in axe_stop()
1470 error = 0; in axe_ioctl()
1471 reinit = 0; in axe_ioctl()
1475 if ((mask & IFCAP_TXCSUM) != 0 && in axe_ioctl()
1476 (if_getcapabilities(ifp) & IFCAP_TXCSUM) != 0) { in axe_ioctl()
1478 if ((if_getcapenable(ifp) & IFCAP_TXCSUM) != 0) in axe_ioctl()
1479 if_sethwassistbits(ifp, AXE_CSUM_FEATURES, 0); in axe_ioctl()
1481 if_sethwassistbits(ifp, 0, AXE_CSUM_FEATURES); in axe_ioctl()
1484 if ((mask & IFCAP_RXCSUM) != 0 && in axe_ioctl()
1485 (if_getcapabilities(ifp) & IFCAP_RXCSUM) != 0) { in axe_ioctl()
1489 if (reinit > 0 && if_getdrvflags(ifp) & IFF_DRV_RUNNING) in axe_ioctl()
1490 if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); in axe_ioctl()
1492 reinit = 0; in axe_ioctl()
1494 if (reinit > 0) in axe_ioctl()