Lines Matching full:private
251 if (cdev->private->flags.initialized) { in ccw_device_unregister()
252 cdev->private->flags.initialized = 0; in ccw_device_unregister()
291 cdev->private->state != DEV_STATE_DISCONNECTED) { in ccw_device_set_offline()
293 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_offline()
294 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_offline()
302 "0.%x.%04x\n", ret, cdev->private->dev_id.ssid, in ccw_device_set_offline()
303 cdev->private->dev_id.devno); in ccw_device_set_offline()
306 state = cdev->private->state; in ccw_device_set_offline()
310 cdev->private->state = state; in ccw_device_set_offline()
313 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_offline()
314 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_offline()
316 if (cdev->private->state == DEV_STATE_BOXED) { in ccw_device_set_offline()
319 } else if (cdev->private->state == DEV_STATE_NOT_OPER) { in ccw_device_set_offline()
328 cdev->private->state = DEV_STATE_OFFLINE; in ccw_device_set_offline()
365 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); in ccw_device_set_online()
369 ret, cdev->private->dev_id.ssid, in ccw_device_set_online()
370 cdev->private->dev_id.devno); in ccw_device_set_online()
377 if ((cdev->private->state != DEV_STATE_ONLINE) && in ccw_device_set_online()
378 (cdev->private->state != DEV_STATE_W4SENSE)) { in ccw_device_set_online()
381 if (cdev->private->state == DEV_STATE_BOXED) { in ccw_device_set_online()
384 } else if (cdev->private->state == DEV_STATE_NOT_OPER) { in ccw_device_set_online()
407 cdev->private->state != DEV_STATE_DISCONNECTED) { in ccw_device_set_online()
409 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_online()
410 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_online()
417 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_online()
418 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_online()
426 ret2, cdev->private->dev_id.ssid, in ccw_device_set_online()
427 cdev->private->dev_id.devno); in ccw_device_set_online()
428 cdev->private->state = DEV_STATE_OFFLINE; in ccw_device_set_online()
437 if (cdev->private->state == DEV_STATE_DISCONNECTED) { in online_store_handle_offline()
451 if (cdev->private->state == DEV_STATE_BOXED) { in online_store_recog_and_online()
455 wait_event(cdev->private->wait_q, in online_store_recog_and_online()
456 cdev->private->flags.recog_done); in online_store_recog_and_online()
457 if (cdev->private->state != DEV_STATE_OFFLINE) in online_store_recog_and_online()
473 if (force && cdev->private->state == DEV_STATE_BOXED) { in online_store_handle_online()
478 cdev->private->state = DEV_STATE_NOT_OPER; in online_store_handle_online()
494 if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) in online_store()
498 cdev->private->state != DEV_STATE_DISCONNECTED) { in online_store()
503 if (work_pending(&cdev->private->todo_work)) { in online_store()
532 atomic_set(&cdev->private->onoff, 0); in online_store()
544 switch (cdev->private->state) { in available_show()
629 return ccw_dev_id_is_equal(&cdev->private->dev_id, dev_id); in match_dev_id()
669 cio_gp_dma_free(cdev->private->dma_pool, cdev->private->dma_area, in ccw_device_release()
670 sizeof(*cdev->private->dma_area)); in ccw_device_release()
671 cio_gp_dma_destroy(cdev->private->dma_pool, &cdev->dev); in ccw_device_release()
674 kfree(cdev->private); in ccw_device_release()
689 cdev->private = kzalloc(sizeof(struct ccw_device_private), in io_subchannel_allocate_dev()
691 if (!cdev->private) { in io_subchannel_allocate_dev()
706 cdev->private->dma_pool = dma_pool; in io_subchannel_allocate_dev()
707 cdev->private->dma_area = cio_gp_dma_zalloc(dma_pool, &cdev->dev, in io_subchannel_allocate_dev()
708 sizeof(*cdev->private->dma_area)); in io_subchannel_allocate_dev()
709 if (!cdev->private->dma_area) { in io_subchannel_allocate_dev()
718 kfree(cdev->private); in io_subchannel_allocate_dev()
730 struct ccw_device_private *priv = cdev->private; in io_subchannel_initialize_dev()
752 ret = dev_set_name(&cdev->dev, "0.%x.%04x", cdev->private->dev_id.ssid, in io_subchannel_initialize_dev()
753 cdev->private->dev_id.devno); in io_subchannel_initialize_dev()
835 cdev->private->dev_id.ssid, in io_subchannel_register()
836 cdev->private->dev_id.devno); in io_subchannel_register()
845 cdev->private->dev_id.ssid, in io_subchannel_register()
846 cdev->private->dev_id.devno, ret); in io_subchannel_register()
855 cdev->private->flags.recog_done = 1; in io_subchannel_register()
856 wake_up(&cdev->private->wait_q); in io_subchannel_register()
869 cdev->private->flags.recog_done = 1; in io_subchannel_recog_done()
872 switch (cdev->private->state) { in io_subchannel_recog_done()
876 cdev->private->flags.recog_done = 1; in io_subchannel_recog_done()
933 cdev->private->dev_id.ssid, in ccw_device_move_to_sch()
934 cdev->private->dev_id.devno, sch->schid.ssid, in ccw_device_move_to_sch()
1053 /* Allocate I/O subchannel private data. */ in io_subchannel_probe()
1119 if (cdev->private->state == DEV_STATE_ONLINE) { in io_subchannel_terminate_path()
1149 cdev->private->path_gone_mask |= mask; in io_subchannel_chp_event()
1156 cdev->private->path_new_mask |= mask; in io_subchannel_chp_event()
1163 cdev->private->path_gone_mask |= mask; in io_subchannel_chp_event()
1171 cdev->private->path_new_mask |= mask; in io_subchannel_chp_event()
1205 cdev->handler(cdev, cdev->private->intparm, ERR_PTR(-EIO)); in io_subchannel_quiesce()
1207 cdev->private->state = DEV_STATE_QUIESCE; in io_subchannel_quiesce()
1208 cdev->private->iretry = 255; in io_subchannel_quiesce()
1213 wait_event(cdev->private->wait_q, in io_subchannel_quiesce()
1214 cdev->private->state != DEV_STATE_QUIESCE); in io_subchannel_quiesce()
1232 return (cdev->private->state == DEV_STATE_DISCONNECTED || in device_is_disconnected()
1233 cdev->private->state == DEV_STATE_DISCONNECTED_SENSE_ID); in device_is_disconnected()
1243 switch (cdev->private->state) { in recovery_check()
1251 cdev->private->dev_id.ssid, in recovery_check()
1252 cdev->private->dev_id.devno); in recovery_check()
1310 struct ccw_dev_id *id = &cdev->private->dev_id; in purge_fn()
1315 (cdev->private->state == DEV_STATE_OFFLINE) && in purge_fn()
1316 (atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) { in purge_fn()
1321 atomic_set(&cdev->private->onoff, 0); in purge_fn()
1348 cdev->private->flags.fake_irb = 0; in ccw_device_set_disconnected()
1349 cdev->private->state = DEV_STATE_DISCONNECTED; in ccw_device_set_disconnected()
1362 cdev->private->state = DEV_STATE_NOT_OPER; in ccw_device_set_notoper()
1393 if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { in sch_get_action()
1407 if (cdev->private->state == DEV_STATE_NOT_OPER) in sch_get_action()
1436 if (cdev && work_pending(&cdev->private->todo_work)) in io_subchannel_sch_event()
1466 if (cdev->private->state == DEV_STATE_SENSE_ID) { in io_subchannel_sch_event()
1551 cdev->private->int_class = cdrv->int_class; in ccw_device_set_int_class()
1553 cdev->private->int_class = IRQIO_CIO; in ccw_device_set_int_class()
1585 if (cdev->private->state == DEV_STATE_ONLINE) in ccw_device_enable_console()
1712 cdev->private->int_class = IRQIO_CIO; in ccw_device_probe()
1735 wait_event(cdev->private->wait_q, in ccw_device_remove()
1740 ret, cdev->private->dev_id.ssid, in ccw_device_remove()
1741 cdev->private->dev_id.devno); in ccw_device_remove()
1748 cdev->private->int_class = IRQIO_CIO; in ccw_device_remove()
1859 cdev->private->dev_id.ssid, cdev->private->dev_id.devno, in ccw_device_sched_todo()
1861 if (cdev->private->todo >= todo) in ccw_device_sched_todo()
1863 cdev->private->todo = todo; in ccw_device_sched_todo()
1867 if (!queue_work(cio_work_q, &cdev->private->todo_work)) { in ccw_device_sched_todo()