Lines Matching defs:sdev

307  * @sdev:	SCSI device associated with LUN.
330 static int read_cap16(struct scsi_device *sdev, struct llun_info *lli)
332 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
363 result = scsi_execute_cmd(sdev, scsi_cmd, REQ_OP_DRV_IN, cmd_buf,
617 * @sdev: SCSI device associated with LUN.
630 int _cxlflash_disk_release(struct scsi_device *sdev,
634 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
636 struct llun_info *lli = sdev->hostdata;
686 rc = _cxlflash_vlun_resize(sdev, ctxi, &size);
732 int cxlflash_disk_release(struct scsi_device *sdev,
735 return _cxlflash_disk_release(sdev, NULL, release);
880 * @sdev: SCSI device associated with LUN.
890 static int _cxlflash_disk_detach(struct scsi_device *sdev,
894 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
896 struct llun_info *lli = sdev->hostdata;
926 _cxlflash_disk_release(sdev, ctxi, &rel);
945 * Release the context reference and the sdev reference that
950 scsi_device_put(sdev);
958 static int cxlflash_disk_detach(struct scsi_device *sdev,
961 return _cxlflash_disk_detach(sdev, NULL, detach);
1029 _cxlflash_disk_detach(lun_access->sdev, ctxi, &detach);
1307 * @sdev: SCSI device associated with LUN.
1317 static int cxlflash_disk_attach(struct scsi_device *sdev,
1320 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1323 struct llun_info *lli = sdev->hostdata;
1348 __func__, lli->lun_id[sdev->channel]);
1349 rc = read_cap16(sdev, lli);
1379 rc = scsi_device_get(sdev);
1381 dev_err(dev, "%s: Unable to get sdev reference\n", __func__);
1393 lun_access->sdev = sdev;
1477 attach->max_xfer = sdev->host->max_sectors * MAX_SECTOR_UNIT;
1520 scsi_device_put(sdev);
1623 * @sdev: SCSI device associated with LUN.
1651 static int cxlflash_afu_recover(struct scsi_device *sdev,
1654 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1656 struct llun_info *lli = sdev->hostdata;
1767 * @sdev: SCSI device associated with LUN.
1772 static int process_sense(struct scsi_device *sdev,
1775 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1777 struct llun_info *lli = sdev->hostdata;
1801 rc = read_cap16(sdev, lli);
1831 * @sdev: SCSI device associated with LUN.
1836 static int cxlflash_disk_verify(struct scsi_device *sdev,
1841 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1843 struct llun_info *lli = sdev->hostdata;
1880 rc = process_sense(sdev, verify);
1952 * @sdev: SCSI device associated with LUN.
1961 static int cxlflash_disk_direct_open(struct scsi_device *sdev, void *arg)
1963 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1966 struct llun_info *lli = sdev->hostdata;
1977 u32 port = CHAN2PORTMASK(sdev->channel);
2009 rht_format1(rhte, lli->lun_id[sdev->channel], ctxi->rht_perms, port);
2031 _cxlflash_disk_release(sdev, ctxi, &rel);
2040 * @sdev: SCSI device associated with LUN.
2049 static int ioctl_common(struct scsi_device *sdev, unsigned int cmd)
2051 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
2053 struct llun_info *lli = sdev->hostdata;
2080 * @sdev: SCSI device associated with LUN.
2094 int cxlflash_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user *arg)
2098 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
2107 struct Scsi_Host *shost = sdev->host;
2154 sdev->channel, sdev->id, sdev->lun);
2155 rc = ioctl_common(sdev, cmd);
2197 rc = do_ioctl(sdev, (void *)&buf);
2213 sdev->channel, sdev->id, sdev->lun, rc);
2217 cmd, shost->host_no, sdev->channel, sdev->id,
2218 sdev->lun, rc);