Lines Matching refs:scsi_dev

139 static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)  in pmcraid_slave_alloc()  argument
148 pinstance = shost_priv(scsi_dev->host); in pmcraid_slave_alloc()
179 if (bus == scsi_dev->channel && in pmcraid_slave_alloc()
180 target == scsi_dev->id && in pmcraid_slave_alloc()
181 lun == scsi_dev->lun) { in pmcraid_slave_alloc()
188 res->scsi_dev = scsi_dev; in pmcraid_slave_alloc()
189 scsi_dev->hostdata = res; in pmcraid_slave_alloc()
213 static int pmcraid_device_configure(struct scsi_device *scsi_dev, in pmcraid_device_configure() argument
216 struct pmcraid_resource_entry *res = scsi_dev->hostdata; in pmcraid_device_configure()
223 scsi_dev->type != TYPE_ENCLOSURE) in pmcraid_device_configure()
227 scsi_dev->host->unique_id, in pmcraid_device_configure()
228 scsi_dev->channel, in pmcraid_device_configure()
229 scsi_dev->id, in pmcraid_device_configure()
230 (u8)scsi_dev->lun); in pmcraid_device_configure()
233 scsi_dev->allow_restart = 1; in pmcraid_device_configure()
235 scsi_dev->allow_restart = 1; in pmcraid_device_configure()
236 blk_queue_rq_timeout(scsi_dev->request_queue, in pmcraid_device_configure()
245 scsi_dev->tagged_supported = 0; in pmcraid_device_configure()
261 static void pmcraid_slave_destroy(struct scsi_device *scsi_dev) in pmcraid_slave_destroy() argument
265 res = (struct pmcraid_resource_entry *)scsi_dev->hostdata; in pmcraid_slave_destroy()
268 res->scsi_dev = NULL; in pmcraid_slave_destroy()
270 scsi_dev->hostdata = NULL; in pmcraid_slave_destroy()
281 static int pmcraid_change_queue_depth(struct scsi_device *scsi_dev, int depth) in pmcraid_change_queue_depth() argument
285 return scsi_change_queue_depth(scsi_dev, depth); in pmcraid_change_queue_depth()
1612 res->scsi_dev = NULL; in pmcraid_handle_config_change()
1621 if (res->scsi_dev) { in pmcraid_handle_config_change()
1634 } else if (!res->scsi_dev) { in pmcraid_handle_config_change()
2697 struct scsi_device *scsi_dev, in pmcraid_reset_device() argument
2709 (struct pmcraid_instance *)scsi_dev->host->hostdata; in pmcraid_reset_device()
2710 res = scsi_dev->hostdata; in pmcraid_reset_device()
2713 sdev_printk(KERN_ERR, scsi_dev, in pmcraid_reset_device()
3056 sdev = res->scsi_dev; in pmcraid_eh_bus_reset_handler()
3071 struct scsi_device *scsi_dev = NULL, *tmp; in pmcraid_eh_target_reset_handler() local
3077 scsi_dev = tmp; in pmcraid_eh_target_reset_handler()
3081 if (!scsi_dev) in pmcraid_eh_target_reset_handler()
3083 sdev_printk(KERN_INFO, scsi_dev, in pmcraid_eh_target_reset_handler()
3085 ret = pmcraid_reset_device(scsi_dev, in pmcraid_eh_target_reset_handler()
3088 scsi_device_put(scsi_dev); in pmcraid_eh_target_reset_handler()
3856 if (res->change_detected == RES_CHANGE_DEL && res->scsi_dev) { in pmcraid_worker_function()
3857 sdev = res->scsi_dev; in pmcraid_worker_function()
5066 res->scsi_dev = NULL; in pmcraid_init_res_table()
5090 if (res->scsi_dev) { in pmcraid_init_res_table()