[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230810160019.16977-6-richard@nod.at>
Date: Thu, 10 Aug 2023 18:00:16 +0200
From: Richard Weinberger <richard@....at>
To: linux-mtd@...ts.infradead.org
Cc: Christoph Hellwig <hch@...radead.org>,
Stephan Wurm <stephan.wurm@...berle.de>,
Richard Weinberger <richard@....at>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Vignesh Raghavendra <vigneshr@...com>,
Oliver Neukum <oliver@...kum.org>,
Ali Akcaagac <aliakc@....de>,
Jamie Lenehan <lenehan@...bble.org>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: [PATCH 5/7] scsi: fdomain: Switch to kmap_sg
Switch to our new helper from scatterlist lib.
No functional change, the mapped region is still used in atomic
context.
Signed-off-by: Richard Weinberger <richard@....at>
---
drivers/scsi/fdomain.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c
index 504c4e0c5d17a..5d58a9ec1c66a 100644
--- a/drivers/scsi/fdomain.c
+++ b/drivers/scsi/fdomain.c
@@ -223,15 +223,14 @@ static void fdomain_read_data(struct scsi_cmnd *cmd)
while ((len = inw(fd->base + REG_FIFO_COUNT)) > 0) {
offset = scsi_bufflen(cmd) - scsi_get_resid(cmd);
- virt = scsi_kmap_atomic_sg(scsi_sglist(cmd), scsi_sg_count(cmd),
- &offset, &len);
+ virt = kmap_sg(scsi_sglist(cmd), scsi_sg_count(cmd), &offset, &len);
ptr = virt + offset;
if (len & 1)
*ptr++ = inb(fd->base + REG_FIFO);
if (len > 1)
insw(fd->base + REG_FIFO, ptr, len >> 1);
scsi_set_resid(cmd, scsi_get_resid(cmd) - len);
- scsi_kunmap_atomic_sg(virt);
+ kunmap_sg(virt);
}
}
@@ -250,15 +249,14 @@ static void fdomain_write_data(struct scsi_cmnd *cmd)
if (len == 0)
break;
}
- virt = scsi_kmap_atomic_sg(scsi_sglist(cmd), scsi_sg_count(cmd),
- &offset, &len);
+ virt = kmap_sg(scsi_sglist(cmd), scsi_sg_count(cmd), &offset, &len);
ptr = virt + offset;
if (len & 1)
outb(*ptr++, fd->base + REG_FIFO);
if (len > 1)
outsw(fd->base + REG_FIFO, ptr, len >> 1);
scsi_set_resid(cmd, scsi_get_resid(cmd) - len);
- scsi_kunmap_atomic_sg(virt);
+ kunmap_sg(virt);
}
}
--
2.35.3
Powered by blists - more mailing lists