Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151055124
D7100.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7100.id.diff
View Options
Index: head/sys/dev/hyperv/vmbus/hv_channel.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_channel.c
+++ head/sys/dev/hyperv/vmbus/hv_channel.c
@@ -897,25 +897,23 @@
int f;
for (f = 0; f < flag_cnt; ++f) {
- uint32_t rel_id_base;
+ uint32_t chid_base;
u_long flags;
- int bit;
+ int chid_ofs;
if (event_flags[f] == 0)
continue;
flags = atomic_swap_long(&event_flags[f], 0);
- rel_id_base = f << VMBUS_EVTFLAG_SHIFT;
+ chid_base = f << VMBUS_EVTFLAG_SHIFT;
- while ((bit = ffsl(flags)) != 0) {
+ while ((chid_ofs = ffsl(flags)) != 0) {
struct hv_vmbus_channel *channel;
- uint32_t rel_id;
- --bit; /* NOTE: ffsl is 1-based */
- flags &= ~(1UL << bit);
+ --chid_ofs; /* NOTE: ffsl is 1-based */
+ flags &= ~(1UL << chid_ofs);
- rel_id = rel_id_base + bit;
- channel = sc->vmbus_chmap[rel_id];
+ channel = sc->vmbus_chmap[chid_base + chid_ofs];
/* if channel is closed or closing */
if (channel == NULL || channel->rxq == NULL)
Index: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
+++ head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
@@ -113,20 +113,18 @@
{
struct vmbus_softc *sc = new_channel->vmbus_sc;
hv_vmbus_channel* channel;
- uint32_t relid;
- relid = new_channel->ch_id;
/*
* Make sure this is a new offer
*/
mtx_lock(&sc->vmbus_chlist_lock);
- if (relid == 0) {
+ if (new_channel->ch_id == 0) {
/*
* XXX channel0 will not be processed; skip it.
*/
printf("VMBUS: got channel0 offer\n");
} else {
- sc->vmbus_chmap[relid] = new_channel;
+ sc->vmbus_chmap[new_channel->ch_id] = new_channel;
}
TAILQ_FOREACH(channel, &sc->vmbus_chlist, ch_link) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 4:47 PM (18 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30985893
Default Alt Text
D7100.id.diff (1 KB)
Attached To
Mode
D7100: hyperv/vmbus: Get rid of rel{_id,id}, use channel id consistently.
Attached
Detach File
Event Timeline
Log In to Comment