Commit Graph

648 Commits

Author SHA1 Message Date
Sebastian Sumpf
7fcf9053b9 usb_hid: perform device destruction on unplug signal only
- Do not perform desctruction on report updatea in EP because
  'unregister_device' may block on Led state 'update' (synchronous
  control message) leading to the driver being stuck because no more
  signals are received
- Check if device is present in 'submit_urb' calls

fixes #4166
2021-05-28 14:16:44 +02:00
Sebastian Sumpf
6910b880e7 usb_host: make device creation/destruction robust
- Signal device ready depending on state (ready or not) immediately or
  when "actconfig" is set
- Report new devices when ready
- Drain packet stream in case there is no device present (needed for
  synchronous operations at client side)
- Do not use 'session_device' on device destruction, check pointer
  directly instead

issue #4149
2021-05-28 14:16:44 +02:00
Christian Helmuth
813f4d976b lxip: allocate skb with properly aligned IP header
Comment in Linux sources:

  Since an ethernet header is 14 bytes network drivers often end up with
  the IP header at an unaligned offset. The IP header can be aligned by
  shifting the start of the packet by 2 bytes. Drivers should do this
  with:

  skb_reserve(skb, NET_IP_ALIGN);

This is ensured when using netdev_alloc_skb_ip_align().

Issue #4094
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
a24224ffc3 usb_host: improve isochronous performance on Intel
This patch takes advantage of block transfer interrupts on Intel XHCI
controllers which is used during isochronous transfers. Because of a bug
in hardware (see usb_host_isoc_bei.patch header), this feature has been
disabled for Intel leading to up to 8000 interrupts/s for isochronous
transfer causing severe CPU consumption on Genode. With this commit we
lower host driver consumption to normal levels.

issue #4149
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
9543161827 usb_host: Move task to device in USB session
A Lx::Task is now associated to a USB device not the session any more.
This implies that a task lives as long as the device making it possible
to gracefully handle outstanding requests (i.e., synchronous) in case
the session has been closed.

issue #4149
2021-05-28 14:15:26 +02:00
Christian Helmuth
777923f9bd depot: update recipe hashes 2021-05-10 11:18:12 +02:00
Josef Söntgen
0f0edc0134 usb_host: implement sg_pcopy_* as TRACE dummies
The former implementation called 'TRACE_AND_STOP' which led to the
'usb_host_drv' to stop whenever such a function was called. Rather
than stopping return '0' and let the contrib code deal with this
situation.

Issue #4116.
2021-05-10 11:16:24 +02:00
Josef Söntgen
d0f084d449 usb_host: backport xhci bounce-buffer fix
This commit backports the Linux upstream commit (d4a6106) [*]
that introduces a check to prevent the sglist from being used
unconditionally.

[*] 'xhci: fix bounce buffer usage for non-sg list case'

Fixes #4116.
2021-05-10 11:16:24 +02:00
Norman Feske
516a9a6925 depot: update recipe hashes 2021-05-05 11:35:31 +02:00
Christian Prochaska
8f23e377d9 lxip: fix build error with gcc 10
Fixes #4102
2021-05-05 11:35:31 +02:00
Stefan Kalkowski
421d2bed40 platform driver: make device info XML optional
* The device XML information dataspace is only provided,
  when the client's policy states `info="yes"`
* The device XM information gets changed to include the
  physical resource names (I/O memory and IRQ addresses)
  instead of virtual ids and page offset

Fix #4077
2021-05-05 11:31:16 +02:00
Christian Helmuth
3f450a77e1 Fix touchscreen config in usb_hid README 2021-05-05 11:21:43 +02:00
Johannes Schlatow
462bff5aef dde_linux: test subdevice id for device matching
As linux drivers may distinguish device configuration by pci subdevice id in
addition to the pci device id, the former must also be used for finding the
matching entry. Otherwise, e.g., the iwlwifi driver might load the wrong
firmware.

Side note: Add break statement to save superfluous iterations after
match was identified.

Fixes genodelabs#4076
2021-05-05 11:21:43 +02:00
Norman Feske
efbed6f7bf depot: update recipe hashes 2021-04-20 12:10:58 +02:00
Norman Feske
dc8c899c1d Streamline platform-device API on ARM
This API rework eases the access to memory-mapped I/O registers and
interrupts when using the platform driver. It introduces the notions of

- Platform::Device       - one device obtained from a platform session
- Platform::Device::Mmio - locally-mapped MMIO registers of a device
- Platform::Device::Irq  - interface for receiving device interrupts

The patch touches several drivers. Some drivers would require a
significant structural change to adopt the new API (e.g., net/virtio,
dde_linux drivers, imx gpio). In these cases, the patch adds
compatibility shims meant to be temporary. In other cases (e.g., imx
i2c), the adaptation was simple enough to carry through.

Fixes #4075
2021-04-20 12:10:58 +02:00
Stefan Kalkowski
d1cf9c86b8 os: introduce device type in platform driver
* Move "compatible" property value to "type" attribute
* Turn device_by_property helper in Platform::Connection into device_by_type

Fix #4074
2021-04-20 12:10:58 +02:00
Norman Feske
0339318572 platform_session: cache arg for alloc_dma_buffer
This patch extends the 'Platform_session::alloc_dma_buffer' interface
with a 'Cache' argument that corresponds to the argument accepted by
'Ram_allocator::alloc', which is used by the platform driver under the
hood.

Since the x86 platform driver used to be hardwired to allocate DMA
buffers as UNCACHED, I adjusted all drivers by specifying the UNCACHED
argument. Right now, this is needed as a hint for core to steer the
allocation of I/O page tables. Once we eliminate the need for such hints
(by introducing an explicit 'Region_map::attach_dma' operation), we can
revisit the drivers individually because cached DMA buffers should
generally be fine on the x86 architecture.

Issue #2243
2021-04-20 12:10:57 +02:00
Norman Feske
468e7a825c base/cache.h: rename Cache_attribute to Cache
The short name is better because the type will become prominently
visible at the API.

Issue #2243
2021-04-20 12:10:31 +02:00
Tomasz Gajewski
1867cf4967 iwl_firmware: use CUSTOM_TARGET_DEPS 2021-04-20 12:03:04 +02:00
Norman Feske
eb89b13327 depot: update recipe hashes 2021-03-24 11:32:53 +01:00
Alexander Boettcher
53041f4cd8 usb_host: support to disable usb controller types
The commits adds the same configuration values as supported up to now by
the monolithic usb driver. In contrast to the original, by default all drivers
are started. Disabling a controller type is used by Sculpt, e.g. for OHCI if
running Sculpt inside Virtualbox.
2021-03-23 11:50:37 +01:00
Alexander Boettcher
521f61b9e0 usb_hid: disable wacom driver
Issue #3997
2021-03-23 11:32:24 +01:00
Norman Feske
ca50a41d28 depot: update recipe hashes 2021-03-23 11:28:53 +01:00
Tomasz Gajewski
2f0898d2a9 dde_linux: fixes in makefiles
Issue #3972
2021-03-16 11:25:25 +01:00
Christian Prochaska
9a0217f21a imx8: use 'snps,dis_u2_susphy_quirk'
Fixes #4048
2021-03-16 11:19:32 +01:00
Christian Prochaska
0cfafa1c8f usb_host_drv: support command timeouts and bool properties
Fixes #4047
2021-03-16 11:19:17 +01:00
Norman Feske
5c5b56d1e0 depot: update recipe hashes 2021-03-12 12:08:24 +01:00
Norman Feske
755aed7cb2 dde_linux: don't spin when panicking
Issue #3997
2021-03-12 12:01:38 +01:00
Christian Helmuth
7ce1f8e92d Enable en_us chargen in drivers_interactive-imx8q_evk
Issue #4038
2021-03-12 12:01:37 +01:00
Norman Feske
e1bb0e8e15 usb_host: refine class heuristics on device report
This patch is an interim fix for using HID devices that offer a HID
interface as not the first interface. It also supplements the
interface classes as supplemental information to the USB-devices
report.

Fixes #4035
2021-03-12 12:01:37 +01:00
Norman Feske
2e4ccc1459 usb_host: reflect ENOSPC as STALL
Issue #4035
2021-03-12 12:01:37 +01:00
Norman Feske
80522fadf6 usb_hid: don't touch non-HID interfaces
Issue #4035
2021-03-12 12:01:36 +01:00
Norman Feske
64165d829e depot: update recipe hashes 2021-02-23 12:07:18 +01:00
Martin Stein
a462a8e741 usb_host: compile errors with DEBUG_LINUX_PRINTK
Ref #3961
2021-02-23 12:07:16 +01:00
Sebastian Sumpf
b6d20b4742 autopilot: disable run script not supported by riscv
- libc and nic driver are currently not available on RISC-V

issue #4021
2021-02-23 12:07:16 +01:00
Christian Helmuth
f23e302475 Update OpenSSL to version 1.1.1i
Note, OpenSSL now comes as one combined depot archive *openssl* that
replaces the former *libssl* and *libcrypto* archives. The libraries are
still separate binaries for compatibility with legacy software.

Issue #3773
2021-02-23 12:07:16 +01:00
Josef Söntgen
a6f0b05834 usb_host: properly handle ISOC read requests
* Update the 'packet_size' information with the actual length for
  each isoc frame to be able to handle short reads at the client side.

* Copy the whole transfer buffer because the host controller stores
  the data at the original offsets, i.e., the buffer is not densely
  packed.

Fixes #4018.
2021-02-23 12:02:44 +01:00
Martin Stein
23620942bf usb_net: allow calling netif_stop_queue dummy
When the usb_net_drv was introduced in ports/run/netperf.inc, the
netperf_lxip_usb test on x86_64/hw/pc triggered the calling of the
netif_stop_queue dummy at
contrib/<DDE_LINUX>/src/drivers/usb_net/drivers/net/usb/usbnet.c:1464. As
netif_start_queue was also a dummy and allowed to be called, we tried allowing
calls to the netif_stop_queue dummy as well which fixed the
netperf_lxip_usb test on x86_64/hw/pc.

Ref #3961
2021-02-23 12:02:44 +01:00
Martin Stein
19d0142e10 ports/recipes/src: usb_net_drv
Ref #3961
2021-02-23 12:02:44 +01:00
Christian Prochaska
f654e6f02d usb_host_drv: dwc_otg stability improvements
- improve NYET error handling
- use split interrupt transaction hack
- clear TT buffers in error situations

Issue #3247
2021-02-23 12:02:43 +01:00
Christian Prochaska
c16611dff2 usb_hid_raw.run: add "Timer" service route
Fixes #4008
2021-02-23 12:02:42 +01:00
Christian Prochaska
33406940f3 usb_hid_drv: stability improvements
Fixes #4007
2021-02-23 12:02:42 +01:00
Christian Prochaska
e1698cf200 dde_linux: fix possible memory leak in wait queue implementation
Fixes #4006
2021-02-23 12:02:42 +01:00
Christian Prochaska
2670ae399b usb_host_drv: improve error handling
Fixes #4005
2021-02-23 12:02:42 +01:00
Norman Feske
8cc2662aac Remove support for the Muen separation kernel
Fixes #3995
Fixes #3994
2021-02-23 11:55:44 +01:00
Martin Stein
691be92046 Don't use the NIC server mode of NIC drivers
Issue #3961
2021-02-23 11:53:41 +01:00
Josef Söntgen
36b55e065a usb_host: check ep pointer before using it
The Usb session allows for submitting packets even when the interface
in question is not yet enabled. Enabling an interface will configure
the udev members properly and is normally done implicitly during
processing of an 'ALT_SETTING' packet.

In case the interface was not enabled this leads to a page-fault in
the USB host-controller driver as 'ep' is NULL.

Fixes #3999.
2021-02-23 11:51:57 +01:00
Norman Feske
a981fb864c depot: update recipe hashes 2021-01-25 14:00:43 +01:00
Stefan Kalkowski
bdd923406f base: remove SPEC variables of boards (fix #3971)
* Remove SPEC declarations from mk/spec
* Remove all board-specific REQUIRE declaratiions left
* Replace [have_spec <board>] run-script declarations with have_board where necessary
* Remove addition of BOARD variable to SPECS in toplevel Makefile
* Move board-specific directories in base-hw out of specs
2021-01-25 13:58:09 +01:00
Martin Stein
f6d195a9de nic drivers: provide optional Uplink-client mode
In order to perform a smooth transition from NIC drivers that act only as NIC
session clients to NIC drivers that act only as Uplink session clients, this
commit introduces an intermediate state in which all NIC drivers support both
modes. That said, a NIC drivers mode is now statically determined through a new
optional 'mode' attribute in the drivers <config> tag that can be set to either
'nic_server' (default value) or 'uplink_client'. Reconfiguring this attribute
at a driver doesn't have any effects. Whithout this attribute being set, all
NIC drivers will behave the same as they did before the commit. When set to
'uplink_client', however, instead of providing a Nic service, they request
an Uplink session whenever their network interface becomes "UP" and close the
session whenever their network interface becomes "DOWN".

Ref #3961
2021-01-25 13:58:09 +01:00