aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-04-17 16:37:17 -0400
committerJens Axboe <axboe@fb.com>2015-05-05 15:40:05 -0400
commitb42171ef7d938a66fa52e66a3d911ed63770b5ca (patch)
tree71111507d961b572397dd453d8b9435d61eeacb2 /include
parent4f8c9510ba71bb54477841bebb90154ef140860f (diff)
block: move REQ_TYPE_ATA_TASKFILE and REQ_TYPE_ATA_PC to ide.h
These values are only used by the IDE driver, so move them into it by allowing drivers to take cmd_type values after the first private one. Note that we have to turn cmd_type into a plain unsigned integer so that gcc doesn't complain about mismatching enum types. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h11
-rw-r--r--include/linux/ide.h7
2 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 98c90272443b..9cb4d80a4987 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -79,14 +79,7 @@ enum rq_cmd_type_bits {
79 REQ_TYPE_PM_SUSPEND, /* suspend request */ 79 REQ_TYPE_PM_SUSPEND, /* suspend request */
80 REQ_TYPE_PM_RESUME, /* resume request */ 80 REQ_TYPE_PM_RESUME, /* resume request */
81 REQ_TYPE_PM_SHUTDOWN, /* shutdown request */ 81 REQ_TYPE_PM_SHUTDOWN, /* shutdown request */
82 REQ_TYPE_DRV_PRIV, /* driver defined type */ 82 REQ_TYPE_DRV_PRIV, /* driver defined types from here */
83 /*
84 * for ATA/ATAPI devices. this really doesn't belong here, ide should
85 * use REQ_TYPE_DRV_PRIV and use rq->cmd[0] with the range of driver
86 * private REQ_LB opcodes to differentiate what type of request this is
87 */
88 REQ_TYPE_ATA_TASKFILE,
89 REQ_TYPE_ATA_PC,
90}; 83};
91 84
92#define BLK_MAX_CDB 16 85#define BLK_MAX_CDB 16
@@ -108,7 +101,7 @@ struct request {
108 struct blk_mq_ctx *mq_ctx; 101 struct blk_mq_ctx *mq_ctx;
109 102
110 u64 cmd_flags; 103 u64 cmd_flags;
111 enum rq_cmd_type_bits cmd_type; 104 unsigned cmd_type;
112 unsigned long atomic_flags; 105 unsigned long atomic_flags;
113 106
114 int cpu; 107 int cpu;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 93b5ca754b5b..62ac399144a6 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -39,6 +39,12 @@
39 39
40struct device; 40struct device;
41 41
42/* IDE-specific values for req->cmd_type */
43enum ata_cmd_type_bits {
44 REQ_TYPE_ATA_TASKFILE = REQ_TYPE_DRV_PRIV + 1,
45 REQ_TYPE_ATA_PC,
46};
47
42/* Error codes returned in rq->errors to the higher part of the driver. */ 48/* Error codes returned in rq->errors to the higher part of the driver. */
43enum { 49enum {
44 IDE_DRV_ERROR_GENERAL = 101, 50 IDE_DRV_ERROR_GENERAL = 101,
@@ -1551,4 +1557,5 @@ static inline void ide_set_drivedata(ide_drive_t *drive, void *data)
1551#define ide_host_for_each_port(i, port, host) \ 1557#define ide_host_for_each_port(i, port, host) \
1552 for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) 1558 for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++)
1553 1559
1560
1554#endif /* _IDE_H */ 1561#endif /* _IDE_H */