Lines Matching refs:sdev
1163 res->sdev = NULL; in ipr_init_res_entry()
1339 if (res->sdev && new_path) in ipr_update_res_entry()
1340 sdev_printk(KERN_INFO, res->sdev, "Resource path: %s\n", in ipr_update_res_entry()
1443 if (res->sdev) { in ipr_handle_config_change()
1451 } else if (!res->sdev || res->del_from_ml) { in ipr_handle_config_change()
3262 struct scsi_device *sdev; in ipr_worker_thread() local
3299 if (res->del_from_ml && res->sdev) { in ipr_worker_thread()
3301 sdev = res->sdev; in ipr_worker_thread()
3302 if (!scsi_device_get(sdev)) { in ipr_worker_thread()
3308 scsi_remove_device(sdev); in ipr_worker_thread()
3309 scsi_device_put(sdev); in ipr_worker_thread()
4352 static int ipr_change_queue_depth(struct scsi_device *sdev, int qdepth) in ipr_change_queue_depth() argument
4354 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_change_queue_depth()
4359 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_change_queue_depth()
4365 scsi_change_queue_depth(sdev, qdepth); in ipr_change_queue_depth()
4366 return sdev->queue_depth; in ipr_change_queue_depth()
4380 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_adapter_handle() local
4381 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_adapter_handle()
4387 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_adapter_handle()
4414 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_resource_path() local
4415 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_resource_path()
4422 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_resource_path()
4454 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_device_id() local
4455 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_device_id()
4461 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_device_id()
4490 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_resource_type() local
4491 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_resource_type()
4497 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_resource_type()
4525 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_raw_mode() local
4526 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_raw_mode()
4532 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_raw_mode()
4553 struct scsi_device *sdev = to_scsi_device(dev); in ipr_store_raw_mode() local
4554 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_store_raw_mode()
4560 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_store_raw_mode()
4565 if (res->sdev) in ipr_store_raw_mode()
4566 sdev_printk(KERN_INFO, res->sdev, "raw mode is %s\n", in ipr_store_raw_mode()
4608 static int ipr_biosparam(struct scsi_device *sdev, in ipr_biosparam() argument
4742 static struct ipr_resource_entry *ipr_find_sdev(struct scsi_device *sdev) in ipr_find_sdev() argument
4744 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; in ipr_find_sdev()
4748 if ((res->bus == sdev->channel) && in ipr_find_sdev()
4749 (res->target == sdev->id) && in ipr_find_sdev()
4750 (res->lun == sdev->lun)) in ipr_find_sdev()
4764 static void ipr_slave_destroy(struct scsi_device *sdev) in ipr_slave_destroy() argument
4770 ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; in ipr_slave_destroy()
4773 res = (struct ipr_resource_entry *) sdev->hostdata; in ipr_slave_destroy()
4777 sdev->hostdata = NULL; in ipr_slave_destroy()
4778 res->sdev = NULL; in ipr_slave_destroy()
4793 static int ipr_slave_configure(struct scsi_device *sdev) in ipr_slave_configure() argument
4795 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; in ipr_slave_configure()
4802 res = sdev->hostdata; in ipr_slave_configure()
4805 sdev->type = TYPE_RAID; in ipr_slave_configure()
4807 sdev->scsi_level = 4; in ipr_slave_configure()
4808 sdev->no_uld_attach = 1; in ipr_slave_configure()
4811 sdev->scsi_level = SCSI_SPC_3; in ipr_slave_configure()
4812 blk_queue_rq_timeout(sdev->request_queue, in ipr_slave_configure()
4814 blk_queue_max_hw_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS); in ipr_slave_configure()
4821 scsi_change_queue_depth(sdev, IPR_MAX_CMD_PER_ATA_LUN); in ipr_slave_configure()
4822 ata_sas_slave_configure(sdev, ap); in ipr_slave_configure()
4826 sdev_printk(KERN_INFO, sdev, "Resource path: %s\n", in ipr_slave_configure()
4845 static int ipr_ata_slave_alloc(struct scsi_device *sdev) in ipr_ata_slave_alloc() argument
4851 if (sdev->sdev_target) in ipr_ata_slave_alloc()
4852 sata_port = sdev->sdev_target->hostdata; in ipr_ata_slave_alloc()
4860 ipr_slave_destroy(sdev); in ipr_ata_slave_alloc()
4878 static int ipr_slave_alloc(struct scsi_device *sdev) in ipr_slave_alloc() argument
4880 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; in ipr_slave_alloc()
4885 sdev->hostdata = NULL; in ipr_slave_alloc()
4889 res = ipr_find_sdev(sdev); in ipr_slave_alloc()
4891 res->sdev = sdev; in ipr_slave_alloc()
4894 sdev->hostdata = res; in ipr_slave_alloc()
4900 return ipr_ata_slave_alloc(sdev); in ipr_slave_alloc()
5281 sdev_printk(KERN_ERR, ipr_cmd->u.sdev, "Abort timed out. Resetting bus.\n"); in ipr_abort_timeout()
5359 ipr_cmd->u.sdev = scsi_cmd->device; in ipr_cancel_op()
6451 static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) in ipr_ioctl() argument
6455 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_ioctl()
6459 return ata_sas_scsi_ioctl(res->sata_port->ap, sdev, cmd, arg); in ipr_ioctl()
7610 } else if (res->sdev && (ipr_is_vset_device(res) || ipr_is_scsi_disk(res))) in ipr_init_res_table()
7611 res->sdev->allow_restart = 1; in ipr_init_res_table()
7618 if (res->sdev) { in ipr_init_res_table()