* [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends
@ 2017-08-25 7:26 Kurt Van Dijck
2017-08-25 14:00 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Kurt Van Dijck @ 2017-08-25 7:26 UTC (permalink / raw)
To: buildroot
The eibd usb backend implements clock_gettime, and calls pth_int_time from there.
pth_int_time will result in a call to clock_gettime, resulting in an endless
recursion.
The problem is that the USB backend shouldn't overrule clock_gettime in the first place.
Since the function does semantically and syntactically the same, the function is
place in comment alltogether.
Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
---
package/bcusdk/0002-linux-usbfs-clock-gettime.patch | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 package/bcusdk/0002-linux-usbfs-clock-gettime.patch
diff --git a/package/bcusdk/0002-linux-usbfs-clock-gettime.patch b/package/bcusdk/0002-linux-usbfs-clock-gettime.patch
new file mode 100644
index 0000000..6d024c6
--- /dev/null
+++ b/package/bcusdk/0002-linux-usbfs-clock-gettime.patch
@@ -0,0 +1,16 @@
+--- a/eibd/usb/linux_usbfs.c 2017-07-29 22:24:15.890087674 +0200
++++ b/eibd/usb/linux_usbfs.c 2017-07-29 22:20:11.830085100 +0200
+@@ -52,11 +52,13 @@
+ return 0;
+ }
+
++/* don't redefine clock_gettime, use the system version
+ int clock_gettime(clockid_t clk_id, struct timespec *tp)
+ {
+ pth_int_time (tp);
+ return 0;
+ }
++*/
+
+ /* sysfs vs usbfs:
+ * opening a usbfs node causes the device to be resumed, so we attempt to
--
1.8.5.rc3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends
2017-08-25 7:26 [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends Kurt Van Dijck
@ 2017-08-25 14:00 ` Thomas Petazzoni
2017-08-25 19:36 ` Kurt Van Dijck
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-25 14:00 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 25 Aug 2017 09:26:39 +0200, Kurt Van Dijck wrote:
> diff --git a/package/bcusdk/0002-linux-usbfs-clock-gettime.patch b/package/bcusdk/0002-linux-usbfs-clock-gettime.patch
> new file mode 100644
> index 0000000..6d024c6
> --- /dev/null
> +++ b/package/bcusdk/0002-linux-usbfs-clock-gettime.patch
All patches need to have a description + Signed-off-by. Also, since the
upstream project is using a Git repository, please use Git formatted
patches (i.e patches generated by git format-patch -N).
In addition, rather than commenting the code, just remove it entirely,
it makes the change more obvious.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends
2017-08-25 14:00 ` Thomas Petazzoni
@ 2017-08-25 19:36 ` Kurt Van Dijck
2017-08-25 20:16 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Kurt Van Dijck @ 2017-08-25 19:36 UTC (permalink / raw)
To: buildroot
--- Original message ---
> Date: Fri, 25 Aug 2017 16:00:04 +0200
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> To: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH] bcusdk: fix endless recursion when opening
> USB backends
>
> Hello,
>
> On Fri, 25 Aug 2017 09:26:39 +0200, Kurt Van Dijck wrote:
>
> > diff --git a/package/bcusdk/0002-linux-usbfs-clock-gettime.patch b/package/bcusdk/0002-linux-usbfs-clock-gettime.patch
> > new file mode 100644
> > index 0000000..6d024c6
> > --- /dev/null
> > +++ b/package/bcusdk/0002-linux-usbfs-clock-gettime.patch
>
> All patches need to have a description + Signed-off-by. Also, since the
ok. I'll redo this patch.
> upstream project is using a Git repository, please use Git formatted
> patches (i.e patches generated by git format-patch -N).
I'm not sure what you mean with 'upstream project' here? Busybox or bcusdk?
bcusdk isn't in git AFAIK.
>
> In addition, rather than commenting the code, just remove it entirely,
> it makes the change more obvious.
ok,
Kind regards,
Kurt
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends
2017-08-25 19:36 ` Kurt Van Dijck
@ 2017-08-25 20:16 ` Thomas Petazzoni
2017-08-25 20:47 ` Kurt Van Dijck
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-25 20:16 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 25 Aug 2017 21:36:52 +0200, Kurt Van Dijck wrote:
> > upstream project is using a Git repository, please use Git formatted
> > patches (i.e patches generated by git format-patch -N).
>
> I'm not sure what you mean with 'upstream project' here? Busybox or bcusdk?
bcusdk of course.
> bcusdk isn't in git AFAIK.
https://sourceforge.net/p/bcusdk/code/ci/master/tree/ is a Git
repository.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends
2017-08-25 20:16 ` Thomas Petazzoni
@ 2017-08-25 20:47 ` Kurt Van Dijck
2017-08-25 20:58 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Kurt Van Dijck @ 2017-08-25 20:47 UTC (permalink / raw)
To: buildroot
--- Original message ---
> Date: Fri, 25 Aug 2017 22:16:17 +0200
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> To: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH] bcusdk: fix endless recursion when opening
> USB backends
> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu)
>
> Hello,
>
> On Fri, 25 Aug 2017 21:36:52 +0200, Kurt Van Dijck wrote:
>
> > > upstream project is using a Git repository, please use Git formatted
> > > patches (i.e patches generated by git format-patch -N).
> >
> > I'm not sure what you mean with 'upstream project' here? Busybox or bcusdk?
>
> bcusdk of course.
>
> > bcusdk isn't in git AFAIK.
>
> https://sourceforge.net/p/bcusdk/code/ci/master/tree/ is a Git
> repository.
One day, I'll switch to https://github.com/knxd/knxd anyway.
Kurt
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends
2017-08-25 20:47 ` Kurt Van Dijck
@ 2017-08-25 20:58 ` Thomas Petazzoni
2017-08-25 21:33 ` Kurt Van Dijck
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-25 20:58 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 25 Aug 2017 22:47:57 +0200, Kurt Van Dijck wrote:
> > https://sourceforge.net/p/bcusdk/code/ci/master/tree/ is a Git
> > repository.
>
> One day, I'll switch to https://github.com/knxd/knxd anyway.
Interesting. I see it's a fork of bcusdk. So perhaps we could drop the
bcusdk package at some point, and replace it with a knxd package.
Indeed, knxd seems to be actively maintained, which isn't the case of
bcusdk.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends
2017-08-25 20:58 ` Thomas Petazzoni
@ 2017-08-25 21:33 ` Kurt Van Dijck
0 siblings, 0 replies; 7+ messages in thread
From: Kurt Van Dijck @ 2017-08-25 21:33 UTC (permalink / raw)
To: buildroot
> Hello,
>
> On Fri, 25 Aug 2017 22:47:57 +0200, Kurt Van Dijck wrote:
>
> > > https://sourceforge.net/p/bcusdk/code/ci/master/tree/ is a Git
> > > repository.
> >
> > One day, I'll switch to https://github.com/knxd/knxd anyway.
>
> Interesting. I see it's a fork of bcusdk. So perhaps we could drop the
> bcusdk package at some point, and replace it with a knxd package.
> Indeed, knxd seems to be actively maintained, which isn't the case of
> bcusdk.
Yes. but bcusdk does it's job at the moment at my place, and knxd does not.
Kurt
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-08-25 21:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 7:26 [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends Kurt Van Dijck
2017-08-25 14:00 ` Thomas Petazzoni
2017-08-25 19:36 ` Kurt Van Dijck
2017-08-25 20:16 ` Thomas Petazzoni
2017-08-25 20:47 ` Kurt Van Dijck
2017-08-25 20:58 ` Thomas Petazzoni
2017-08-25 21:33 ` Kurt Van Dijck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.