Lines Matching refs:hv_dev
137 struct hv_device *hv_dev = device_to_hv_device(dev); in id_show() local
139 if (!hv_dev->channel) in id_show()
141 return sysfs_emit(buf, "%d\n", hv_dev->channel->offermsg.child_relid); in id_show()
148 struct hv_device *hv_dev = device_to_hv_device(dev); in state_show() local
150 if (!hv_dev->channel) in state_show()
152 return sysfs_emit(buf, "%d\n", hv_dev->channel->state); in state_show()
159 struct hv_device *hv_dev = device_to_hv_device(dev); in monitor_id_show() local
161 if (!hv_dev->channel) in monitor_id_show()
163 return sysfs_emit(buf, "%d\n", hv_dev->channel->offermsg.monitorid); in monitor_id_show()
170 struct hv_device *hv_dev = device_to_hv_device(dev); in class_id_show() local
172 if (!hv_dev->channel) in class_id_show()
175 &hv_dev->channel->offermsg.offer.if_type); in class_id_show()
182 struct hv_device *hv_dev = device_to_hv_device(dev); in device_id_show() local
184 if (!hv_dev->channel) in device_id_show()
187 &hv_dev->channel->offermsg.offer.if_instance); in device_id_show()
194 struct hv_device *hv_dev = device_to_hv_device(dev); in modalias_show() local
196 return sysfs_emit(buf, "vmbus:%*phN\n", UUID_SIZE, &hv_dev->dev_type); in modalias_show()
204 struct hv_device *hv_dev = device_to_hv_device(dev); in numa_node_show() local
206 if (!hv_dev->channel) in numa_node_show()
209 return sysfs_emit(buf, "%d\n", cpu_to_node(hv_dev->channel->target_cpu)); in numa_node_show()
218 struct hv_device *hv_dev = device_to_hv_device(dev); in server_monitor_pending_show() local
220 if (!hv_dev->channel) in server_monitor_pending_show()
222 return sysfs_emit(buf, "%d\n", channel_pending(hv_dev->channel, in server_monitor_pending_show()
231 struct hv_device *hv_dev = device_to_hv_device(dev); in client_monitor_pending_show() local
233 if (!hv_dev->channel) in client_monitor_pending_show()
235 return sysfs_emit(buf, "%d\n", channel_pending(hv_dev->channel, in client_monitor_pending_show()
244 struct hv_device *hv_dev = device_to_hv_device(dev); in server_monitor_latency_show() local
246 if (!hv_dev->channel) in server_monitor_latency_show()
248 return sysfs_emit(buf, "%d\n", channel_latency(hv_dev->channel, in server_monitor_latency_show()
257 struct hv_device *hv_dev = device_to_hv_device(dev); in client_monitor_latency_show() local
259 if (!hv_dev->channel) in client_monitor_latency_show()
261 return sysfs_emit(buf, "%d\n", channel_latency(hv_dev->channel, in client_monitor_latency_show()
270 struct hv_device *hv_dev = device_to_hv_device(dev); in server_monitor_conn_id_show() local
272 if (!hv_dev->channel) in server_monitor_conn_id_show()
274 return sysfs_emit(buf, "%d\n", channel_conn_id(hv_dev->channel, in server_monitor_conn_id_show()
283 struct hv_device *hv_dev = device_to_hv_device(dev); in client_monitor_conn_id_show() local
285 if (!hv_dev->channel) in client_monitor_conn_id_show()
287 return sysfs_emit(buf, "%d\n", channel_conn_id(hv_dev->channel, in client_monitor_conn_id_show()
295 struct hv_device *hv_dev = device_to_hv_device(dev); in out_intr_mask_show() local
299 if (!hv_dev->channel) in out_intr_mask_show()
302 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_intr_mask_show()
314 struct hv_device *hv_dev = device_to_hv_device(dev); in out_read_index_show() local
318 if (!hv_dev->channel) in out_read_index_show()
321 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_read_index_show()
333 struct hv_device *hv_dev = device_to_hv_device(dev); in out_write_index_show() local
337 if (!hv_dev->channel) in out_write_index_show()
340 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_write_index_show()
352 struct hv_device *hv_dev = device_to_hv_device(dev); in out_read_bytes_avail_show() local
356 if (!hv_dev->channel) in out_read_bytes_avail_show()
359 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_read_bytes_avail_show()
371 struct hv_device *hv_dev = device_to_hv_device(dev); in out_write_bytes_avail_show() local
375 if (!hv_dev->channel) in out_write_bytes_avail_show()
378 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_write_bytes_avail_show()
389 struct hv_device *hv_dev = device_to_hv_device(dev); in in_intr_mask_show() local
393 if (!hv_dev->channel) in in_intr_mask_show()
396 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_intr_mask_show()
407 struct hv_device *hv_dev = device_to_hv_device(dev); in in_read_index_show() local
411 if (!hv_dev->channel) in in_read_index_show()
414 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_read_index_show()
425 struct hv_device *hv_dev = device_to_hv_device(dev); in in_write_index_show() local
429 if (!hv_dev->channel) in in_write_index_show()
432 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_write_index_show()
444 struct hv_device *hv_dev = device_to_hv_device(dev); in in_read_bytes_avail_show() local
448 if (!hv_dev->channel) in in_read_bytes_avail_show()
451 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_read_bytes_avail_show()
463 struct hv_device *hv_dev = device_to_hv_device(dev); in in_write_bytes_avail_show() local
467 if (!hv_dev->channel) in in_write_bytes_avail_show()
470 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_write_bytes_avail_show()
482 struct hv_device *hv_dev = device_to_hv_device(dev); in channel_vp_mapping_show() local
483 struct vmbus_channel *channel = hv_dev->channel, *cur_sc; in channel_vp_mapping_show()
514 struct hv_device *hv_dev = device_to_hv_device(dev); in vendor_show() local
516 return sysfs_emit(buf, "0x%x\n", hv_dev->vendor_id); in vendor_show()
524 struct hv_device *hv_dev = device_to_hv_device(dev); in device_show() local
526 return sysfs_emit(buf, "0x%x\n", hv_dev->device_id); in device_show()
534 struct hv_device *hv_dev = device_to_hv_device(dev); in driver_override_store() local
537 ret = driver_set_override(dev, &hv_dev->driver_override, buf, count); in driver_override_store()
547 struct hv_device *hv_dev = device_to_hv_device(dev); in driver_override_show() local
551 len = sysfs_emit(buf, "%s\n", hv_dev->driver_override); in driver_override_show()
600 const struct hv_device *hv_dev = device_to_hv_device(dev); in vmbus_dev_attr_is_visible() local
603 if (!hv_dev->channel->offermsg.monitor_allocated && in vmbus_dev_attr_is_visible()
845 struct hv_device *hv_dev = device_to_hv_device(device); in vmbus_match() local
848 if (is_hvsock_channel(hv_dev->channel)) in vmbus_match()
851 if (hv_vmbus_get_id(drv, hv_dev)) in vmbus_match()
980 struct hv_device *hv_dev = device_to_hv_device(device); in vmbus_device_release() local
981 struct vmbus_channel *channel = hv_dev->channel; in vmbus_device_release()
983 hv_debug_rm_dev_dir(hv_dev); in vmbus_device_release()
988 kfree(hv_dev); in vmbus_device_release()