Without the close-dev successive ping command fails to get the arguments,
because the net device is not instantiated as the open-count is not
decremented.
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>
* 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>
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>
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>
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>
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>
Code inherited from libusb code 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>
* Create usb directory
* Remove compilation of slof-usb code
* Generalize pci-class_0c.fs
* Add usb-static.fs with alias and dummy usb-scan
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
This patch enumerates aliases (e.g. disk, disk1, disk2 etc.)
for multiple disk or cdrom provided
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Combine both cdrom and disk alias creation.
[ some more scope of unifying discovery routine ]
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
grub2 is bogus, it looks for "/memory" to check for available
memory. On a system with multiple memory nodes that might return
anything and not necessarily the RMA node which is the only one
usable in real mode.
This adds a hack to the client interface code which transforms
any request for "/memory" to explicitly look for "/memory@0"
which returns the RMA node.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
We now exclusively use the proper SCSI command interface to vio-vscsi.fs
and move all of the higher level command building from vio-vscsi.fs
to scsi-disk.fs with the exception of the ones used during probe.
[ Even those could be moved out by in large part by opening/closing
the device and letting it print its own inquiry data but that's less
urgent. In fact we could have a generic "Probe SCSI bus" helper
]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This reworks the vio-vscsi driver to funnel all SCSI commands through
a more/less generic SCSI command interface. Adds the ability to retry
based on the sense code and busy status and handles various conditions
better.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To make 4k scsi devices to work, allocated memory needs to be increased
accordingly
Tested in the following scenario:
modprobe scsi_debug dev_size_mb=100 sector_size=4096
parted /dev/sdc u b p
Model: Linux scsi_debug (scsi)
Disk /dev/sdc: 209715200B
Sector size (logical/physical): 4096B/4096B
Partition Table: msdos
Number Start End Size Type File system Flags
1 262144B 2097151B 1835008B primary boot,
prep, type=41
2 2097152B 200015871B 197918720B primary type=83
qemu-system-ppc64 -enable-kvm -M pseries -m 1024 -nographic -drive
file=/dev/sdc,if=none,format=raw,id=drive-scsi0 -device
scsi-block,drive=drive-scsi0,id=scsi0 -vga none
Signed-off-by: Dinar Valeev <dvaleev@suse.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Some folks put a whole zImage in there, and we can easily cope
with more than 8M nowadays.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
It can be stored in nvram. It defaults to a platform specified default
currently set to 256MB on js2x and 16K on qemu.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This fixes booting from a path that has an explicitly specified
unit address on a wildcard node
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
instance>path (and instance>qpath) which are used among others by
the client interface "instance-to-path" are broken when dealing
with wildcard nodes (node with no unit address which obtain one
when opened).
This fixes this by properly using the instance address when building
instance path.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
There was a hack there involving having no #address-cells property
in the parent and "manual" parsing of the resulting address numbers
but this really didn't work properly.
I added (the hack is still there until I'm sure nothing relies on it)
a proper handling of wildcard nodes, changing match-unit to match them
properly, and recovering the unit address in find-component.
There are still issues, among other instance>package still loses the
unit address, as does disk-label (for different reasons).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>