cam: delete cam_sim_alloc_dev

cam_sim_alloc_dev was only used internally by the MMC system. That has
been convered to using xpt_path_device() and has stopped using this
interface, so this can be retired.

Reviewed by:		scottl@, mav@
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30858
This commit is contained in:
Warner Losh 2021-06-28 16:00:44 -06:00
parent aeb04e88f5
commit dcd5dea965
2 changed files with 0 additions and 29 deletions

View file

@ -116,7 +116,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll,
sim->sim_name = sim_name;
sim->softc = softc;
sim->path_id = CAM_PATH_ANY;
sim->sim_dev = NULL; /* set only by cam_sim_alloc_dev */
sim->unit_number = unit;
sim->bus_id = 0; /* set in xpt_bus_register */
sim->max_tagged_dev_openings = max_tagged_dev_transactions;
@ -128,33 +127,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll,
return (sim);
}
/**
* @brief allocate a new sim and fill in the details with a device_t
*
* Just like @c cam_sim_alloc, but with an additional paramter.
*
* @param dev A newbus device that's associated with the
* sim. Must be non-NULL.
*/
struct cam_sim *
cam_sim_alloc_dev(sim_action_func sim_action, sim_poll_func sim_poll,
const char *sim_name, void *softc, device_t dev, struct mtx *mtx,
int max_dev_transactions, int max_tagged_dev_transactions,
struct cam_devq *queue)
{
struct cam_sim *sim;
KASSERT(dev != NULL, ("%s: dev is null for sim_name %s softc %p\n",
__func__, sim_name, softc));
sim = cam_sim_alloc(sim_action, sim_poll, sim_name, softc,
device_get_unit(dev), mtx, max_dev_transactions,
max_tagged_dev_transactions, queue);
if (sim != NULL)
sim->sim_dev = dev;
return (sim);
}
void
cam_sim_free(struct cam_sim *sim, int free_devq)
{

View file

@ -104,7 +104,6 @@ struct cam_sim {
u_int32_t flags;
struct cam_devq *devq; /* Device Queue to use for this SIM */
int refcount; /* References to the SIM. */
device_t sim_dev; /* For attached peripherals. */
};
static __inline u_int32_t