From: Cornelia Huck <cohuck@redhat.com>
To: Vineeth Vijayan <vneethv@linux.ibm.com>
Cc: oberpar@linux.ibm.com, linux-s390@vger.kernel.org,
farman@linux.ibm.com, fiuczy@linux.ibm.com
Subject: Re: [RFC 1/1] s390/cio: Remove uevent-suppress from css driver
Date: Tue, 24 Nov 2020 14:02:20 +0100 [thread overview]
Message-ID: <20201124140220.77c65539.cohuck@redhat.com> (raw)
In-Reply-To: <20201124093407.23189-2-vneethv@linux.ibm.com>
On Tue, 24 Nov 2020 10:34:07 +0100
Vineeth Vijayan <vneethv@linux.ibm.com> wrote:
> 'commit fa1a8c23eb7d ("s390: cio: Delay uevents for subchannels")'
> introduced the uevent suppression of subchannels. Even though there
> are reasons for wanting to delay the uevent, it also introduces
> problems. i.e On some platforms (qemu), where the udev-rule for the
> subchannel needs to do driver_override to bind the vfio-ccw driver
> instead of io_subchannel driver, but the suppressed uevent is
> generated only when the device is found on the subchannel. By the
> time it generates the uevent, it makes it difficult for the vfio-ccw
> udev-rules to work.
> This patch removes the uevent-suppress logic from the css driver.
> The ADD uevent will be generated when there is a valid subchannel
> and not after binding the valid device. The uevent generates while
> device_add() during css_sch_device_register() function.
>
> Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
> ---
> drivers/s390/cio/chsc_sch.c | 5 -----
> drivers/s390/cio/css.c | 19 -------------------
> drivers/s390/cio/device.c | 18 ------------------
> drivers/s390/cio/eadm_sch.c | 5 -----
> drivers/s390/cio/vfio_ccw_drv.c | 5 -----
> 5 files changed, 52 deletions(-)
While I really like that diffstat, I hope that this is actually safe
for userspace programs processing uevents. Previously, we generated the
ADD uevent only when all parts were setup and ready to use (including a
child ccw_device, for example). Now, the ADD uevent is created earlier,
before drivers have done their setup. Do existing udev rules still work
as expected?
(...)
> @@ -1055,16 +1047,6 @@ static int io_subchannel_probe(struct subchannel *sch)
> "attributes for subchannel "
> "0.%x.%04x (rc=%d)\n",
> sch->schid.ssid, sch->schid.sch_no, rc);
> - /*
> - * The console subchannel already has an associated ccw_device.
> - * Throw the delayed uevent for the subchannel, register
> - * the ccw_device and exit.
I would keep the comment that we already have a ccw_device here. I.e.
/*
* The console subchannel already has an associated ccw_device.
* Register it and exit.
*/
> - */
> - if (dev_get_uevent_suppress(&sch->dev)) {
> - /* should always be the case for the console */
> - dev_set_uevent_suppress(&sch->dev, 0);
> - kobject_uevent(&sch->dev.kobj, KOBJ_ADD);
> - }
> cdev = sch_get_cdev(sch);
> rc = ccw_device_add(cdev);
> if (rc) {
(...)
next prev parent reply other threads:[~2020-11-24 13:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 9:34 [RFC 0/1] Remove uevent suppression logic from css driver Vineeth Vijayan
2020-11-24 9:34 ` [RFC 1/1] s390/cio: Remove uevent-suppress " Vineeth Vijayan
2020-11-24 13:02 ` Cornelia Huck [this message]
2020-11-25 9:40 ` Vineeth Vijayan
2020-12-07 8:09 ` Vineeth Vijayan
2020-12-08 17:30 ` Cornelia Huck
2020-12-09 12:52 ` Halil Pasic
2020-12-15 18:13 ` Cornelia Huck
2020-12-19 6:33 ` Halil Pasic
2020-12-21 15:46 ` Cornelia Huck
2020-12-21 16:51 ` Halil Pasic
2021-01-14 13:03 ` Boris Fiuczynski
2021-01-19 11:47 ` Halil Pasic
2021-01-19 11:59 ` Cornelia Huck
2021-01-19 12:18 ` Vineeth Vijayan
[not found] ` <89146a87-371a-f148-057b-d3b7ce0cc21e@linux.ibm.com>
[not found] ` <20201216130710.5aa6a933.cohuck@redhat.com>
2020-12-19 7:20 ` Halil Pasic
2020-12-21 15:52 ` Cornelia Huck
2020-12-21 17:23 ` Halil Pasic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201124140220.77c65539.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=farman@linux.ibm.com \
--cc=fiuczy@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=oberpar@linux.ibm.com \
--cc=vneethv@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox