aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-17 22:29:32 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-17 22:29:32 -0500
commitededa4d396b15c282aa60d6aacddfc07f0142dbf (patch)
treedc8af166ac6f7332e5a885675dec222a0494de41 /include
parent64396accc2831fcbdc7d793edc25481a5ebc75b2 (diff)
parent140b5e59119a172a91b5fa13d54ca4f79bbefee1 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: fix ATAPI draining libata: update atapi_eh_request_sense() such that lbam/lbah contains buffer size libata-acpi: implement _GTF command filtering libata-acpi: improve _GTF execution error handling and reporting libata-acpi: improve ACPI disabling libata-acpi: implement dev->gtf_cache and evaluate _GTF right after _STM during resume libata-acpi: implement and use ata_acpi_init_gtm() libata-acpi: add new hooks ata_acpi_dissociate() and ata_acpi_on_disable() libata: ata_dev_disable() should be called from EH context libata: add more opcodes to ata.h libata: update ata_*_printk() macros such that level can be a variable libata-acpi: adjust constness in ata_acpi_gtm/stm() parameters sata_mv: improve warnings about Highpoint RocketRAID 23xx cards libata: add ST3160023AS / 3.42 to NCQ blacklist libata: clear link->eh_info.serror from ata_std_postreset() sata_sil: fix spurious IRQ handling
Diffstat (limited to 'include')
-rw-r--r--include/linux/ata.h15
-rw-r--r--include/linux/libata.h29
2 files changed, 36 insertions, 8 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 5c4e54a2a8d6..72ab80801ef6 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -190,6 +190,8 @@ enum {
190 ATA_CMD_READ_LOG_EXT = 0x2f, 190 ATA_CMD_READ_LOG_EXT = 0x2f,
191 ATA_CMD_PMP_READ = 0xE4, 191 ATA_CMD_PMP_READ = 0xE4,
192 ATA_CMD_PMP_WRITE = 0xE8, 192 ATA_CMD_PMP_WRITE = 0xE8,
193 ATA_CMD_CONF_OVERLAY = 0xB1,
194 ATA_CMD_SEC_FREEZE_LOCK = 0xF5,
193 195
194 /* READ_LOG_EXT pages */ 196 /* READ_LOG_EXT pages */
195 ATA_LOG_SATA_NCQ = 0x10, 197 ATA_LOG_SATA_NCQ = 0x10,
@@ -239,6 +241,19 @@ enum {
239 SATA_AN = 0x05, /* Asynchronous Notification */ 241 SATA_AN = 0x05, /* Asynchronous Notification */
240 SATA_DIPM = 0x03, /* Device Initiated Power Management */ 242 SATA_DIPM = 0x03, /* Device Initiated Power Management */
241 243
244 /* feature values for SET_MAX */
245 ATA_SET_MAX_ADDR = 0x00,
246 ATA_SET_MAX_PASSWD = 0x01,
247 ATA_SET_MAX_LOCK = 0x02,
248 ATA_SET_MAX_UNLOCK = 0x03,
249 ATA_SET_MAX_FREEZE_LOCK = 0x04,
250
251 /* feature values for DEVICE CONFIGURATION OVERLAY */
252 ATA_DCO_RESTORE = 0xC0,
253 ATA_DCO_FREEZE_LOCK = 0xC1,
254 ATA_DCO_IDENTIFY = 0xC2,
255 ATA_DCO_SET = 0xC3,
256
242 /* ATAPI stuff */ 257 /* ATAPI stuff */
243 ATAPI_PKT_DMA = (1 << 0), 258 ATAPI_PKT_DMA = (1 << 0),
244 ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: 259 ATAPI_DMADIR = (1 << 2), /* ATAPI data dir:
diff --git a/include/linux/libata.h b/include/linux/libata.h
index ef52a07c43d8..124033cb5e9b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -119,6 +119,8 @@ enum {
119 ATA_DEF_BUSY_WAIT = 10000, 119 ATA_DEF_BUSY_WAIT = 10000,
120 ATA_SHORT_PAUSE = (HZ >> 6) + 1, 120 ATA_SHORT_PAUSE = (HZ >> 6) + 1,
121 121
122 ATAPI_MAX_DRAIN = 16 << 10,
123
122 ATA_SHT_EMULATED = 1, 124 ATA_SHT_EMULATED = 1,
123 ATA_SHT_CMD_PER_LUN = 1, 125 ATA_SHT_CMD_PER_LUN = 1,
124 ATA_SHT_THIS_ID = -1, 126 ATA_SHT_THIS_ID = -1,
@@ -211,7 +213,7 @@ enum {
211 213
212 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ 214 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */
213 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ 215 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */
214 ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ 216 ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */
215 217
216 /* struct ata_queued_cmd flags */ 218 /* struct ata_queued_cmd flags */
217 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ 219 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */
@@ -498,6 +500,7 @@ struct ata_device {
498 struct scsi_device *sdev; /* attached SCSI device */ 500 struct scsi_device *sdev; /* attached SCSI device */
499#ifdef CONFIG_ATA_ACPI 501#ifdef CONFIG_ATA_ACPI
500 acpi_handle acpi_handle; 502 acpi_handle acpi_handle;
503 union acpi_object *gtf_cache;
501#endif 504#endif
502 /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ 505 /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */
503 u64 n_sectors; /* size of device, if ATA */ 506 u64 n_sectors; /* size of device, if ATA */
@@ -653,7 +656,7 @@ struct ata_port {
653 656
654#ifdef CONFIG_ATA_ACPI 657#ifdef CONFIG_ATA_ACPI
655 acpi_handle acpi_handle; 658 acpi_handle acpi_handle;
656 struct ata_acpi_gtm acpi_gtm; 659 struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
657#endif 660#endif
658 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ 661 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */
659}; 662};
@@ -939,10 +942,20 @@ enum {
939 942
940/* libata-acpi.c */ 943/* libata-acpi.c */
941#ifdef CONFIG_ATA_ACPI 944#ifdef CONFIG_ATA_ACPI
945static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap)
946{
947 if (ap->pflags & ATA_PFLAG_INIT_GTM_VALID)
948 return &ap->__acpi_init_gtm;
949 return NULL;
950}
942extern int ata_acpi_cbl_80wire(struct ata_port *ap); 951extern int ata_acpi_cbl_80wire(struct ata_port *ap);
943int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm); 952int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm);
944int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *stm); 953int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm);
945#else 954#else
955static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap)
956{
957 return NULL;
958}
946static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } 959static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; }
947#endif 960#endif
948 961
@@ -1013,18 +1026,18 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
1013 * printk helpers 1026 * printk helpers
1014 */ 1027 */
1015#define ata_port_printk(ap, lv, fmt, args...) \ 1028#define ata_port_printk(ap, lv, fmt, args...) \
1016 printk(lv"ata%u: "fmt, (ap)->print_id , ##args) 1029 printk("%sata%u: "fmt, lv, (ap)->print_id , ##args)
1017 1030
1018#define ata_link_printk(link, lv, fmt, args...) do { \ 1031#define ata_link_printk(link, lv, fmt, args...) do { \
1019 if ((link)->ap->nr_pmp_links) \ 1032 if ((link)->ap->nr_pmp_links) \
1020 printk(lv"ata%u.%02u: "fmt, (link)->ap->print_id, \ 1033 printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \
1021 (link)->pmp , ##args); \ 1034 (link)->pmp , ##args); \
1022 else \ 1035 else \
1023 printk(lv"ata%u: "fmt, (link)->ap->print_id , ##args); \ 1036 printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
1024 } while(0) 1037 } while(0)
1025 1038
1026#define ata_dev_printk(dev, lv, fmt, args...) \ 1039#define ata_dev_printk(dev, lv, fmt, args...) \
1027 printk(lv"ata%u.%02u: "fmt, (dev)->link->ap->print_id, \ 1040 printk("%sata%u.%02u: "fmt, lv, (dev)->link->ap->print_id, \
1028 (dev)->link->pmp + (dev)->devno , ##args) 1041 (dev)->link->pmp + (dev)->devno , ##args)
1029 1042
1030/* 1043/*