Lines Matching full:private
254 if (cdev->private->flags.initialized) { in ccw_device_unregister()
255 cdev->private->flags.initialized = 0; in ccw_device_unregister()
294 cdev->private->state != DEV_STATE_DISCONNECTED) { in ccw_device_set_offline()
296 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_offline()
297 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_offline()
305 "0.%x.%04x\n", ret, cdev->private->dev_id.ssid, in ccw_device_set_offline()
306 cdev->private->dev_id.devno); in ccw_device_set_offline()
309 state = cdev->private->state; in ccw_device_set_offline()
313 cdev->private->state = state; in ccw_device_set_offline()
316 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_offline()
317 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_offline()
319 if (cdev->private->state == DEV_STATE_BOXED) { in ccw_device_set_offline()
322 } else if (cdev->private->state == DEV_STATE_NOT_OPER) { in ccw_device_set_offline()
331 cdev->private->state = DEV_STATE_OFFLINE; in ccw_device_set_offline()
370 ret, cdev->private->dev_id.ssid, in ccw_device_set_online()
371 cdev->private->dev_id.devno); in ccw_device_set_online()
379 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); in ccw_device_set_online()
383 if ((cdev->private->state != DEV_STATE_ONLINE) && in ccw_device_set_online()
384 (cdev->private->state != DEV_STATE_W4SENSE)) { in ccw_device_set_online()
387 if (cdev->private->state == DEV_STATE_BOXED) { in ccw_device_set_online()
390 } else if (cdev->private->state == DEV_STATE_NOT_OPER) { in ccw_device_set_online()
413 cdev->private->state != DEV_STATE_DISCONNECTED) { in ccw_device_set_online()
415 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_online()
416 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_online()
423 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_online()
424 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_online()
432 ret2, cdev->private->dev_id.ssid, in ccw_device_set_online()
433 cdev->private->dev_id.devno); in ccw_device_set_online()
434 cdev->private->state = DEV_STATE_OFFLINE; in ccw_device_set_online()
443 if (cdev->private->state == DEV_STATE_DISCONNECTED) { in online_store_handle_offline()
457 if (cdev->private->state == DEV_STATE_BOXED) { in online_store_recog_and_online()
461 wait_event(cdev->private->wait_q, in online_store_recog_and_online()
462 cdev->private->flags.recog_done); in online_store_recog_and_online()
463 if (cdev->private->state != DEV_STATE_OFFLINE) in online_store_recog_and_online()
479 if (force && cdev->private->state == DEV_STATE_BOXED) { in online_store_handle_online()
484 cdev->private->state = DEV_STATE_NOT_OPER; in online_store_handle_online()
500 if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) in online_store()
504 cdev->private->state != DEV_STATE_DISCONNECTED) { in online_store()
509 if (work_pending(&cdev->private->todo_work)) { in online_store()
538 atomic_set(&cdev->private->onoff, 0); in online_store()
550 switch (cdev->private->state) { in available_show()
635 return ccw_dev_id_is_equal(&cdev->private->dev_id, dev_id); in match_dev_id()
677 cio_gp_dma_free(cdev->private->dma_pool, cdev->private->dma_area, in ccw_device_release()
678 sizeof(*cdev->private->dma_area)); in ccw_device_release()
679 cio_gp_dma_destroy(cdev->private->dma_pool, &cdev->dev); in ccw_device_release()
682 kfree(cdev->private); in ccw_device_release()
697 cdev->private = kzalloc(sizeof(struct ccw_device_private), in io_subchannel_allocate_dev()
699 if (!cdev->private) { in io_subchannel_allocate_dev()
714 cdev->private->dma_pool = dma_pool; in io_subchannel_allocate_dev()
715 cdev->private->dma_area = cio_gp_dma_zalloc(dma_pool, &cdev->dev, in io_subchannel_allocate_dev()
716 sizeof(*cdev->private->dma_area)); in io_subchannel_allocate_dev()
717 if (!cdev->private->dma_area) { in io_subchannel_allocate_dev()
726 kfree(cdev->private); in io_subchannel_allocate_dev()
738 struct ccw_device_private *priv = cdev->private; in io_subchannel_initialize_dev()
761 ret = dev_set_name(&cdev->dev, "0.%x.%04x", cdev->private->dev_id.ssid, in io_subchannel_initialize_dev()
762 cdev->private->dev_id.devno); in io_subchannel_initialize_dev()
845 cdev->private->dev_id.ssid, in io_subchannel_register()
846 cdev->private->dev_id.devno); in io_subchannel_register()
855 cdev->private->dev_id.ssid, in io_subchannel_register()
856 cdev->private->dev_id.devno, ret); in io_subchannel_register()
866 cdev->private->flags.recog_done = 1; in io_subchannel_register()
868 wake_up(&cdev->private->wait_q); in io_subchannel_register()
881 cdev->private->flags.recog_done = 1; in io_subchannel_recog_done()
884 switch (cdev->private->state) { in io_subchannel_recog_done()
888 cdev->private->flags.recog_done = 1; in io_subchannel_recog_done()
945 cdev->private->dev_id.ssid, in ccw_device_move_to_sch()
946 cdev->private->dev_id.devno, sch->schid.ssid, in ccw_device_move_to_sch()
1065 /* Allocate I/O subchannel private data. */ in io_subchannel_probe()
1133 if (cdev->private->state == DEV_STATE_ONLINE) { in io_subchannel_terminate_path()
1163 cdev->private->path_gone_mask |= mask; in io_subchannel_chp_event()
1170 cdev->private->path_new_mask |= mask; in io_subchannel_chp_event()
1177 cdev->private->path_gone_mask |= mask; in io_subchannel_chp_event()
1185 cdev->private->path_new_mask |= mask; in io_subchannel_chp_event()
1219 cdev->handler(cdev, cdev->private->intparm, ERR_PTR(-EIO)); in io_subchannel_quiesce()
1221 cdev->private->state = DEV_STATE_QUIESCE; in io_subchannel_quiesce()
1222 cdev->private->iretry = 255; in io_subchannel_quiesce()
1227 wait_event(cdev->private->wait_q, in io_subchannel_quiesce()
1228 cdev->private->state != DEV_STATE_QUIESCE); in io_subchannel_quiesce()
1246 return (cdev->private->state == DEV_STATE_DISCONNECTED || in device_is_disconnected()
1247 cdev->private->state == DEV_STATE_DISCONNECTED_SENSE_ID); in device_is_disconnected()
1257 switch (cdev->private->state) { in recovery_check()
1265 cdev->private->dev_id.ssid, in recovery_check()
1266 cdev->private->dev_id.devno); in recovery_check()
1324 struct ccw_dev_id *id = &cdev->private->dev_id; in purge_fn()
1329 (cdev->private->state == DEV_STATE_OFFLINE) && in purge_fn()
1330 (atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) { in purge_fn()
1335 atomic_set(&cdev->private->onoff, 0); in purge_fn()
1362 cdev->private->flags.fake_irb = 0; in ccw_device_set_disconnected()
1363 cdev->private->state = DEV_STATE_DISCONNECTED; in ccw_device_set_disconnected()
1376 cdev->private->state = DEV_STATE_NOT_OPER; in ccw_device_set_notoper()
1408 if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { in sch_get_action()
1422 if (cdev->private->state == DEV_STATE_NOT_OPER) in sch_get_action()
1451 if (cdev && work_pending(&cdev->private->todo_work)) in io_subchannel_sch_event()
1482 if (cdev->private->state == DEV_STATE_SENSE_ID) { in io_subchannel_sch_event()
1568 cdev->private->int_class = cdrv->int_class; in ccw_device_set_int_class()
1570 cdev->private->int_class = IRQIO_CIO; in ccw_device_set_int_class()
1602 if (cdev->private->state == DEV_STATE_ONLINE) in ccw_device_enable_console()
1729 cdev->private->int_class = IRQIO_CIO; in ccw_device_probe()
1752 wait_event(cdev->private->wait_q, in ccw_device_remove()
1757 ret, cdev->private->dev_id.ssid, in ccw_device_remove()
1758 cdev->private->dev_id.devno); in ccw_device_remove()
1765 cdev->private->int_class = IRQIO_CIO; in ccw_device_remove()
1876 cdev->private->dev_id.ssid, cdev->private->dev_id.devno, in ccw_device_sched_todo()
1878 if (cdev->private->todo >= todo) in ccw_device_sched_todo()
1880 cdev->private->todo = todo; in ccw_device_sched_todo()
1884 if (!queue_work(cio_work_q, &cdev->private->todo_work)) { in ccw_device_sched_todo()