Commit Graph

12 Commits

Author SHA1 Message Date
Alexey Kardashevskiy d3596133f4 libusb: Fix compiler warnings with gcc9
gcc9 enforces -Waddress-of-packed-member, fix this.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2019-10-22 14:15:41 +11:00
Nikunj A Dadhania 80ba6519d8 usb-ohci: done_head processing fixes
Return error code like STALL back, so it can be handled effectively.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04 12:01:21 +05:30
Nikunj A Dadhania 1abf624dfb usb: fix various issues found with js2x
* JS20 exposed various timing related issues that were not apparent in
  the emulated environment.
* Reset the USB Bus
* JS20 overrides the frame_interval and periodic_start on setting the
  controller to USB operational. Reprogram them.
* ohci fix the data-toggle bits.
* Robust error handling

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21 10:50:02 +05:30
Nikunj A Dadhania 8092c2e3e3 usb-ohci: collect TDs from done list
OHCI HC after using the TDs queues them back to hccaDoneHead. Until
this event the TDs cannot be reused, as there might be references in
the host controller still pending. Recycle all the TDs from the queue
and acknowledge it by clearing the WD bit in interrupt status
register.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21 10:49:36 +05:30
Nikunj A Dadhania 67dafd87d2 usb-ohci: suspend the controller in exit code path
Moreover ehci already suspends the controller in the hcd_exit path. So
we can remove hc-suspend from the cleanup path.

Also, count mechanism is not needed anymore, as quiesce is called only
once.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06 16:00:29 +10:00
Nikunj A Dadhania d7354e2724 usb: unmap buffers
Clean up all the dma allocated buffers and remove their mappings.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24 14:46:23 +05:30
Nikunj A Dadhania 1b495eec59 usb-ohci: add Bulk transfer support
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24 14:46:23 +05:30
Nikunj A Dadhania 6eb646603d USB keyboard driver
Portions of keyboard driver(usb-key.h and usb-hid.c) inherited from
code originally written by former SLOF team

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24 14:46:23 +05:30
Nikunj A Dadhania 323108d792 usb-ohci: implement ohci send control
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24 14:46:23 +05:30
Nikunj A Dadhania 0376b7eb56 usb-core: implement usb_{get,put}_pipe routines
Generic routines to get pipe structure from controller.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24 14:46:22 +05:30
Nikunj A Dadhania 0b4a392b66 usb-ohci: allocate pipe pool
usb-core: usb_pipe structure, this structure will be embedded in
	  controller specific pipe structure and accessed using
	  container_of macro.

usb-ohci: allocate pipe pool and support routines

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24 14:46:22 +05:30
Nikunj A Dadhania f9ad8f3cd5 usb-ohci: reset, init and check-ports
* Resets the controller
* Initializes controller
* Query ports for discovering devices

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2013-07-24 14:46:22 +05:30