summaryrefslogtreecommitdiff
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-04-17 22:37:20 +0200
committerJens Axboe <axboe@fb.com>2015-05-05 13:40:42 -0600
commita7928c1578c550bd6f4dec62d65132e6db226c57 (patch)
tree1a9a13abf0679e7dc4e1e5124cd4fcb3c0ac1265 /include/linux/ide.h
parentac7cdff00a33d48d27217560fa3b16d802e5f535 (diff)
block: move PM request support to IDE
This removes the request types and hacks from the block code and into the old IDE driver. There is a small amunt of code duplication due to this, but it's not too bad. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 9856b7d455d9..a633898f36ac 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -44,8 +44,14 @@ enum ata_cmd_type_bits {
REQ_TYPE_ATA_TASKFILE = REQ_TYPE_DRV_PRIV + 1,
REQ_TYPE_ATA_PC,
REQ_TYPE_ATA_SENSE, /* sense request */
+ REQ_TYPE_ATA_PM_SUSPEND,/* suspend request */
+ REQ_TYPE_ATA_PM_RESUME, /* resume request */
};
+#define ata_pm_request(rq) \
+ ((rq)->cmd_type == REQ_TYPE_ATA_PM_SUSPEND || \
+ (rq)->cmd_type == REQ_TYPE_ATA_PM_RESUME)
+
/* Error codes returned in rq->errors to the higher part of the driver. */
enum {
IDE_DRV_ERROR_GENERAL = 101,
@@ -1321,6 +1327,19 @@ struct ide_port_info {
u8 udma_mask;
};
+/*
+ * State information carried for REQ_TYPE_ATA_PM_SUSPEND and REQ_TYPE_ATA_PM_RESUME
+ * requests.
+ */
+struct ide_pm_state {
+ /* PM state machine step value, currently driver specific */
+ int pm_step;
+ /* requested PM state value (S1, S2, S3, S4, ...) */
+ u32 pm_state;
+ void* data; /* for driver use */
+};
+
+
int ide_pci_init_one(struct pci_dev *, const struct ide_port_info *, void *);
int ide_pci_init_two(struct pci_dev *, struct pci_dev *,
const struct ide_port_info *, void *);