- Sep 20, 2014
-
-
Jan Kiszka authored
Mandatory on machines with 4 G memory, IOMMU enabled or DMA debugging active. And it also simplifies the driver code. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Introduce the URB flag URB_ALLOC_TRANSFER_BUF. When set, a transfer buffer of max_packet_size is allocated on URB registration and also premapped for DMA usage. The buffer is freed again on unregistration. This avoids having to perform the potentially RT-incompatible mapping operations from a real-time task or interrupt context. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Add the proper GFP flag for this driver memory. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Avoid duplicating cleanup code via goto. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
We already resolved the generic URB pointer in those functions. Use it. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
The DMA API changed since the original code was written. Nowadays you need to call an error checking functions to test if a DMA mapping was successful. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
The setup packet is only transferred from the host to the device. So also unmap it as PCI_DMA_TODEVICE. The kernel will complain otherwise. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Sep 17, 2014
-
-
Jan Kiszka authored
The kernel dislikes us for using stack memory as DMA buffer. Use a kmalloc'ed buffer instead. We can also avoid the string buffer by using the device's config copies while retrieving the strings. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Sep 16, 2014
-
-
Jan Kiszka authored
Too much code duplications which makes it hard to add resources that required cleanup. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Sep 09, 2014
-
-
Jan Kiszka authored
Some gcc versions complain about uninitialized p_td, though we don't use it in that case. Silence the warning nevertheless. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Feb 27, 2013
-
-
Jan Kiszka authored
Use kzalloc instead of kmalloc + zero-initialization. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Already declared in rt_usb.h. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Feb 25, 2013
-
-
Jan Kiszka authored
Make internal functions static, move prototypes to headers, use kernel coding style. A first step. No functional changes. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Feb 21, 2013
-
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Feb 13, 2013
-
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This tests the rt_cdc_acm driver against the USB orientation sensors 3DM-GX3-25 and 3DM-GX3-45 by MicroStrain. It configures the sensors to deliver a continuous data stream at 1 kHz (GX3-25) and 100 Hz (GX3-45), then receives the stream and displays the data as well as the timing. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Replace the hard-coded Microstrain endpoint numbers with values obtained from the device configuration. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Add support for dropping all queued data from the input queue. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This allows to set/retrieve the read and write timeout values. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
We only use a single write URB with up to 512 bytes so far. If more data has to be written or a second requests is issued before the first completed, the writer has to wait. This can easily be extended later on by using a pool of write URBs. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This is a basic version of a CDC ACM driver, only supporting read access so far and hard-coding the input endpoint. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Nothing good seems to come from it, so leave it off by default. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Mixed implicit and normal rule - we only need the latter. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Just wait for the frame number in the corresponding UHCI register to change once. As we are polling anyway, there is no need for fiddling with IOC of the termination TD. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Feb 12, 2013
-
-
Jan Kiszka authored
Implement the necessary bits to support bulk ring buffer URBs. The section size equals the maximum transfer packet size, thus the URB's buffer is split into transfer_buffer_length / max_packet_size pieces. Only callback-based handling is supported so far. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Ring buffer URBs are input URBs that are continuously queued, reading input in a ring-like fashion into the associated buffer. The buffer may be filled non-contiguously (depending on the transaction size). Therefore, the concept of URB section is introduced. After a ring buffer URB (partially) completed, rt_usb_next_urb_section will return the next filled section. Furthermore, rt_usb_next_urb_section releases the section it returned in the previous invocation, if any. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Wait at least two frame cycles after removing an active URB from the schedule. This ensures we do not release resources before the controller stopped using them. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
usb_device::lock is a regular Linux spin lock, thus we need to use Linux lock/unlock services. Moreover, there is no need for irq protection here. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
A TD is either registered with the active or the free list, so there is no need for two list links. At this change, use advance list manipulation functions to move an entry between two lists or fold on list into the other. Makes things simpler. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
To properly handle short transactions, we have to walk the full TD list, stop on errors or on the last inactive TD and then update the toggle state. Also, the SPD bit was set incorrectly. We want to detect short transactions unconditionally but only report them as error if URB_SHORT_NOT_OK. This aligns us with the Linux UHCI driver. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
URBs that don't have the state PURB_IN_PROGRESS are not registered with the host controller, thus cannot cause any errors. Skip them while iterating the list of registered URBs on interrupts. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
There is no point in letting the final TD in a frame point to itself, creating a strange loop. For that we have bandwidth reclamation mode. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This avoids potentially corrupting the list due to concurrent schedule/ unschedule operations. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Jan 21, 2013
-
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Dec 03, 2012
-
-
Jan Kiszka authored
We can lose events if we clear interrupt reasons after walking the list of URBs: If we missed a completed URB during the walk, the late clearing will prevent that the controller reasserts the interrupt. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Nov 27, 2012
-
-
Jan Kiszka authored
rt_schedule/unschedule_ctrl_bulk_urb may race with each other changing the queue heads. Protect this critical region with a per-controller spin lock. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-