Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Hellwig and committed by
Jens Axboe
b42171ef 4f8c9510

+9 -9
+2 -9
include/linux/blkdev.h
··· 79 79 REQ_TYPE_PM_SUSPEND, /* suspend request */ 80 80 REQ_TYPE_PM_RESUME, /* resume request */ 81 81 REQ_TYPE_PM_SHUTDOWN, /* shutdown request */ 82 - REQ_TYPE_DRV_PRIV, /* driver defined type */ 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, 82 + REQ_TYPE_DRV_PRIV, /* driver defined types from here */ 90 83 }; 91 84 92 85 #define BLK_MAX_CDB 16 ··· 101 108 struct blk_mq_ctx *mq_ctx; 102 109 103 110 u64 cmd_flags; 104 - enum rq_cmd_type_bits cmd_type; 111 + unsigned cmd_type; 105 112 unsigned long atomic_flags; 106 113 107 114 int cpu;
+7
include/linux/ide.h
··· 39 39 40 40 struct device; 41 41 42 + /* IDE-specific values for req->cmd_type */ 43 + enum ata_cmd_type_bits { 44 + REQ_TYPE_ATA_TASKFILE = REQ_TYPE_DRV_PRIV + 1, 45 + REQ_TYPE_ATA_PC, 46 + }; 47 + 42 48 /* Error codes returned in rq->errors to the higher part of the driver. */ 43 49 enum { 44 50 IDE_DRV_ERROR_GENERAL = 101, ··· 1556 1550 1557 1551 #define ide_host_for_each_port(i, port, host) \ 1558 1552 for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) 1553 + 1559 1554 1560 1555 #endif /* _IDE_H */