Commit Graph

13 Commits

Author SHA1 Message Date
Gleb Smirnoff
35d3dd8b12 Use mbuf queue instead of ifqueue in USB network drivers.
Reviewed by:	stevek
2019-08-30 00:05:04 +00:00
Bjoern A. Zeeb
c982e56f4b usb: fix usb_fdt_support.c when altq enabled (usb_ehernet.h changes)
After r351243 when ALTQ was enabled in the kernel, the inline functions
in ifq.h would not have full type information as if_var.h was not
included.

Given usb_ethernet.h already includes all the various headers (which)
is the cause of the problem here, add if_var.h to it.  This fixes the
builds again.

Reported by:	CI system, e.g. FreeBSD-head-aarch64-LINT
2019-08-22 09:24:43 +00:00
Stephen J. Kiernan
df845c0f86 usb_ethernet.h includes a number of mii headers, but only does so in
order to have struct mii_data available. However, it only really needs
a forward declaration of struct mii_data for use in pointer form for
the return type of a function prototype.

Custom kernel configuration that have usb and fdt enabled, but no miibus,
end up with compilation failures because miibus_if.h will not get
generated.

Due to the above, the following changes have been made to usb_ethernet.h:
 * remove the inclusion of mii headers
 * forward-declare struct mii_data
 * include net/ifq.h to satify the need for complete struct ifqueue

Reviewed by:	ian
Obtained from:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D21293
2019-08-20 01:06:43 +00:00
Hans Petter Selasky
0c89167c76 Add function to wait for USB ethernet attach to complete.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2018-05-24 15:24:42 +00:00
Pedro F. Giffuni
718cf2ccb9 sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-27 14:52:40 +00:00
Pyun YongHyeon
5c6b53d82c This change makes it possible to define driver specific attach
handler such that driver can announce interface capabilities and
can do its own MII attach.  Currently all USB ethernet controllers
have no way to establish a link with pause capabilities. Lack of
checksum offloading support also was one of reason to bring this
change in.

This change adds a couple of wrappers to USB ethernet drivers
(uether_ifmedia_upd, uether_init and uether_start). All exported
functions in uether has prefix uether_ so I think it's more
consistent to have wrappers that follow the convention.
This change preserves ABI/KPI so it should be safe to merge this
change to stable/8.

While I'm here add missing __FBSDID and clean up headers.

Reviewed by:	hselasky
2011-10-24 23:38:11 +00:00
Andrew Thompson
759736470c Fix _USB2_* refernces in the header protection defines. 2009-06-15 01:09:19 +00:00
Andrew Thompson
a593f6b8de s/usb2_/usb_|usbd_/ on all function names for the USB stack. 2009-06-15 01:02:43 +00:00
Andrew Thompson
e0a69b51ac s/usb2_/usb_/ on all typedefs for the USB stack. 2009-05-29 18:46:57 +00:00
Andrew Thompson
760bc48e7e s/usb2_/usb_/ on all C structs for the USB stack. 2009-05-28 17:36:36 +00:00
Andrew Thompson
6b1bca02b9 Remove USB shutdown methods from device drivers as its the host controllers
responsibility to detach the bus.

PR:		usb/133896
Submitted by:	Hans Petter Selasky
2009-05-05 15:39:29 +00:00
Andrew Thompson
75fd0939b4 Move m_getcl() into its own function. This also fixes a bug where the m_adj for
ETHER_ALIGN was having no effect since m_len had not been set.
2009-03-08 06:56:13 +00:00
Andrew Thompson
02ac645488 Move the new USB stack into its new home. 2009-02-23 18:31:00 +00:00