diff options
author | Brian King <brking@us.ibm.com> | 2006-03-29 09:37:16 -0600 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-13 10:13:28 -0500 |
commit | 1121b794a384bc317fe36e967b82308b0e2c3852 (patch) | |
tree | 7a552a1a76e9debdcc56bc6d48ae5fdebf668991 /drivers | |
parent | c06bb7f514567efa39062a781679120e51caa818 (diff) | |
download | linux-1121b794a384bc317fe36e967b82308b0e2c3852.tar.gz linux-1121b794a384bc317fe36e967b82308b0e2c3852.tar.bz2 linux-1121b794a384bc317fe36e967b82308b0e2c3852.zip |
[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')
-rw-r--r-- | drivers/scsi/ipr.c | 6 | ||||
-rw-r--r-- | drivers/scsi/ipr.h | 1 |
2 files changed, 4 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, if (hostrcb->hcam.notify_type == IPR_HOST_RCB_NOTIF_TYPE_REM_ENTRY) { if (res->sdev) { - res->sdev->hostdata = NULL; res->del_from_ml = 1; + res->cfgte.res_handle = IPR_INVALID_RES_HANDLE; if (ioa_cfg->allow_ml_add_del) schedule_work(&ioa_cfg->work_q); } else @@ -2107,7 +2107,6 @@ restart: did_work = 1; sdev = res->sdev; if (!scsi_device_get(sdev)) { - res->sdev = NULL; list_move_tail(&res->queue, &ioa_cfg->free_res_q); spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); scsi_remove_device(sdev); @@ -2124,6 +2123,7 @@ restart: bus = res->cfgte.res_addr.bus; target = res->cfgte.res_addr.target; lun = res->cfgte.res_addr.lun; + res->add_to_ml = 0; spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); scsi_add_device(ioa_cfg->host, bus, target, lun); 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) list_for_each_entry_safe(res, temp, &old_res, queue) { if (res->sdev) { res->del_from_ml = 1; - res->sdev->hostdata = NULL; + res->cfgte.res_handle = IPR_INVALID_RES_HANDLE; list_move_tail(&res->queue, &ioa_cfg->used_res_q); } else { list_move_tail(&res->queue, &ioa_cfg->free_res_q); diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index fd360bfe56dd..ee9169d817b1 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h @@ -133,6 +133,7 @@ #define IPR_MAX_SCSI_RATE(width) ((320 * 10) / ((width) / 8)) #define IPR_IOA_RES_HANDLE 0xffffffff +#define IPR_INVALID_RES_HANDLE 0 #define IPR_IOA_RES_ADDR 0x00ffffff /* |