Commit Graph

55 Commits

Author SHA1 Message Date
Sebastian Sumpf 191cfd2c53 usb_drv: Add Natural Ergonomic 4000 keyboard support
fixes  #1878
2016-02-05 17:06:26 +01:00
Josef Söntgen 46e4c3dc9b usb_drv: release interfaces on Usb session close
Interfaces that have been claimed by a component always have to be
released when the session is closed in case the component
malfunctioned.

Fixes #1869.
2016-02-05 10:47:45 +01:00
Sebastian Sumpf 716eab21e3 usb_drv: change Usb session and raw driver
- Use 'label' attribute to identify device instead of
  bus/dev and vendor_id/product_id

- Implement release_interface RPC

- Report 'label' as well as 'bus' and 'dev'

- Add policy handling to raw driver (includes reconfiguration
  at runtime)

- Use own memory backing store for large DMA allocations

Issue #1863.
2016-01-27 16:15:34 +01:00
Sebastian Sumpf 64f39c9a42 usb_drv: Remove signal dispatching from storage
Do not call 'wait_and_dispatch_one_signal' in storage back end. This causes a
race of the EP with the main thread.
2015-12-10 13:16:26 +01:00
Alexander Boettcher 92cb9eb06d x86: support dynamic upgrades for platform driver
and, especially, for the device_pd. Account all resources per platform session
separately.

Fixes #1539
2015-11-29 18:17:02 +01:00
Norman Feske 7920b57d34 Consider byte offset in Attached_io_mem_dataspace
Ref #1764
2015-11-18 12:22:07 +01:00
Sebastian Sumpf 78e18981fb nic session: fix quota check
Check for overflow.

Issue #1735
2015-10-09 16:38:48 +02:00
Alexy Gallardo Segura 7f1641e460 usb: use GPIO session for configuration
This fixes the issue of conflicting base-address attachment between USB
and GPIO.

Fixes #1732
2015-10-09 16:37:22 +02:00
Norman Feske 8f50b00f13 usb_drv: fix shadowing of loop variable
This patch also fixes the assignment of the pci_dev flags (the
mem flag was never set).
2015-10-06 12:18:52 +02:00
Christian Helmuth 08541b68f7 dde_linux: stack alignment on x86_64 in wifi/usb
platform_execute() is used to initially switch the stack of a
routine/task. While Thread_base::alloc_secondary_stack() properly aligns
the returned stack pointer the x86_64 assembler implementation did not
comply to stack frame management specified in the ABI.

The used (and most simple) stack-alignment check may pass a float to a
varargs function on x86, which requires the compiler to properly save
some XMM registers on stack.
2015-09-30 12:20:41 +02:00
Stefan Kalkowski ed52d5a211 Introduce 'spec' subdirectories to outline aspects
Instead of holding SPEC-variable dependent files and directories inline
within the repository structure, move them into 'spec' subdirectories
at the corresponding levels, e.g.:

  repos/base/include/spec
  repos/base/mk/spec
  repos/base/lib/mk/spec
  repos/base/src/core/spec
  ...

Moreover, this commit removes the 'platform' directories. That term was
used in an overloaded sense. All SPEC-relative 'platform' directories are
now named 'spec'. Other files, like for instance those related to the
kernel/architecture specific startup library, where moved from 'platform'
directories to explicit, more meaningful places like e.g.: 'src/lib/startup'.

Fix #1673
2015-09-16 13:58:50 +02:00
Stefan Kalkowski 458b4d6fc4 base: redesign object pool using lambda interface
Instead of returning pointers to locked objects via a lookup function,
the new object pool implementation restricts object access to
functors resp. lambda expressions that are applied to the objects
within the pool itself.

Fix #884
Fix #1658
2015-09-09 15:14:28 +02:00
Reinier Millo Sánchez 433f859cb9 foc_odroid_x2: USB support
Fixes #1627
2015-08-31 09:09:22 +02:00
Adrian-Ken Rueegsegger c2ff0ae9d4 Minor cleanup fixes
- Fix spelling errors
- Remove extra semicolons
- Remove extra spaces

Fixes #1650
2015-08-21 11:00:59 +02:00
Sebastian Sumpf 49ae508889 usb_drv: use heap for vmalloc allocations
Do not use slabs for allocations above 64KB, this seems to lead to memory
corruptions and the error described in issue #1613 under certain circumstances.

fixes #1613
2015-07-07 19:48:06 +02:00
Reinier Millo Sánchez b13b0113c8 usb: kernel-specific USB IRQ number on Raspberry Pi
The USB interrupt number on Raspberry Pi differs betwenn Fiasco.OC and
base-hw, the former uses 9 while the latter uses 17.
2015-07-06 12:22:26 +02:00
Sebastian Sumpf 463c9bec17 Replace Nic driver interface by customizable component
Removed the Nic::Driver implementation. All nic servers now inherit from
Nic::Session_component. Packet stream signals are dispatched to
the 'handle_packet_stream' function within a session component. Thus, nic
servers now have direct access to the packet stream channels, making handling
more flexible.

Adjusted nic_loobpack, dde_ipxe, wifi, usb, lan9118, Linux nic, and OpenVPN to
the new interface.

Fixes #1602
2015-07-01 14:46:16 +02:00
Sebastian Sumpf d80c1c91be usb_drv: Remove signaling in wait_event_timeout
With the server framework this becomes unnecessary. Also when the 'platform_drv'
has a lower priority, signaling will cause a constant load that starves the
'platform_drv'.

Fixes #1594
2015-06-22 14:43:40 +02:00
Christian Helmuth 1f62446b65 usb: effectively request all IRQ capabilities
Thanks @alex-ab for the remote help.
2015-06-22 14:43:37 +02:00
Alexander Boettcher 1f40d9de6a pci: convert to platform_drv
Fixes #1542
2015-06-22 14:43:34 +02:00
Sebastian Sumpf 146b34bf40 lxip: remove dde_kit
issue #1565
2015-06-22 14:43:33 +02:00
Sebastian Sumpf 0a1664b892 usb_drv: remove dde_kit
issue #1565
2015-06-22 14:43:33 +02:00
Alexander Boettcher cbc46a2276 usb: avoid allocation across non-cont. phys memory
Fixes #1530
2015-05-27 11:25:34 +02:00
Alexander Boettcher ccc0f4c2ec usb: handle quota_exceed exception of pci_drv
Issue #755
2015-05-26 09:39:48 +02:00
Christian Prochaska 2d869dd15e usb_drv: generate a device list report
The report lists all connected devices and gets updated when devices are
added or removed.

Example report:

<devices>
    <device vendor_id="0x17ef" product_id="0x4816"/>
    <device vendor_id="0x0a5c" product_id="0x217f"/>
    <device vendor_id="0x8087" product_id="0x0020"/>
    <device vendor_id="0x8087" product_id="0x0020"/>
    <device vendor_id="0x1d6b" product_id="0x0002"/>
    <device vendor_id="0x1d6b" product_id="0x0002"/>
</devices>

There is no distinction yet for multiple devices of the same type.

The report is named "devices" and an example policy for 'report_rom' would
look like:

<policy label="vbox -> usb_devices" report="usb_drv -> devices"/>

The report only gets generated if enabled in the 'usb_drv' configuration:

<config>
    <raw>
        <report devices="yes"/>
    </raw>
</config>

Fixes #1506
2015-05-26 09:39:46 +02:00
Sebastian Sumpf 33bc63e7c3 os: rename 'bswap' to 'host_to_big_endian' 2015-05-20 17:52:58 +02:00
Alexander Boettcher 2ceecd44f9 pci: assign device during pci config cmd write
Issue #1216
2015-05-20 17:52:57 +02:00
Christian Prochaska 1001a04883 usb_drv improvements
- send a 'state_change' signal on session creation if the device is
  already attached
- evaluate the status code of a finished asynchronous operation
- return the number of actually transferred bytes for control transfers,
  too

Fixes #1490
2015-05-06 12:01:30 +02:00
Alexander Boettcher 6c65e436bf usb: use io_mem on x86 via platform driver
Issue #1487
2015-05-06 10:55:22 +02:00
Alexander Boettcher b7ca04ddde dde_kit: use io ports via device interface
Issue #1487
2015-05-06 10:55:21 +02:00
Alexander Boettcher d37d2bd737 dde_linux: upgrade quota for usb_drv
Issue #755
2015-05-06 10:55:20 +02:00
Alexander Boettcher e4d663cf41 pci: remove device_cap from dma calls
Issue #1486
2015-05-06 10:55:18 +02:00
Alexander Boettcher a58bc84d3e usb: use irq via platform driver or directly
Issue #1471
2015-05-06 10:55:18 +02:00
Norman Feske eaab23c012 base: const-correctness of Allocator interface
This patch adds const qualifiers to the functions Allocator::consumed,
Allocator::overhead, Allocator::avail, and Range_allocator::valid_addr.

Fixes #1481
2015-04-17 16:13:22 +02:00
Norman Feske d9d65aa86b base: use reference for ascii_to output argument
Issue #1477
2015-04-17 16:13:19 +02:00
Josef Söntgen dd47129bef nic session: link-state change handling
A Nic::Session client can install a signal handler that is used to
propagate changes of the link-state by calling 'link_state_sigh()'.
The actual link state is queried via 'link_state()'.

The nic-driver interface now provides a Driver_notification callback,
which is used to forward link-state changes from the driver to the
Nic::Session_component.

The following drivers now provide real link state: dde_ipxe, nic_bridge,
and usb_drv. Currently, OpenVPN, Linux nic_drv, and lan9118 do not
support link state and always report link up.

Fixes #1327
2015-03-27 11:53:13 +01:00
Alexander Boettcher cd764a6aa6 usb: support multi touch devices
Issue #1444
2015-03-19 08:57:18 +01:00
Alexander Boettcher d68c7d1d10 usb: rename coordinates to width/height for touch 2015-02-27 11:48:36 +01:00
Sebastian Sumpf c2c8483293 usb_drv: Fix controller initialization on RPI
Execute high priority tasklets immediately, these tasklets need to be processed
before any other work.

Issue #1401
2015-02-16 13:40:36 +01:00
Sebastian Sumpf 0c2bdf9edd usb_drv: Remote USB driver interface
Issue #1329
2015-02-16 13:40:33 +01:00
Alexander Boettcher 0f18ecc142 base: handle input overflow exception
Fixes #1348
2015-01-09 11:52:06 +01:00
Alexander Boettcher a59cf9f557 usb: wacom touchscreen support 2014-12-19 13:58:48 +01:00
Christian Menard eedddeced1 dde_linux: fix bug in find_next_zero_bit_le
value '1' has a default type of int, but long is needed to cover all 64 bits
2014-11-20 16:39:16 +01:00
Josef Söntgen 35239b84df dde_kit: remove jiffies alias
The alias is rather Linux-specific and also prevents particularly
tailored jiffies implementations. For the existing dde_linux ports (usb
and lxip) we just define jiffies to be dde_kit_timer_ticks with a
preprocessor macro.
2014-10-21 11:05:15 +02:00
Norman Feske 85362ba0b9 dde_linux: USB SOF IRQ filter for Raspberry Pi 2014-10-13 14:53:00 +02:00
Sebastian Sumpf 98165dd91b dde_linux: Update to Linux 3.14.5
Update patch files and file lists.
2014-08-28 12:35:55 +02:00
Christian Menard ad2cd4b328 dde_linux: HID multitouch support
Fixes #1209
2014-07-24 16:15:58 +02:00
Stefan Kalkowski 786fe805da base: introduce caching attributes (fix #1184)
On ARM it's relevant to not only distinguish between ordinary cached memory
and write-combined one, but also having non-cached memory too. To insert the
appropriated page table entries e.g.: in the base-hw kernel, we need to preserve
the information about the kind of memory from allocation until the pager
resolves a page fault. Therefore, this commit introduces a new Cache_attribute
type, and replaces the write_combined boolean with the new type where necessary.
2014-06-26 10:57:26 +02:00
Sebastian Sumpf cc8bf82300 usb_drv: Add timeout support for events (ref #758) 2014-06-26 10:57:26 +02:00
Sebastian Sumpf 3961a3e2a1 usb_drv: Add hrtimer support (ref #758) 2014-06-26 10:57:26 +02:00