* [PATCH 05/10] ipr: Disk remove path cleanup
@ 2006-03-29 14:38 Brian King
2006-03-29 15:10 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Brian King @ 2006-03-29 14:38 UTC (permalink / raw)
To: jgarzik; +Cc: linux-ide, linux-scsi, James.Bottomley, brking
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>
---
libata-dev-bjking1/drivers/scsi/ipr.c | 6 +++---
libata-dev-bjking1/drivers/scsi/ipr.h | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff -puN drivers/scsi/ipr.c~ipr_disk_remove_cleanup drivers/scsi/ipr.c
--- libata-dev/drivers/scsi/ipr.c~ipr_disk_remove_cleanup 2006-03-06 09:20:06.000000000 -0600
+++ libata-dev-bjking1/drivers/scsi/ipr.c 2006-03-06 09:20:06.000000000 -0600
@@ -869,8 +869,8 @@ static void ipr_handle_config_change(str
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
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 -puN drivers/scsi/ipr.h~ipr_disk_remove_cleanup drivers/scsi/ipr.h
--- libata-dev/drivers/scsi/ipr.h~ipr_disk_remove_cleanup 2006-03-06 09:20:06.000000000 -0600
+++ libata-dev-bjking1/drivers/scsi/ipr.h 2006-03-06 09:20:06.000000000 -0600
@@ -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
/*
_
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 05/10] ipr: Disk remove path cleanup
2006-03-29 14:38 [PATCH 05/10] ipr: Disk remove path cleanup Brian King
@ 2006-03-29 15:10 ` Christoph Hellwig
2006-03-29 15:18 ` Brian King
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2006-03-29 15:10 UTC (permalink / raw)
To: Brian King; +Cc: jgarzik, linux-ide, linux-scsi, James.Bottomley
On Wed, Mar 29, 2006 at 08:38:18AM -0600, Brian King wrote:
>
> 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.
It would help greatly if you could split out the patches that don't
require libata changes so they could go into scsi-misc already.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 05/10] ipr: Disk remove path cleanup
2006-03-29 15:10 ` Christoph Hellwig
@ 2006-03-29 15:18 ` Brian King
0 siblings, 0 replies; 3+ messages in thread
From: Brian King @ 2006-03-29 15:18 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: jgarzik, linux-ide, linux-scsi, James.Bottomley
Christoph Hellwig wrote:
> On Wed, Mar 29, 2006 at 08:38:18AM -0600, Brian King wrote:
>> 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.
>
> It would help greatly if you could split out the patches that don't
> require libata changes so they could go into scsi-misc already.
Ok. Will do.
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-29 15:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-29 14:38 [PATCH 05/10] ipr: Disk remove path cleanup Brian King
2006-03-29 15:10 ` Christoph Hellwig
2006-03-29 15:18 ` Brian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).