summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2014-12-30 23:46:15 +0100
committerChristoph Hellwig <hch@lst.de>2015-01-09 15:44:18 +0100
commit15a0fbbc8e0d4c135b069c34258fbaebad471dd7 (patch)
tree1463f560ba324693083975b020489e0b2943b680 /drivers
parentses: close potential registration race (diff)
downloadlinux-15a0fbbc8e0d4c135b069c34258fbaebad471dd7.tar.xz
linux-15a0fbbc8e0d4c135b069c34258fbaebad471dd7.zip
ses: generate KOBJ_CHANGE on enclosure attach
In support of a /dev/disk/by-slot populated with data from the enclosure and ses modules udev needs notification when the new interface files/links are available. Otherwise, any udev rules specified for the disk cannot assume that the enclosure topology has settled. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Song Liu <songliubraving@fb.com> Reviewed-by: Jens Axboe <axboe@fb.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ses.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 7dd9cf558380..6662b0ca6cfd 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -349,7 +349,8 @@ static int ses_enclosure_find_by_addr(struct enclosure_device *edev,
if (scomp->addr != efd->addr)
continue;
- enclosure_add_device(edev, i, efd->dev);
+ if (enclosure_add_device(edev, i, efd->dev) == 0)
+ kobject_uevent(&efd->dev->kobj, KOBJ_CHANGE);
return 1;
}
return 0;