s390: cio async subchannel reprobe.
Subsystems (2)
PATCH 7/24 s390: cio async subchannel reprobe.
From: Peter Oberparleiter <[email protected]>
[S390] cio async subchannel reprobe.
Changes in the DASD driver require an asynchronous implementation of the subchannel reprobe loop. This loop was so far only used by the blacklisting mechanism but is now available to all CCW device drivers.
Signed-off-by Peter Oberparleiter <[email protected]>
Signed-off-by Martin Schwidefsky <[email protected]>
---
drivers/s390/cio/blacklist.c | 35 ----------------------- drivers/s390/cio/css.c | 63 +++++++++++++++++++++++++++++++++++++++++++ drivers/s390/cio/device.c | 4 +- drivers/s390/cio/device.h | 6 ++++ include/asm-s390/cio.h | 2 + 5 files changed, 74 insertions(+), 36 deletions(-)
drivers/s390/cio/blacklist.c +1 -34
@@ -224,39 +224,6 @@ is_blacklisted (int ssid, int devno) }#ifdef CONFIG_PROC_FS -static int -__s390_redo_validation (struct subchannel_id schid,void *data) -{ -int ret; -struct subchannel *sch; - - sch =get_subchannel_by_schid (schid); -if (sch) { -/* Already known. */ -put_device (&sch->dev); -return 0 ; - } - ret =css_probe_device (schid); -if (ret == -ENXIO ) -return ret;/* We're through. */ -if (ret == -ENOMEM ) -/* Stop validation for now. Bad, but no need for a panic. */ -return ret; -return 0 ; -} - -/* -* Function: s390_redo_validation -* Look for no longer blacklisted devices -* FIXME: there must be a better way to do this */ -static inline void -s390_redo_validation (void ) -{ -CIO_TRACE_EVENT (0 ,"redoval" ); - -for_each_subchannel (__s390_redo_validation,NULL ); -} -/* * Function: blacklist_parse_proc_parameters * parse the stuff which is piped to /proc/cio_ignore
@@ -281,7 +248,7 @@ blacklist_parse_proc_parameters (char *breturn ; } -s390_redo_validation (); +css_schedule_reprobe (); }/* Iterator struct for all devices. */
drivers/s390/cio/css.c +63 -0
78 lines not on this page · raw message
drivers/s390/cio/device.c +2 -2
@@ -133,8 +133,8 @@ struct css_driver io_subchannel_driver =struct workqueue_struct *ccw_device_work;struct workqueue_struct *ccw_device_notify_work; -static wait_queue_head_t ccw_device_init_wq; -static atomic_t ccw_device_init_count; +wait_queue_head_t ccw_device_init_wq; +atomic_t ccw_device_init_count;static int __init init_ccw_bus_type (void )
drivers/s390/cio/device.h +6 -0
@@ -1,6 +1,10 @@#ifndef S390_DEVICE_H #define S390_DEVICE_H +#include <asm/ccwdev.h> +#include <asm/atomic.h> +#include <linux/wait.h> +/* * states of the device statemachine */
@@ -67,6 +71,8 @@ dev_fsm_final_state(struct ccw_device *cextern struct workqueue_struct *ccw_device_work;extern struct workqueue_struct *ccw_device_notify_work; +extern wait_queue_head_t ccw_device_init_wq; +extern atomic_t ccw_device_init_count;void io_subchannel_recog_done (struct ccw_device *cdev);
include/asm-s390/cio.h +2 -0
@@ -276,6 +276,8 @@ extern void wait_cons_dev(void);extern void clear_all_subchannels (void ); +extern void css_schedule_reprobe (void ); +#endif #endif