Lines Matching refs:tgt_dev

805 	tgtdev = tgt_priv->tgt_dev;  in __mpi3mr_get_tgtdev_from_tgtpriv()
4292 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_slave_destroy() local
4309 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_slave_destroy()
4312 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_slave_destroy()
4316 if (tgt_dev && (!scsi_tgt_priv_data->num_luns)) in mpi3mr_slave_destroy()
4317 tgt_dev->starget = NULL; in mpi3mr_slave_destroy()
4318 if (tgt_dev) in mpi3mr_slave_destroy()
4319 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_slave_destroy()
4339 struct mpi3mr_tgt_dev *tgt_dev; in mpi3mr_target_destroy() local
4350 tgt_dev = __mpi3mr_get_tgtdev_from_tgtpriv(mrioc, scsi_tgt_priv_data); in mpi3mr_target_destroy()
4351 if (tgt_dev && (tgt_dev->starget == starget) && in mpi3mr_target_destroy()
4352 (tgt_dev->perst_id == starget->id)) in mpi3mr_target_destroy()
4353 tgt_dev->starget = NULL; in mpi3mr_target_destroy()
4354 if (tgt_dev) { in mpi3mr_target_destroy()
4355 scsi_tgt_priv_data->tgt_dev = NULL; in mpi3mr_target_destroy()
4357 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_target_destroy()
4358 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_target_destroy()
4380 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_slave_configure() local
4391 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_slave_configure()
4394 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_slave_configure()
4398 if (!tgt_dev) in mpi3mr_slave_configure()
4401 mpi3mr_change_queue_depth(sdev, tgt_dev->q_depth); in mpi3mr_slave_configure()
4406 switch (tgt_dev->dev_type) { in mpi3mr_slave_configure()
4409 if ((tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_slave_configure()
4413 tgt_dev->dev_spec.pcie_inf.mdts / 512); in mpi3mr_slave_configure()
4414 if (tgt_dev->dev_spec.pcie_inf.pgsz == 0) in mpi3mr_slave_configure()
4419 ((1 << tgt_dev->dev_spec.pcie_inf.pgsz) - 1)); in mpi3mr_slave_configure()
4426 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_slave_configure()
4444 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_slave_alloc() local
4459 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_slave_alloc()
4462 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_slave_alloc()
4466 if (tgt_dev) { in mpi3mr_slave_alloc()
4467 if (tgt_dev->starget == NULL) in mpi3mr_slave_alloc()
4468 tgt_dev->starget = starget; in mpi3mr_slave_alloc()
4469 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_slave_alloc()
4504 struct mpi3mr_tgt_dev *tgt_dev; in mpi3mr_target_alloc() local
4517 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_target_alloc()
4518 if (tgt_dev && !tgt_dev->is_hidden) { in mpi3mr_target_alloc()
4520 scsi_tgt_priv_data->dev_handle = tgt_dev->dev_handle; in mpi3mr_target_alloc()
4521 scsi_tgt_priv_data->perst_id = tgt_dev->perst_id; in mpi3mr_target_alloc()
4522 scsi_tgt_priv_data->dev_type = tgt_dev->dev_type; in mpi3mr_target_alloc()
4523 scsi_tgt_priv_data->tgt_dev = tgt_dev; in mpi3mr_target_alloc()
4524 tgt_dev->starget = starget; in mpi3mr_target_alloc()
4527 if ((tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_PCIE) && in mpi3mr_target_alloc()
4528 ((tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_target_alloc()
4531 ((tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_target_alloc()
4535 scsi_tgt_priv_data->io_throttle_enabled = tgt_dev->io_throttle_enabled; in mpi3mr_target_alloc()
4536 scsi_tgt_priv_data->wslen = tgt_dev->wslen; in mpi3mr_target_alloc()
4537 if (tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_VD) in mpi3mr_target_alloc()
4538 scsi_tgt_priv_data->throttle_group = tgt_dev->dev_spec.vd_inf.tg; in mpi3mr_target_alloc()
4543 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_target_alloc()
4545 if (tgt_dev && !tgt_dev->is_hidden && !tgt_dev->non_stl && in mpi3mr_target_alloc()
4546 (tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_SAS_SATA)) { in mpi3mr_target_alloc()
4548 scsi_tgt_priv_data->dev_handle = tgt_dev->dev_handle; in mpi3mr_target_alloc()
4549 scsi_tgt_priv_data->perst_id = tgt_dev->perst_id; in mpi3mr_target_alloc()
4550 scsi_tgt_priv_data->dev_type = tgt_dev->dev_type; in mpi3mr_target_alloc()
4551 scsi_tgt_priv_data->tgt_dev = tgt_dev; in mpi3mr_target_alloc()
4552 scsi_tgt_priv_data->io_throttle_enabled = tgt_dev->io_throttle_enabled; in mpi3mr_target_alloc()
4553 scsi_tgt_priv_data->wslen = tgt_dev->wslen; in mpi3mr_target_alloc()
4554 tgt_dev->starget = starget; in mpi3mr_target_alloc()