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

block: move REQ_TYPE_SENSE to the ide driver

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
b0b93b48 b42171ef

+10 -10
+3 -3
drivers/ide/ide-atapi.c
··· 191 191 192 192 BUG_ON(sense_len > sizeof(*sense)); 193 193 194 - if (rq->cmd_type == REQ_TYPE_SENSE || drive->sense_rq_armed) 194 + if (rq->cmd_type == REQ_TYPE_ATA_SENSE || drive->sense_rq_armed) 195 195 return; 196 196 197 197 memset(sense, 0, sizeof(*sense)); ··· 210 210 sense_rq->rq_disk = rq->rq_disk; 211 211 sense_rq->cmd[0] = GPCMD_REQUEST_SENSE; 212 212 sense_rq->cmd[4] = cmd_len; 213 - sense_rq->cmd_type = REQ_TYPE_SENSE; 213 + sense_rq->cmd_type = REQ_TYPE_ATA_SENSE; 214 214 sense_rq->cmd_flags |= REQ_PREEMPT; 215 215 216 216 if (drive->media == ide_tape) ··· 310 310 switch (rq->cmd_type) { 311 311 case REQ_TYPE_FS: 312 312 return 32768; 313 - case REQ_TYPE_SENSE: 313 + case REQ_TYPE_ATA_SENSE: 314 314 case REQ_TYPE_BLOCK_PC: 315 315 case REQ_TYPE_ATA_PC: 316 316 return blk_rq_bytes(rq);
+4 -4
drivers/ide/ide-cd.c
··· 210 210 static void ide_cd_complete_failed_rq(ide_drive_t *drive, struct request *rq) 211 211 { 212 212 /* 213 - * For REQ_TYPE_SENSE, "rq->special" points to the original 213 + * For REQ_TYPE_ATA_SENSE, "rq->special" points to the original 214 214 * failed request. Also, the sense data should be read 215 215 * directly from rq which might be different from the original 216 216 * sense buffer if it got copied during mapping. ··· 285 285 "stat 0x%x", 286 286 rq->cmd[0], rq->cmd_type, err, stat); 287 287 288 - if (rq->cmd_type == REQ_TYPE_SENSE) { 288 + if (rq->cmd_type == REQ_TYPE_ATA_SENSE) { 289 289 /* 290 290 * We got an error trying to get sense info from the drive 291 291 * (probably while trying to recover from a former error). ··· 526 526 ide_expiry_t *expiry = NULL; 527 527 int dma_error = 0, dma, thislen, uptodate = 0; 528 528 int write = (rq_data_dir(rq) == WRITE) ? 1 : 0, rc = 0; 529 - int sense = (rq->cmd_type == REQ_TYPE_SENSE); 529 + int sense = (rq->cmd_type == REQ_TYPE_ATA_SENSE); 530 530 unsigned int timeout; 531 531 u16 len; 532 532 u8 ireason, stat; ··· 791 791 if (cdrom_start_rw(drive, rq) == ide_stopped) 792 792 goto out_end; 793 793 break; 794 - case REQ_TYPE_SENSE: 794 + case REQ_TYPE_ATA_SENSE: 795 795 case REQ_TYPE_BLOCK_PC: 796 796 case REQ_TYPE_ATA_PC: 797 797 if (!rq->timeout)
+1 -1
drivers/ide/ide-floppy.c
··· 266 266 idefloppy_create_rw_cmd(drive, pc, rq, (unsigned long)block); 267 267 break; 268 268 case REQ_TYPE_DRV_PRIV: 269 - case REQ_TYPE_SENSE: 269 + case REQ_TYPE_ATA_SENSE: 270 270 pc = (struct ide_atapi_pc *)rq->special; 271 271 break; 272 272 case REQ_TYPE_BLOCK_PC:
+1 -1
drivers/ide/ide-tape.c
··· 577 577 blk_rq_sectors(rq)); 578 578 579 579 BUG_ON(!(rq->cmd_type == REQ_TYPE_DRV_PRIV || 580 - rq->cmd_type == REQ_TYPE_SENSE)); 580 + rq->cmd_type == REQ_TYPE_ATA_SENSE)); 581 581 582 582 /* Retry a failed packet command */ 583 583 if (drive->failed_pc && drive->pc->c[0] == REQUEST_SENSE) {
-1
include/linux/blkdev.h
··· 75 75 enum rq_cmd_type_bits { 76 76 REQ_TYPE_FS = 1, /* fs request */ 77 77 REQ_TYPE_BLOCK_PC, /* scsi command */ 78 - REQ_TYPE_SENSE, /* sense request */ 79 78 REQ_TYPE_PM_SUSPEND, /* suspend request */ 80 79 REQ_TYPE_PM_RESUME, /* resume request */ 81 80 REQ_TYPE_PM_SHUTDOWN, /* shutdown request */
+1
include/linux/ide.h
··· 43 43 enum ata_cmd_type_bits { 44 44 REQ_TYPE_ATA_TASKFILE = REQ_TYPE_DRV_PRIV + 1, 45 45 REQ_TYPE_ATA_PC, 46 + REQ_TYPE_ATA_SENSE, /* sense request */ 46 47 }; 47 48 48 49 /* Error codes returned in rq->errors to the higher part of the driver. */