Lines Matching refs:hv_dev

93 static void print_alias_name(struct hv_device *hv_dev, char *alias_name)  in print_alias_name()  argument
97 sprintf(&alias_name[i], "%02x", hv_dev->dev_type.b[i/2]); in print_alias_name()
138 struct hv_device *hv_dev = device_to_hv_device(dev); in id_show() local
140 if (!hv_dev->channel) in id_show()
142 return sprintf(buf, "%d\n", hv_dev->channel->offermsg.child_relid); in id_show()
149 struct hv_device *hv_dev = device_to_hv_device(dev); in state_show() local
151 if (!hv_dev->channel) in state_show()
153 return sprintf(buf, "%d\n", hv_dev->channel->state); in state_show()
160 struct hv_device *hv_dev = device_to_hv_device(dev); in monitor_id_show() local
162 if (!hv_dev->channel) in monitor_id_show()
164 return sprintf(buf, "%d\n", hv_dev->channel->offermsg.monitorid); in monitor_id_show()
171 struct hv_device *hv_dev = device_to_hv_device(dev); in class_id_show() local
173 if (!hv_dev->channel) in class_id_show()
176 hv_dev->channel->offermsg.offer.if_type.b); in class_id_show()
183 struct hv_device *hv_dev = device_to_hv_device(dev); in device_id_show() local
185 if (!hv_dev->channel) in device_id_show()
188 hv_dev->channel->offermsg.offer.if_instance.b); in device_id_show()
195 struct hv_device *hv_dev = device_to_hv_device(dev); in modalias_show() local
198 print_alias_name(hv_dev, alias_name); in modalias_show()
207 struct hv_device *hv_dev = device_to_hv_device(dev); in numa_node_show() local
209 if (!hv_dev->channel) in numa_node_show()
212 return sprintf(buf, "%d\n", hv_dev->channel->numa_node); in numa_node_show()
221 struct hv_device *hv_dev = device_to_hv_device(dev); in server_monitor_pending_show() local
223 if (!hv_dev->channel) in server_monitor_pending_show()
226 channel_pending(hv_dev->channel, in server_monitor_pending_show()
235 struct hv_device *hv_dev = device_to_hv_device(dev); in client_monitor_pending_show() local
237 if (!hv_dev->channel) in client_monitor_pending_show()
240 channel_pending(hv_dev->channel, in client_monitor_pending_show()
249 struct hv_device *hv_dev = device_to_hv_device(dev); in server_monitor_latency_show() local
251 if (!hv_dev->channel) in server_monitor_latency_show()
254 channel_latency(hv_dev->channel, in server_monitor_latency_show()
263 struct hv_device *hv_dev = device_to_hv_device(dev); in client_monitor_latency_show() local
265 if (!hv_dev->channel) in client_monitor_latency_show()
268 channel_latency(hv_dev->channel, in client_monitor_latency_show()
277 struct hv_device *hv_dev = device_to_hv_device(dev); in server_monitor_conn_id_show() local
279 if (!hv_dev->channel) in server_monitor_conn_id_show()
282 channel_conn_id(hv_dev->channel, in server_monitor_conn_id_show()
291 struct hv_device *hv_dev = device_to_hv_device(dev); in client_monitor_conn_id_show() local
293 if (!hv_dev->channel) in client_monitor_conn_id_show()
296 channel_conn_id(hv_dev->channel, in client_monitor_conn_id_show()
304 struct hv_device *hv_dev = device_to_hv_device(dev); in out_intr_mask_show() local
308 if (!hv_dev->channel) in out_intr_mask_show()
311 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_intr_mask_show()
323 struct hv_device *hv_dev = device_to_hv_device(dev); in out_read_index_show() local
327 if (!hv_dev->channel) in out_read_index_show()
330 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_read_index_show()
342 struct hv_device *hv_dev = device_to_hv_device(dev); in out_write_index_show() local
346 if (!hv_dev->channel) in out_write_index_show()
349 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_write_index_show()
361 struct hv_device *hv_dev = device_to_hv_device(dev); in out_read_bytes_avail_show() local
365 if (!hv_dev->channel) in out_read_bytes_avail_show()
368 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_read_bytes_avail_show()
380 struct hv_device *hv_dev = device_to_hv_device(dev); in out_write_bytes_avail_show() local
384 if (!hv_dev->channel) in out_write_bytes_avail_show()
387 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, in out_write_bytes_avail_show()
398 struct hv_device *hv_dev = device_to_hv_device(dev); in in_intr_mask_show() local
402 if (!hv_dev->channel) in in_intr_mask_show()
405 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_intr_mask_show()
416 struct hv_device *hv_dev = device_to_hv_device(dev); in in_read_index_show() local
420 if (!hv_dev->channel) in in_read_index_show()
423 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_read_index_show()
434 struct hv_device *hv_dev = device_to_hv_device(dev); in in_write_index_show() local
438 if (!hv_dev->channel) in in_write_index_show()
441 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_write_index_show()
453 struct hv_device *hv_dev = device_to_hv_device(dev); in in_read_bytes_avail_show() local
457 if (!hv_dev->channel) in in_read_bytes_avail_show()
460 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_read_bytes_avail_show()
472 struct hv_device *hv_dev = device_to_hv_device(dev); in in_write_bytes_avail_show() local
476 if (!hv_dev->channel) in in_write_bytes_avail_show()
479 ret = hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); in in_write_bytes_avail_show()
491 struct hv_device *hv_dev = device_to_hv_device(dev); in channel_vp_mapping_show() local
492 struct vmbus_channel *channel = hv_dev->channel, *cur_sc; in channel_vp_mapping_show()
528 struct hv_device *hv_dev = device_to_hv_device(dev); in vendor_show() local
529 return sprintf(buf, "0x%x\n", hv_dev->vendor_id); in vendor_show()
537 struct hv_device *hv_dev = device_to_hv_device(dev); in device_show() local
538 return sprintf(buf, "0x%x\n", hv_dev->device_id); in device_show()
546 struct hv_device *hv_dev = device_to_hv_device(dev); in driver_override_store() local
562 old = hv_dev->driver_override; in driver_override_store()
564 hv_dev->driver_override = driver_override; in driver_override_store()
567 hv_dev->driver_override = NULL; in driver_override_store()
579 struct hv_device *hv_dev = device_to_hv_device(dev); in driver_override_show() local
583 len = snprintf(buf, PAGE_SIZE, "%s\n", hv_dev->driver_override); in driver_override_show()
632 const struct hv_device *hv_dev = device_to_hv_device(dev); in vmbus_dev_attr_is_visible() local
635 if (!hv_dev->channel->offermsg.monitor_allocated && in vmbus_dev_attr_is_visible()
840 struct hv_device *hv_dev = device_to_hv_device(device); in vmbus_match() local
843 if (is_hvsock_channel(hv_dev->channel)) in vmbus_match()
846 if (hv_vmbus_get_id(drv, hv_dev)) in vmbus_match()
960 struct hv_device *hv_dev = device_to_hv_device(device); in vmbus_device_release() local
961 struct vmbus_channel *channel = hv_dev->channel; in vmbus_device_release()
966 kfree(hv_dev); in vmbus_device_release()