Lines Matching refs:tgt_dev

805 	tgtdev = tgt_priv->tgt_dev;  in __mpi3mr_get_tgtdev_from_tgtpriv()
4314 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_slave_destroy() local
4331 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_slave_destroy()
4334 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_slave_destroy()
4338 if (tgt_dev && (!scsi_tgt_priv_data->num_luns)) in mpi3mr_slave_destroy()
4339 tgt_dev->starget = NULL; in mpi3mr_slave_destroy()
4340 if (tgt_dev) in mpi3mr_slave_destroy()
4341 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_slave_destroy()
4361 struct mpi3mr_tgt_dev *tgt_dev; in mpi3mr_target_destroy() local
4372 tgt_dev = __mpi3mr_get_tgtdev_from_tgtpriv(mrioc, scsi_tgt_priv_data); in mpi3mr_target_destroy()
4373 if (tgt_dev && (tgt_dev->starget == starget) && in mpi3mr_target_destroy()
4374 (tgt_dev->perst_id == starget->id)) in mpi3mr_target_destroy()
4375 tgt_dev->starget = NULL; in mpi3mr_target_destroy()
4376 if (tgt_dev) { in mpi3mr_target_destroy()
4377 scsi_tgt_priv_data->tgt_dev = NULL; in mpi3mr_target_destroy()
4379 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_target_destroy()
4380 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_target_destroy()
4402 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_slave_configure() local
4413 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_slave_configure()
4416 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_slave_configure()
4420 if (!tgt_dev) in mpi3mr_slave_configure()
4423 mpi3mr_change_queue_depth(sdev, tgt_dev->q_depth); in mpi3mr_slave_configure()
4428 switch (tgt_dev->dev_type) { in mpi3mr_slave_configure()
4431 if ((tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_slave_configure()
4435 tgt_dev->dev_spec.pcie_inf.mdts / 512); in mpi3mr_slave_configure()
4436 if (tgt_dev->dev_spec.pcie_inf.pgsz == 0) in mpi3mr_slave_configure()
4441 ((1 << tgt_dev->dev_spec.pcie_inf.pgsz) - 1)); in mpi3mr_slave_configure()
4448 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_slave_configure()
4466 struct mpi3mr_tgt_dev *tgt_dev = NULL; in mpi3mr_slave_alloc() local
4481 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_slave_alloc()
4484 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_slave_alloc()
4488 if (tgt_dev) { in mpi3mr_slave_alloc()
4489 if (tgt_dev->starget == NULL) in mpi3mr_slave_alloc()
4490 tgt_dev->starget = starget; in mpi3mr_slave_alloc()
4491 mpi3mr_tgtdev_put(tgt_dev); in mpi3mr_slave_alloc()
4526 struct mpi3mr_tgt_dev *tgt_dev; in mpi3mr_target_alloc() local
4539 tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id); in mpi3mr_target_alloc()
4540 if (tgt_dev && !tgt_dev->is_hidden) { in mpi3mr_target_alloc()
4542 scsi_tgt_priv_data->dev_handle = tgt_dev->dev_handle; in mpi3mr_target_alloc()
4543 scsi_tgt_priv_data->perst_id = tgt_dev->perst_id; in mpi3mr_target_alloc()
4544 scsi_tgt_priv_data->dev_type = tgt_dev->dev_type; in mpi3mr_target_alloc()
4545 scsi_tgt_priv_data->tgt_dev = tgt_dev; in mpi3mr_target_alloc()
4546 tgt_dev->starget = starget; in mpi3mr_target_alloc()
4549 if ((tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_PCIE) && in mpi3mr_target_alloc()
4550 ((tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_target_alloc()
4553 ((tgt_dev->dev_spec.pcie_inf.dev_info & in mpi3mr_target_alloc()
4557 scsi_tgt_priv_data->io_throttle_enabled = tgt_dev->io_throttle_enabled; in mpi3mr_target_alloc()
4558 scsi_tgt_priv_data->wslen = tgt_dev->wslen; in mpi3mr_target_alloc()
4559 if (tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_VD) in mpi3mr_target_alloc()
4560 scsi_tgt_priv_data->throttle_group = tgt_dev->dev_spec.vd_inf.tg; in mpi3mr_target_alloc()
4565 tgt_dev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_target_alloc()
4567 if (tgt_dev && !tgt_dev->is_hidden && !tgt_dev->non_stl && in mpi3mr_target_alloc()
4568 (tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_SAS_SATA)) { in mpi3mr_target_alloc()
4570 scsi_tgt_priv_data->dev_handle = tgt_dev->dev_handle; in mpi3mr_target_alloc()
4571 scsi_tgt_priv_data->perst_id = tgt_dev->perst_id; in mpi3mr_target_alloc()
4572 scsi_tgt_priv_data->dev_type = tgt_dev->dev_type; in mpi3mr_target_alloc()
4573 scsi_tgt_priv_data->tgt_dev = tgt_dev; in mpi3mr_target_alloc()
4574 scsi_tgt_priv_data->io_throttle_enabled = tgt_dev->io_throttle_enabled; in mpi3mr_target_alloc()
4575 scsi_tgt_priv_data->wslen = tgt_dev->wslen; in mpi3mr_target_alloc()
4576 tgt_dev->starget = starget; in mpi3mr_target_alloc()