5 * states of the device statemachine
15 DEV_STATE_DISBAND_PGID,
17 /* states to wait for i/o completion before doing something */
18 DEV_STATE_CLEAR_VERIFY,
19 DEV_STATE_TIMEOUT_KILL,
22 /* special states for devices gone not operational */
23 DEV_STATE_DISCONNECTED,
24 DEV_STATE_DISCONNECTED_SENSE_ID,
31 * asynchronous events of the device statemachine
45 * action called through jumptable
47 typedef void (fsm_func_t)(struct ccw_device *, enum dev_event);
48 extern fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS];
51 dev_fsm_event(struct ccw_device *cdev, enum dev_event dev_event)
53 dev_jumptable[cdev->private->state][dev_event](cdev, dev_event);
57 * Delivers 1 if the device state is final.
60 dev_fsm_final_state(struct ccw_device *cdev)
62 return (cdev->private->state == DEV_STATE_NOT_OPER ||
63 cdev->private->state == DEV_STATE_OFFLINE ||
64 cdev->private->state == DEV_STATE_ONLINE ||
65 cdev->private->state == DEV_STATE_BOXED);
68 extern struct workqueue_struct *ccw_device_work;
69 extern struct workqueue_struct *ccw_device_notify_work;
71 void io_subchannel_recog_done(struct ccw_device *cdev);
73 int ccw_device_cancel_halt_clear(struct ccw_device *);
75 int ccw_device_register(struct ccw_device *);
76 void ccw_device_do_unreg_rereg(void *);
77 void ccw_device_call_sch_unregister(void *);
79 int ccw_device_recognition(struct ccw_device *);
80 int ccw_device_online(struct ccw_device *);
81 int ccw_device_offline(struct ccw_device *);
83 /* Function prototypes for device status and basic sense stuff. */
84 void ccw_device_accumulate_irb(struct ccw_device *, struct irb *);
85 void ccw_device_accumulate_basic_sense(struct ccw_device *, struct irb *);
86 int ccw_device_accumulate_and_sense(struct ccw_device *, struct irb *);
87 int ccw_device_do_sense(struct ccw_device *, struct irb *);
89 /* Function prototypes for sense id stuff. */
90 void ccw_device_sense_id_start(struct ccw_device *);
91 void ccw_device_sense_id_irq(struct ccw_device *, enum dev_event);
92 void ccw_device_sense_id_done(struct ccw_device *, int);
94 /* Function prototypes for path grouping stuff. */
95 void ccw_device_sense_pgid_start(struct ccw_device *);
96 void ccw_device_sense_pgid_irq(struct ccw_device *, enum dev_event);
97 void ccw_device_sense_pgid_done(struct ccw_device *, int);
99 void ccw_device_verify_start(struct ccw_device *);
100 void ccw_device_verify_irq(struct ccw_device *, enum dev_event);
101 void ccw_device_verify_done(struct ccw_device *, int);
103 void ccw_device_disband_start(struct ccw_device *);
104 void ccw_device_disband_irq(struct ccw_device *, enum dev_event);
105 void ccw_device_disband_done(struct ccw_device *, int);
107 int ccw_device_call_handler(struct ccw_device *);
109 int ccw_device_stlck(struct ccw_device *);
111 /* qdio needs this. */
112 void ccw_device_set_timeout(struct ccw_device *, int);
113 extern struct subchannel_id ccw_device_get_subchannel_id(struct ccw_device *);
115 void retry_set_schib(struct ccw_device *cdev);