Lines Matching refs:tgt_dev
840 tgtdev = tgt_priv->tgt_dev; in __mpi3mr_get_tgtdev_from_tgtpriv()
1025 static void mpi3mr_configure_nvme_dev(struct mpi3mr_tgt_dev *tgt_dev, in mpi3mr_configure_nvme_dev() argument
1028 u8 pgsz = tgt_dev->dev_spec.pcie_inf.pgsz ? : MPI3MR_DEFAULT_PGSZEXP; in mpi3mr_configure_nvme_dev()
1030 lim->max_hw_sectors = tgt_dev->dev_spec.pcie_inf.mdts / 512; in mpi3mr_configure_nvme_dev()
1034 static void mpi3mr_configure_tgt_dev(struct mpi3mr_tgt_dev *tgt_dev, in mpi3mr_configure_tgt_dev() argument
1037 if (tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_PCIE && in mpi3mr_configure_tgt_dev()
1038 (tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_configure_tgt_dev()
1041 mpi3mr_configure_nvme_dev(tgt_dev, lim); in mpi3mr_configure_tgt_dev()
4480 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_slave_destroy() local
4497 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_slave_destroy()
4500 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_slave_destroy()
4504 if (tgt_dev && (!scsi_tgt_priv_data->num_luns)) in mpi3mr_slave_destroy()
4505 tgt_dev->starget = NULL; in mpi3mr_slave_destroy()
4506 if (tgt_dev) in mpi3mr_slave_destroy()
4507 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_slave_destroy()
4527 struct mpi3mr_tgt_dev *tgt_dev; in mpi3mr_target_destroy() local
4538 tgt_dev = __mpi3mr_get_tgtdev_from_tgtpriv(mrioc, scsi_tgt_priv_data); in mpi3mr_target_destroy()
4539 if (tgt_dev && (tgt_dev->starget == starget) && in mpi3mr_target_destroy()
4540 (tgt_dev->perst_id == starget->id)) in mpi3mr_target_destroy()
4541 tgt_dev->starget = NULL; in mpi3mr_target_destroy()
4542 if (tgt_dev) { in mpi3mr_target_destroy()
4543 scsi_tgt_priv_data->tgt_dev = NULL; in mpi3mr_target_destroy()
4545 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_target_destroy()
4546 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_target_destroy()
4570 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_device_configure() local
4581 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_device_configure()
4584 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_device_configure()
4588 if (!tgt_dev) in mpi3mr_device_configure()
4591 mpi3mr_change_queue_depth(sdev, tgt_dev->q_depth); in mpi3mr_device_configure()
4596 mpi3mr_configure_tgt_dev(tgt_dev, lim); in mpi3mr_device_configure()
4597 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_device_configure()
4614 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_slave_alloc() local
4629 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_slave_alloc()
4632 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_slave_alloc()
4636 if (tgt_dev) { in mpi3mr_slave_alloc()
4637 if (tgt_dev->starget == NULL) in mpi3mr_slave_alloc()
4638 tgt_dev->starget = starget; in mpi3mr_slave_alloc()
4639 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_slave_alloc()
4674 struct mpi3mr_tgt_dev *tgt_dev; in mpi3mr_target_alloc() local
4687 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_target_alloc()
4688 if (tgt_dev && !tgt_dev->is_hidden) { in mpi3mr_target_alloc()
4690 scsi_tgt_priv_data->dev_handle = tgt_dev->dev_handle; in mpi3mr_target_alloc()
4691 scsi_tgt_priv_data->perst_id = tgt_dev->perst_id; in mpi3mr_target_alloc()
4692 scsi_tgt_priv_data->dev_type = tgt_dev->dev_type; in mpi3mr_target_alloc()
4693 scsi_tgt_priv_data->tgt_dev = tgt_dev; in mpi3mr_target_alloc()
4694 tgt_dev->starget = starget; in mpi3mr_target_alloc()
4697 if ((tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_PCIE) && in mpi3mr_target_alloc()
4698 ((tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_target_alloc()
4701 ((tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_target_alloc()
4705 scsi_tgt_priv_data->io_throttle_enabled = tgt_dev->io_throttle_enabled; in mpi3mr_target_alloc()
4706 scsi_tgt_priv_data->wslen = tgt_dev->wslen; in mpi3mr_target_alloc()
4707 if (tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_VD) in mpi3mr_target_alloc()
4708 scsi_tgt_priv_data->throttle_group = tgt_dev->dev_spec.vd_inf.tg; in mpi3mr_target_alloc()
4713 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_target_alloc()
4715 if (tgt_dev && !tgt_dev->is_hidden && !tgt_dev->non_stl && in mpi3mr_target_alloc()
4716 (tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_SAS_SATA)) { in mpi3mr_target_alloc()
4718 scsi_tgt_priv_data->dev_handle = tgt_dev->dev_handle; in mpi3mr_target_alloc()
4719 scsi_tgt_priv_data->perst_id = tgt_dev->perst_id; in mpi3mr_target_alloc()
4720 scsi_tgt_priv_data->dev_type = tgt_dev->dev_type; in mpi3mr_target_alloc()
4721 scsi_tgt_priv_data->tgt_dev = tgt_dev; in mpi3mr_target_alloc()
4722 scsi_tgt_priv_data->io_throttle_enabled = tgt_dev->io_throttle_enabled; in mpi3mr_target_alloc()
4723 scsi_tgt_priv_data->wslen = tgt_dev->wslen; in mpi3mr_target_alloc()
4724 tgt_dev->starget = starget; in mpi3mr_target_alloc()