diff options
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index cdfe5a16de2a..dcad2389be3d 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -4339,8 +4339,7 @@ static struct ipr_resource_entry *ipr_find_starget(struct scsi_target *starget) | |||
4339 | 4339 | ||
4340 | list_for_each_entry(res, &ioa_cfg->used_res_q, queue) { | 4340 | list_for_each_entry(res, &ioa_cfg->used_res_q, queue) { |
4341 | if ((res->bus == starget->channel) && | 4341 | if ((res->bus == starget->channel) && |
4342 | (res->target == starget->id) && | 4342 | (res->target == starget->id)) { |
4343 | (res->lun == 0)) { | ||
4344 | return res; | 4343 | return res; |
4345 | } | 4344 | } |
4346 | } | 4345 | } |
@@ -4414,12 +4413,14 @@ static void ipr_target_destroy(struct scsi_target *starget) | |||
4414 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) shost->hostdata; | 4413 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) shost->hostdata; |
4415 | 4414 | ||
4416 | if (ioa_cfg->sis64) { | 4415 | if (ioa_cfg->sis64) { |
4417 | if (starget->channel == IPR_ARRAY_VIRTUAL_BUS) | 4416 | if (!ipr_find_starget(starget)) { |
4418 | clear_bit(starget->id, ioa_cfg->array_ids); | 4417 | if (starget->channel == IPR_ARRAY_VIRTUAL_BUS) |
4419 | else if (starget->channel == IPR_VSET_VIRTUAL_BUS) | 4418 | clear_bit(starget->id, ioa_cfg->array_ids); |
4420 | clear_bit(starget->id, ioa_cfg->vset_ids); | 4419 | else if (starget->channel == IPR_VSET_VIRTUAL_BUS) |
4421 | else if (starget->channel == 0) | 4420 | clear_bit(starget->id, ioa_cfg->vset_ids); |
4422 | clear_bit(starget->id, ioa_cfg->target_ids); | 4421 | else if (starget->channel == 0) |
4422 | clear_bit(starget->id, ioa_cfg->target_ids); | ||
4423 | } | ||
4423 | } | 4424 | } |
4424 | 4425 | ||
4425 | if (sata_port) { | 4426 | if (sata_port) { |