summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-03-18 13:57:32 +0400
committerJiri Kosina <jkosina@suse.cz>2013-03-18 13:57:57 +0400
commitaa1262b3876ec5249ff464618a7dcd46b3ca54e2 (patch)
treeb150bb2c83c073e1f0e298ba7899148f7d991ef7 /drivers/scsi/scsi_lib.c
parent806b2139db236e0cbd0b5833ab0ce139f0196bcd (diff)
parent6dbe51c251a327e012439c4772097a13df43c5b8 (diff)
downloadlinux-aa1262b3876ec5249ff464618a7dcd46b3ca54e2.tar.xz
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to the newly added ITG-3200 driver.
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index f1bf5aff68ed..765398c063c7 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2617,3 +2617,17 @@ void scsi_kunmap_atomic_sg(void *virt)
kunmap_atomic(virt);
}
EXPORT_SYMBOL(scsi_kunmap_atomic_sg);
+
+void sdev_disable_disk_events(struct scsi_device *sdev)
+{
+ atomic_inc(&sdev->disk_events_disable_depth);
+}
+EXPORT_SYMBOL(sdev_disable_disk_events);
+
+void sdev_enable_disk_events(struct scsi_device *sdev)
+{
+ if (WARN_ON_ONCE(atomic_read(&sdev->disk_events_disable_depth) <= 0))
+ return;
+ atomic_dec(&sdev->disk_events_disable_depth);
+}
+EXPORT_SYMBOL(sdev_enable_disk_events);