Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101492
b: refs/heads/master
c: 19c4158
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and James Bottomley committed Jun 5, 2008
1 parent 6e0dfe6 commit bc010c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13a17fdeedbb156463a9a007378366ec0a0c30ef
refs/heads/master: 19c4158bcdf42ee3b2394342caf14f8471d2c78e
8 changes: 2 additions & 6 deletions trunk/drivers/scsi/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,7 @@ static int mesh_suspend(struct macio_dev *mdev, pm_message_t mesg)
default:
return 0;
}
if (mesg.event == mdev->ofdev.dev.power.power_state.event)
if (ms->phase == sleeping)
return 0;

scsi_block_requests(ms->host);
Expand All @@ -1780,8 +1780,6 @@ static int mesh_suspend(struct macio_dev *mdev, pm_message_t mesg)
disable_irq(ms->meshintr);
set_mesh_power(ms, 0);

mdev->ofdev.dev.power.power_state = mesg;

return 0;
}

Expand All @@ -1790,7 +1788,7 @@ static int mesh_resume(struct macio_dev *mdev)
struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev);
unsigned long flags;

if (mdev->ofdev.dev.power.power_state.event == PM_EVENT_ON)
if (ms->phase != sleeping)
return 0;

set_mesh_power(ms, 1);
Expand All @@ -1801,8 +1799,6 @@ static int mesh_resume(struct macio_dev *mdev)
enable_irq(ms->meshintr);
scsi_unblock_requests(ms->host);

mdev->ofdev.dev.power.power_state.event = PM_EVENT_ON;

return 0;
}

Expand Down

0 comments on commit bc010c4

Please sign in to comment.