diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-01-20 07:38:33 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-01-20 07:38:33 +0000 |
commit | d5c9bbfbf2027c7efc9f44aee8f5cc459198b3f0 (patch) | |
tree | 605d3c9f2f783654045386042cd04f312155f047 /sys/dev/usb/uhcivar.h | |
parent | 6dea110be6b504383e7271cd0173acd492dea9e8 (diff) | |
download | FreeBSD-src-d5c9bbfbf2027c7efc9f44aee8f5cc459198b3f0.zip FreeBSD-src-d5c9bbfbf2027c7efc9f44aee8f5cc459198b3f0.tar.gz |
More USB ethernet tweaks:
- Sync ohci, uhci and usbdi modules with NetBSD in order to obtain the
following improvements:
o New USBD_NO_TSLEEP flag can be used in place of UQ_NO_TSLEEP
quirk. This allows drivers to specify busy waiting only for
certain transfers (namely control transfers for reading/writing
registers and stuff).
o New USBD_FORCE_SHORT_XFER flag can be used to deal with
devices like the ADMtek Pegasus that sense the end of bulk OUT
transfers in a special way (if a transfer is exactly a multiple
of 64 bytes in size, you need to send an extra empty packet
to terminate the transfer).
o usbd_open_pipe_intr() now accepts an interval argument which
can be used to change the rate at which the interrupt callback
routine is invoked. Specifying USBD_DEFAULT_INTERVAL uses the
value specified in the device's config data, but drivers can
override it if needed.
- Change if_aue to use USBD_FORCE_SHORT_XFER for packet transmissions.
- Change if_aue, if_kue and if_cue to use USBD_NO_TSLEEP for all
control transfers. We no longer force the non-tsleep hack for
bulk transfers since these are done asynchronously anyway.
- Removed quirk entry fiddling from if_aue and if_kue since we don't
need it anymore now that we have the USBD_NO_TSLEEP flag.
- Tweak ulpt, uhid, ums and ukbd drivers to use the new arg to
usbd_open_pipe_intr().
- Add a flag to the softc struct in the ethernet drivers to indicate
when a device has been detached, and use this flag to perform
tests to prevent the drivers from trying to do control transfers
if this is the case. This is necessary because calling if_detach()
with INET6 enabled will eventually result in a call to the driver's
ioctl() routine to delete the multicast groups on the interface,
which will result in attempts to perform control transfers. (It's
possible this also happens even without INET6 support enabled.) This
is pointless since we know that if the detach method has been called,
the hardware has been unplugged.
- Changed watchdog timeout routines to just call the driver init routines
to initialize the device states without trying to close and re-open the
pipes. This is partly because we don't want to frob things at interrupt
context, but also because this doesn't seem to work right and I don't
want to panic the system just because a USB device may have stopped
responding.
- Fix aue_rxeof() to be a little smarter about detecting when a double
transfer is needed. Unfortunately, the design of the chip makes it hard
to get this exactly right. Hopefully, this will go away once either
Nick or Lennart finds the bug in the uhci driver that makes this ugly
hack necessary.
- Also sync usbdevs with NetBSD.
Diffstat (limited to 'sys/dev/usb/uhcivar.h')
-rw-r--r-- | sys/dev/usb/uhcivar.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h index 682a495..82e4c1e 100644 --- a/sys/dev/usb/uhcivar.h +++ b/sys/dev/usb/uhcivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: uhcivar.h,v 1.16 1999/10/13 08:10:56 augustss Exp $ */ +/* $NetBSD: uhcivar.h,v 1.21 2000/01/18 20:11:01 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -92,7 +92,7 @@ struct uhci_soft_td { }; /* * Make the size such that it is a multiple of UHCI_TD_ALIGN. This way - * we can pack a number of soft TD together and have the real TS well + * we can pack a number of soft TD together and have the real TD well * aligned. * NOTE: Minimum size is 32 bytes. */ @@ -116,7 +116,7 @@ struct uhci_soft_qh { #define UHCI_SQH_CHUNK 128 /*(PAGE_SIZE / UHCI_QH_SIZE)*/ /* - * Information about an entry in the virtial frame list. + * Information about an entry in the virtual frame list. */ struct uhci_vframe { uhci_soft_td_t *htd; /* pointer to dummy TD */ @@ -140,31 +140,34 @@ typedef struct uhci_softc { uhci_soft_qh_t *sc_bulk_start; /* dummy QH for bulk */ uhci_soft_qh_t *sc_bulk_end; /* last bulk transfer */ - uhci_soft_td_t *sc_freetds; - uhci_soft_qh_t *sc_freeqhs; + uhci_soft_td_t *sc_freetds; /* TD free list */ + uhci_soft_qh_t *sc_freeqhs; /* QH free list */ + + SIMPLEQ_HEAD(, usbd_xfer) sc_free_xfers; /* free xfers */ u_int8_t sc_addr; /* device address */ u_int8_t sc_conf; /* device configuration */ char sc_isreset; - char sc_suspend; - usbd_xfer_handle sc_has_timo; LIST_HEAD(, uhci_intr_info) sc_intrhead; /* Info for the root hub interrupt channel. */ - int sc_ival; + int sc_ival; /* time between root hug intrs */ + usbd_xfer_handle sc_has_timo; /* root hub interrupt transfer */ - char sc_vflock; + char sc_vflock; /* for lock virtual frame list */ #define UHCI_HAS_LOCK 1 #define UHCI_WANT_LOCK 2 - char sc_vendor[16]; - int sc_id_vendor; + char sc_vendor[16]; /* vendor string for root hub */ + int sc_id_vendor; /* vendor ID for root hub */ + + void *sc_powerhook; /* cookie from power hook */ + void *sc_shutdownhook; /* cookie from shutdown hook */ - void *sc_powerhook; - device_ptr_t sc_child; + device_ptr_t sc_child; /* /dev/usb device */ } uhci_softc_t; usbd_status uhci_init __P((uhci_softc_t *)); |