Lines Matching refs:scsi_dev
266 scsi_req_new(lu->scsi_dev, task_tag, lu->lun, req->req_upiu.sc.cdb, in ufs_process_scsi_cmd()
347 DeviceState *scsi_dev; in ufs_init_scsi_device() local
359 scsi_dev = qdev_new("scsi-hd"); in ufs_init_scsi_device()
360 object_property_add_child(OBJECT(&lu->bus), "ufs-scsi", OBJECT(scsi_dev)); in ufs_init_scsi_device()
362 qdev_prop_set_uint32(scsi_dev, "physical_block_size", UFS_BLOCK_SIZE); in ufs_init_scsi_device()
363 qdev_prop_set_uint32(scsi_dev, "logical_block_size", UFS_BLOCK_SIZE); in ufs_init_scsi_device()
364 qdev_prop_set_uint32(scsi_dev, "scsi-id", 0); in ufs_init_scsi_device()
365 qdev_prop_set_uint32(scsi_dev, "lun", lu->lun); in ufs_init_scsi_device()
366 if (!qdev_prop_set_drive_err(scsi_dev, "drive", blk, errp)) { in ufs_init_scsi_device()
367 object_unparent(OBJECT(scsi_dev)); in ufs_init_scsi_device()
371 if (!qdev_realize_and_unref(scsi_dev, &lu->bus.qbus, errp)) { in ufs_init_scsi_device()
372 object_unparent(OBJECT(scsi_dev)); in ufs_init_scsi_device()
377 lu->scsi_dev = SCSI_DEVICE(scsi_dev); in ufs_init_scsi_device()
417 if (lu->scsi_dev) { in ufs_lu_unrealize()
418 object_unref(OBJECT(lu->scsi_dev)); in ufs_lu_unrealize()
419 lu->scsi_dev = NULL; in ufs_lu_unrealize()