summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-10-15 00:13:48 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-10-15 00:13:48 +0000
commitcbb15d6c662d0ef6f2674d5ef5edde3ee0a6e057 (patch)
treea91a0d5a1e6b7c3994f0bd613af910b8232b5cff /sys/dev
parentd6ff12b8bdf9e86cbfc6a867f4341d309db00984 (diff)
Replace sr_copy_internal_data() with scsi_copy_internal_data().
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/softraid.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index b204464b25c..aac33da065f 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.415 2020/09/22 19:32:52 krw Exp $ */
+/* $OpenBSD: softraid.c,v 1.416 2020/10/15 00:13:47 krw Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -94,8 +94,6 @@ struct cfdriver softraid_cd = {
/* scsi & discipline */
void sr_scsi_cmd(struct scsi_xfer *);
int sr_scsi_probe(struct scsi_link *);
-void sr_copy_internal_data(struct scsi_xfer *,
- void *, size_t);
int sr_scsi_ioctl(struct scsi_link *, u_long,
caddr_t, int);
int sr_bio_ioctl(struct device *, u_long, caddr_t);
@@ -1886,20 +1884,6 @@ sr_error(struct sr_softc *sc, const char *fmt, ...)
va_end(ap);
}
-void
-sr_copy_internal_data(struct scsi_xfer *xs, void *v, size_t size)
-{
- size_t copy_cnt;
-
- DNPRINTF(SR_D_MISC, "sr_copy_internal_data xs: %p size: %zu\n",
- xs, size);
-
- if (xs->datalen) {
- copy_cnt = MIN(size, xs->datalen);
- memcpy(xs->data, v, copy_cnt);
- }
-}
-
int
sr_ccb_alloc(struct sr_discipline *sd)
{
@@ -4035,7 +4019,7 @@ sr_raid_inquiry(struct sr_workunit *wu)
sizeof(inq.product));
strlcpy(inq.revision, sd->sd_meta->ssdi.ssd_revision,
sizeof(inq.revision));
- sr_copy_internal_data(xs, &inq, sizeof(inq));
+ scsi_copy_internal_data(xs, &inq, sizeof(inq));
return (0);
}
@@ -4063,13 +4047,13 @@ sr_raid_read_cap(struct sr_workunit *wu)
else
_lto4b(addr, rcd.addr);
_lto4b(secsize, rcd.length);
- sr_copy_internal_data(xs, &rcd, sizeof(rcd));
+ scsi_copy_internal_data(xs, &rcd, sizeof(rcd));
rv = 0;
} else if (xs->cmd.opcode == READ_CAPACITY_16) {
bzero(&rcd16, sizeof(rcd16));
_lto8b(addr, rcd16.addr);
_lto4b(secsize, rcd16.length);
- sr_copy_internal_data(xs, &rcd16, sizeof(rcd16));
+ scsi_copy_internal_data(xs, &rcd16, sizeof(rcd16));
rv = 0;
}