Commit Graph

3095 Commits

Author SHA1 Message Date
bouyer
dbac012ecf Make it safe to call uhci_init() from a kernel thread with interrupts
enabled:
- don't enable interrupts before calling uhci_run()
- check if the controller's interrupt is enabled in uhci_intr()
The issue is that uhci_run() may tsleep(), uhci_intr1() may be called before
uhci_run() is complete and disable it because it found it halted.

Now a uhci controller can be successfully exported to a NetBSD Xen domU :)
2009-03-06 23:40:50 +00:00
jmcneill
f11a7f3f4f Revision 1.25 was unintentionally reverted in the previous commit, bring
it back.
2009-02-18 00:27:21 +00:00
jakllsch
78a7904557 Add USB_VENDOR_CYBERPOWER/USB_PRODUCT_CYBERPOWER_UPS to the HID blacklist.
This will allow Network UPS Tools to communicate with these UPSes via ugen(4).
2009-02-14 17:13:01 +00:00
jakllsch
5a819467a1 regen. 2009-02-14 17:03:33 +00:00
jakllsch
2c011568c9 Add CyberPower Systems, Inc. vendor ID, as well as one of their product IDs,
which is used in two (or more) models of UPS devices.
2009-02-14 17:01:23 +00:00
bouyer
73920b4161 More printf format fixes. 2009-02-13 23:31:23 +00:00
drochner
c4dd0bbb21 In usb_reserve_allocm(), return an error immediately if the requested
size is impossible to allocate, otherwise we might get a diagnostic
panic in subr_extent.c.
Being here, fix an off-by-one in setup.
2009-02-10 17:00:06 +00:00
jmorse
6e5c689d54 Fix uvideo_stream_init uninitialized variable / bad argument, leading to panic when opening video stream. 2009-02-09 23:28:50 +00:00
ghen
a349a96a6f Enable Colemak altgr keys. 2009-02-03 17:50:28 +00:00
jmcneill
5a635bb25b Add kmod glue. 2009-02-03 13:31:24 +00:00
joerg
90e9431320 Include the right header to get usb_hid_descriptor_t. 2009-02-02 18:15:36 +00:00
joerg
e2e8a79757 Include guards and match usbd_get_hid_descriptor prototype and
implementation.
2009-02-02 14:12:01 +00:00
jmcneill
a38fd8e41a When setting up isochronous transfers, fix a typo in an out-of-memory test. 2009-01-30 12:55:46 +00:00
cegger
f365ed0108 buildfix: re-adapt to major()/minor() returning a 32bit value again. 2009-01-22 16:12:43 +00:00
jnemeth
ebc311ebd3 add a comment explaining how to regenerate usbdevs.h and usbdevs_data.h 2009-01-21 14:36:10 +00:00
drochner
95dfcca096 kill unused variable 2009-01-20 20:15:15 +00:00
drochner
d767912be3 Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
2009-01-20 18:20:47 +00:00
tnn
8daad4ac39 Fix swedish USB keymap. The apostrophe key was mapped to comma.
(How did this go unnoticed for so many years?)
2009-01-18 12:58:49 +00:00
jmcneill
e90eb84a4b regen for HP Generic RNDIS 2009-01-16 13:31:41 +00:00
jmcneill
3e9c6e548d Add HP Generic RNDIS ID 2009-01-16 13:31:01 +00:00
cegger
8c2b3a39bc make this compile 2009-01-11 10:58:26 +00:00
cegger
378bd0b618 make this compile 2009-01-11 10:47:37 +00:00
jakllsch
02513c1f9c Correct license. I have not formally contributed this to TNF.
However, ugensa.c was, so restore that licencse and append mine.

Also, use UT_*_VENDOR_INTERFACE instead of local defines of the same thing.
No functional change.
2009-01-05 17:22:18 +00:00
yamt
b1fea83762 remove extra semicolons. 2009-01-03 03:43:21 +00:00
jmorse
b400d28c38 Fix UVC webcam output by:
- Storing updated video format after user changes format
- Round up number of xfers queued to multiple of 8, due to ehci inefficiencies
- Remove random debugging line I slipped in earlier
2008-12-23 03:22:29 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
tonnerre
3fd167219b Remove { 0, 0 } from the list of u3g devices. This entry is no longer
required in modern device lists due to sizeof() tricks. However, keeping
it makes u3g attach to HP ServerWorks mice and keyboards.
2008-12-12 07:49:46 +00:00
jmorse
beb501f394 PR#39651
Fix two problems in umass:
 * usb xfers being freed before being removed from pipe, leading to null deref
 * config_activate requests not supported, which leads to config_deactivate requests not being passed through. Spotted by jmcneill@

Added mechanism to usbdi allowing the default pipe to be aborted
2008-12-12 05:35:11 +00:00
jmcneill
61d5be8fc7 Don't select an endpoint with a larger packet size than the maximum for
the current video stream.
2008-11-28 23:31:11 +00:00
jmorse
4f7247f185 Modified uvideo_stream_init_desc to correctly calculate max packet size for high speed endpoints. 2008-11-28 17:20:02 +00:00
jmorse
3ce0341c47 Fixed high-speed isoc USB transfers, 64 bit capable host controllers have a different transfer descriptor to non-capable controllers.
Added dma-sync of data buffer before scheduling transfers
2008-11-28 17:18:21 +00:00
jnemeth
4e826d168f regen for Corega CG-USBRS232R 2008-11-20 10:51:51 +00:00
jnemeth
55a2353845 PR/39971 - SHIMAOKA Shunsuke -- Recognize Corega CG-USBRS232R as a
serial device.
2008-11-20 10:50:42 +00:00
dyoung
de87fe677d *** Summary ***
When a link-layer address changes (e.g., ifconfig ex0 link
02🇩🇪ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.
2008-11-07 00:20:01 +00:00
joerg
71e504882f Remove E220 quirk -- u3g(4) does implement that directly. 2008-10-27 21:46:43 +00:00
christos
e8d515e422 regen. 2008-10-25 17:37:31 +00:00
christos
b311f98821 The Sierra Wireless USBConnect 881 card presents itself as umass containing
the driver to be installed for it. We don't need this crap. Tell it to become
a modem.
2008-10-25 17:35:44 +00:00
cegger
f982353b74 regen. (how is it possible to have conflicts in the repo in a generated file?) 2008-10-22 12:10:48 +00:00
haad
543e3d0539 Add HL-340 usb2Serial addapter. 2008-10-22 10:35:50 +00:00
haad
b392ebc9c0 I forgot to commit this after regen. 2008-10-22 10:33:20 +00:00
haad
27418aa546 Regen. 2008-10-22 10:27:28 +00:00
haad
49e162a888 Add product/vendor ID for my USB2serial adapter. 2008-10-22 10:23:51 +00:00
jun
3caafa9653 Add
corega K.K CG-WLUSB2GPX
2008-10-21 12:20:44 +00:00
apb
96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
joerg
7e64fc36e4 Remove two devices that are handled by ubsa and might need special
handling from u3g until further reports. Move a number of data cards
from ugensa to u3g based on the FreeBSD list.
2008-10-19 11:40:02 +00:00
joerg
5519d99b9a Regen. 2008-10-19 11:37:44 +00:00
joerg
74069cabed Sync list of 3G cards with FreeBSD. 2008-10-19 11:36:11 +00:00
joerg
f48b5b12a3 Make u3g send an eject command to Novatel MC950D devices. Explicitly
attach as device for umass mode on MC950D and the Huawei devices to
supersede the umass quirk.
2008-10-18 09:43:44 +00:00
wrstuden
fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
jmcneill
e2728f33e6 ehci_dump_itd and _sitd are unused 2008-10-14 18:32:53 +00:00