From mboxrd@z Thu Jan 1 00:00:00 1970 From: Octavian Purdila Subject: Re: [PATCH v3 3/3] gpio: add support for the Diolan DLN-2 USB GPIO driver Date: Tue, 9 Sep 2014 13:27:01 +0300 Message-ID: References: <1409930279-1382-1-git-send-email-octavian.purdila@intel.com> <1409930279-1382-4-git-send-email-octavian.purdila@intel.com> <20140905153835.GC13242@localhost> <20140909093606.GB2974@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20140909093606.GB2974@localhost> Sender: linux-kernel-owner@vger.kernel.org To: Johan Hovold Cc: Linus Walleij , Greg Kroah-Hartman , Alexandre Courbot , wsa@the-dreams.de, Samuel Ortiz , Lee Jones , Arnd Bergmann , Daniel Baluta , Laurentiu Palcu , linux-usb@vger.kernel.org, lkml , linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org List-Id: linux-gpio@vger.kernel.org On Tue, Sep 9, 2014 at 12:36 PM, Johan Hovold wrote: > On Fri, Sep 05, 2014 at 07:04:51PM +0300, Octavian Purdila wrote: >> On Fri, Sep 5, 2014 at 6:38 PM, Johan Hovold wrote: >> > On Fri, Sep 05, 2014 at 06:17:59PM +0300, Octavian Purdila wrote: > >> > In general, how well have these patches been tested with disconnect >> > events? At least gpiolib is known to blow up (sooner or later) when a >> > gpiochip is removed when having requested gpios. >> >> I do disconnect tests regularly. Since switching to the new irq >> interface the following patch is needed: >> >> https://lkml.org/lkml/2014/9/5/408 >> >> With it and the current patch sets things seems to work well. > > I see no comments from Linus W on that patch? > > And I can confirm that things do blow up. > > After disconnecting while having a gpio exported, I get the familiar > OOPS below when reconnecting the device. > > This has also been reported here: > > https://lkml.org/lkml/2014/8/4/303 > Hi Johan, I did not test with gpio exported via sysfs, only with an i2c driver that requests a gpio irq. That works because when the i2c bus gets removed the i2c device gets removed as well and that drops the requested irq which frees the gpio. I do see your point with exporting a gpio via sysfs. So I will drop the remove retry from the patch. However, I think the above mentioned patch is worth merging as it is simple enough and it fixes a couple of issues in the gpio remove path. But I guess we can discuss this in that thread, when Linus W gets to it. And thanks a lot for spending so much time on reviewing these patches.