Lines Matching refs:stor_device
546 struct storvsc_device *stor_device; in get_out_stor_device() local
548 stor_device = hv_get_drvdata(device); in get_out_stor_device()
550 if (stor_device && stor_device->destroy) in get_out_stor_device()
551 stor_device = NULL; in get_out_stor_device()
553 return stor_device; in get_out_stor_device()
568 struct storvsc_device *stor_device; in get_in_stor_device() local
570 stor_device = hv_get_drvdata(device); in get_in_stor_device()
572 if (!stor_device) in get_in_stor_device()
580 if (stor_device->destroy && in get_in_stor_device()
581 (atomic_read(&stor_device->num_outstanding_req) == 0)) in get_in_stor_device()
582 stor_device = NULL; in get_in_stor_device()
585 return stor_device; in get_in_stor_device()
592 struct storvsc_device *stor_device; in handle_sc_creation() local
595 stor_device = get_out_stor_device(device); in handle_sc_creation()
596 if (!stor_device) in handle_sc_creation()
599 if (stor_device->open_sub_channel == false) in handle_sc_creation()
614 struct storvsc_device *stor_device; in handle_multichannel_storage() local
622 stor_device = get_out_stor_device(device); in handle_multichannel_storage()
623 if (!stor_device) in handle_multichannel_storage()
626 request = &stor_device->init_request; in handle_multichannel_storage()
629 stor_device->open_sub_channel = true; in handle_multichannel_storage()
643 stor_device->open_sub_channel = false; in handle_multichannel_storage()
675 stor_device->open_sub_channel = true; in handle_multichannel_storage()
681 struct storvsc_device *stor_device; in storvsc_channel_init() local
688 stor_device = get_out_stor_device(device); in storvsc_channel_init()
689 if (!stor_device) in storvsc_channel_init()
692 request = &stor_device->init_request; in storvsc_channel_init()
818 stor_device->max_transfer_bytes = in storvsc_channel_init()
969 struct storvsc_device *stor_device; in storvsc_on_io_completion() local
972 stor_device = hv_get_drvdata(device); in storvsc_on_io_completion()
1018 if (atomic_dec_and_test(&stor_device->num_outstanding_req) && in storvsc_on_io_completion()
1019 stor_device->drain_notify) in storvsc_on_io_completion()
1020 wake_up(&stor_device->waiting_to_drain); in storvsc_on_io_completion()
1030 struct storvsc_device *stor_device; in storvsc_on_receive() local
1039 stor_device = get_in_stor_device(device); in storvsc_on_receive()
1045 work->host = stor_device->host; in storvsc_on_receive()
1058 struct storvsc_device *stor_device; in storvsc_on_channel_callback() local
1070 stor_device = get_in_stor_device(device); in storvsc_on_channel_callback()
1071 if (!stor_device) in storvsc_on_channel_callback()
1084 if ((request == &stor_device->init_request) || in storvsc_on_channel_callback()
1085 (request == &stor_device->reset_request)) { in storvsc_on_channel_callback()
1128 struct storvsc_device *stor_device; in storvsc_dev_remove() local
1131 stor_device = hv_get_drvdata(device); in storvsc_dev_remove()
1134 stor_device->destroy = true; in storvsc_dev_remove()
1143 storvsc_wait_to_drain(stor_device); in storvsc_dev_remove()
1159 kfree(stor_device); in storvsc_dev_remove()
1166 struct storvsc_device *stor_device; in storvsc_do_io() local
1172 stor_device = get_out_stor_device(device); in storvsc_do_io()
1174 if (!stor_device) in storvsc_do_io()
1220 atomic_inc(&stor_device->num_outstanding_req); in storvsc_do_io()
1295 struct storvsc_device *stor_device; in storvsc_host_reset_handler() local
1301 stor_device = get_out_stor_device(device); in storvsc_host_reset_handler()
1302 if (!stor_device) in storvsc_host_reset_handler()
1305 request = &stor_device->reset_request; in storvsc_host_reset_handler()
1312 vstor_packet->vm_srb.path_id = stor_device->path_id; in storvsc_host_reset_handler()
1317 (unsigned long)&stor_device->reset_request, in storvsc_host_reset_handler()
1336 storvsc_wait_to_drain(stor_device); in storvsc_host_reset_handler()
1547 struct storvsc_device *stor_device; in storvsc_probe() local
1589 stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL); in storvsc_probe()
1590 if (!stor_device) { in storvsc_probe()
1595 stor_device->destroy = false; in storvsc_probe()
1596 stor_device->open_sub_channel = false; in storvsc_probe()
1597 init_waitqueue_head(&stor_device->waiting_to_drain); in storvsc_probe()
1598 stor_device->device = device; in storvsc_probe()
1599 stor_device->host = host; in storvsc_probe()
1600 hv_set_drvdata(device, stor_device); in storvsc_probe()
1602 stor_device->port_number = host->host_no; in storvsc_probe()
1607 host_dev->path = stor_device->path_id; in storvsc_probe()
1608 host_dev->target = stor_device->target_id; in storvsc_probe()
1636 host->sg_tablesize = (stor_device->max_transfer_bytes >> PAGE_SHIFT); in storvsc_probe()
1667 kfree(stor_device); in storvsc_probe()
1676 struct storvsc_device *stor_device = hv_get_drvdata(dev); in storvsc_remove() local
1677 struct Scsi_Host *host = stor_device->host; in storvsc_remove()