freebsd-skq/sys/dev/usb
Ian Lepore 28315e27a7 Implement a mechanism for making changes in the kernel<->driver PPS
interface without breaking ABI or API compatibility with existing drivers.

The existing data structures used to communicate between the kernel and
driver portions of PPS processing contain no spare/padding fields and no
flags field or other straightforward mechanism for communicating changes
in the structures or behaviors of the code.  This makes it difficult to
MFC new features added to the PPS facility.  ABI compatibility is
important; out-of-tree drivers in module form are known to exist.  (Note
that the existing api_version field in the pps_params structure must
contain the value mandated by RFC 2783 and any RFCs that come along after.)

These changes introduce a pair of abi-version fields which are filled in
by the driver and the kernel respectively to indicate the interface
version.  The driver sets its version field before calling the new
pps_init_abi() function.  That lets the kernel know how much of the
pps_state structure is understood by the driver and it can avoid using
newer fields at the end of the structure that it knows about if the driver
is a lower version.  The kernel fills in its version field during the init
call, letting the driver know what features and data the kernel supports.

To implement the new version information in a way that is backwards
compatible with code from before these changes, the high bit of the
lightly-used 'kcmode' field is repurposed as a flag bit that indicates the
driver is aware of the abi versioning scheme.  Basically if this bit is
clear that indicates a "version 0" driver and if it is set the driver_abi
field indicates the version.

These changes also move the recently-added 'mtx' field of pps_state from
the middle to the end of the structure, and make the kernel code that uses
this field conditional on the driver being abi version 1 or higher.  It
changes the only driver currently supplying the mtx field, usb_serial, to
use pps_init_abi().

Reviewed by:	hselasky@
2015-05-04 17:59:39 +00:00
..
controller Disable multi process interrupts, because the current code doesn't use 2015-04-23 07:41:58 +00:00
gadget Make a bunch of USB debug SYSCTLs tunable, so that their value(s) can 2015-01-05 15:04:17 +00:00
input Lock softc before clearing bits. 2015-03-10 16:06:07 +00:00
misc In order to reduce use of M_EXT outside of the mbuf allocator and 2015-01-06 12:59:37 +00:00
net Add Lenovo ThinkPad OneLink GigaLAN. 2015-04-07 01:47:36 +00:00
quirk Add more USB IDs. 2015-03-07 17:11:07 +00:00
serial Implement a mechanism for making changes in the kernel<->driver PPS 2015-05-04 17:59:39 +00:00
storage Use define instead of constant. 2015-03-17 08:42:09 +00:00
template Add usb template SERIALNET allowing us to have both USB CDC Ethernet 2015-01-13 14:03:56 +00:00
video Don't print uninitialized variables. 2015-04-21 06:11:47 +00:00
wlan - Disable usb aggregation mode by default since it boots performance 2015-04-30 02:47:21 +00:00
ufm_ioctl.h
uftdiio.h
uled_ioctl.h
usb_bus.h Resolve a special case deadlock: When two or more threads are 2015-01-13 16:37:43 +00:00
usb_busdma.c
usb_busdma.h
usb_cdc.h
usb_compat_linux.c
usb_compat_linux.h
usb_controller.h
usb_core.c Remove no longer used allocation type. 2015-03-17 11:07:59 +00:00
usb_core.h Section 3.2.9 in the XHCI specification about control transfers says 2015-02-02 11:06:41 +00:00
usb_debug.c
usb_debug.h
usb_dev.c Resolve a special case deadlock: When two or more threads are 2015-01-13 16:37:43 +00:00
usb_dev.h
usb_device.c Add a kernel function to delist our kernel character devices, so that 2015-01-14 14:04:29 +00:00
usb_device.h Resolve a special case deadlock: When two or more threads are 2015-01-13 16:37:43 +00:00
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_freebsd_loader.h Increase the maximum number of dynamic USB quirks. USB memory stick 2015-01-12 06:34:23 +00:00
usb_freebsd.h Increase the maximum number of dynamic USB quirks. USB memory stick 2015-01-12 06:34:23 +00:00
usb_generic.c Fix returned data for the USB_GET_DEV_PORT_PATH IOCTL in particular 2015-01-20 11:43:16 +00:00
usb_generic.h
usb_handle_request.c
usb_hid.c
usb_hub.c Add ugen keyword to USB pnpinfo. Remove extra space from existing pnpinfo. 2015-02-25 08:35:00 +00:00
usb_hub.h
usb_if.m
usb_ioctl.h Add usb template SERIALNET allowing us to have both USB CDC Ethernet 2015-01-13 14:03:56 +00:00
usb_lookup.c
usb_mbuf.c
usb_mbuf.h
usb_msctest.c Separate out detection of prevent and allow medium removal quirk. 2015-02-02 18:20:10 +00:00
usb_msctest.h
usb_parse.c
usb_pci.h
usb_pf.c
usb_pf.h
usb_process.c
usb_process.h
usb_request.c Make a bunch of USB debug SYSCTLs tunable, so that their value(s) can 2015-01-05 15:04:17 +00:00
usb_request.h
usb_transfer.c Optimise allocation of USB DMA structures. By default don't double map 2015-02-02 11:32:15 +00:00
usb_transfer.h
usb_util.c
usb_util.h
usb.h Add definition of the ISOCHRONOUS endpoint usage bits. 2015-03-25 13:32:27 +00:00
usbdevs - Add a new urtwn(4) device 2015-04-28 03:24:27 +00:00
usbdi_util.h
usbdi.h
usbhid.h