Lines Matching refs:sdev
303 static int read_cap16(struct scsi_device *sdev, struct llun_info *lli) in read_cap16() argument
305 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in read_cap16()
334 result = scsi_execute(sdev, scsi_cmd, DMA_FROM_DEVICE, cmd_buf, in read_cap16()
604 int _cxlflash_disk_release(struct scsi_device *sdev, in _cxlflash_disk_release() argument
608 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in _cxlflash_disk_release()
610 struct llun_info *lli = sdev->hostdata; in _cxlflash_disk_release()
659 rc = _cxlflash_vlun_resize(sdev, ctxi, &size); in _cxlflash_disk_release()
701 int cxlflash_disk_release(struct scsi_device *sdev, in cxlflash_disk_release() argument
704 return _cxlflash_disk_release(sdev, NULL, release); in cxlflash_disk_release()
820 static int _cxlflash_disk_detach(struct scsi_device *sdev, in _cxlflash_disk_detach() argument
824 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in _cxlflash_disk_detach()
826 struct llun_info *lli = sdev->hostdata; in _cxlflash_disk_detach()
857 _cxlflash_disk_release(sdev, ctxi, &rel); in _cxlflash_disk_detach()
907 scsi_device_put(sdev); in _cxlflash_disk_detach()
916 static int cxlflash_disk_detach(struct scsi_device *sdev, in cxlflash_disk_detach() argument
919 return _cxlflash_disk_detach(sdev, NULL, detach); in cxlflash_disk_detach()
1001 _cxlflash_disk_detach(lun_access->sdev, ctxi, &detach); in cxlflash_cxl_release()
1288 static int cxlflash_disk_attach(struct scsi_device *sdev, in cxlflash_disk_attach() argument
1291 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in cxlflash_disk_attach()
1294 struct llun_info *lli = sdev->hostdata; in cxlflash_disk_attach()
1318 __func__, lli->lun_id[sdev->channel]); in cxlflash_disk_attach()
1319 rc = read_cap16(sdev, lli); in cxlflash_disk_attach()
1349 rc = scsi_device_get(sdev); in cxlflash_disk_attach()
1363 lun_access->sdev = sdev; in cxlflash_disk_attach()
1443 attach->max_xfer = sdev->host->max_sectors * MAX_SECTOR_UNIT; in cxlflash_disk_attach()
1479 scsi_device_put(sdev); in cxlflash_disk_attach()
1604 static int cxlflash_afu_recover(struct scsi_device *sdev, in cxlflash_afu_recover() argument
1607 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in cxlflash_afu_recover()
1609 struct llun_info *lli = sdev->hostdata; in cxlflash_afu_recover()
1702 static int process_sense(struct scsi_device *sdev, in process_sense() argument
1705 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in process_sense()
1707 struct llun_info *lli = sdev->hostdata; in process_sense()
1732 rc = read_cap16(sdev, lli); in process_sense()
1767 static int cxlflash_disk_verify(struct scsi_device *sdev, in cxlflash_disk_verify() argument
1772 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in cxlflash_disk_verify()
1774 struct llun_info *lli = sdev->hostdata; in cxlflash_disk_verify()
1811 rc = process_sense(sdev, verify); in cxlflash_disk_verify()
1892 static int cxlflash_disk_direct_open(struct scsi_device *sdev, void *arg) in cxlflash_disk_direct_open() argument
1894 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in cxlflash_disk_direct_open()
1897 struct llun_info *lli = sdev->hostdata; in cxlflash_disk_direct_open()
1907 u32 port = CHAN2PORT(sdev->channel); in cxlflash_disk_direct_open()
1939 rht_format1(rhte, lli->lun_id[sdev->channel], ctxi->rht_perms, port); in cxlflash_disk_direct_open()
1970 static int ioctl_common(struct scsi_device *sdev, int cmd) in ioctl_common() argument
1972 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in ioctl_common()
1974 struct llun_info *lli = sdev->hostdata; in ioctl_common()
2015 int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) in cxlflash_ioctl() argument
2019 struct cxlflash_cfg *cfg = (struct cxlflash_cfg *)sdev->host->hostdata; in cxlflash_ioctl()
2028 struct Scsi_Host *shost = sdev->host; in cxlflash_ioctl()
2075 sdev->channel, sdev->id, sdev->lun); in cxlflash_ioctl()
2076 rc = ioctl_common(sdev, cmd); in cxlflash_ioctl()
2119 rc = do_ioctl(sdev, (void *)&buf); in cxlflash_ioctl()
2136 sdev->channel, sdev->id, sdev->lun, rc); in cxlflash_ioctl()
2140 cmd, shost->host_no, sdev->channel, sdev->id, in cxlflash_ioctl()
2141 sdev->lun, rc); in cxlflash_ioctl()