Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebased patches from beaker-fork #31

Closed
wants to merge 22 commits into from
Closed

Rebased patches from beaker-fork #31

wants to merge 22 commits into from

Conversation

orosp
Copy link

@orosp orosp commented Aug 17, 2017

No description provided.

orosp and others added 22 commits August 17, 2017 08:53
Signed-off-by Petr Oros <poros@redhat.com>
This patch makes it possible to run cross-platform unit tests by
faking the architecture returned by uname(2) to match the format of
/proc/cpuinfo.
Not sure how to contribute these back to the Universität Regensburg
list...
In spite of its name, the SCSI_IOCTL_GET_PCI ioctl will actually return
the kernel name for the underlying SCSI adapter no matter whether it's
on the PCI bus or not. For example an IBM VIO SCSI adapter on the vio
bus might return 30000002 for this ioctl.

Since this doesn't look like a PCI bus address, the guessBusInfo()
function would then make a bad guess, returning businfo as
parisc@30000002 which is not right.

We can figure out the right businfo without guessing by looking in sysfs
instead.
Older IBM POWER systems (for example JS20) have a /memory-controller@*
node in their device tree, which exposes DIMM info under IBM-specific
properties.
The "64-bit capable" bit can also be set for CPUs which are not
x86-based, like Itanium and ARM. Changed it to "lm" (long mode) instead
which matches the existing Linux CPU flag.
The rest of the codebase expects to only find at most one "memory" node,
even though the SMBIOS data may indicate more than one.

If we really do find more than one memory array with type System Memory
in SMBIOS, we just discard the subsequent ones and place all memory
devices (DIMMs) into the first memory array.
This avoids accidentally parenting a SCSI device onto the wrong host
from the previous iteration of the loop, if no parent device was found
in the current iteration.
This matches the behaviour of guessBusInfo() for USB device names of the
form host-port:config.interface.

This patch allows SCSI devices where the host is a USB device to be
parented correctly.
Signed-off-by: Petr Oros <poros@redhat.com>
@lyonel
Copy link
Owner

lyonel commented Sep 25, 2017

merged upstream.

@lyonel lyonel closed this Sep 25, 2017
lyonel added a commit that referenced this pull request Sep 25, 2017
lyonel added a commit that referenced this pull request Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants