Skip to contentSkip to conversation

s390: ccw device reconnect oops.

PATCH New Martin Schwidefsky 1 participant 1 message Oct 6, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: ccw device reconnect oops.

Hi Andrew,
this patch is a bug fix that should be included in 2.6.14. The klist bus_find_device/driver_find_device rework has introduced the bug. The machine will oops if an online ccw device that has been detached gets reconnected.

blue skies,
Martin.

---

[patch] s390: ccw device reconnect oops.

From: Cornelia Huck <[email protected]>

Search for a disconnect ccw_device on the ccw bus rather than on the css bus (was a typo in patch I did for the klist conversion). A cast to an embedding ccw_device from an embedded device in a struct subchannel will lead us to oopses.

drivers/s390/cio/device.c +1 -1
diff -urpN linux-2.6/drivers/s390/cio/device.c linux-2.6-patched/drivers/s390/cio/device.c
@@ -544,7 +544,7 @@ get_disc_ccwdev_by_devno(unsigned int de
 		.sibling = sibling,
 	};
 
-	dev = bus_find_device(&css_bus_type, NULL, &data, match_devno);
+	dev = bus_find_device(&ccw_bus_type, NULL, &data, match_devno);
 
 	return dev ? to_ccwdev(dev) : NULL;
 }