@@ -49,6 +49,12 @@ unsigned int get_loadparm_index(void)
return atoui(loadparm_str);
}
+/*
+ * Find the subchannel connected to the given device (dev_no) and fill in the
+ * subchannel information block (schib) with the connected subchannel's info.
+ * NOTE: The global variable blk_schid is updated to contain the subchannel
+ * information.
+ */
static bool find_dev(Schib *schib, int dev_no)
{
int i, r;
@@ -62,15 +68,15 @@ static bool find_dev(Schib *schib, int dev_no)
if (!schib->pmcw.dnv) {
continue;
}
- if (!virtio_is_supported(blk_schid)) {
- continue;
- }
+
/* Skip net devices since no IPLB is created and therefore no
- * no network bootloader has been loaded
+ * network bootloader has been loaded
*/
- if (virtio_get_device_type() == VIRTIO_ID_NET && dev_no < 0) {
+ if (virtio_is_supported(blk_schid) &&
+ virtio_get_device_type() == VIRTIO_ID_NET && dev_no < 0) {
continue;
}
+
if ((dev_no < 0) || (schib->pmcw.dev == dev_no)) {
return true;
}