Lines Matching refs:sdev

1163 	res->sdev = NULL;  in ipr_init_res_entry()
1338 if (res->sdev && new_path) in ipr_update_res_entry()
1339 sdev_printk(KERN_INFO, res->sdev, "Resource path: %s\n", in ipr_update_res_entry()
1442 if (res->sdev) { in ipr_handle_config_change()
1450 } else if (!res->sdev || res->del_from_ml) { in ipr_handle_config_change()
3261 struct scsi_device *sdev; in ipr_worker_thread() local
3298 if (res->del_from_ml && res->sdev) { in ipr_worker_thread()
3300 sdev = res->sdev; in ipr_worker_thread()
3301 if (!scsi_device_get(sdev)) { in ipr_worker_thread()
3307 scsi_remove_device(sdev); in ipr_worker_thread()
3308 scsi_device_put(sdev); in ipr_worker_thread()
4347 static int ipr_change_queue_depth(struct scsi_device *sdev, int qdepth) in ipr_change_queue_depth() argument
4349 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_change_queue_depth()
4354 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_change_queue_depth()
4360 scsi_change_queue_depth(sdev, qdepth); in ipr_change_queue_depth()
4361 return sdev->queue_depth; in ipr_change_queue_depth()
4375 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_adapter_handle() local
4376 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_adapter_handle()
4382 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_adapter_handle()
4409 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_resource_path() local
4410 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_resource_path()
4417 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_resource_path()
4449 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_device_id() local
4450 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_device_id()
4456 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_device_id()
4485 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_resource_type() local
4486 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_resource_type()
4492 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_resource_type()
4520 struct scsi_device *sdev = to_scsi_device(dev); in ipr_show_raw_mode() local
4521 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_show_raw_mode()
4527 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_show_raw_mode()
4548 struct scsi_device *sdev = to_scsi_device(dev); in ipr_store_raw_mode() local
4549 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; in ipr_store_raw_mode()
4555 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_store_raw_mode()
4560 if (res->sdev) in ipr_store_raw_mode()
4561 sdev_printk(KERN_INFO, res->sdev, "raw mode is %s\n", in ipr_store_raw_mode()
4603 static int ipr_biosparam(struct scsi_device *sdev, in ipr_biosparam() argument
4737 static struct ipr_resource_entry *ipr_find_sdev(struct scsi_device *sdev) in ipr_find_sdev() argument
4739 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; in ipr_find_sdev()
4743 if ((res->bus == sdev->channel) && in ipr_find_sdev()
4744 (res->target == sdev->id) && in ipr_find_sdev()
4745 (res->lun == sdev->lun)) in ipr_find_sdev()
4759 static void ipr_slave_destroy(struct scsi_device *sdev) in ipr_slave_destroy() argument
4765 ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; in ipr_slave_destroy()
4768 res = (struct ipr_resource_entry *) sdev->hostdata; in ipr_slave_destroy()
4772 sdev->hostdata = NULL; in ipr_slave_destroy()
4773 res->sdev = NULL; in ipr_slave_destroy()
4788 static int ipr_slave_configure(struct scsi_device *sdev) in ipr_slave_configure() argument
4790 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; in ipr_slave_configure()
4797 res = sdev->hostdata; in ipr_slave_configure()
4800 sdev->type = TYPE_RAID; in ipr_slave_configure()
4802 sdev->scsi_level = 4; in ipr_slave_configure()
4803 sdev->no_uld_attach = 1; in ipr_slave_configure()
4806 sdev->scsi_level = SCSI_SPC_3; in ipr_slave_configure()
4807 blk_queue_rq_timeout(sdev->request_queue, in ipr_slave_configure()
4809 blk_queue_max_hw_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS); in ipr_slave_configure()
4816 scsi_change_queue_depth(sdev, IPR_MAX_CMD_PER_ATA_LUN); in ipr_slave_configure()
4817 ata_sas_slave_configure(sdev, ap); in ipr_slave_configure()
4821 sdev_printk(KERN_INFO, sdev, "Resource path: %s\n", in ipr_slave_configure()
4840 static int ipr_ata_slave_alloc(struct scsi_device *sdev) in ipr_ata_slave_alloc() argument
4846 if (sdev->sdev_target) in ipr_ata_slave_alloc()
4847 sata_port = sdev->sdev_target->hostdata; in ipr_ata_slave_alloc()
4855 ipr_slave_destroy(sdev); in ipr_ata_slave_alloc()
4873 static int ipr_slave_alloc(struct scsi_device *sdev) in ipr_slave_alloc() argument
4875 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; in ipr_slave_alloc()
4880 sdev->hostdata = NULL; in ipr_slave_alloc()
4884 res = ipr_find_sdev(sdev); in ipr_slave_alloc()
4886 res->sdev = sdev; in ipr_slave_alloc()
4889 sdev->hostdata = res; in ipr_slave_alloc()
4895 return ipr_ata_slave_alloc(sdev); in ipr_slave_alloc()
5276 sdev_printk(KERN_ERR, ipr_cmd->u.sdev, "Abort timed out. Resetting bus.\n"); in ipr_abort_timeout()
5354 ipr_cmd->u.sdev = scsi_cmd->device; in ipr_cancel_op()
6438 static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) in ipr_ioctl() argument
6442 res = (struct ipr_resource_entry *)sdev->hostdata; in ipr_ioctl()
6446 return ata_sas_scsi_ioctl(res->sata_port->ap, sdev, cmd, arg); in ipr_ioctl()
7598 } else if (res->sdev && (ipr_is_vset_device(res) || ipr_is_scsi_disk(res))) in ipr_init_res_table()
7599 res->sdev->allow_restart = 1; in ipr_init_res_table()
7606 if (res->sdev) { in ipr_init_res_table()