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);
360 result = scsi_execute(sdev, scsi_cmd, DMA_FROM_DEVICE, cmd_buf,
616 * @sdev: SCSI device associated with LUN.
629 int _cxlflash_disk_release(struct scsi_device *sdev,
633 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
635 struct llun_info *lli = sdev->hostdata;
685 rc = _cxlflash_vlun_resize(sdev, ctxi, &size);
731 int cxlflash_disk_release(struct scsi_device *sdev,
734 return _cxlflash_disk_release(sdev, NULL, release);
879 * @sdev: SCSI device associated with LUN.
889 static int _cxlflash_disk_detach(struct scsi_device *sdev,
893 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
895 struct llun_info *lli = sdev->hostdata;
925 _cxlflash_disk_release(sdev, ctxi, &rel);
944 * Release the context reference and the sdev reference that
949 scsi_device_put(sdev);
957 static int cxlflash_disk_detach(struct scsi_device *sdev,
960 return _cxlflash_disk_detach(sdev, NULL, detach);
1028 _cxlflash_disk_detach(lun_access->sdev, ctxi, &detach);
1306 * @sdev: SCSI device associated with LUN.
1316 static int cxlflash_disk_attach(struct scsi_device *sdev,
1319 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1322 struct llun_info *lli = sdev->hostdata;
1347 __func__, lli->lun_id[sdev->channel]);
1348 rc = read_cap16(sdev, lli);
1378 rc = scsi_device_get(sdev);
1380 dev_err(dev, "%s: Unable to get sdev reference\n", __func__);
1392 lun_access->sdev = sdev;
1476 attach->max_xfer = sdev->host->max_sectors * MAX_SECTOR_UNIT;
1519 scsi_device_put(sdev);
1622 * @sdev: SCSI device associated with LUN.
1650 static int cxlflash_afu_recover(struct scsi_device *sdev,
1653 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1655 struct llun_info *lli = sdev->hostdata;
1766 * @sdev: SCSI device associated with LUN.
1771 static int process_sense(struct scsi_device *sdev,
1774 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1776 struct llun_info *lli = sdev->hostdata;
1800 rc = read_cap16(sdev, lli);
1830 * @sdev: SCSI device associated with LUN.
1835 static int cxlflash_disk_verify(struct scsi_device *sdev,
1840 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1842 struct llun_info *lli = sdev->hostdata;
1879 rc = process_sense(sdev, verify);
1951 * @sdev: SCSI device associated with LUN.
1960 static int cxlflash_disk_direct_open(struct scsi_device *sdev, void *arg)
1962 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
1965 struct llun_info *lli = sdev->hostdata;
1976 u32 port = CHAN2PORTMASK(sdev->channel);
2008 rht_format1(rhte, lli->lun_id[sdev->channel], ctxi->rht_perms, port);
2030 _cxlflash_disk_release(sdev, ctxi, &rel);
2039 * @sdev: SCSI device associated with LUN.
2048 static int ioctl_common(struct scsi_device *sdev, unsigned int cmd)
2050 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
2052 struct llun_info *lli = sdev->hostdata;
2079 * @sdev: SCSI device associated with LUN.
2093 int cxlflash_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user *arg)
2097 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
2106 struct Scsi_Host *shost = sdev->host;
2153 sdev->channel, sdev->id, sdev->lun);
2154 rc = ioctl_common(sdev, cmd);
2196 rc = do_ioctl(sdev, (void *)&buf);
2212 sdev->channel, sdev->id, sdev->lun, rc);
2216 cmd, shost->host_no, sdev->channel, sdev->id,
2217 sdev->lun, rc);