aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-24 17:32:15 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-24 17:32:15 -0800
commitd9978ec5680059d727b39d6c706777c6973587f2 (patch)
tree8fad9cf8cf9599af58757e4acbf27c602df9ed79 /include
parenta883b70d8e0a88278c0a1f80753b4dc99962b541 (diff)
parent53637e0760d56274177be7e6d630490bc49766c1 (diff)
Merge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
Pull libata updates from Jeff Garzik: 1) apply, and then revert, the sysfs export of ATA host controller number. Discussion was continuing after patch application, trying to figure out how to best mesh exported data with the installers, boot-time agents and other parties that want this info. 2) Merge Zero-Power Optical Device Driver (ZPODD) support, bringing the wonderfulness of sane power management to your CD/DVD device. Includes one SCSI-subsystem patch (with appropriate ACKs), adding runtime PM support to 'sr' driver. That is the ZPODD interaction bits. Patchset went through some 13 revisions before it got here; kudos to Intel for persistence. 3) pata_samsung_cf: use devm_clk_get() 4) more ata_piix, ahci PCI IDs 5) Add SATA driver for R-Car SoC 6) Convert libata to use devm_ioremap_resource (Note: I think Greg sent this to you, also) 7) Set proper Sense Key (SK) in the SCSI simulator when ATA passthrough indicates check condition. Google and specification hawks everywhere shall rejoice. * tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (22 commits) [libata] fix smatch warning for zpodd_wake_dev [libata] Set proper SK when CK_COND is set. [libata] Convert to devm_ioremap_resource() libata: add R-Car SATA driver ahci: Add Device IDs for Intel Wellsburg PCH ata_piix: Add Device IDs for Intel Wellsburg PCH [SCSI] remove can_power_off flag from scsi_device [libata] scsi: no poll when ODD is powered off [SCSI] sr: support runtime pm ahci: AHCI-mode SATA patch for Intel Avoton DeviceIDs ata_piix: IDE-mode SATA patch for Intel Avoton DeviceIDs [libata] PM code cleanup for ata port [libata] pm: differentiate system and runtime pm for ata port Revert "libata: export host controller number thru /sys" libata: do not suspend port if normal ODD is attached libata: expose pm qos flags for ata device libata: handle power transition of ODD libata: check zero power ready status for ZPODD libata: move acpi notification code to zpodd libata: identify and init ZPODD devices ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h3
-rw-r--r--include/scsi/scsi_device.h5
-rw-r--r--include/uapi/linux/cdrom.h34
3 files changed, 41 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 649e5f86b5f..91c9d109e5f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -620,6 +620,9 @@ struct ata_device {
union acpi_object *gtf_cache;
unsigned int gtf_filter;
#endif
+#ifdef CONFIG_SATA_ZPODD
+ void *zpodd;
+#endif
struct device tdev;
/* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
u64 n_sectors; /* size of device, if ATA */
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index e65c62e82c5..a7f9cba275e 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -157,10 +157,11 @@ struct scsi_device {
unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */
unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */
unsigned is_visible:1; /* is the device visible in sysfs */
- unsigned can_power_off:1; /* Device supports runtime power off */
unsigned wce_default_on:1; /* Cache is ON by default */
unsigned no_dif:1; /* T10 PI (DIF) should be disabled */
+ atomic_t disk_events_disable_depth; /* disable depth for disk events */
+
DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
struct list_head event_list; /* asserted events */
struct work_struct event_work;
@@ -397,6 +398,8 @@ extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
int data_direction, void *buffer, unsigned bufflen,
struct scsi_sense_hdr *, int timeout, int retries,
int *resid);
+extern void sdev_disable_disk_events(struct scsi_device *sdev);
+extern void sdev_enable_disk_events(struct scsi_device *sdev);
#ifdef CONFIG_PM_RUNTIME
extern int scsi_autopm_get_device(struct scsi_device *);
diff --git a/include/uapi/linux/cdrom.h b/include/uapi/linux/cdrom.h
index 898b866b300..bd17ad5aa06 100644
--- a/include/uapi/linux/cdrom.h
+++ b/include/uapi/linux/cdrom.h
@@ -908,5 +908,39 @@ struct mode_page_header {
__be16 desc_length;
};
+/* removable medium feature descriptor */
+struct rm_feature_desc {
+ __be16 feature_code;
+#if defined(__BIG_ENDIAN_BITFIELD)
+ __u8 reserved1:2;
+ __u8 feature_version:4;
+ __u8 persistent:1;
+ __u8 curr:1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 curr:1;
+ __u8 persistent:1;
+ __u8 feature_version:4;
+ __u8 reserved1:2;
+#endif
+ __u8 add_len;
+#if defined(__BIG_ENDIAN_BITFIELD)
+ __u8 mech_type:3;
+ __u8 load:1;
+ __u8 eject:1;
+ __u8 pvnt_jmpr:1;
+ __u8 dbml:1;
+ __u8 lock:1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 lock:1;
+ __u8 dbml:1;
+ __u8 pvnt_jmpr:1;
+ __u8 eject:1;
+ __u8 load:1;
+ __u8 mech_type:3;
+#endif
+ __u8 reserved2;
+ __u8 reserved3;
+ __u8 reserved4;
+};
#endif /* _UAPI_LINUX_CDROM_H */