~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/scsi/scsi_pm.c

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings, Bastian Blank, Ben Hutchings, Uwe Kleine-König
  • Date: 2012-03-04 15:32:20 UTC
  • mfrom: (1.3.14)
  • mto: This revision was merged to the branch mainline in revision 57.
  • Revision ID: package-import@ubuntu.com-20120304153220-zbhqnmufx18yk6q4
* New upstream stable update:
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.8
  - [i386] i387: move TS_USEDFPU flag from thread_info to task_struct
  - [x86] additional refactoring of FPU/SSE state save and restore
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.9
  - vfs: fix d_inode_lookup() dentry ref leak
  - target: Allow control CDBs with data > 1 page
  - epoll: introduce POLLFREE to flush ->signalfd_wqh before kfree()
  - epoll: ep_unregister_pollwait() can use the freed pwq->whead
  - epoll: limit paths (CVE-2011-1083)
  - cdrom: use copy_to_user() without the underscores

[ Bastian Blank ]
* [mips,mipsel] Also remove ext4 modules from installer.

[ Ben Hutchings ]
* Update debconf template translations:
  - Update Dutch (Willem Kuyn) (Closes: #658736)
  - Add Polish (Michał Kułach) (Closes: #658912)
* Bump ABI to 2
* fs: Introduce and enable security restrictions on links:
  - Do not follow symlinks in /tmp that are owned by other users
    (sysctl: fs.protected_symlinks)
  - Do not allow unprivileged users to create hard links to sensitive files
    (sysctl: fs.protected_hardlinks) (Closes: #609455)
    + This breaks the 'at' package in stable, which will be fixed shortly
      (see #597130)
  The precise restrictions are specified in Documentation/sysctl/fs.txt in
  the linux-doc-3.2 and linux-source-3.2 packages.
* iwlwifi: fix key removal (Closes: #651199)
* cgroups: Set CGROUP_PERF
* hid: Enable HID_HOLTEK, HID_PRIMAX, HID_SPEEDLINK, HID_WIIMOTE as modules,
  HID_ACRUX_FF
* media/rc: Enable RC_ATI_REMOTE as module
* gspca: Enable USB_GSPCA_TOPRO as module
* dvb-usb: Enable DVB_USB_PCTV452E, DVB_USB_MXL111SF as modules

[ Uwe Kleine-König ]
* [x86] Update rt featureset to 3.2.9-rt15

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
#include <linux/pm_runtime.h>
9
9
#include <linux/export.h>
 
10
#include <linux/async.h>
10
11
 
11
12
#include <scsi/scsi.h>
12
13
#include <scsi/scsi_device.h>
69
70
        return err;
70
71
}
71
72
 
 
73
static int scsi_bus_prepare(struct device *dev)
 
74
{
 
75
        if (scsi_is_sdev_device(dev)) {
 
76
                /* sd probing uses async_schedule.  Wait until it finishes. */
 
77
                async_synchronize_full();
 
78
 
 
79
        } else if (scsi_is_host_device(dev)) {
 
80
                /* Wait until async scanning is finished */
 
81
                scsi_complete_async_scans();
 
82
        }
 
83
        return 0;
 
84
}
 
85
 
72
86
static int scsi_bus_suspend(struct device *dev)
73
87
{
74
88
        return scsi_bus_suspend_common(dev, PMSG_SUSPEND);
87
101
#else /* CONFIG_PM_SLEEP */
88
102
 
89
103
#define scsi_bus_resume_common          NULL
 
104
#define scsi_bus_prepare                NULL
90
105
#define scsi_bus_suspend                NULL
91
106
#define scsi_bus_freeze                 NULL
92
107
#define scsi_bus_poweroff               NULL
195
210
#endif /* CONFIG_PM_RUNTIME */
196
211
 
197
212
const struct dev_pm_ops scsi_bus_pm_ops = {
 
213
        .prepare =              scsi_bus_prepare,
198
214
        .suspend =              scsi_bus_suspend,
199
215
        .resume =               scsi_bus_resume_common,
200
216
        .freeze =               scsi_bus_freeze,