All network drivers have been moved to library
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
The network drivers ported to library get interfaced with net-snk
through client interface module. Hence the ci module should set
the MAC address during initialization.
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
As per 1275 standard, canon converts the possibly ambiguous
device-specifier to a fully qualified pathname (see 6.3.2.2). It is kind
of find-alias for clients. Earlier canon implementation was not complete,
it was not at all returning the full path name. So grub was not getting
the alias path by calling canon and it was breaking.
In this patch I'm checking if the passed string is already a full path
by comparing the first character with '/'. In that case I return the
passed string as is. Otherwise I return the find-alias.
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
SCSI layer represents DIR as TRUE or FALSE, and for SLOF TRUE is -1
and FALSE is 0, convert that to proper direction when building the
CBW
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
This solves the bad checksum issue in udp header. The fill_udp_checksum()
function suffers from "strict aliasing" problem as it is doing quite a bit
of pointer casting.
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
* 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>
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>
* Build fixes to include scsi files
* Move usb-setup-hcidev out of board-qemu
* Fix pci-bridge-probe to assign temporary ranges
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
We were incorrectly checking ig instance>#units was 0 (forgot to
actually load the value before testing it) and then didn't properly
fallback to printing the node unit in that case.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
We constantly access /chosen, among other in the console I/O routines
so instead of doing a path walk every time, cache the phandle
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
We had lots of duplication of code between root.fs and fdt.fs
The reason we didn't use root.fs in the first place is that it tried
to create the root node and the chosen node which we already have via
the fdt.
Instead, modify root.fs to check for their presence and only "extend"
them in that case.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
After removal of the QTD, the device driver needs to make sure that
the host controller is really done with this QTD, and does not have
any local/cached copy of this. This is achieved by employing a 3-bit
handshake as explained in the echi spec 4.8.2 and Fig 4-10
Also add missing memory barrier.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
* Start the control/bulk processing after ed is written
* Clear the content of control_head_ed and bulk_head_ed
once done using them.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
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>
Or it will continue DMA'ing which is not a good idea. On recent qemu's
that add proper DMA error handling, it will get into error state.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
We cannot just access MMIO like that. On KVM for example, this has
to be hypercalls. On js2x, we need to use special cache-inhibited
loads and stores.
We have accessors in cache.h, we just need to use them. However that
means that read/write_reg() are no longer suitable for in-memory
byteswaps. We need to use the accessors in byteorder.h for that
While at it, we also fix the code to use mb() instead of barrier()
as a full memory barrier is needed to actually order things.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
There is no point in overloading all the OFW exception vectors
and the "syscalls" are as well implemented as simple calls since
the "modules" don't use them anyway.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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>
As quiesce is not a standard interface which is not what everybody
supports. Now make quiesce call when the stdin is closed. This makes
sure that the inteface is call always and is not dependent on OS
calling quiesce.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
* Integrated with generic scsi
* Support multiple LUNs
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
[ Changed to adapt to latest scsi rework ]
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
* Implement USB ehci bulk transfer
* USB core add bulk transfer api
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Support for usb generic hub driver.
Todo: Detect disconnects and remove device
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Call usb-core routine to setup the newly found device
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Discover devices connected on the controller
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
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>
* Configures the newly found usb devices.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Fixes-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Have a device structure pool and provide apis usb_devpool_[get,put]
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Introduce generice usb_send_control and implement correspoding stubs
in ohci and ehci
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
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>
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>