On Mon, 2016-04-11 at 00:02 +0200, John Paul Adrian Glaubitz wrote: > On 04/10/2016 10:17 PM, Ben Hutchings wrote: > > > > Like everything else in the installer initramfs, they are installed > > from a udeb. See build/pkg-lists/*/sparc64.cfg > Yeah, I remember that now. Indeed, scsi-core-modules was missing. > However, nic-modules was already there. > > I rebuilt d-i now making sure both are present and created a new > set of images. When booting on a SPARC-T5, the modules are just > not loaded automatically. [...] > So, the question now is why those modules aren't loaded automatically > when boot the debian-installer initrd and kernel.
That turns out to be quite simple: - These are drivers for the vio bus, and the module aliases generated from their device ID tables have the form "vio:T<type>S<compat>". - The vio bus can exist on PowerPC and SPARC, and they have two separate (but similar) implementations. - The PowerPC implementation generates module aliases for vio devices but the SPARC implementation does not. So autoloading currently only works on PowerPC. The attached patch might fix that, though the correct fix would presumably be to merge the two implementations. Ben. -- Ben Hutchings Humans are not rational beings; they are rationalising beings.
From: Ben Hutchings <b...@decadent.org.uk> Date: Mon, 11 Apr 2016 00:30:34 +0100 Subject: sparc: vio: Add modalias attribute to support auto-loading drivers Bug-Debian: https://bugs.debian.org/815977 Add a modalias attribute for vio devices, matching the syntax supported by file2alias and the PowerPC vio implementation. Signed-off-by: Ben Hutchings <b...@decadent.org.uk> --- --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c @@ -105,9 +105,31 @@ static ssize_t type_show(struct device *dev, return sprintf(buf, "%s\n", vdev->type); } +static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + const struct vio_dev *vdev = to_vio_dev(dev); + struct device_node *dn; + const char *cp; + + dn = dev->of_node; + if (!dn) { + strcpy(buf, "\n"); + return strlen(buf); + } + cp = of_get_property(dn, "compatible", NULL); + if (!cp) { + strcpy(buf, "\n"); + return strlen(buf); + } + + return sprintf(buf, "vio:T%sS%s\n", vdev->type, cp); +} + static struct device_attribute vio_dev_attrs[] = { __ATTR_RO(devspec), __ATTR_RO(type), + __ATTR_RO(modalias), __ATTR_NULL };
signature.asc
Description: This is a digitally signed message part