Send scsi_host kobject uevent notifications for potential
configuration changes. This small change allows userspace ipr
apps to use netlink/uevent for configuration change notification
instead of having to poll /sys for this information. These apps
can already look for add/remove uevents for devices, but they also
need to be notified when an adapter reset occurs, which is what this
patch will do.

Signed-off-by: Brian King <[EMAIL PROTECTED]>
---

 linux-2.6.11-rc4-bk9-bjking1/drivers/scsi/ipr.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN drivers/scsi/ipr.c~ipr_kobject_uevent drivers/scsi/ipr.c
--- linux-2.6.11-rc4-bk9/drivers/scsi/ipr.c~ipr_kobject_uevent  2005-02-21 
13:16:47.000000000 -0600
+++ linux-2.6.11-rc4-bk9-bjking1/drivers/scsi/ipr.c     2005-02-21 
13:16:47.000000000 -0600
@@ -1923,6 +1923,7 @@ restart:
        }
 
        spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
+       kobject_uevent(&ioa_cfg->host->shost_classdev.kobj, KOBJ_CHANGE, NULL);
        LEAVE;
 }
 
@@ -4053,10 +4054,10 @@ static int ipr_ioa_reset_done(struct ipr
        list_for_each_entry(res, &ioa_cfg->used_res_q, queue) {
                if (ioa_cfg->allow_ml_add_del && (res->add_to_ml || 
res->del_from_ml)) {
                        ipr_trace;
-                       schedule_work(&ioa_cfg->work_q);
                        break;
                }
        }
+       schedule_work(&ioa_cfg->work_q);
 
        list_for_each_entry_safe(hostrcb, temp, &ioa_cfg->hostrcb_free_q, 
queue) {
                list_del(&hostrcb->queue);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to