All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Bart Van Assche <bvanassche@acm.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 057/117] ide: Convert to the scsi_status union
Date: Mon, 19 Apr 2021 17:07:45 -0700	[thread overview]
Message-ID: <20210420000845.25873-58-bvanassche@acm.org> (raw)
In-Reply-To: <20210420000845.25873-1-bvanassche@acm.org>

An explanation of the purpose of this patch is available in the patch
"scsi: Introduce the scsi_status union".

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ide/ide-atapi.c    | 10 +++++-----
 drivers/ide/ide-cd.c       | 20 ++++++++++----------
 drivers/ide/ide-cd_ioctl.c |  2 +-
 drivers/ide/ide-devsets.c  |  4 ++--
 drivers/ide/ide-dma.c      |  2 +-
 drivers/ide/ide-eh.c       | 36 ++++++++++++++++++------------------
 drivers/ide/ide-floppy.c   | 10 +++++-----
 drivers/ide/ide-io.c       | 10 +++++-----
 drivers/ide/ide-ioctls.c   |  4 ++--
 drivers/ide/ide-park.c     |  2 +-
 drivers/ide/ide-pm.c       |  6 +++---
 drivers/ide/ide-tape.c     |  4 ++--
 drivers/ide/ide-taskfile.c |  6 +++---
 13 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index a1ce9f5ac3aa..92805a68a02e 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -108,7 +108,7 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
 	if (drive->media == ide_tape)
 		scsi_req(rq)->cmd[13] = REQ_IDETAPE_PC1;
 	blk_execute_rq(disk, rq, 0);
-	error = scsi_req(rq)->result ? -EIO : 0;
+	error = scsi_req(rq)->status.combined ? -EIO : 0;
 put_req:
 	blk_put_request(rq);
 	return error;
@@ -471,7 +471,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
 			debug_log("%s: I/O error\n", drive->name);
 
 			if (drive->media != ide_tape)
-				scsi_req(pc->rq)->result++;
+				scsi_req(pc->rq)->status.combined++;
 
 			if (scsi_req(rq)->cmd[0] == REQUEST_SENSE) {
 				printk(KERN_ERR PFX "%s: I/O error in request "
@@ -505,13 +505,13 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
 			drive->failed_pc = NULL;
 
 		if (ata_misc_request(rq)) {
-			scsi_req(rq)->result = 0;
+			scsi_req(rq)->status.combined = 0;
 			error = BLK_STS_OK;
 		} else {
 
 			if (blk_rq_is_passthrough(rq) && uptodate <= 0) {
-				if (scsi_req(rq)->result == 0)
-					scsi_req(rq)->result = -EIO;
+				if (scsi_req(rq)->status.combined == 0)
+					scsi_req(rq)->status.combined = -EIO;
 			}
 
 			error = uptodate ? BLK_STS_OK : BLK_STS_IOERR;
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index cffbcc27a34c..4a3e7ab6d6f7 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -248,10 +248,10 @@ static int ide_cd_breathe(ide_drive_t *drive, struct request *rq)
 
 	struct cdrom_info *info = drive->driver_data;
 
-	if (!scsi_req(rq)->result)
+	if (!scsi_req(rq)->status.combined)
 		info->write_timeout = jiffies +	ATAPI_WAIT_WRITE_BUSY;
 
-	scsi_req(rq)->result = 1;
+	scsi_req(rq)->status.combined = 1;
 
 	if (time_after(jiffies, info->write_timeout))
 		return 0;
@@ -306,8 +306,8 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat)
 	}
 
 	/* if we have an error, pass CHECK_CONDITION as the SCSI status byte */
-	if (blk_rq_is_scsi(rq) && !scsi_req(rq)->result)
-		scsi_req(rq)->result = SAM_STAT_CHECK_CONDITION;
+	if (blk_rq_is_scsi(rq) && !scsi_req(rq)->status.combined)
+		scsi_req(rq)->status.combined = SAM_STAT_CHECK_CONDITION;
 
 	if (blk_noretry_request(rq))
 		do_end_request = 1;
@@ -337,7 +337,7 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat)
 		 * Arrange to retry the request but be sure to give up if we've
 		 * retried too many times.
 		 */
-		if (++scsi_req(rq)->result > ERROR_MAX)
+		if (++scsi_req(rq)->status.combined > ERROR_MAX)
 			do_end_request = 1;
 		break;
 	case ILLEGAL_REQUEST:
@@ -384,7 +384,7 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat)
 			/* go to the default handler for other errors */
 			ide_error(drive, "cdrom_decode_status", stat);
 			return 1;
-		} else if (++scsi_req(rq)->result > ERROR_MAX)
+		} else if (++scsi_req(rq)->status.combined > ERROR_MAX)
 			/* we've racked up too many retries, abort */
 			do_end_request = 1;
 	}
@@ -468,7 +468,7 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd,
 		}
 
 		blk_execute_rq(info->disk, rq, 0);
-		error = scsi_req(rq)->result ? -EIO : 0;
+		error = scsi_req(rq)->status.combined ? -EIO : 0;
 
 		if (buffer)
 			*bufflen = scsi_req(rq)->resid_len;
@@ -585,7 +585,7 @@ static bool ide_cdrom_prep_pc(struct request *rq)
 	 * appropriate action
 	 */
 	if (c[0] == MODE_SENSE || c[0] == MODE_SELECT) {
-		scsi_req(rq)->result = ILLEGAL_REQUEST;
+		scsi_req(rq)->status.combined = ILLEGAL_REQUEST;
 		return false;
 	}
 
@@ -773,8 +773,8 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
 			if (cmd->nleft == 0)
 				uptodate = 1;
 		} else {
-			if (uptodate <= 0 && scsi_req(rq)->result == 0)
-				scsi_req(rq)->result = -EIO;
+			if (uptodate <= 0 && scsi_req(rq)->status.combined == 0)
+				scsi_req(rq)->status.combined = -EIO;
 		}
 
 		if (uptodate == 0 && rq->bio)
diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c
index 011eab9c69b7..3dd1956df9b8 100644
--- a/drivers/ide/ide-cd_ioctl.c
+++ b/drivers/ide/ide-cd_ioctl.c
@@ -300,7 +300,7 @@ int ide_cdrom_reset(struct cdrom_device_info *cdi)
 	ide_req(rq)->type = ATA_PRIV_MISC;
 	rq->rq_flags = RQF_QUIET;
 	blk_execute_rq(cd->disk, rq, 0);
-	ret = scsi_req(rq)->result ? -EIO : 0;
+	ret = scsi_req(rq)->status.combined ? -EIO : 0;
 	blk_put_request(rq);
 	/*
 	 * A reset will unlock the door. If it was previously locked,
diff --git a/drivers/ide/ide-devsets.c b/drivers/ide/ide-devsets.c
index ca1d4b3d3878..c56563a1e84d 100644
--- a/drivers/ide/ide-devsets.c
+++ b/drivers/ide/ide-devsets.c
@@ -174,7 +174,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting,
 	ide_req(rq)->special = setting->set;
 
 	blk_execute_rq(NULL, rq, 0);
-	ret = scsi_req(rq)->result;
+	ret = scsi_req(rq)->status.combined;
 	blk_put_request(rq);
 
 	return ret;
@@ -186,7 +186,7 @@ ide_startstop_t ide_do_devset(ide_drive_t *drive, struct request *rq)
 
 	err = setfunc(drive, *(int *)&scsi_req(rq)->cmd[1]);
 	if (err)
-		scsi_req(rq)->result = err;
+		scsi_req(rq)->status.combined = err;
 	ide_complete_rq(drive, 0, blk_rq_bytes(rq));
 	return ide_stopped;
 }
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 6f344654ef22..344a4613f653 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -488,7 +488,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
 	 * make sure request is sane
 	 */
 	if (hwif->rq)
-		scsi_req(hwif->rq)->result = 0;
+		scsi_req(hwif->rq)->status.combined = 0;
 	return ret;
 }
 
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c
index 2f378213e9b5..0aef620c22cf 100644
--- a/drivers/ide/ide-eh.c
+++ b/drivers/ide/ide-eh.c
@@ -13,7 +13,7 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq,
 	if ((stat & ATA_BUSY) ||
 	    ((stat & ATA_DF) && (drive->dev_flags & IDE_DFLAG_NOWERR) == 0)) {
 		/* other bits are useless when BUSY */
-		scsi_req(rq)->result |= ERROR_RESET;
+		scsi_req(rq)->status.combined |= ERROR_RESET;
 	} else if (stat & ATA_ERR) {
 		/* err has different meaning on cdrom and tape */
 		if (err == ATA_ABORTED) {
@@ -26,10 +26,10 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq,
 			drive->crc_count++;
 		} else if (err & (ATA_BBK | ATA_UNC)) {
 			/* retries won't help these */
-			scsi_req(rq)->result = ERROR_MAX;
+			scsi_req(rq)->status.combined = ERROR_MAX;
 		} else if (err & ATA_TRK0NF) {
 			/* help it find track zero */
-			scsi_req(rq)->result |= ERROR_RECAL;
+			scsi_req(rq)->status.combined |= ERROR_RECAL;
 		}
 	}
 
@@ -40,23 +40,23 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq,
 		ide_pad_transfer(drive, READ, nsect * SECTOR_SIZE);
 	}
 
-	if (scsi_req(rq)->result >= ERROR_MAX || blk_noretry_request(rq)) {
+	if (scsi_req(rq)->status.combined >= ERROR_MAX || blk_noretry_request(rq)) {
 		ide_kill_rq(drive, rq);
 		return ide_stopped;
 	}
 
 	if (hwif->tp_ops->read_status(hwif) & (ATA_BUSY | ATA_DRQ))
-		scsi_req(rq)->result |= ERROR_RESET;
+		scsi_req(rq)->status.combined |= ERROR_RESET;
 
-	if ((scsi_req(rq)->result & ERROR_RESET) == ERROR_RESET) {
-		++scsi_req(rq)->result;
+	if ((scsi_req(rq)->status.combined & ERROR_RESET) == ERROR_RESET) {
+		++scsi_req(rq)->status.combined;
 		return ide_do_reset(drive);
 	}
 
-	if ((scsi_req(rq)->result & ERROR_RECAL) == ERROR_RECAL)
+	if ((scsi_req(rq)->status.combined & ERROR_RECAL) == ERROR_RECAL)
 		drive->special_flags |= IDE_SFLAG_RECALIBRATE;
 
-	++scsi_req(rq)->result;
+	++scsi_req(rq)->status.combined;
 
 	return ide_stopped;
 }
@@ -69,7 +69,7 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq,
 	if ((stat & ATA_BUSY) ||
 	    ((stat & ATA_DF) && (drive->dev_flags & IDE_DFLAG_NOWERR) == 0)) {
 		/* other bits are useless when BUSY */
-		scsi_req(rq)->result |= ERROR_RESET;
+		scsi_req(rq)->status.combined |= ERROR_RESET;
 	} else {
 		/* add decoding error stuff */
 	}
@@ -78,14 +78,14 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq,
 		/* force an abort */
 		hwif->tp_ops->exec_command(hwif, ATA_CMD_IDLEIMMEDIATE);
 
-	if (scsi_req(rq)->result >= ERROR_MAX) {
+	if (scsi_req(rq)->status.combined >= ERROR_MAX) {
 		ide_kill_rq(drive, rq);
 	} else {
-		if ((scsi_req(rq)->result & ERROR_RESET) == ERROR_RESET) {
-			++scsi_req(rq)->result;
+		if ((scsi_req(rq)->status.combined & ERROR_RESET) == ERROR_RESET) {
+			++scsi_req(rq)->status.combined;
 			return ide_do_reset(drive);
 		}
-		++scsi_req(rq)->result;
+		++scsi_req(rq)->status.combined;
 	}
 
 	return ide_stopped;
@@ -131,11 +131,11 @@ ide_startstop_t ide_error(ide_drive_t *drive, const char *msg, u8 stat)
 			if (cmd)
 				ide_complete_cmd(drive, cmd, stat, err);
 		} else if (ata_pm_request(rq)) {
-			scsi_req(rq)->result = 1;
+			scsi_req(rq)->status.combined = 1;
 			ide_complete_pm_rq(drive, rq);
 			return ide_stopped;
 		}
-		scsi_req(rq)->result = err;
+		scsi_req(rq)->status.combined = err;
 		ide_complete_rq(drive, err ? BLK_STS_IOERR : BLK_STS_OK, blk_rq_bytes(rq));
 		return ide_stopped;
 	}
@@ -150,8 +150,8 @@ static inline void ide_complete_drive_reset(ide_drive_t *drive, blk_status_t err
 
 	if (rq && ata_misc_request(rq) &&
 	    scsi_req(rq)->cmd[0] == REQ_DRIVE_RESET) {
-		if (err <= 0 && scsi_req(rq)->result == 0)
-			scsi_req(rq)->result = -EIO;
+		if (err <= 0 && scsi_req(rq)->status.combined == 0)
+			scsi_req(rq)->status.combined = -EIO;
 		ide_complete_rq(drive, err, blk_rq_bytes(rq));
 	}
 }
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index f5a2870aaf54..bad2eb12daa8 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -100,7 +100,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc)
 	}
 
 	if (ata_misc_request(rq))
-		scsi_req(rq)->result = uptodate ? 0 : IDE_DRV_ERROR_GENERAL;
+		scsi_req(rq)->status.combined = uptodate ? 0 : IDE_DRV_ERROR_GENERAL;
 
 	return uptodate;
 }
@@ -241,7 +241,7 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
 					? rq->rq_disk->disk_name
 					: "dev?"));
 
-	if (scsi_req(rq)->result >= ERROR_MAX) {
+	if (scsi_req(rq)->status.combined >= ERROR_MAX) {
 		if (drive->failed_pc) {
 			ide_floppy_report_error(floppy, drive->failed_pc);
 			drive->failed_pc = NULL;
@@ -249,7 +249,7 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
 			printk(KERN_ERR PFX "%s: I/O error\n", drive->name);
 
 		if (ata_misc_request(rq)) {
-			scsi_req(rq)->result = 0;
+			scsi_req(rq)->status.combined = 0;
 			ide_complete_rq(drive, BLK_STS_OK, blk_rq_bytes(rq));
 			return ide_stopped;
 		} else
@@ -303,8 +303,8 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
 	return ide_floppy_issue_pc(drive, &cmd, pc);
 out_end:
 	drive->failed_pc = NULL;
-	if (blk_rq_is_passthrough(rq) && scsi_req(rq)->result == 0)
-		scsi_req(rq)->result = -EIO;
+	if (blk_rq_is_passthrough(rq) && scsi_req(rq)->status.combined == 0)
+		scsi_req(rq)->status.combined = -EIO;
 	ide_complete_rq(drive, BLK_STS_IOERR, blk_rq_bytes(rq));
 	return ide_stopped;
 }
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 4867b67b60d6..bda2093aed1c 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -151,12 +151,12 @@ void ide_kill_rq(ide_drive_t *drive, struct request *rq)
 	drive->failed_pc = NULL;
 
 	if ((media == ide_floppy || media == ide_tape) && drv_req) {
-		scsi_req(rq)->result = 0;
+		scsi_req(rq)->status.combined = 0;
 	} else {
 		if (media == ide_tape)
-			scsi_req(rq)->result = IDE_DRV_ERROR_GENERAL;
-		else if (blk_rq_is_passthrough(rq) && scsi_req(rq)->result == 0)
-			scsi_req(rq)->result = -EIO;
+			scsi_req(rq)->status.combined = IDE_DRV_ERROR_GENERAL;
+		else if (blk_rq_is_passthrough(rq) && scsi_req(rq)->status.combined == 0)
+			scsi_req(rq)->status.combined = -EIO;
 	}
 
 	ide_complete_rq(drive, BLK_STS_IOERR, blk_rq_bytes(rq));
@@ -284,7 +284,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
 #ifdef DEBUG
  	printk("%s: DRIVE_CMD (null)\n", drive->name);
 #endif
-	scsi_req(rq)->result = 0;
+	scsi_req(rq)->status.combined = 0;
 	ide_complete_rq(drive, BLK_STS_OK, blk_rq_bytes(rq));
 
  	return ide_stopped;
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c
index 43fbc37d85c3..11999ebd5637 100644
--- a/drivers/ide/ide-ioctls.c
+++ b/drivers/ide/ide-ioctls.c
@@ -138,7 +138,7 @@ static int ide_cmd_ioctl(ide_drive_t *drive, void __user *argp)
 		rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0);
 		ide_req(rq)->type = ATA_PRIV_TASKFILE;
 		blk_execute_rq(NULL, rq, 0);
-		err = scsi_req(rq)->result ? -EIO : 0;
+		err = scsi_req(rq)->status.combined ? -EIO : 0;
 		blk_put_request(rq);
 
 		return err;
@@ -236,7 +236,7 @@ static int generic_drive_reset(ide_drive_t *drive)
 	scsi_req(rq)->cmd_len = 1;
 	scsi_req(rq)->cmd[0] = REQ_DRIVE_RESET;
 	blk_execute_rq(NULL, rq, 1);
-	ret = scsi_req(rq)->result;
+	ret = scsi_req(rq)->status.combined;
 	blk_put_request(rq);
 	return ret;
 }
diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c
index a80a0f28f7b9..dd891bd3fe1b 100644
--- a/drivers/ide/ide-park.c
+++ b/drivers/ide/ide-park.c
@@ -38,7 +38,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
 	ide_req(rq)->type = ATA_PRIV_MISC;
 	ide_req(rq)->special = &timeout;
 	blk_execute_rq(NULL, rq, 1);
-	rc = scsi_req(rq)->result ? -EIO : 0;
+	rc = scsi_req(rq)->status.combined ? -EIO : 0;
 	blk_put_request(rq);
 	if (rc)
 		goto out;
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c
index d680b3e3295f..8058dbc1e03b 100644
--- a/drivers/ide/ide-pm.c
+++ b/drivers/ide/ide-pm.c
@@ -28,7 +28,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg)
 	rqpm.pm_state = mesg.event;
 
 	blk_execute_rq(NULL, rq, 0);
-	ret = scsi_req(rq)->result ? -EIO : 0;
+	ret = scsi_req(rq)->status.combined ? -EIO : 0;
 	blk_put_request(rq);
 
 	if (ret == 0 && ide_port_acpi(hwif)) {
@@ -46,13 +46,13 @@ static int ide_pm_execute_rq(struct request *rq)
 
 	if (unlikely(blk_queue_dying(q))) {
 		rq->rq_flags |= RQF_QUIET;
-		scsi_req(rq)->result = -ENXIO;
+		scsi_req(rq)->status.combined = -ENXIO;
 		blk_mq_end_request(rq, BLK_STS_OK);
 		return -ENXIO;
 	}
 	blk_execute_rq(NULL, rq, true);
 
-	return scsi_req(rq)->result ? -EIO : 0;
+	return scsi_req(rq)->status.combined ? -EIO : 0;
 }
 
 int generic_ide_resume(struct device *dev)
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index fa05e7e7d609..d04b10c32dfa 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -367,7 +367,7 @@ static int ide_tape_callback(ide_drive_t *drive, int dsc)
 			err = pc->error;
 		}
 	}
-	scsi_req(rq)->result = err;
+	scsi_req(rq)->status.combined = err;
 
 	return uptodate;
 }
@@ -879,7 +879,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size)
 		tape->valid = 0;
 
 	ret = size;
-	if (scsi_req(rq)->result == IDE_DRV_ERROR_GENERAL)
+	if (scsi_req(rq)->status.combined == IDE_DRV_ERROR_GENERAL)
 		ret = -EIO;
 out_put:
 	blk_put_request(rq);
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 6665fc4724b9..a542201b81a9 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -279,7 +279,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct ide_cmd *cmd,
 	u8 saved_io_32bit = drive->io_32bit;
 
 	if (cmd->tf_flags & IDE_TFLAG_FS)
-		scsi_req(cmd->rq)->result = 0;
+		scsi_req(cmd->rq)->status.combined = 0;
 
 	if (cmd->tf_flags & IDE_TFLAG_IO_16BIT)
 		drive->io_32bit = 0;
@@ -321,7 +321,7 @@ void ide_finish_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat)
 	u8 set_xfer = !!(cmd->tf_flags & IDE_TFLAG_SET_XFER);
 
 	ide_complete_cmd(drive, cmd, stat, err);
-	scsi_req(rq)->result = err;
+	scsi_req(rq)->status.combined = err;
 
 	if (err == 0 && set_xfer) {
 		ide_set_xfer_rate(drive, nsect);
@@ -444,7 +444,7 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf,
 	cmd->rq = rq;
 
 	blk_execute_rq(NULL, rq, 0);
-	error = scsi_req(rq)->result ? -EIO : 0;
+	error = scsi_req(rq)->status.combined ? -EIO : 0;
 put_req:
 	blk_put_request(rq);
 	return error;

  parent reply	other threads:[~2021-04-20  0:10 UTC|newest]

Thread overview: 158+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  0:06 [PATCH 000/117] Make better use of static type checking Bart Van Assche
2021-04-20  0:06 ` [PATCH 001/117] libsas: Introduce more SAM status code aliases in enum exec_status Bart Van Assche
2021-04-20  0:06 ` [PATCH 002/117] Introduce enums for the SAM, message, host and driver status codes Bart Van Assche
2021-04-20  9:23   ` Steffen Maier
2021-04-20 14:59     ` Bart Van Assche
2021-04-20  0:06 ` [PATCH 003/117] Change the type of the second argument of scsi_host_complete_all_commands() Bart Van Assche
2021-04-20  0:06 ` [PATCH 004/117] libiscsi: Use the host_status enum Bart Van Assche
2021-05-06 16:51   ` Lee Duncan
2021-04-20  0:06 ` [PATCH 005/117] libsas: Use the host_status and sam_status enums Bart Van Assche
2021-04-20  0:06 ` [PATCH 006/117] target: Use enum sam_status instead of u8 Bart Van Assche
2021-04-20  0:06 ` [PATCH 007/117] lpfc: Reformat four comparisons Bart Van Assche
2021-04-21 20:22   ` James Smart
2021-04-20  0:06 ` [PATCH 008/117] fc: Add a compile-time structure size check Bart Van Assche
2021-04-20  0:06 ` [PATCH 009/117] iscsi: " Bart Van Assche
2021-05-06 16:52   ` Lee Duncan
2021-04-20  0:06 ` [PATCH 010/117] ufs: " Bart Van Assche
2021-05-06 23:56   ` Can Guo
2021-04-20  0:06 ` [PATCH 011/117] Introduce the scsi_status union Bart Van Assche
2021-05-06 17:04   ` Lee Duncan
2021-05-07  0:04   ` Can Guo
2021-04-20  0:07 ` [PATCH 012/117] block: Convert SCSI and bsg code to " Bart Van Assche
2021-04-20  0:07 ` [PATCH 013/117] core: Convert " Bart Van Assche
2021-04-20  0:07 ` [PATCH 014/117] ch: Pass union scsi_status to driver_byte() Bart Van Assche
2021-04-20  0:07 ` [PATCH 015/117] sd: Convert to the scsi_status union Bart Van Assche
2021-04-20  0:07 ` [PATCH 016/117] sr: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 017/117] st: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 018/117] sg: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 019/117] 3w*: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 020/117] 53c700: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 021/117] BusLogic: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 022/117] NCR5380: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 023/117] a100u2w: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 024/117] aacraid: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 025/117] acornscsi: Annotate fallthrough Bart Van Assche
2021-04-20  0:07 ` [PATCH 026/117] acornscsi: Convert to the scsi_status union Bart Van Assche
2021-04-20  0:07 ` [PATCH 027/117] advansys: " Bart Van Assche
2021-04-20  1:49   ` Matthew Wilcox
2021-04-20  2:27     ` Douglas Gilbert
2021-04-20  3:20       ` Bart Van Assche
2021-04-20  3:17     ` Bart Van Assche
2021-04-20  3:23       ` Matthew Wilcox
2021-04-20 15:01         ` Bart Van Assche
2021-04-20  0:07 ` [PATCH 028/117] aha*: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 029/117] aic*: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 030/117] arcmsr: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 031/117] ata: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 032/117] atp870u: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 033/117] be2iscsi: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 034/117] bfa: Use type int32_t to represent a signed integer Bart Van Assche
2021-04-20  0:07 ` [PATCH 035/117] bfa: Convert to the scsi_status union Bart Van Assche
2021-04-20  0:07 ` [PATCH 036/117] bnx2fc: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 037/117] cdrom: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 038/117] csiostor: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 039/117] cxlflash: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 040/117] dc395x: Use the set_{host,msg,status}_byte() functions Bart Van Assche
2021-04-20  0:07 ` [PATCH 041/117] dc395x: Convert to the scsi_status union Bart Van Assche
2021-04-20  0:07 ` [PATCH 042/117] dpt_i2o: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 043/117] esas2r: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 044/117] esp_scsi: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 045/117] fas216: Fix two source code comments Bart Van Assche
2021-04-20  0:07 ` [PATCH 046/117] fas216: Convert to the scsi_status union Bart Van Assche
2021-04-20  0:07 ` [PATCH 047/117] fc: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 048/117] fdomain: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 049/117] firewire: sbp2: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 050/117] fnic: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 051/117] hpsa: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 052/117] hptiop: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 053/117] ib_srp: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 054/117] ibmvfc: Fix the documentation of the return value of ibmvfc_host_chkready() Bart Van Assche
2021-04-20  0:07 ` [PATCH 055/117] ibmvfc: Convert to the scsi_status union Bart Van Assche
2021-04-20  0:07 ` [PATCH 056/117] ibmvscsi: " Bart Van Assche
2021-04-20  0:07 ` Bart Van Assche [this message]
2021-04-20  0:07 ` [PATCH 058/117] imm: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 059/117] initio: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 060/117] ipr: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 061/117] ips: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 062/117] iscsi: " Bart Van Assche
2021-05-06 18:54   ` Lee Duncan
2021-04-20  0:07 ` [PATCH 063/117] libfc: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 064/117] sas: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 065/117] lpfc: " Bart Van Assche
2021-04-21 20:26   ` James Smart
2021-04-20  0:07 ` [PATCH 066/117] mac53c94: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 067/117] megaraid: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 068/117] mesh: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 069/117] message: fusion: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 070/117] mpt3sas: " Bart Van Assche
2021-04-20  0:07 ` [PATCH 071/117] mvumi: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 072/117] myrb: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 073/117] myrs: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 074/117] ncr53c8xx: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 075/117] nfsd: " Bart Van Assche
2021-04-20 14:36   ` Chuck Lever III
2021-04-20 16:44     ` Bart Van Assche
2021-04-21 14:22       ` Chuck Lever III
2021-04-21 16:12         ` Bart Van Assche
2021-04-21 16:27           ` Chuck Lever III
2021-04-20  0:08 ` [PATCH 076/117] nsp32: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 077/117] pcmcia: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 078/117] pktcdvd: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 079/117] pmcraid: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 080/117] ppa: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 081/117] ps3rom: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 082/117] qedf: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 083/117] qedi: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 084/117] qla1280: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 085/117] qla2xxx: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 086/117] qla4xxx: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 087/117] qlogicfas408: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 088/117] qlogicpti: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 089/117] s390/zfcp: " Bart Van Assche
2021-04-20  0:08 ` [PATCH 090/117] scsi_debug: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 091/117] smartpqi: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 092/117] snic: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 093/117] staging: " Bart Van Assche
2021-04-20  7:47   ` Greg Kroah-Hartman
2021-04-20 15:02     ` Bart Van Assche
2021-04-20 15:06       ` Greg Kroah-Hartman
2021-04-20  2:13 ` [PATCH 094/117] stex: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 095/117] storvsc: " Bart Van Assche
2021-04-20 19:39   ` Wei Liu
2021-04-20  2:13 ` [PATCH 096/117] sym53c8xx_2: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 097/117] target: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 098/117] ufs: Remove an unused structure member Bart Van Assche
2021-05-06 23:57   ` Can Guo
2021-04-20  2:13 ` [PATCH 099/117] ufs: Remove a local variable Bart Van Assche
2021-05-06 23:56   ` Can Guo
2021-04-20  2:13 ` [PATCH 100/117] ufs: Use enum sam_status where appropriate Bart Van Assche
2021-05-07  0:01   ` Can Guo
2021-05-07  0:01   ` Can Guo
2021-04-20  2:13 ` [PATCH 101/117] ufs: Remove an assignment from ufshcd_transfer_rsp_status() Bart Van Assche
2021-05-07  0:03   ` Can Guo
2021-04-20  2:13 ` [PATCH 102/117] ufs: Convert to the scsi_status union Bart Van Assche
2021-05-07  0:09   ` Can Guo
2021-05-07  3:35     ` Bart Van Assche
2021-05-07  4:48       ` Can Guo
2021-04-20  2:13 ` [PATCH 103/117] usb: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 104/117] virtio-scsi: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 105/117] vmw_pvscsi: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 106/117] wd33c93: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 107/117] wd719x: " Bart Van Assche
2021-04-20  2:13 ` [PATCH 108/117] xen-scsiback: Pass union status to the {status,msg,host,driver}_byte() macros Bart Van Assche
2021-04-20  2:13 ` [PATCH 109/117] xen-scsifront: Convert to the scsi_status union Bart Van Assche
2021-04-20  2:13 ` [PATCH 110/117] Finalize the switch from 'int' to 'union scsi_status' Bart Van Assche
2021-05-06 18:55   ` Lee Duncan
2021-05-07  0:24   ` Can Guo
2021-04-20  2:13 ` [PATCH 111/117] Use the scsi_status union more widely Bart Van Assche
2021-04-20  2:13 ` [PATCH 112/117] Change the return type of scsi_execute() into union scsi_status Bart Van Assche
2021-04-20  2:13 ` [PATCH 113/117] Change the return type of scsi_execute_req() " Bart Van Assche
2021-04-20  2:13 ` [PATCH 114/117] Change the return type of scsi_test_unit_ready() " Bart Van Assche
2021-04-20  2:14 ` [PATCH 115/117] Change the return types of scsi_mode_sense() and sd_do_mode_sense() Bart Van Assche
2021-04-20  2:14 ` [PATCH 116/117] Change the return type of scsi_mode_select() into union scsi_status Bart Van Assche
2021-04-20  2:14 ` [PATCH 117/117] Change the return type of ioctl_internal_command() " Bart Van Assche
2021-04-20  6:04 ` [PATCH 000/117] Make better use of static type checking Hannes Reinecke
2021-04-20 16:12   ` Bart Van Assche
2021-04-20 17:11     ` Hannes Reinecke
2021-04-20 21:10       ` Bart Van Assche
2021-04-20 17:19     ` Douglas Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210420000845.25873-58-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.