From a2b046620c54db977196128b3c53da2704b9fd20 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 28 Nov 2023 18:49:01 -0700 Subject: [PATCH] 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 --- sys/dev/mpi3mr/mpi3mr.c | 3 --- sys/dev/mpi3mr/mpi3mr.h | 6 ------ 2 files changed, 9 deletions(-) diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c index 478b0944def..9a052c98d13 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 479ba9c7b11..b00d2ef562d 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;