aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-26 14:36:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-26 14:36:12 -0400
commit05e4cb7c25c1ac35a6a61c79ad40cf69dd3538bf (patch)
tree5afe08194536045b97c16edf768e50805acf70fd /drivers/misc
parent8f074a557104aed6f7b0a0913227039481da3449 (diff)
parent9b0ee8cf70457520c144e944bcf8df2324bad880 (diff)
Merge tag 'char-misc-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc patches from Greg KH: "Here are some char/misc patches for 3.11-rc3. It's pretty much just: - mei fixes - hyperv fixes - new ja_JP translation update all tiny stuff, but fixes for issues people have reported." * tag 'char-misc-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: HOWTO ja_JP sync mei: me: fix waiting for hw ready mei: don't have to clean the state on power up mei: me: fix reset state machine mei: hbm: fix typo in error message Tools: hv: KVP: Fix a bug in IPV6 subnet enumeration Drivers: hv: balloon: Do not post pressure status if interrupted Drivers: hv: balloon: Fix a bug in the hot-add code Drivers: hv: vmbus: incorrect device name is printed when child device is unregistered
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/hbm.c2
-rw-r--r--drivers/misc/mei/hw-me.c14
-rw-r--r--drivers/misc/mei/init.c3
3 files changed, 13 insertions, 6 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index f9296abcf02a..6127ab64bb39 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -167,7 +167,7 @@ int mei_hbm_start_req(struct mei_device *dev)
167 167
168 dev->hbm_state = MEI_HBM_IDLE; 168 dev->hbm_state = MEI_HBM_IDLE;
169 if (mei_write_message(dev, mei_hdr, dev->wr_msg.data)) { 169 if (mei_write_message(dev, mei_hdr, dev->wr_msg.data)) {
170 dev_err(&dev->pdev->dev, "version message writet failed\n"); 170 dev_err(&dev->pdev->dev, "version message write failed\n");
171 dev->dev_state = MEI_DEV_RESETTING; 171 dev->dev_state = MEI_DEV_RESETTING;
172 mei_reset(dev, 1); 172 mei_reset(dev, 1);
173 return -ENODEV; 173 return -ENODEV;
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index e4f8dec4dc3c..b22c7e247225 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -239,14 +239,18 @@ static int mei_me_hw_ready_wait(struct mei_device *dev)
239 if (mei_me_hw_is_ready(dev)) 239 if (mei_me_hw_is_ready(dev))
240 return 0; 240 return 0;
241 241
242 dev->recvd_hw_ready = false;
242 mutex_unlock(&dev->device_lock); 243 mutex_unlock(&dev->device_lock);
243 err = wait_event_interruptible_timeout(dev->wait_hw_ready, 244 err = wait_event_interruptible_timeout(dev->wait_hw_ready,
244 dev->recvd_hw_ready, MEI_INTEROP_TIMEOUT); 245 dev->recvd_hw_ready,
246 mei_secs_to_jiffies(MEI_INTEROP_TIMEOUT));
245 mutex_lock(&dev->device_lock); 247 mutex_lock(&dev->device_lock);
246 if (!err && !dev->recvd_hw_ready) { 248 if (!err && !dev->recvd_hw_ready) {
249 if (!err)
250 err = -ETIMEDOUT;
247 dev_err(&dev->pdev->dev, 251 dev_err(&dev->pdev->dev,
248 "wait hw ready failed. status = 0x%x\n", err); 252 "wait hw ready failed. status = %d\n", err);
249 return -ETIMEDOUT; 253 return err;
250 } 254 }
251 255
252 dev->recvd_hw_ready = false; 256 dev->recvd_hw_ready = false;
@@ -483,7 +487,9 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
483 /* check if ME wants a reset */ 487 /* check if ME wants a reset */
484 if (!mei_hw_is_ready(dev) && 488 if (!mei_hw_is_ready(dev) &&
485 dev->dev_state != MEI_DEV_RESETTING && 489 dev->dev_state != MEI_DEV_RESETTING &&
486 dev->dev_state != MEI_DEV_INITIALIZING) { 490 dev->dev_state != MEI_DEV_INITIALIZING &&
491 dev->dev_state != MEI_DEV_POWER_DOWN &&
492 dev->dev_state != MEI_DEV_POWER_UP) {
487 dev_dbg(&dev->pdev->dev, "FW not ready.\n"); 493 dev_dbg(&dev->pdev->dev, "FW not ready.\n");
488 mei_reset(dev, 1); 494 mei_reset(dev, 1);
489 mutex_unlock(&dev->device_lock); 495 mutex_unlock(&dev->device_lock);
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index ed1d75203af6..e6f16f83ecde 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -148,7 +148,8 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
148 148
149 dev->hbm_state = MEI_HBM_IDLE; 149 dev->hbm_state = MEI_HBM_IDLE;
150 150
151 if (dev->dev_state != MEI_DEV_INITIALIZING) { 151 if (dev->dev_state != MEI_DEV_INITIALIZING &&
152 dev->dev_state != MEI_DEV_POWER_UP) {
152 if (dev->dev_state != MEI_DEV_DISABLED && 153 if (dev->dev_state != MEI_DEV_DISABLED &&
153 dev->dev_state != MEI_DEV_POWER_DOWN) 154 dev->dev_state != MEI_DEV_POWER_DOWN)
154 dev->dev_state = MEI_DEV_RESETTING; 155 dev->dev_state = MEI_DEV_RESETTING;