Changeset 200
- Timestamp:
- Oct 10, 2010, 12:28:20 PM (14 years ago)
- Location:
- freebsd-mos-driver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
freebsd-mos-driver/Makefile
r175 r200 26 26 core: 27 27 kgdb /usr/obj/usr/src/sys/GENERIC/kernel.debug `ls /var/crash/vmcore.* | tail -1` 28 29 ipload: load 30 sleep 5 31 ifconfig ue0 10.0.1.1/24 -
freebsd-mos-driver/if_mos.c
r199 r200 703 703 iface_index = MOS_IFACE_IDX; 704 704 error = usbd_transfer_setup(uaa->device, &iface_index, 705 sc->sc_xfer, mos_config, MOS_ CONFIG_NO,705 sc->sc_xfer, mos_config, MOS_ENDPT_MAX, 706 706 sc, &sc->sc_mtx); 707 707 … … 753 753 mos_chip_init(sc); 754 754 755 // ifp = GET_IFP(sc); 756 // ifp->if_softc = sc; 757 // ifp->if_flags = IFF_SIMPLEX | IFF_MULTICAST; 758 // ifp->if_ioctl = mos_ioctl; 759 // ifp->if_start = mos_start; 760 // ifp->if_watchdog = mos_watchdog; 761 // strlcpy(ifp->if_xname, sc->mos_dev.dv_xname, IFNAMSIZ); 762 763 // IFQ_SET_READY(&ifp->if_snd); 764 // ifp->if_capabilities = IFCAP_VLAN_MTU; 765 755 766 sc->mos_attached = 1; 756 767 } … … 762 773 struct usb_ether *ue = &sc->sc_ue; 763 774 764 usbd_transfer_unsetup(sc->sc_xfer, MOS_ CONFIG_NO);775 usbd_transfer_unsetup(sc->sc_xfer, MOS_ENDPT_MAX); 765 776 uether_ifdetach(ue); 766 777 mtx_destroy(&sc->sc_mtx); … … 806 817 /* evaluate status byte at the end */ 807 818 pktlen = actlen - 1; 808 //rxstat = stat[pktlen] & MOS_RXSTS_MASK; 809 if (stat != NULL) { 810 m_freem(stat); 811 } else { 812 DPRINTF("Potential NULL error\n"); 813 } 819 rxstat = stat->m_pktdat[pktlen] & MOS_RXSTS_MASK; 814 820 815 821 if (rxstat != MOS_RXSTS_VALID) { … … 1030 1036 struct mos_softc *sc = usbd_xfer_softc(xfer); 1031 1037 struct ifnet *ifp = uether_getifp(&sc->sc_ue); 1038 //struct usb_page_cache *pc; 1032 1039 int actlen; 1033 1040 1041 DPRINTF("%s: %s: enter\n", "mos", __func__); 1034 1042 ifp->if_oerrors++; 1035 1043 printf("%s: watchdog timeout\n", "mos"); … … 1038 1046 1039 1047 //XXX: Porting, how? mos_txeof(c->mos_xfer, c, stat); 1048 switch (USB_GET_STATE(xfer)) { 1049 case USB_ST_TRANSFERRED: 1050 //pc = usbd_xfer_get_frame(xfer, 0); 1051 //usbd_copy_out(pc, 0, &pkt, sizeof(pkt)); 1052 /* FALLTHROUGH */ 1053 case USB_ST_SETUP: 1054 tr_setup: 1055 usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); 1056 usbd_transfer_submit(xfer); 1057 return; 1058 default: /* Error */ 1059 if (error != USB_ERR_CANCELLED) { 1060 /* try to clear stall first */ 1061 usbd_xfer_set_stall(xfer); 1062 goto tr_setup; 1063 } 1064 return; 1065 } 1040 1066 } 1041 1067
Note:
See TracChangeset
for help on using the changeset viewer.