aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2023-11-29 01:49:01 +0000
committerWarner Losh <imp@FreeBSD.org>2023-11-29 01:49:01 +0000
commita2b046620c54db977196128b3c53da2704b9fd20 (patch)
tree4586b10e2572ef4d3e132621d1c3d923cc2b8081
parentb411372b7d17ae7e5d6c944732d41b979bde2ac4 (diff)
mpi3mr: Remove unused fields in struct mpi3mr_cmd
All of these fields are either unused, or just initialized. Remove them. This saves about 1MB of memory for the cards that I have which can do 8k transactions at once. Sponsored by: Netflix Reviewed by: mav, jhb Differential Revision: https://reviews.freebsd.org/D42538
-rw-r--r--sys/dev/mpi3mr/mpi3mr.c3
-rw-r--r--sys/dev/mpi3mr/mpi3mr.h6
2 files changed, 0 insertions, 9 deletions
diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c
index 478b0944defa..9a052c98d13e 100644
--- a/sys/dev/mpi3mr/mpi3mr.c
+++ b/sys/dev/mpi3mr/mpi3mr.c
@@ -4985,12 +4985,9 @@ mpi3mr_get_command(struct mpi3mr_softc *sc)
cmd->data_dir = 0;
cmd->ccb = NULL;
cmd->targ = NULL;
- cmd->max_segs = 0;
- cmd->lun = 0;
cmd->state = MPI3MR_CMD_STATE_BUSY;
cmd->data = NULL;
cmd->length = 0;
- cmd->out_len = 0;
out:
mtx_unlock(&sc->cmd_pool_lock);
return cmd;
diff --git a/sys/dev/mpi3mr/mpi3mr.h b/sys/dev/mpi3mr/mpi3mr.h
index 479ba9c7b11b..b00d2ef562d8 100644
--- a/sys/dev/mpi3mr/mpi3mr.h
+++ b/sys/dev/mpi3mr/mpi3mr.h
@@ -456,19 +456,13 @@ struct mpi3mr_cmd {
union ccb *ccb;
void *data;
u_int length;
- u_int out_len;
- struct uio uio;
- struct iovec iovec[MPI3MR_IOVEC_COUNT];
- u_int max_segs;
struct mpi3mr_target *targ;
- u_int lun;
u_int data_dir;
u_int state;
bus_dmamap_t dmamap;
struct scsi_sense_data *sense;
struct callout callout;
bool callout_owner;
- mpi3mr_cmd_callback_t *timeout_handler;
U16 hosttag;
U8 req_qidx;
Mpi3SCSIIORequest_t io_request;