Re: [PATCH] HID: logitech-dj: issue udev change event on device connection
From: Peter Hutterer
Date: Fri Mar 20 2020 - 20:29:52 EST
On Fri, Mar 20, 2020 at 07:15:38PM -0500, Mario Limonciello wrote:
> On Fri, Mar 20, 2020, 19:06 Jiri Kosina <jikos@xxxxxxxxxx> wrote:
>
> > On Thu, 19 Mar 2020, Peter Hutterer wrote:
> >
> > > > Then we would need to support that attribute forever. IMHO the best
> > > > option is to just make a uname call and check the kernel version, with
> > > > the code marked to be removed in the future when kernels older then
> > > > $version are no longer something we want to support.
> >
> > Oh, this doesn't work *at all* with distro kernels backporting everything
> > that passess by to kernels with major versions looking years old.
> >
> > I (as one of the "guilty ones" with my distro hat on) am not at all saying
> > it's perfect, but that's the way it is.
> >
> > --
> > Jiri Kosina
> > SUSE Lab
> >
>
> Another "solution" is to use module versioning bump as part of this patch.
> At least when distros backport then you can look at module versioning to
> tell the behavior of the driver.
tbh, if there is no good solution in the kernel to communicate this,
userspace can make do without knowing about it ahead of time.
long-term you can just assume you'll get the change event and handle the
error case just as you'd have to do now. Sure it'd be nice to know ahead of
time but it's not the only thing we don't know until we get the first event.
Cheers,
Peter