libata updates for 3.9
Subsystems (5)
PATCH 1/1 libata updates for 3.9
Please pull 53637e0760d56274177be7e6d630490bc49766c1 fromgit://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tags/upstream-linus
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.
to receive the following updates:
drivers/ata/Kconfig | 21 + drivers/ata/Makefile | 2 + drivers/ata/ahci.c | 32 +- drivers/ata/ata_piix.c | 17 + drivers/ata/libahci.c | 6 +- drivers/ata/libata-acpi.c | 177 ++++---- drivers/ata/libata-core.c | 88 ++-- drivers/ata/libata-eh.c | 29 +- drivers/ata/libata-scsi.c | 20 +- drivers/ata/libata-zpodd.c | 299 ++++++++++++++ drivers/ata/libata.h | 27 ++ drivers/ata/pata_ep93xx.c | 7 +- drivers/ata/pata_samsung_cf.c | 4 +- drivers/ata/sata_rcar.c | 910 ++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/scsi_lib.c | 14 + drivers/scsi/sr.c | 46 ++- include/linux/ata.h | 8 +- include/linux/libata.h | 7 +- include/scsi/scsi_device.h | 5 +- include/uapi/linux/cdrom.h | 34 ++ 20 files changed, 1593 insertions(+), 160 deletions(-) create mode 100644 drivers/ata/libata-zpodd.c create mode 100644 drivers/ata/sata_rcar.c
Aaron Lu (12):
libata: identify and init ZPODD devices
libata: move acpi notification code to zpodd
libata: check zero power ready status for ZPODD
libata: handle power transition of ODD
libata: expose pm qos flags for ata device
libata: do not suspend port if normal ODD is attached [libata] pm: differentiate system and runtime pm for ata port [libata] PM code cleanup for ata port
[SCSI] sr: support runtime pm
[libata] scsi: no poll when ODD is powered off [SCSI] remove can_power_off flag from scsi_device [libata] fix smatch warning for zpodd_wake_dev
Bian Yu (1):
[libata] ahci: Fix lack of command retry after a success error handler.
David Milburn (1):
libata: export host controller number thru /sys
Gwendal Grignou (1):
[libata] Set proper SK when CK_COND is set.
Hugh Daschbach (1):
[libata] ahci: Add support for Enmotus Bobcat device.
James Ralston (2):
ata_piix: Add Device IDs for Intel Wellsburg PCH
ahci: Add Device IDs for Intel Wellsburg PCH
Jeff Garzik (1):
Revert "libata: export host controller number thru /sys"
Jingoo Han (1):
pata_samsung_cf: Use devm_clk_get()
Seth Heasley (2):
ata_piix: IDE-mode SATA patch for Intel Avoton DeviceIDs
ahci: AHCI-mode SATA patch for Intel Avoton DeviceIDs
Shane Huang (1):
[libata] replace sata_settings with devslp_timing
Thierry Reding (1):
[libata] Convert to devm_ioremap_resource()
Vladimir Barinov (1):
libata: add R-Car SATA driver
drivers/ata/Kconfig +21 -0
@@ -58,6 +58,19 @@ config ATA_ACPI You can disable this at kernel boot time by using the option libata.noacpi=1 +config SATA_ZPODD + bool "SATA Zero Power ODD Support" + depends on ATA_ACPI + default n + help + This option adds support for SATA ZPODD. It requires both + ODD and the platform support, and if enabled, will automatically + power on/off the ODD when certain condition is satisfied. This + does not impact user's experience of the ODD, only power is saved + when ODD is not in use(i.e. no disc inside). + + If unsure, say N. + config SATA_PMP bool "SATA Port Multiplier support" default y
@@ -247,6 +260,14 @@ config SATA_PROMISE If unsure, say N. +config SATA_RCAR + tristate "Renesas R-Car SATA support" + depends on ARCH_SHMOBILE && ARCH_R8A7779 + help + This option enables support for Renesas R-Car Serial ATA. + + If unsure, say N. + config SATA_SIL tristate "Silicon Image SATA support" depends on PCI
drivers/ata/Makefile +2 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_ATA_PIIX) += ata_piix.o obj-$(CONFIG_SATA_MV) += sata_mv.o obj-$(CONFIG_SATA_NV) += sata_nv.o obj-$(CONFIG_SATA_PROMISE) += sata_promise.o +obj-$(CONFIG_SATA_RCAR) += sata_rcar.o obj-$(CONFIG_SATA_SIL) += sata_sil.o obj-$(CONFIG_SATA_SIS) += sata_sis.o obj-$(CONFIG_SATA_SVW) += sata_svw.o
@@ -107,3 +108,4 @@ libata-y := libata-core.o libata-scsi.o libata-eh.o libata-transport.o libata-$(CONFIG_ATA_SFF) += libata-sff.o libata-$(CONFIG_SATA_PMP) += libata-pmp.o libata-$(CONFIG_ATA_ACPI) += libata-acpi.o +libata-$(CONFIG_SATA_ZPODD) += libata-zpodd.o
drivers/ata/ahci.c +31 -1
@@ -53,6 +53,7 @@enum {AHCI_PCI_BAR_STA2X11 =0 , +AHCI_PCI_BAR_ENMOTUS =2 ,AHCI_PCI_BAR_STANDARD =5 , };
@@ -264,6 +265,30 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(INTEL, 0x9c07), board_ahci }, /* Lynx Point-LP RAID */ { PCI_VDEVICE(INTEL, 0x9c0e), board_ahci }, /* Lynx Point-LP RAID */ { PCI_VDEVICE(INTEL, 0x9c0f), board_ahci }, /* Lynx Point-LP RAID */ + { PCI_VDEVICE(INTEL, 0x1f22), board_ahci }, /* Avoton AHCI */ + { PCI_VDEVICE(INTEL, 0x1f23), board_ahci }, /* Avoton AHCI */ + { PCI_VDEVICE(INTEL, 0x1f24), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f25), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f26), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f27), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f2e), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f2f), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f32), board_ahci }, /* Avoton AHCI */ + { PCI_VDEVICE(INTEL, 0x1f33), board_ahci }, /* Avoton AHCI */ + { PCI_VDEVICE(INTEL, 0x1f34), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f35), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f36), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f37), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f3e), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x1f3f), board_ahci }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */ + { PCI_VDEVICE(INTEL, 0x8d04), board_ahci }, /* Wellsburg RAID */ + { PCI_VDEVICE(INTEL, 0x8d06), board_ahci }, /* Wellsburg RAID */ + { PCI_VDEVICE(INTEL, 0x8d0e), board_ahci }, /* Wellsburg RAID */ + { PCI_VDEVICE(INTEL, 0x8d62), board_ahci }, /* Wellsburg AHCI */ + { PCI_VDEVICE(INTEL, 0x8d64), board_ahci }, /* Wellsburg RAID */ + { PCI_VDEVICE(INTEL, 0x8d66), board_ahci }, /* Wellsburg RAID */ + { PCI_VDEVICE(INTEL, 0x8d6e), board_ahci }, /* Wellsburg RAID *//* JMicron 360/1/3/5/6, match class to avoid IDE function */ { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
@@ -410,6 +435,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ +/* Enmotus */ + { PCI_DEVICE(0x1c44, 0x8000), board_ahci }, +/* Generic, PCI class code for AHCI */ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
@@ -1098,9 +1126,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)dev_info (&pdev->dev,"PDC42819 can only drive SATA devices with this driver\n" ); -/* The Connext uses non-standard BAR */ +/* Both Connext and Enmotus devices use non-standard BARs */ if (pdev->vendor ==PCI_VENDOR_ID_STMICRO && pdev->device ==0xCC06 ) ahci_pci_bar =AHCI_PCI_BAR_STA2X11 ; +else if (pdev->vendor ==0x1c44 && pdev->device ==0x8000 ) + ahci_pci_bar =AHCI_PCI_BAR_ENMOTUS ;/* acquire resources */ rc =pcim_enable_device (pdev);
drivers/ata/ata_piix.c +17 -0
@@ -317,6 +317,23 @@ static const struct pci_device_id piix_pci_tbl[] = { { 0x8086, 0x9c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },/* SATA Controller IDE (DH89xxCC) */ { 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (Avoton) */ + { 0x8086, 0x1f20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, +/* SATA Controller IDE (Avoton) */ + { 0x8086, 0x1f21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, +/* SATA Controller IDE (Avoton) */ + { 0x8086, 0x1f30, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (Avoton) */ + { 0x8086, 0x1f31, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (Wellsburg) */ + { 0x8086, 0x8d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, +/* SATA Controller IDE (Wellsburg) */ + { 0x8086, 0x8d08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (Wellsburg) */ + { 0x8086, 0x8d60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, +/* SATA Controller IDE (Wellsburg) */ + { 0x8086, 0x8d68, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, + { } /* terminate list */ };
drivers/ata/libahci.c +3 -3
@@ -1951,13 +1951,13 @@ static void ahci_set_aggressive_devslp(struct ata_port *ap, bool sleep)/* Use the nominal value 10 ms if the read MDAT is zero, * the nominal value of DETO is 20 ms. */ -if (dev->sata_settings[ATA_LOG_DEVSLP_VALID ] & +if (dev->devslp_timing[ATA_LOG_DEVSLP_VALID ] &ATA_LOG_DEVSLP_VALID_MASK ) { - mdat = dev->sata_settings[ATA_LOG_DEVSLP_MDAT ] & + mdat = dev->devslp_timing[ATA_LOG_DEVSLP_MDAT ] &ATA_LOG_DEVSLP_MDAT_MASK ;if (!mdat) mdat =10 ; - deto = dev->sata_settings[ATA_LOG_DEVSLP_DETO ]; + deto = dev->devslp_timing[ATA_LOG_DEVSLP_DETO ];if (!deto) deto =20 ; }else {
drivers/ata/libata-acpi.c +77 -100
233 lines not on this page · raw message
drivers/ata/libata-core.c +58 -30
176 lines not on this page · raw message
drivers/ata/libata-eh.c +22 -7
@@ -1591,7 +1591,7 @@ static int ata_eh_read_log_10h(struct ata_device *dev,* RETURNS: * 0 on success, AC_ERR_* mask on failure. */ -static unsigned int atapi_eh_tur (struct ata_device *dev,u8 *r_sense_key) +unsigned int atapi_eh_tur (struct ata_device *dev,u8 *r_sense_key) {u8 cdb[ATAPI_CDB_LEN ] = {TEST_UNIT_READY ,0 ,0 ,0 ,0 ,0 };struct ata_taskfile tf;
@@ -1624,7 +1624,7 @@ static unsigned int atapi_eh_tur(struct ata_device *dev, u8 *r_sense_key)* RETURNS: * 0 on success, AC_ERR_* mask on failure */ -static unsigned int atapi_eh_request_sense (struct ata_device *dev, +unsigned int atapi_eh_request_sense (struct ata_device *dev,u8 *sense_buf,u8 dfl_sense_key) { u8 cdb[ATAPI_CDB_LEN] =
@@ -2094,7 +2094,7 @@ static unsigned int ata_eh_speed_down(struct ata_device *dev,*/ static inline int ata_eh_worth_retry (struct ata_queued_cmd *qc) { -if (qc->flags &AC_ERR_MEDIA ) +if (qc->err_mask &AC_ERR_MEDIA )return 0 ;/* don't retry media errors */ if (qc->flags &ATA_QCFLAG_IO )return 1 ;/* otherwise retry anything from fs stack */
@@ -3857,6 +3857,8 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, rc =atapi_eh_clear_ua (dev);if (rc) goto rest_fail; +if (zpodd_dev_enabled (dev)) +zpodd_post_poweron (dev); } }
@@ -4022,11 +4024,12 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap) {unsigned long flags;int rc =0 ; +struct ata_device *dev;/* are we suspending? */ spin_lock_irqsave (ap->lock, flags);if (!(ap->pflags &ATA_PFLAG_PM_PENDING ) || - ap->pm_mesg.event ==PM_EVENT_ON ) { + ap->pm_mesg.event &PM_EVENT_RESUME ) {spin_unlock_irqrestore (ap->lock, flags);return ; }
@@ -4034,6 +4037,18 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap)WARN_ON (ap->pflags &ATA_PFLAG_SUSPENDED ); +/* +* If we have a ZPODD attached, check its zero +* power ready status before the port is frozen. +* Only needed for runtime suspend. +*/ +if (PMSG_IS_AUTO (ap->pm_mesg)) { +ata_for_each_dev (dev, &ap->link,ENABLED ) { +if (zpodd_dev_enabled (dev)) +zpodd_on_suspend (dev); + } + } +/* tell ACPI we're suspending */ rc =ata_acpi_on_suspend (ap);if (rc)
@@ -4045,7 +4060,7 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap)if (ap->ops->port_suspend) rc = ap->ops->port_suspend (ap, ap->pm_mesg); -ata_acpi_set_state (ap,PMSG_SUSPEND ); +ata_acpi_set_state (ap, ap->pm_mesg); out:/* report result */ spin_lock_irqsave (ap->lock, flags);
@@ -4085,7 +4100,7 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)/* are we resuming? */ spin_lock_irqsave (ap->lock, flags);if (!(ap->pflags &ATA_PFLAG_PM_PENDING ) || - ap->pm_mesg.event !=PM_EVENT_ON ) { + !(ap->pm_mesg.event &PM_EVENT_RESUME )) {spin_unlock_irqrestore (ap->lock, flags);return ; }
@@ -4104,7 +4119,7 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)ata_for_each_dev (dev, link,ALL )ata_ering_clear (&dev->ering); -ata_acpi_set_state (ap,PMSG_ON ); +ata_acpi_set_state (ap, ap->pm_mesg);if (ap->ops->port_resume) rc = ap->ops->port_resume (ap);
drivers/ata/libata-scsi.c +16 -4
@@ -933,7 +933,11 @@ static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk,* block specified for the ATA pass through commands. Regardless * of whether the command errored or not, return a sense * block. Copy all controller registers into the sense -* block. Clear sense key, ASC & ASCQ if there is no error. +* block. If there was no error, we get the request from an ATA +* passthrough command, so we use the following sense data: +* sk = RECOVERED ERROR +* asc,ascq = ATA PASS-THROUGH INFORMATION AVAILABLE +* * * LOCKING: * None.
@@ -959,6 +963,10 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)ata_to_sense_error (qc->ap->print_id, tf->command, tf->feature, &sb[1 ], &sb[2 ], &sb[3 ], verbose); sb[1 ] &=0x0f ; + }else { + sb[1 ] =RECOVERED_ERROR ; + sb[2 ] =0 ; + sb[3 ] =0x1D ; }/*
@@ -1733,10 +1741,12 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)/* For ATA pass thru (SAT) commands, generate a sense block if * user mandated it or if there's an error. Note that if we -* generate because the user forced us to, a check condition -* is generated and the ATA register values are returned +* generate because the user forced us to [CK_COND =1], a check +* condition is generated and the ATA register values are returned * whether the command completed successfully or not. If there -* was no error, SK, ASC and ASCQ will all be zero. +* was no error, we use the following sense data: +* sk = RECOVERED ERROR +* asc,ascq = ATA PASS-THROUGH INFORMATION AVAILABLE */ if (((cdb[0 ] ==ATA_16 ) || (cdb[0 ] ==ATA_12 )) && ((cdb[2 ] &0x20 ) || need_sense)) {
@@ -3755,6 +3765,8 @@ static void ata_scsi_remove_dev(struct ata_device *dev)mutex_lock (&ap->scsi_host->scan_mutex);spin_lock_irqsave (ap->lock, flags); +if (zpodd_dev_enabled (dev)) +zpodd_exit (dev);ata_acpi_unbind (dev);/* clearing dev->sdev is protected by host lock */
drivers/ata/libata-zpodd.c new file +299 -0
299 lines not on this page · raw message
drivers/ata/libata.h +27 -0
@@ -182,6 +182,9 @@ extern void ata_eh_finish(struct ata_port *ap);extern int ata_ering_map (struct ata_ering *ering,int (*map_fn)(struct ata_ering_entry *,void *),void *arg); +extern unsigned int atapi_eh_tur (struct ata_device *dev,u8 *r_sense_key); +extern unsigned int atapi_eh_request_sense (struct ata_device *dev, +u8 *sense_buf,u8 dfl_sense_key);/* libata-pmp.c */ #ifdef CONFIG_SATA_PMP
@@ -230,4 +233,28 @@ static inline void ata_sff_exit(void) { }#endif /* CONFIG_ATA_SFF */ +/* libata-zpodd.c */ +#ifdef CONFIG_SATA_ZPODD +void zpodd_init (struct ata_device *dev); +void zpodd_exit (struct ata_device *dev); +static inline bool zpodd_dev_enabled (struct ata_device *dev) +{ +return dev->zpodd !=NULL ; +} +void zpodd_on_suspend (struct ata_device *dev); +bool zpodd_zpready (struct ata_device *dev); +void zpodd_enable_run_wake (struct ata_device *dev); +void zpodd_disable_run_wake (struct ata_device *dev); +void zpodd_post_poweron (struct ata_device *dev); +#else /* CONFIG_SATA_ZPODD */ +static inline void zpodd_init (struct ata_device *dev) {} +static inline void zpodd_exit (struct ata_device *dev) {} +static inline bool zpodd_dev_enabled (struct ata_device *dev) {return false; } +static inline void zpodd_on_suspend (struct ata_device *dev) {} +static inline bool zpodd_zpready (struct ata_device *dev) {return false; } +static inline void zpodd_enable_run_wake (struct ata_device *dev) {} +static inline void zpodd_disable_run_wake (struct ata_device *dev) {} +static inline void zpodd_post_poweron (struct ata_device *dev) {} +#endif /* CONFIG_SATA_ZPODD */ +#endif /* __LIBATA_H__ */
drivers/ata/pata_ep93xx.c +4 -3
@@ -31,6 +31,7 @@* Copyright (C) 2006 Tower Technologies */ +#include <linux/err.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h>
@@ -937,9 +938,9 @@ static int ep93xx_pata_probe(struct platform_device *pdev) goto err_rel_gpio; } - ide_base =devm_request_and_ioremap (&pdev->dev, mem_res); -if (!ide_base) { - err = -ENXIO ; + ide_base =devm_ioremap_resource (&pdev->dev, mem_res); +if (IS_ERR (ide_base)) { + err =PTR_ERR (ide_base); goto err_rel_gpio; }
drivers/ata/pata_samsung_cf.c +1 -3
@@ -512,7 +512,7 @@ static int __init pata_s3c_probe(struct platform_device *pdev)return -ENOMEM ; } - info->clk =clk_get (&pdev->dev,"cfcon" ); + info->clk =devm_clk_get (&pdev->dev,"cfcon" );if (IS_ERR (info->clk)) {dev_err (dev,"failed to get access to cf controller clock\n" ); ret =PTR_ERR (info->clk);
@@ -589,7 +589,6 @@ static int __init pata_s3c_probe(struct platform_device *pdev) stop_clk:clk_disable (info->clk); -clk_put (info->clk);return ret; }
@@ -601,7 +600,6 @@ static int __exit pata_s3c_remove(struct platform_device *pdev)ata_host_detach (host);clk_disable (info->clk); -clk_put (info->clk);return 0 ; }
drivers/ata/sata_rcar.c new file +910 -0
910 lines not on this page · raw message
drivers/scsi/scsi_lib.c +14 -0
@@ -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);
drivers/scsi/sr.c +43 -3
123 lines not on this page · raw message
include/linux/ata.h +5 -3
@@ -297,10 +297,12 @@ enum {ATA_LOG_SATA_NCQ =0x10 ,ATA_LOG_SATA_ID_DEV_DATA =0x30 ,ATA_LOG_SATA_SETTINGS =0x08 , -ATA_LOG_DEVSLP_MDAT =0x30 , +ATA_LOG_DEVSLP_OFFSET =0x30 , +ATA_LOG_DEVSLP_SIZE =0x08 , +ATA_LOG_DEVSLP_MDAT =0x00 ,ATA_LOG_DEVSLP_MDAT_MASK =0x1F , -ATA_LOG_DEVSLP_DETO =0x31 , -ATA_LOG_DEVSLP_VALID =0x37 , +ATA_LOG_DEVSLP_DETO =0x01 , +ATA_LOG_DEVSLP_VALID =0x07 ,ATA_LOG_DEVSLP_VALID_MASK =0x80 , /* READ/WRITE LONG (obsolete) */
include/linux/libata.h +5 -2
@@ -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 */
@@ -652,8 +655,8 @@ struct ata_device {u32 gscr[SATA_PMP_GSCR_DWORDS ];/* PMP GSCR block */ }; -/* Identify Device Data Log (30h), SATA Settings (page 08h) */ -u8 sata_settings[ATA_SECT_SIZE ]; +/* DEVSLP Timing Variables from Identify Device Data Log */ +u8 devslp_timing[ATA_LOG_DEVSLP_SIZE ];/* error history */ int spdn_cnt;
include/scsi/scsi_device.h +4 -1
@@ -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 *);
include/uapi/linux/cdrom.h +34 -0
@@ -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 */