Lines Matching full:private

265 	if (cdev->private->flags.initialized) {  in ccw_device_unregister()
266 cdev->private->flags.initialized = 0; in ccw_device_unregister()
305 cdev->private->state != DEV_STATE_DISCONNECTED) { in ccw_device_set_offline()
307 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_offline()
308 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_offline()
316 "0.%x.%04x\n", ret, cdev->private->dev_id.ssid, in ccw_device_set_offline()
317 cdev->private->dev_id.devno); in ccw_device_set_offline()
320 state = cdev->private->state; in ccw_device_set_offline()
324 cdev->private->state = state; in ccw_device_set_offline()
327 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_offline()
328 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_offline()
330 if (cdev->private->state == DEV_STATE_BOXED) { in ccw_device_set_offline()
333 } else if (cdev->private->state == DEV_STATE_NOT_OPER) { in ccw_device_set_offline()
342 cdev->private->state = DEV_STATE_OFFLINE; in ccw_device_set_offline()
379 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); in ccw_device_set_online()
383 ret, cdev->private->dev_id.ssid, in ccw_device_set_online()
384 cdev->private->dev_id.devno); in ccw_device_set_online()
391 if ((cdev->private->state != DEV_STATE_ONLINE) && in ccw_device_set_online()
392 (cdev->private->state != DEV_STATE_W4SENSE)) { in ccw_device_set_online()
395 if (cdev->private->state == DEV_STATE_BOXED) { in ccw_device_set_online()
398 } else if (cdev->private->state == DEV_STATE_NOT_OPER) { in ccw_device_set_online()
421 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()
431 wait_event(cdev->private->wait_q, (dev_fsm_final_state(cdev) || in ccw_device_set_online()
432 cdev->private->state == DEV_STATE_DISCONNECTED)); in ccw_device_set_online()
440 ret2, cdev->private->dev_id.ssid, in ccw_device_set_online()
441 cdev->private->dev_id.devno); in ccw_device_set_online()
442 cdev->private->state = DEV_STATE_OFFLINE; in ccw_device_set_online()
451 if (cdev->private->state == DEV_STATE_DISCONNECTED) { in online_store_handle_offline()
465 if (cdev->private->state == DEV_STATE_BOXED) { in online_store_recog_and_online()
469 wait_event(cdev->private->wait_q, in online_store_recog_and_online()
470 cdev->private->flags.recog_done); in online_store_recog_and_online()
471 if (cdev->private->state != DEV_STATE_OFFLINE) in online_store_recog_and_online()
487 if (force && cdev->private->state == DEV_STATE_BOXED) { in online_store_handle_online()
492 cdev->private->state = DEV_STATE_NOT_OPER; in online_store_handle_online()
508 if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) in online_store()
512 cdev->private->state != DEV_STATE_DISCONNECTED) { in online_store()
517 if (work_pending(&cdev->private->todo_work)) { in online_store()
546 atomic_set(&cdev->private->onoff, 0); in online_store()
558 switch (cdev->private->state) { in available_show()
651 return ccw_dev_id_is_equal(&cdev->private->dev_id, dev_id); in match_dev_id()
691 cio_gp_dma_free(cdev->private->dma_pool, cdev->private->dma_area, in ccw_device_release()
692 sizeof(*cdev->private->dma_area)); in ccw_device_release()
693 cio_gp_dma_destroy(cdev->private->dma_pool, &cdev->dev); in ccw_device_release()
696 kfree(cdev->private); in ccw_device_release()
708 cdev->private = kzalloc(sizeof(struct ccw_device_private), in io_subchannel_allocate_dev()
710 if (!cdev->private) in io_subchannel_allocate_dev()
717 cdev->private->dma_pool = dma_pool; in io_subchannel_allocate_dev()
718 cdev->private->dma_area = cio_gp_dma_zalloc(dma_pool, &cdev->dev, in io_subchannel_allocate_dev()
719 sizeof(*cdev->private->dma_area)); in io_subchannel_allocate_dev()
720 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()
759 ret = dev_set_name(&cdev->dev, "0.%x.%04x", cdev->private->dev_id.ssid, in io_subchannel_initialize_dev()
760 cdev->private->dev_id.devno); in io_subchannel_initialize_dev()
842 cdev->private->dev_id.ssid, in io_subchannel_register()
843 cdev->private->dev_id.devno); in io_subchannel_register()
860 cdev->private->dev_id.ssid, in io_subchannel_register()
861 cdev->private->dev_id.devno, ret); in io_subchannel_register()
870 cdev->private->flags.recog_done = 1; in io_subchannel_register()
871 wake_up(&cdev->private->wait_q); in io_subchannel_register()
897 cdev->private->flags.recog_done = 1; in io_subchannel_recog_done()
900 switch (cdev->private->state) { in io_subchannel_recog_done()
904 cdev->private->flags.recog_done = 1; in io_subchannel_recog_done()
961 cdev->private->dev_id.ssid, in ccw_device_move_to_sch()
962 cdev->private->dev_id.devno, sch->schid.ssid, in ccw_device_move_to_sch()
1087 /* Allocate I/O subchannel private data. */ in io_subchannel_probe()
1154 if (cdev->private->state == DEV_STATE_ONLINE) { in io_subchannel_terminate_path()
1183 cdev->private->path_gone_mask |= mask; in io_subchannel_chp_event()
1190 cdev->private->path_new_mask |= mask; in io_subchannel_chp_event()
1197 cdev->private->path_gone_mask |= mask; in io_subchannel_chp_event()
1205 cdev->private->path_new_mask |= mask; in io_subchannel_chp_event()
1227 cdev->handler(cdev, cdev->private->intparm, ERR_PTR(-EIO)); in io_subchannel_quiesce()
1229 cdev->private->state = DEV_STATE_QUIESCE; in io_subchannel_quiesce()
1230 cdev->private->iretry = 255; in io_subchannel_quiesce()
1235 wait_event(cdev->private->wait_q, in io_subchannel_quiesce()
1236 cdev->private->state != DEV_STATE_QUIESCE); in io_subchannel_quiesce()
1254 return (cdev->private->state == DEV_STATE_DISCONNECTED || in device_is_disconnected()
1255 cdev->private->state == DEV_STATE_DISCONNECTED_SENSE_ID); in device_is_disconnected()
1265 switch (cdev->private->state) { in recovery_check()
1273 cdev->private->dev_id.ssid, in recovery_check()
1274 cdev->private->dev_id.devno); in recovery_check()
1332 struct ccw_dev_id *id = &cdev->private->dev_id; in purge_fn()
1336 (cdev->private->state == DEV_STATE_OFFLINE) && in purge_fn()
1337 (atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) { in purge_fn()
1341 atomic_set(&cdev->private->onoff, 0); in purge_fn()
1368 cdev->private->flags.fake_irb = 0; in ccw_device_set_disconnected()
1369 cdev->private->state = DEV_STATE_DISCONNECTED; in ccw_device_set_disconnected()
1382 cdev->private->state = DEV_STATE_NOT_OPER; in ccw_device_set_notoper()
1413 if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { in sch_get_action()
1425 if (cdev->online && !cdev->private->flags.resuming) in sch_get_action()
1427 if (cdev->private->state == DEV_STATE_NOT_OPER) in sch_get_action()
1456 if (cdev && work_pending(&cdev->private->todo_work)) in io_subchannel_sch_event()
1486 if (cdev->private->state == DEV_STATE_SENSE_ID) { in io_subchannel_sch_event()
1517 if (cdev->private->flags.resuming) { in io_subchannel_sch_event()
1534 if (!cdev || !cdev->private->flags.resuming) in io_subchannel_sch_event()
1577 cdev->private->int_class = cdrv->int_class; in ccw_device_set_int_class()
1579 cdev->private->int_class = IRQIO_CIO; in ccw_device_set_int_class()
1611 if (cdev->private->state == DEV_STATE_ONLINE) in ccw_device_enable_console()
1746 cdev->private->int_class = IRQIO_CIO; in ccw_device_probe()
1769 wait_event(cdev->private->wait_q, in ccw_device_remove()
1774 ret, cdev->private->dev_id.ssid, in ccw_device_remove()
1775 cdev->private->dev_id.devno); in ccw_device_remove()
1782 cdev->private->int_class = IRQIO_CIO; in ccw_device_remove()
1805 if (work_pending(&cdev->private->todo_work)) in ccw_device_pm_prepare()
1808 if (atomic_read(&cdev->private->onoff)) in ccw_device_pm_prepare()
1843 cm_enabled = cdev->private->cmb != NULL; in ccw_device_pm_freeze()
1871 cm_enabled = cdev->private->cmb != NULL; in ccw_device_pm_thaw()
1901 cdev->private->flags.resuming = 1; in __ccw_device_pm_restore()
1902 cdev->private->path_new_mask = LPM_ANYPATH; in __ccw_device_pm_restore()
1910 if (cdev->private->state != DEV_STATE_ONLINE && in __ccw_device_pm_restore()
1911 cdev->private->state != DEV_STATE_OFFLINE) in __ccw_device_pm_restore()
1916 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev) || in __ccw_device_pm_restore()
1917 cdev->private->state == DEV_STATE_DISCONNECTED); in __ccw_device_pm_restore()
1921 cdev->private->flags.resuming = 0; in __ccw_device_pm_restore()
1927 cdev->private->state = DEV_STATE_BOXED; in resume_handle_boxed()
1936 cdev->private->state = DEV_STATE_DISCONNECTED; in resume_handle_disc()
1956 switch (cdev->private->state) { in ccw_device_pm_restore()
1959 cdev->private->flags.donotify = 0; in ccw_device_pm_restore()
1989 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); in ccw_device_pm_restore()
1999 if (cdev->private->cmb) { in ccw_device_pm_restore()
2005 "(rc=%d)\n", cdev->private->dev_id.ssid, in ccw_device_pm_restore()
2006 cdev->private->dev_id.devno, ret); in ccw_device_pm_restore()
2125 cdev->private->dev_id.ssid, cdev->private->dev_id.devno, in ccw_device_sched_todo()
2127 if (cdev->private->todo >= todo) in ccw_device_sched_todo()
2129 cdev->private->todo = todo; in ccw_device_sched_todo()
2133 if (!queue_work(cio_work_q, &cdev->private->todo_work)) { in ccw_device_sched_todo()