Lines Matching defs:sdev

1192 	res->sdev = NULL;
1368 if (res->sdev && new_path)
1369 sdev_printk(KERN_INFO, res->sdev, "Resource path: %s\n",
1471 if (res->sdev) {
1479 } else if (!res->sdev || res->del_from_ml) {
3328 struct scsi_device *sdev;
3346 if (res->del_from_ml && res->sdev) {
3348 sdev = res->sdev;
3349 if (!scsi_device_get(sdev)) {
3355 scsi_remove_device(sdev);
3356 scsi_device_put(sdev);
4494 * @sdev: scsi device struct
4500 static int ipr_change_queue_depth(struct scsi_device *sdev, int qdepth)
4502 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
4507 res = (struct ipr_resource_entry *)sdev->hostdata;
4513 scsi_change_queue_depth(sdev, qdepth);
4514 return sdev->queue_depth;
4528 struct scsi_device *sdev = to_scsi_device(dev);
4529 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
4535 res = (struct ipr_resource_entry *)sdev->hostdata;
4562 struct scsi_device *sdev = to_scsi_device(dev);
4563 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
4570 res = (struct ipr_resource_entry *)sdev->hostdata;
4602 struct scsi_device *sdev = to_scsi_device(dev);
4603 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
4609 res = (struct ipr_resource_entry *)sdev->hostdata;
4638 struct scsi_device *sdev = to_scsi_device(dev);
4639 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
4645 res = (struct ipr_resource_entry *)sdev->hostdata;
4674 struct scsi_device *sdev = to_scsi_device(dev);
4675 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
4681 res = (struct ipr_resource_entry *)sdev->hostdata;
4704 struct scsi_device *sdev = to_scsi_device(dev);
4705 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
4711 res = (struct ipr_resource_entry *)sdev->hostdata;
4716 if (res->sdev)
4717 sdev_printk(KERN_INFO, res->sdev, "raw mode is %s\n",
4747 * @sdev: scsi device struct
4759 static int ipr_biosparam(struct scsi_device *sdev,
4888 * @sdev: scsi device struct
4893 static struct ipr_resource_entry *ipr_find_sdev(struct scsi_device *sdev)
4895 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
4899 if ((res->bus == sdev->channel) &&
4900 (res->target == sdev->id) &&
4901 (res->lun == sdev->lun))
4910 * @sdev: scsi device struct
4915 static void ipr_slave_destroy(struct scsi_device *sdev)
4921 ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
4924 res = (struct ipr_resource_entry *) sdev->hostdata;
4928 sdev->hostdata = NULL;
4929 res->sdev = NULL;
4937 * @sdev: scsi device struct
4944 static int ipr_slave_configure(struct scsi_device *sdev)
4946 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
4953 res = sdev->hostdata;
4956 sdev->type = TYPE_RAID;
4958 sdev->scsi_level = 4;
4959 sdev->no_uld_attach = 1;
4962 sdev->scsi_level = SCSI_SPC_3;
4963 sdev->no_report_opcodes = 1;
4964 blk_queue_rq_timeout(sdev->request_queue,
4966 blk_queue_max_hw_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS);
4973 scsi_change_queue_depth(sdev, IPR_MAX_CMD_PER_ATA_LUN);
4974 ata_sas_slave_configure(sdev, ap);
4978 sdev_printk(KERN_INFO, sdev, "Resource path: %s\n",
4989 * @sdev: scsi device struct
4997 static int ipr_ata_slave_alloc(struct scsi_device *sdev)
5003 if (sdev->sdev_target)
5004 sata_port = sdev->sdev_target->hostdata;
5012 ipr_slave_destroy(sdev);
5020 * @sdev: scsi device struct
5030 static int ipr_slave_alloc(struct scsi_device *sdev)
5032 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
5037 sdev->hostdata = NULL;
5041 res = ipr_find_sdev(sdev);
5043 res->sdev = sdev;
5046 sdev->hostdata = res;
5052 return ipr_ata_slave_alloc(sdev);
5064 * @device: device to match (sdev)
5067 * 1 if command matches sdev / 0 if command does not match sdev
5101 * 1 if command matches sdev / 0 if command does not match sdev
5115 * @device: device to match (sdev)
5483 sdev_printk(KERN_ERR, ipr_cmd->u.sdev, "Abort timed out. Resetting bus.\n");
5562 ipr_cmd->u.sdev = scsi_cmd->device;
6696 * @sdev: scsi device struct
6703 static int ipr_ioctl(struct scsi_device *sdev, unsigned int cmd,
6708 res = (struct ipr_resource_entry *)sdev->hostdata;
6712 return ata_sas_scsi_ioctl(res->sata_port->ap, sdev, cmd, arg);
7862 } else if (res->sdev && (ipr_is_vset_device(res) || ipr_is_scsi_disk(res)))
7863 res->sdev->allow_restart = 1;
7870 if (res->sdev) {