Lines Matching defs:channel
63 /* channel callback timeout in ms */
219 * properties of the channel.
272 /* Structure used to query channel properties. */
278 /* Fibre channel address packet */
352 "Select a channel if available ring size > this in percent");
401 /* A storvsc device is a device object that contains a vmbus channel */
413 * Each unique Port/Path/Target represents 1 channel ie scsi
439 /* Used for vsc/vsp channel reset process */
598 static void storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old,
608 device = channel->primary_channel ?
609 channel->primary_channel->device_obj
610 : channel->device_obj;
623 if (device->channel != channel && device->channel->target_cpu == old) {
624 cur_chn = device->channel;
628 list_for_each_entry(cur_chn, &device->channel->sc_list, sc_list) {
629 if (cur_chn == channel)
650 WRITE_ONCE(stor_device->stor_chns[new], channel);
656 static u64 storvsc_next_request_id(struct vmbus_channel *channel, u64 rqst_addr)
697 /* In case vmbus_open() fails, we don't use the sub-channel. */
699 dev_err(dev, "Failed to open sub-channel: err=%d\n", ret);
705 /* Add the sub-channel to the array of available channels. */
723 * should not be created. The primary channel is already created
741 vmbus_set_sc_create_callback(device->channel, handle_sc_creation);
752 ret = vmbus_sendpacket(device->channel, vstor_packet,
759 dev_err(dev, "Failed to create sub-channel: err=%d\n", ret);
765 dev_err(dev, "Failed to create sub-channel: timed out\n");
771 dev_err(dev, "Failed to create sub-channel: op=%d, sts=%d\n",
778 * invokes channel->sc_creation_callback, which will open and use
779 * the sub-channel(s).
820 ret = vmbus_sendpacket(device->channel, vstor_packet,
860 * channel
910 * Check to see if multi-channel support is there.
912 * support multi-channel.
930 device->channel->change_target_cpu_callback = storvsc_change_target_cpu;
932 stor_device->stor_chns[device->channel->target_cpu] = device->channel;
933 cpumask_set_cpu(device->channel->target_cpu,
1231 struct vmbus_channel *channel = (struct vmbus_channel *)context;
1238 if (channel->primary_channel != NULL)
1239 device = channel->primary_channel->device_obj;
1241 device = channel->device_obj;
1249 foreach_vmbus_pkt(desc, channel) {
1258 hv_pkt_iter_close(channel);
1329 device->channel->max_pkt_size = STORVSC_MAX_PKT_SIZE;
1330 device->channel->next_request_id_callback = storvsc_next_request_id;
1332 ret = vmbus_open(device->channel,
1337 storvsc_on_channel_callback, device->channel);
1375 /* Close the channel */
1376 vmbus_close(device->channel);
1392 stor_device->stor_chns[q_num] = stor_device->device->channel;
1393 return stor_device->device->channel;
1397 * Our channel array is sparsley populated and we
1399 * currently have a designated channel. Fix this.
1413 stor_device->stor_chns[q_num] = stor_device->device->channel;
1414 return stor_device->device->channel;
1440 struct vmbus_channel *outgoing_channel, *channel;
1455 * Select an appropriate channel to send the request out.
1462 * Ideally, we want to pick a different channel if
1472 channel = READ_ONCE(
1474 if (channel == NULL)
1477 &channel->outbound)
1479 outgoing_channel = channel;
1486 * busy. Try to use the channel on the current CPU
1495 * NUMA node are busy. Try to find a channel in
1501 channel = READ_ONCE(
1503 if (channel == NULL)
1506 &channel->outbound)
1508 outgoing_channel = channel;
1652 ret = vmbus_sendpacket(device->channel, vstor_packet,
1780 vm_srb->path_id = scmnd->device->channel;
2154 vmbus_close(hv_dev->channel);