aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
authorBrian King <brking@us.ibm.com>2006-03-29 10:37:16 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-13 11:13:28 -0400
commit1121b794a384bc317fe36e967b82308b0e2c3852 (patch)
tree7a552a1a76e9debdcc56bc6d48ae5fdebf668991 /drivers/scsi/ipr.c
parentc06bb7f514567efa39062a781679120e51caa818 (diff)
[SCSI] ipr: Disk remove path cleanup
Instead of NULLing the resource entry pointer when a disk goes away to prevent any new commands being sent to it, set the adapter resource handle to an invalid value so new ops getting sent to it will fail with a selection timeout response. This patch is needed for future SATA patches. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 5890e5f92d82..154b78c5baa8 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -869,8 +869,8 @@ static void ipr_handle_config_change(struct ipr_ioa_cfg *ioa_cfg,
869 869
870 if (hostrcb->hcam.notify_type == IPR_HOST_RCB_NOTIF_TYPE_REM_ENTRY) { 870 if (hostrcb->hcam.notify_type == IPR_HOST_RCB_NOTIF_TYPE_REM_ENTRY) {
871 if (res->sdev) { 871 if (res->sdev) {
872 res->sdev->hostdata = NULL;
873 res->del_from_ml = 1; 872 res->del_from_ml = 1;
873 res->cfgte.res_handle = IPR_INVALID_RES_HANDLE;
874 if (ioa_cfg->allow_ml_add_del) 874 if (ioa_cfg->allow_ml_add_del)
875 schedule_work(&ioa_cfg->work_q); 875 schedule_work(&ioa_cfg->work_q);
876 } else 876 } else
@@ -2107,7 +2107,6 @@ restart:
2107 did_work = 1; 2107 did_work = 1;
2108 sdev = res->sdev; 2108 sdev = res->sdev;
2109 if (!scsi_device_get(sdev)) { 2109 if (!scsi_device_get(sdev)) {
2110 res->sdev = NULL;
2111 list_move_tail(&res->queue, &ioa_cfg->free_res_q); 2110 list_move_tail(&res->queue, &ioa_cfg->free_res_q);
2112 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 2111 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
2113 scsi_remove_device(sdev); 2112 scsi_remove_device(sdev);
@@ -2124,6 +2123,7 @@ restart:
2124 bus = res->cfgte.res_addr.bus; 2123 bus = res->cfgte.res_addr.bus;
2125 target = res->cfgte.res_addr.target; 2124 target = res->cfgte.res_addr.target;
2126 lun = res->cfgte.res_addr.lun; 2125 lun = res->cfgte.res_addr.lun;
2126 res->add_to_ml = 0;
2127 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 2127 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
2128 scsi_add_device(ioa_cfg->host, bus, target, lun); 2128 scsi_add_device(ioa_cfg->host, bus, target, lun);
2129 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); 2129 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
@@ -4980,7 +4980,7 @@ static int ipr_init_res_table(struct ipr_cmnd *ipr_cmd)
4980 list_for_each_entry_safe(res, temp, &old_res, queue) { 4980 list_for_each_entry_safe(res, temp, &old_res, queue) {
4981 if (res->sdev) { 4981 if (res->sdev) {
4982 res->del_from_ml = 1; 4982 res->del_from_ml = 1;
4983 res->sdev->hostdata = NULL; 4983 res->cfgte.res_handle = IPR_INVALID_RES_HANDLE;
4984 list_move_tail(&res->queue, &ioa_cfg->used_res_q); 4984 list_move_tail(&res->queue, &ioa_cfg->used_res_q);
4985 } else { 4985 } else {
4986 list_move_tail(&res->queue, &ioa_cfg->free_res_q); 4986 list_move_tail(&res->queue, &ioa_cfg->free_res_q);