diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-29 16:44:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-29 16:44:48 -0400 |
commit | c23c2234de418d32f5b1cd1b7f2d22a13fd8e7fa (patch) | |
tree | 405661c43c66e59b1c76efe3037122185d9a6ba9 | |
parent | cac6653529eeac9b661fc8342c47d849c3adb085 (diff) | |
parent | 8bbf9f440f196ee08cc5ab1c19e62b1c5a736ff0 (diff) |
Merge tag 'char-misc-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH:
"Here are some HyperV and MEI driver fixes for 3.12-rc3. They resolve
some issues that people have been reporting for them"
* tag 'char-misc-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
Drivers: hv: vmbus: Terminate vmbus version negotiation on timeout
Drivers: hv: util: Correctly support ws2008R2 and earlier
mei: cancel stall timers in mei_reset
mei: bus: stop wait for read during cl state transition
mei: make me client counters less error prone
-rw-r--r-- | drivers/hv/connection.c | 2 | ||||
-rw-r--r-- | drivers/hv/hv_kvp.c | 38 | ||||
-rw-r--r-- | drivers/hv/hv_snapshot.c | 6 | ||||
-rw-r--r-- | drivers/hv/hv_util.c | 71 | ||||
-rw-r--r-- | drivers/misc/mei/amthif.c | 1 | ||||
-rw-r--r-- | drivers/misc/mei/bus.c | 5 | ||||
-rw-r--r-- | drivers/misc/mei/client.h | 6 | ||||
-rw-r--r-- | drivers/misc/mei/hbm.c | 10 | ||||
-rw-r--r-- | drivers/misc/mei/init.c | 3 | ||||
-rw-r--r-- | drivers/misc/mei/main.c | 11 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 6 | ||||
-rw-r--r-- | include/linux/hyperv.h | 7 |
12 files changed, 116 insertions, 50 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 8f4743ab5fb2..936093e0271e 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c | |||
@@ -195,7 +195,7 @@ int vmbus_connect(void) | |||
195 | 195 | ||
196 | do { | 196 | do { |
197 | ret = vmbus_negotiate_version(msginfo, version); | 197 | ret = vmbus_negotiate_version(msginfo, version); |
198 | if (ret) | 198 | if (ret == -ETIMEDOUT) |
199 | goto cleanup; | 199 | goto cleanup; |
200 | 200 | ||
201 | if (vmbus_connection.conn_state == CONNECTED) | 201 | if (vmbus_connection.conn_state == CONNECTED) |
diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index 28b03325b872..09988b289622 100644 --- a/drivers/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c | |||
@@ -32,13 +32,17 @@ | |||
32 | /* | 32 | /* |
33 | * Pre win8 version numbers used in ws2008 and ws 2008 r2 (win7) | 33 | * Pre win8 version numbers used in ws2008 and ws 2008 r2 (win7) |
34 | */ | 34 | */ |
35 | #define WS2008_SRV_MAJOR 1 | ||
36 | #define WS2008_SRV_MINOR 0 | ||
37 | #define WS2008_SRV_VERSION (WS2008_SRV_MAJOR << 16 | WS2008_SRV_MINOR) | ||
38 | |||
35 | #define WIN7_SRV_MAJOR 3 | 39 | #define WIN7_SRV_MAJOR 3 |
36 | #define WIN7_SRV_MINOR 0 | 40 | #define WIN7_SRV_MINOR 0 |
37 | #define WIN7_SRV_MAJOR_MINOR (WIN7_SRV_MAJOR << 16 | WIN7_SRV_MINOR) | 41 | #define WIN7_SRV_VERSION (WIN7_SRV_MAJOR << 16 | WIN7_SRV_MINOR) |
38 | 42 | ||
39 | #define WIN8_SRV_MAJOR 4 | 43 | #define WIN8_SRV_MAJOR 4 |
40 | #define WIN8_SRV_MINOR 0 | 44 | #define WIN8_SRV_MINOR 0 |
41 | #define WIN8_SRV_MAJOR_MINOR (WIN8_SRV_MAJOR << 16 | WIN8_SRV_MINOR) | 45 | #define WIN8_SRV_VERSION (WIN8_SRV_MAJOR << 16 | WIN8_SRV_MINOR) |
42 | 46 | ||
43 | /* | 47 | /* |
44 | * Global state maintained for transaction that is being processed. | 48 | * Global state maintained for transaction that is being processed. |
@@ -587,6 +591,8 @@ void hv_kvp_onchannelcallback(void *context) | |||
587 | 591 | ||
588 | struct icmsg_hdr *icmsghdrp; | 592 | struct icmsg_hdr *icmsghdrp; |
589 | struct icmsg_negotiate *negop = NULL; | 593 | struct icmsg_negotiate *negop = NULL; |
594 | int util_fw_version; | ||
595 | int kvp_srv_version; | ||
590 | 596 | ||
591 | if (kvp_transaction.active) { | 597 | if (kvp_transaction.active) { |
592 | /* | 598 | /* |
@@ -606,17 +612,26 @@ void hv_kvp_onchannelcallback(void *context) | |||
606 | 612 | ||
607 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { | 613 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { |
608 | /* | 614 | /* |
609 | * We start with win8 version and if the host cannot | 615 | * Based on the host, select appropriate |
610 | * support that we use the previous version. | 616 | * framework and service versions we will |
617 | * negotiate. | ||
611 | */ | 618 | */ |
612 | if (vmbus_prep_negotiate_resp(icmsghdrp, negop, | 619 | switch (vmbus_proto_version) { |
613 | recv_buffer, UTIL_FW_MAJOR_MINOR, | 620 | case (VERSION_WS2008): |
614 | WIN8_SRV_MAJOR_MINOR)) | 621 | util_fw_version = UTIL_WS2K8_FW_VERSION; |
615 | goto done; | 622 | kvp_srv_version = WS2008_SRV_VERSION; |
616 | 623 | break; | |
624 | case (VERSION_WIN7): | ||
625 | util_fw_version = UTIL_FW_VERSION; | ||
626 | kvp_srv_version = WIN7_SRV_VERSION; | ||
627 | break; | ||
628 | default: | ||
629 | util_fw_version = UTIL_FW_VERSION; | ||
630 | kvp_srv_version = WIN8_SRV_VERSION; | ||
631 | } | ||
617 | vmbus_prep_negotiate_resp(icmsghdrp, negop, | 632 | vmbus_prep_negotiate_resp(icmsghdrp, negop, |
618 | recv_buffer, UTIL_FW_MAJOR_MINOR, | 633 | recv_buffer, util_fw_version, |
619 | WIN7_SRV_MAJOR_MINOR); | 634 | kvp_srv_version); |
620 | 635 | ||
621 | } else { | 636 | } else { |
622 | kvp_msg = (struct hv_kvp_msg *)&recv_buffer[ | 637 | kvp_msg = (struct hv_kvp_msg *)&recv_buffer[ |
@@ -649,7 +664,6 @@ void hv_kvp_onchannelcallback(void *context) | |||
649 | return; | 664 | return; |
650 | 665 | ||
651 | } | 666 | } |
652 | done: | ||
653 | 667 | ||
654 | icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | 668 | icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION |
655 | | ICMSGHDRFLAG_RESPONSE; | 669 | | ICMSGHDRFLAG_RESPONSE; |
diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c index e4572f3f2834..0c3546224376 100644 --- a/drivers/hv/hv_snapshot.c +++ b/drivers/hv/hv_snapshot.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #define VSS_MAJOR 5 | 27 | #define VSS_MAJOR 5 |
28 | #define VSS_MINOR 0 | 28 | #define VSS_MINOR 0 |
29 | #define VSS_MAJOR_MINOR (VSS_MAJOR << 16 | VSS_MINOR) | 29 | #define VSS_VERSION (VSS_MAJOR << 16 | VSS_MINOR) |
30 | 30 | ||
31 | 31 | ||
32 | 32 | ||
@@ -190,8 +190,8 @@ void hv_vss_onchannelcallback(void *context) | |||
190 | 190 | ||
191 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { | 191 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { |
192 | vmbus_prep_negotiate_resp(icmsghdrp, negop, | 192 | vmbus_prep_negotiate_resp(icmsghdrp, negop, |
193 | recv_buffer, UTIL_FW_MAJOR_MINOR, | 193 | recv_buffer, UTIL_FW_VERSION, |
194 | VSS_MAJOR_MINOR); | 194 | VSS_VERSION); |
195 | } else { | 195 | } else { |
196 | vss_msg = (struct hv_vss_msg *)&recv_buffer[ | 196 | vss_msg = (struct hv_vss_msg *)&recv_buffer[ |
197 | sizeof(struct vmbuspipe_hdr) + | 197 | sizeof(struct vmbuspipe_hdr) + |
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index cb82233541b1..273e3ddb3a20 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c | |||
@@ -28,17 +28,32 @@ | |||
28 | #include <linux/reboot.h> | 28 | #include <linux/reboot.h> |
29 | #include <linux/hyperv.h> | 29 | #include <linux/hyperv.h> |
30 | 30 | ||
31 | #define SHUTDOWN_MAJOR 3 | ||
32 | #define SHUTDOWN_MINOR 0 | ||
33 | #define SHUTDOWN_MAJOR_MINOR (SHUTDOWN_MAJOR << 16 | SHUTDOWN_MINOR) | ||
34 | 31 | ||
35 | #define TIMESYNCH_MAJOR 3 | 32 | #define SD_MAJOR 3 |
36 | #define TIMESYNCH_MINOR 0 | 33 | #define SD_MINOR 0 |
37 | #define TIMESYNCH_MAJOR_MINOR (TIMESYNCH_MAJOR << 16 | TIMESYNCH_MINOR) | 34 | #define SD_VERSION (SD_MAJOR << 16 | SD_MINOR) |
38 | 35 | ||
39 | #define HEARTBEAT_MAJOR 3 | 36 | #define SD_WS2008_MAJOR 1 |
40 | #define HEARTBEAT_MINOR 0 | 37 | #define SD_WS2008_VERSION (SD_WS2008_MAJOR << 16 | SD_MINOR) |
41 | #define HEARTBEAT_MAJOR_MINOR (HEARTBEAT_MAJOR << 16 | HEARTBEAT_MINOR) | 38 | |
39 | #define TS_MAJOR 3 | ||
40 | #define TS_MINOR 0 | ||
41 | #define TS_VERSION (TS_MAJOR << 16 | TS_MINOR) | ||
42 | |||
43 | #define TS_WS2008_MAJOR 1 | ||
44 | #define TS_WS2008_VERSION (TS_WS2008_MAJOR << 16 | TS_MINOR) | ||
45 | |||
46 | #define HB_MAJOR 3 | ||
47 | #define HB_MINOR 0 | ||
48 | #define HB_VERSION (HB_MAJOR << 16 | HB_MINOR) | ||
49 | |||
50 | #define HB_WS2008_MAJOR 1 | ||
51 | #define HB_WS2008_VERSION (HB_WS2008_MAJOR << 16 | HB_MINOR) | ||
52 | |||
53 | static int sd_srv_version; | ||
54 | static int ts_srv_version; | ||
55 | static int hb_srv_version; | ||
56 | static int util_fw_version; | ||
42 | 57 | ||
43 | static void shutdown_onchannelcallback(void *context); | 58 | static void shutdown_onchannelcallback(void *context); |
44 | static struct hv_util_service util_shutdown = { | 59 | static struct hv_util_service util_shutdown = { |
@@ -99,8 +114,8 @@ static void shutdown_onchannelcallback(void *context) | |||
99 | 114 | ||
100 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { | 115 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { |
101 | vmbus_prep_negotiate_resp(icmsghdrp, negop, | 116 | vmbus_prep_negotiate_resp(icmsghdrp, negop, |
102 | shut_txf_buf, UTIL_FW_MAJOR_MINOR, | 117 | shut_txf_buf, util_fw_version, |
103 | SHUTDOWN_MAJOR_MINOR); | 118 | sd_srv_version); |
104 | } else { | 119 | } else { |
105 | shutdown_msg = | 120 | shutdown_msg = |
106 | (struct shutdown_msg_data *)&shut_txf_buf[ | 121 | (struct shutdown_msg_data *)&shut_txf_buf[ |
@@ -216,6 +231,7 @@ static void timesync_onchannelcallback(void *context) | |||
216 | struct icmsg_hdr *icmsghdrp; | 231 | struct icmsg_hdr *icmsghdrp; |
217 | struct ictimesync_data *timedatap; | 232 | struct ictimesync_data *timedatap; |
218 | u8 *time_txf_buf = util_timesynch.recv_buffer; | 233 | u8 *time_txf_buf = util_timesynch.recv_buffer; |
234 | struct icmsg_negotiate *negop = NULL; | ||
219 | 235 | ||
220 | vmbus_recvpacket(channel, time_txf_buf, | 236 | vmbus_recvpacket(channel, time_txf_buf, |
221 | PAGE_SIZE, &recvlen, &requestid); | 237 | PAGE_SIZE, &recvlen, &requestid); |
@@ -225,9 +241,10 @@ static void timesync_onchannelcallback(void *context) | |||
225 | sizeof(struct vmbuspipe_hdr)]; | 241 | sizeof(struct vmbuspipe_hdr)]; |
226 | 242 | ||
227 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { | 243 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { |
228 | vmbus_prep_negotiate_resp(icmsghdrp, NULL, time_txf_buf, | 244 | vmbus_prep_negotiate_resp(icmsghdrp, negop, |
229 | UTIL_FW_MAJOR_MINOR, | 245 | time_txf_buf, |
230 | TIMESYNCH_MAJOR_MINOR); | 246 | util_fw_version, |
247 | ts_srv_version); | ||
231 | } else { | 248 | } else { |
232 | timedatap = (struct ictimesync_data *)&time_txf_buf[ | 249 | timedatap = (struct ictimesync_data *)&time_txf_buf[ |
233 | sizeof(struct vmbuspipe_hdr) + | 250 | sizeof(struct vmbuspipe_hdr) + |
@@ -257,6 +274,7 @@ static void heartbeat_onchannelcallback(void *context) | |||
257 | struct icmsg_hdr *icmsghdrp; | 274 | struct icmsg_hdr *icmsghdrp; |
258 | struct heartbeat_msg_data *heartbeat_msg; | 275 | struct heartbeat_msg_data *heartbeat_msg; |
259 | u8 *hbeat_txf_buf = util_heartbeat.recv_buffer; | 276 | u8 *hbeat_txf_buf = util_heartbeat.recv_buffer; |
277 | struct icmsg_negotiate *negop = NULL; | ||
260 | 278 | ||
261 | vmbus_recvpacket(channel, hbeat_txf_buf, | 279 | vmbus_recvpacket(channel, hbeat_txf_buf, |
262 | PAGE_SIZE, &recvlen, &requestid); | 280 | PAGE_SIZE, &recvlen, &requestid); |
@@ -266,9 +284,9 @@ static void heartbeat_onchannelcallback(void *context) | |||
266 | sizeof(struct vmbuspipe_hdr)]; | 284 | sizeof(struct vmbuspipe_hdr)]; |
267 | 285 | ||
268 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { | 286 | if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) { |
269 | vmbus_prep_negotiate_resp(icmsghdrp, NULL, | 287 | vmbus_prep_negotiate_resp(icmsghdrp, negop, |
270 | hbeat_txf_buf, UTIL_FW_MAJOR_MINOR, | 288 | hbeat_txf_buf, util_fw_version, |
271 | HEARTBEAT_MAJOR_MINOR); | 289 | hb_srv_version); |
272 | } else { | 290 | } else { |
273 | heartbeat_msg = | 291 | heartbeat_msg = |
274 | (struct heartbeat_msg_data *)&hbeat_txf_buf[ | 292 | (struct heartbeat_msg_data *)&hbeat_txf_buf[ |
@@ -321,6 +339,25 @@ static int util_probe(struct hv_device *dev, | |||
321 | goto error; | 339 | goto error; |
322 | 340 | ||
323 | hv_set_drvdata(dev, srv); | 341 | hv_set_drvdata(dev, srv); |
342 | /* | ||
343 | * Based on the host; initialize the framework and | ||
344 | * service version numbers we will negotiate. | ||
345 | */ | ||
346 | switch (vmbus_proto_version) { | ||
347 | case (VERSION_WS2008): | ||
348 | util_fw_version = UTIL_WS2K8_FW_VERSION; | ||
349 | sd_srv_version = SD_WS2008_VERSION; | ||
350 | ts_srv_version = TS_WS2008_VERSION; | ||
351 | hb_srv_version = HB_WS2008_VERSION; | ||
352 | break; | ||
353 | |||
354 | default: | ||
355 | util_fw_version = UTIL_FW_VERSION; | ||
356 | sd_srv_version = SD_VERSION; | ||
357 | ts_srv_version = TS_VERSION; | ||
358 | hb_srv_version = HB_VERSION; | ||
359 | } | ||
360 | |||
324 | return 0; | 361 | return 0; |
325 | 362 | ||
326 | error: | 363 | error: |
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index d0fdc134068a..f6ff711aa5bb 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c | |||
@@ -57,6 +57,7 @@ void mei_amthif_reset_params(struct mei_device *dev) | |||
57 | dev->iamthif_ioctl = false; | 57 | dev->iamthif_ioctl = false; |
58 | dev->iamthif_state = MEI_IAMTHIF_IDLE; | 58 | dev->iamthif_state = MEI_IAMTHIF_IDLE; |
59 | dev->iamthif_timer = 0; | 59 | dev->iamthif_timer = 0; |
60 | dev->iamthif_stall_timer = 0; | ||
60 | } | 61 | } |
61 | 62 | ||
62 | /** | 63 | /** |
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 6d0282c08a06..cd2033cd7120 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c | |||
@@ -297,10 +297,13 @@ int __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length) | |||
297 | 297 | ||
298 | if (cl->reading_state != MEI_READ_COMPLETE && | 298 | if (cl->reading_state != MEI_READ_COMPLETE && |
299 | !waitqueue_active(&cl->rx_wait)) { | 299 | !waitqueue_active(&cl->rx_wait)) { |
300 | |||
300 | mutex_unlock(&dev->device_lock); | 301 | mutex_unlock(&dev->device_lock); |
301 | 302 | ||
302 | if (wait_event_interruptible(cl->rx_wait, | 303 | if (wait_event_interruptible(cl->rx_wait, |
303 | (MEI_READ_COMPLETE == cl->reading_state))) { | 304 | cl->reading_state == MEI_READ_COMPLETE || |
305 | mei_cl_is_transitioning(cl))) { | ||
306 | |||
304 | if (signal_pending(current)) | 307 | if (signal_pending(current)) |
305 | return -EINTR; | 308 | return -EINTR; |
306 | return -ERESTARTSYS; | 309 | return -ERESTARTSYS; |
diff --git a/drivers/misc/mei/client.h b/drivers/misc/mei/client.h index 9eb031e92070..892cc4207fa2 100644 --- a/drivers/misc/mei/client.h +++ b/drivers/misc/mei/client.h | |||
@@ -90,6 +90,12 @@ static inline bool mei_cl_is_connected(struct mei_cl *cl) | |||
90 | cl->dev->dev_state == MEI_DEV_ENABLED && | 90 | cl->dev->dev_state == MEI_DEV_ENABLED && |
91 | cl->state == MEI_FILE_CONNECTED); | 91 | cl->state == MEI_FILE_CONNECTED); |
92 | } | 92 | } |
93 | static inline bool mei_cl_is_transitioning(struct mei_cl *cl) | ||
94 | { | ||
95 | return (MEI_FILE_INITIALIZING == cl->state || | ||
96 | MEI_FILE_DISCONNECTED == cl->state || | ||
97 | MEI_FILE_DISCONNECTING == cl->state); | ||
98 | } | ||
93 | 99 | ||
94 | bool mei_cl_is_other_connecting(struct mei_cl *cl); | 100 | bool mei_cl_is_other_connecting(struct mei_cl *cl); |
95 | int mei_cl_disconnect(struct mei_cl *cl); | 101 | int mei_cl_disconnect(struct mei_cl *cl); |
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c index 6127ab64bb39..0a0448326e9d 100644 --- a/drivers/misc/mei/hbm.c +++ b/drivers/misc/mei/hbm.c | |||
@@ -35,11 +35,15 @@ static void mei_hbm_me_cl_allocate(struct mei_device *dev) | |||
35 | struct mei_me_client *clients; | 35 | struct mei_me_client *clients; |
36 | int b; | 36 | int b; |
37 | 37 | ||
38 | dev->me_clients_num = 0; | ||
39 | dev->me_client_presentation_num = 0; | ||
40 | dev->me_client_index = 0; | ||
41 | |||
38 | /* count how many ME clients we have */ | 42 | /* count how many ME clients we have */ |
39 | for_each_set_bit(b, dev->me_clients_map, MEI_CLIENTS_MAX) | 43 | for_each_set_bit(b, dev->me_clients_map, MEI_CLIENTS_MAX) |
40 | dev->me_clients_num++; | 44 | dev->me_clients_num++; |
41 | 45 | ||
42 | if (dev->me_clients_num <= 0) | 46 | if (dev->me_clients_num == 0) |
43 | return; | 47 | return; |
44 | 48 | ||
45 | kfree(dev->me_clients); | 49 | kfree(dev->me_clients); |
@@ -221,7 +225,7 @@ static int mei_hbm_prop_req(struct mei_device *dev) | |||
221 | struct hbm_props_request *prop_req; | 225 | struct hbm_props_request *prop_req; |
222 | const size_t len = sizeof(struct hbm_props_request); | 226 | const size_t len = sizeof(struct hbm_props_request); |
223 | unsigned long next_client_index; | 227 | unsigned long next_client_index; |
224 | u8 client_num; | 228 | unsigned long client_num; |
225 | 229 | ||
226 | 230 | ||
227 | client_num = dev->me_client_presentation_num; | 231 | client_num = dev->me_client_presentation_num; |
@@ -677,8 +681,6 @@ void mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr) | |||
677 | if (dev->dev_state == MEI_DEV_INIT_CLIENTS && | 681 | if (dev->dev_state == MEI_DEV_INIT_CLIENTS && |
678 | dev->hbm_state == MEI_HBM_ENUM_CLIENTS) { | 682 | dev->hbm_state == MEI_HBM_ENUM_CLIENTS) { |
679 | dev->init_clients_timer = 0; | 683 | dev->init_clients_timer = 0; |
680 | dev->me_client_presentation_num = 0; | ||
681 | dev->me_client_index = 0; | ||
682 | mei_hbm_me_cl_allocate(dev); | 684 | mei_hbm_me_cl_allocate(dev); |
683 | dev->hbm_state = MEI_HBM_CLIENT_PROPERTIES; | 685 | dev->hbm_state = MEI_HBM_CLIENT_PROPERTIES; |
684 | 686 | ||
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 92c73118b13c..6197018e2f16 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -175,6 +175,9 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) | |||
175 | memset(&dev->wr_ext_msg, 0, sizeof(dev->wr_ext_msg)); | 175 | memset(&dev->wr_ext_msg, 0, sizeof(dev->wr_ext_msg)); |
176 | } | 176 | } |
177 | 177 | ||
178 | /* we're already in reset, cancel the init timer */ | ||
179 | dev->init_clients_timer = 0; | ||
180 | |||
178 | dev->me_clients_num = 0; | 181 | dev->me_clients_num = 0; |
179 | dev->rd_msg_hdr = 0; | 182 | dev->rd_msg_hdr = 0; |
180 | dev->wd_pending = false; | 183 | dev->wd_pending = false; |
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 173ff095be0d..cabeddd66c1f 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
@@ -249,19 +249,16 @@ static ssize_t mei_read(struct file *file, char __user *ubuf, | |||
249 | mutex_unlock(&dev->device_lock); | 249 | mutex_unlock(&dev->device_lock); |
250 | 250 | ||
251 | if (wait_event_interruptible(cl->rx_wait, | 251 | if (wait_event_interruptible(cl->rx_wait, |
252 | (MEI_READ_COMPLETE == cl->reading_state || | 252 | MEI_READ_COMPLETE == cl->reading_state || |
253 | MEI_FILE_INITIALIZING == cl->state || | 253 | mei_cl_is_transitioning(cl))) { |
254 | MEI_FILE_DISCONNECTED == cl->state || | 254 | |
255 | MEI_FILE_DISCONNECTING == cl->state))) { | ||
256 | if (signal_pending(current)) | 255 | if (signal_pending(current)) |
257 | return -EINTR; | 256 | return -EINTR; |
258 | return -ERESTARTSYS; | 257 | return -ERESTARTSYS; |
259 | } | 258 | } |
260 | 259 | ||
261 | mutex_lock(&dev->device_lock); | 260 | mutex_lock(&dev->device_lock); |
262 | if (MEI_FILE_INITIALIZING == cl->state || | 261 | if (mei_cl_is_transitioning(cl)) { |
263 | MEI_FILE_DISCONNECTED == cl->state || | ||
264 | MEI_FILE_DISCONNECTING == cl->state) { | ||
265 | rets = -EBUSY; | 262 | rets = -EBUSY; |
266 | goto out; | 263 | goto out; |
267 | } | 264 | } |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 7b918b2fb894..456b322013e2 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -396,9 +396,9 @@ struct mei_device { | |||
396 | struct mei_me_client *me_clients; /* Note: memory has to be allocated */ | 396 | struct mei_me_client *me_clients; /* Note: memory has to be allocated */ |
397 | DECLARE_BITMAP(me_clients_map, MEI_CLIENTS_MAX); | 397 | DECLARE_BITMAP(me_clients_map, MEI_CLIENTS_MAX); |
398 | DECLARE_BITMAP(host_clients_map, MEI_CLIENTS_MAX); | 398 | DECLARE_BITMAP(host_clients_map, MEI_CLIENTS_MAX); |
399 | u8 me_clients_num; | 399 | unsigned long me_clients_num; |
400 | u8 me_client_presentation_num; | 400 | unsigned long me_client_presentation_num; |
401 | u8 me_client_index; | 401 | unsigned long me_client_index; |
402 | 402 | ||
403 | struct mei_cl wd_cl; | 403 | struct mei_cl wd_cl; |
404 | enum mei_wd_states wd_state; | 404 | enum mei_wd_states wd_state; |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index a3b8b2e2d244..d98503bde7e9 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -30,10 +30,13 @@ | |||
30 | /* | 30 | /* |
31 | * Framework version for util services. | 31 | * Framework version for util services. |
32 | */ | 32 | */ |
33 | #define UTIL_FW_MINOR 0 | ||
34 | |||
35 | #define UTIL_WS2K8_FW_MAJOR 1 | ||
36 | #define UTIL_WS2K8_FW_VERSION (UTIL_WS2K8_FW_MAJOR << 16 | UTIL_FW_MINOR) | ||
33 | 37 | ||
34 | #define UTIL_FW_MAJOR 3 | 38 | #define UTIL_FW_MAJOR 3 |
35 | #define UTIL_FW_MINOR 0 | 39 | #define UTIL_FW_VERSION (UTIL_FW_MAJOR << 16 | UTIL_FW_MINOR) |
36 | #define UTIL_FW_MAJOR_MINOR (UTIL_FW_MAJOR << 16 | UTIL_FW_MINOR) | ||
37 | 40 | ||
38 | 41 | ||
39 | /* | 42 | /* |