Lines Matching refs:raid_device
568 struct _raid_device *raid_device; in _scsih_determine_boot_device() local
583 raid_device = device; in _scsih_determine_boot_device()
584 sas_address = raid_device->wwid; in _scsih_determine_boot_device()
1434 struct _raid_device *raid_device, *r; in _scsih_raid_device_find_by_id() local
1437 list_for_each_entry(raid_device, &ioc->raid_device_list, list) { in _scsih_raid_device_find_by_id()
1438 if (raid_device->id == id && raid_device->channel == channel) { in _scsih_raid_device_find_by_id()
1439 r = raid_device; in _scsih_raid_device_find_by_id()
1460 struct _raid_device *raid_device, *r; in mpt3sas_raid_device_find_by_handle() local
1463 list_for_each_entry(raid_device, &ioc->raid_device_list, list) { in mpt3sas_raid_device_find_by_handle()
1464 if (raid_device->handle != handle) in mpt3sas_raid_device_find_by_handle()
1466 r = raid_device; in mpt3sas_raid_device_find_by_handle()
1486 struct _raid_device *raid_device, *r; in _scsih_raid_device_find_by_wwid() local
1489 list_for_each_entry(raid_device, &ioc->raid_device_list, list) { in _scsih_raid_device_find_by_wwid()
1490 if (raid_device->wwid != wwid) in _scsih_raid_device_find_by_wwid()
1492 r = raid_device; in _scsih_raid_device_find_by_wwid()
1509 struct _raid_device *raid_device) in _scsih_raid_device_add() argument
1516 raid_device->handle, (u64)raid_device->wwid)); in _scsih_raid_device_add()
1519 list_add_tail(&raid_device->list, &ioc->raid_device_list); in _scsih_raid_device_add()
1531 struct _raid_device *raid_device) in _scsih_raid_device_remove() argument
1536 list_del(&raid_device->list); in _scsih_raid_device_remove()
1537 kfree(raid_device); in _scsih_raid_device_remove()
1874 struct _raid_device *raid_device; in scsih_target_alloc() local
1891 raid_device = _scsih_raid_device_find_by_id(ioc, starget->id, in scsih_target_alloc()
1893 if (raid_device) { in scsih_target_alloc()
1894 sas_target_priv_data->handle = raid_device->handle; in scsih_target_alloc()
1895 sas_target_priv_data->sas_address = raid_device->wwid; in scsih_target_alloc()
1898 sas_target_priv_data->raid_device = raid_device; in scsih_target_alloc()
1899 raid_device->starget = starget; in scsih_target_alloc()
1964 struct _raid_device *raid_device; in scsih_target_destroy() local
1974 raid_device = _scsih_raid_device_find_by_id(ioc, starget->id, in scsih_target_destroy()
1976 if (raid_device) { in scsih_target_destroy()
1977 raid_device->starget = NULL; in scsih_target_destroy()
1978 raid_device->sdev = NULL; in scsih_target_destroy()
2043 struct _raid_device *raid_device; in scsih_slave_alloc() local
2068 raid_device = _scsih_raid_device_find_by_id(ioc, in scsih_slave_alloc()
2070 if (raid_device) in scsih_slave_alloc()
2071 raid_device->sdev = sdev; /* raid is single lun */ in scsih_slave_alloc()
2248 static struct _raid_device *raid_device; in scsih_get_resync() local
2262 raid_device = _scsih_raid_device_find_by_id(ioc, sdev->id, in scsih_get_resync()
2264 if (raid_device) { in scsih_get_resync()
2265 handle = raid_device->handle; in scsih_get_resync()
2266 percent_complete = raid_device->percent_complete; in scsih_get_resync()
2309 static struct _raid_device *raid_device; in scsih_get_state() local
2318 raid_device = _scsih_raid_device_find_by_id(ioc, sdev->id, in scsih_get_state()
2320 if (raid_device) in scsih_get_state()
2321 handle = raid_device->handle; in scsih_get_state()
2324 if (!raid_device) in scsih_get_state()
2416 struct _raid_device *raid_device) in _scsih_get_volume_capabilities() argument
2425 if ((mpt3sas_config_get_number_pds(ioc, raid_device->handle, in _scsih_get_volume_capabilities()
2433 raid_device->num_pds = num_pds; in _scsih_get_volume_capabilities()
2444 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, raid_device->handle, sz))) { in _scsih_get_volume_capabilities()
2452 raid_device->volume_type = vol_pg0->VolumeType; in _scsih_get_volume_capabilities()
2463 raid_device->device_info = in _scsih_get_volume_capabilities()
2516 struct _raid_device *raid_device; in scsih_device_configure() local
2536 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in scsih_device_configure()
2538 if (!raid_device) { in scsih_device_configure()
2545 if (_scsih_get_volume_capabilities(ioc, raid_device)) { in scsih_device_configure()
2555 mpt3sas_init_warpdrive_properties(ioc, raid_device); in scsih_device_configure()
2562 if (raid_device->device_info & in scsih_device_configure()
2568 if (raid_device->device_info & in scsih_device_configure()
2575 switch (raid_device->volume_type) { in scsih_device_configure()
2584 !(raid_device->num_pds % 2)) in scsih_device_configure()
2608 r_level, raid_device->handle, in scsih_device_configure()
2609 (unsigned long long)raid_device->wwid, in scsih_device_configure()
2610 raid_device->num_pds, ds); in scsih_device_configure()
2623 _scsih_set_level(ioc, sdev, raid_device->volume_type); in scsih_device_configure()
4797 struct _raid_device *raid_device; in _scsih_set_volume_delete_flag() local
4802 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in _scsih_set_volume_delete_flag()
4803 if (raid_device && raid_device->starget && in _scsih_set_volume_delete_flag()
4804 raid_device->starget->hostdata) { in _scsih_set_volume_delete_flag()
4806 raid_device->starget->hostdata; in _scsih_set_volume_delete_flag()
4810 handle, (u64)raid_device->wwid)); in _scsih_set_volume_delete_flag()
5120 struct _raid_device *raid_device; in scsih_qcmd() local
5257 raid_device = sas_target_priv_data->raid_device; in scsih_qcmd()
5258 if (raid_device && raid_device->direct_io_enabled) in scsih_qcmd()
5260 raid_device, mpi_request); in scsih_qcmd()
9007 struct _raid_device *raid_device; in _scsih_sas_volume_add() local
9021 raid_device = _scsih_raid_device_find_by_wwid(ioc, wwid); in _scsih_sas_volume_add()
9024 if (raid_device) in _scsih_sas_volume_add()
9027 raid_device = kzalloc(sizeof(struct _raid_device), GFP_KERNEL); in _scsih_sas_volume_add()
9028 if (!raid_device) { in _scsih_sas_volume_add()
9034 raid_device->id = ioc->sas_id++; in _scsih_sas_volume_add()
9035 raid_device->channel = RAID_CHANNEL; in _scsih_sas_volume_add()
9036 raid_device->handle = handle; in _scsih_sas_volume_add()
9037 raid_device->wwid = wwid; in _scsih_sas_volume_add()
9038 _scsih_raid_device_add(ioc, raid_device); in _scsih_sas_volume_add()
9041 raid_device->id, 0); in _scsih_sas_volume_add()
9043 _scsih_raid_device_remove(ioc, raid_device); in _scsih_sas_volume_add()
9046 _scsih_determine_boot_device(ioc, raid_device, 1); in _scsih_sas_volume_add()
9060 struct _raid_device *raid_device; in _scsih_sas_volume_delete() local
9066 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in _scsih_sas_volume_delete()
9067 if (raid_device) { in _scsih_sas_volume_delete()
9068 if (raid_device->starget) { in _scsih_sas_volume_delete()
9069 starget = raid_device->starget; in _scsih_sas_volume_delete()
9074 raid_device->handle, (u64)raid_device->wwid); in _scsih_sas_volume_delete()
9075 list_del(&raid_device->list); in _scsih_sas_volume_delete()
9076 kfree(raid_device); in _scsih_sas_volume_delete()
9400 struct _raid_device *raid_device; in _scsih_sas_ir_volume_event() local
9432 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in _scsih_sas_ir_volume_event()
9435 if (raid_device) in _scsih_sas_ir_volume_event()
9445 raid_device = kzalloc(sizeof(struct _raid_device), GFP_KERNEL); in _scsih_sas_ir_volume_event()
9446 if (!raid_device) { in _scsih_sas_ir_volume_event()
9452 raid_device->id = ioc->sas_id++; in _scsih_sas_ir_volume_event()
9453 raid_device->channel = RAID_CHANNEL; in _scsih_sas_ir_volume_event()
9454 raid_device->handle = handle; in _scsih_sas_ir_volume_event()
9455 raid_device->wwid = wwid; in _scsih_sas_ir_volume_event()
9456 _scsih_raid_device_add(ioc, raid_device); in _scsih_sas_ir_volume_event()
9458 raid_device->id, 0); in _scsih_sas_ir_volume_event()
9460 _scsih_raid_device_remove(ioc, raid_device); in _scsih_sas_ir_volume_event()
9608 static struct _raid_device *raid_device; in _scsih_sas_ir_operation_status_event() local
9622 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in _scsih_sas_ir_operation_status_event()
9623 if (raid_device) in _scsih_sas_ir_operation_status_event()
9624 raid_device->percent_complete = in _scsih_sas_ir_operation_status_event()
10003 struct _raid_device *raid_device; in _scsih_mark_responding_raid_device() local
10007 list_for_each_entry(raid_device, &ioc->raid_device_list, list) { in _scsih_mark_responding_raid_device()
10008 if (raid_device->wwid == wwid && raid_device->starget) { in _scsih_mark_responding_raid_device()
10009 starget = raid_device->starget; in _scsih_mark_responding_raid_device()
10015 raid_device->responding = 1; in _scsih_mark_responding_raid_device()
10017 starget_printk(KERN_INFO, raid_device->starget, in _scsih_mark_responding_raid_device()
10019 (unsigned long long)raid_device->wwid); in _scsih_mark_responding_raid_device()
10026 mpt3sas_init_warpdrive_properties(ioc, raid_device); in _scsih_mark_responding_raid_device()
10028 if (raid_device->handle == handle) { in _scsih_mark_responding_raid_device()
10034 raid_device->handle); in _scsih_mark_responding_raid_device()
10035 raid_device->handle = handle; in _scsih_mark_responding_raid_device()
10224 struct _raid_device *raid_device, *raid_device_next; in _scsih_remove_unresponding_devices() local
10299 list_for_each_entry_safe(raid_device, raid_device_next, in _scsih_remove_unresponding_devices()
10301 if (!raid_device->responding) in _scsih_remove_unresponding_devices()
10303 raid_device->handle); in _scsih_remove_unresponding_devices()
10305 raid_device->responding = 0; in _scsih_remove_unresponding_devices()
10377 static struct _raid_device *raid_device; in _scsih_scan_for_devices_after_reset() local
10500 raid_device = _scsih_raid_device_find_by_wwid(ioc, in _scsih_scan_for_devices_after_reset()
10503 if (raid_device) in _scsih_scan_for_devices_after_reset()
11239 struct _raid_device *raid_device, *next; in scsih_remove() local
11276 list_for_each_entry_safe(raid_device, next, &ioc->raid_device_list, in scsih_remove()
11278 if (raid_device->starget) { in scsih_remove()
11280 raid_device->starget->hostdata; in scsih_remove()
11282 scsi_remove_target(&raid_device->starget->dev); in scsih_remove()
11285 raid_device->handle, (u64)raid_device->wwid); in scsih_remove()
11286 _scsih_raid_device_remove(ioc, raid_device); in scsih_remove()
11398 struct _raid_device *raid_device; in _scsih_probe_boot_devices() local
11428 raid_device = device; in _scsih_probe_boot_devices()
11434 if (raid_device->starget) in _scsih_probe_boot_devices()
11437 raid_device->id, 0); in _scsih_probe_boot_devices()
11439 _scsih_raid_device_remove(ioc, raid_device); in _scsih_probe_boot_devices()
11502 struct _raid_device *raid_device, *raid_next; in _scsih_probe_raid() local
11505 list_for_each_entry_safe(raid_device, raid_next, in _scsih_probe_raid()
11507 if (raid_device->starget) in _scsih_probe_raid()
11510 raid_device->id, 0); in _scsih_probe_raid()
11512 _scsih_raid_device_remove(ioc, raid_device); in _scsih_probe_raid()