Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1263607 > unrolled thread
| Started by | Andrew Duggan <aduggan@synaptics.com> |
|---|---|
| First post | 2015-11-06 00:40 +0100 |
| Last post | 2015-11-10 10:20 +0100 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound Andrew Duggan <aduggan@synaptics.com> - 2015-11-06 00:40 +0100
Re: [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound Linus Walleij <linus.walleij@linaro.org> - 2015-11-09 14:00 +0100
Re: [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-11-10 00:20 +0100
Re: [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound Benjamin Tissoires <benjamin.tissoires@gmail.com> - 2015-11-10 10:20 +0100
| From | Andrew Duggan <aduggan@synaptics.com> |
|---|---|
| Date | 2015-11-06 00:40 +0100 |
| Subject | [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound |
| Message-ID | <qrCin-57c-31@gated-at.bofh.it> |
From: Benjamin Tissoires <benjamin.tissoires@redhat.com> If the device has been registered but is not populated, we should not process any incoming interrupt. Make sure the pointers we are following are valid. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew Duggan <aduggan@synaptics.com> --- drivers/input/rmi4/rmi_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index 2fdc7e8..fe5f2f9 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -279,6 +279,9 @@ int rmi_process_interrupt_requests(struct rmi_device *rmi_dev) struct rmi_function *entry; int error; + if (!data || !data->f01_container || !data->irq_status) + return 0; + error = rmi_read_block(rmi_dev, data->f01_container->fd.data_base_addr + 1, data->irq_status, data->num_of_irq_regs); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-11-09 14:00 +0100 |
| Subject | Re: [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound |
| Message-ID | <qsUdb-6vT-1@gated-at.bofh.it> |
| In reply to | #1263607 |
On Fri, Nov 6, 2015 at 12:37 AM, Andrew Duggan <aduggan@synaptics.com> wrote: > From: Benjamin Tissoires <benjamin.tissoires@redhat.com> > > If the device has been registered but is not populated, we should not > process any incoming interrupt. > Make sure the pointers we are following are valid. > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> > Tested-by: Andrew Duggan <aduggan@synaptics.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> This should just be squashed into the offending commit. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2015-11-10 00:20 +0100 |
| Subject | Re: [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound |
| Message-ID | <qt3Tc-5oe-3@gated-at.bofh.it> |
| In reply to | #1263607 |
On Thu, Nov 05, 2015 at 03:37:25PM -0800, Andrew Duggan wrote: > From: Benjamin Tissoires <benjamin.tissoires@redhat.com> > > If the device has been registered but is not populated, we should not > process any incoming interrupt. > Make sure the pointers we are following are valid. Why are the interrupts enabled when device is not ready? > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> > Tested-by: Andrew Duggan <aduggan@synaptics.com> > --- > drivers/input/rmi4/rmi_driver.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c > index 2fdc7e8..fe5f2f9 100644 > --- a/drivers/input/rmi4/rmi_driver.c > +++ b/drivers/input/rmi4/rmi_driver.c > @@ -279,6 +279,9 @@ int rmi_process_interrupt_requests(struct rmi_device *rmi_dev) > struct rmi_function *entry; > int error; > > + if (!data || !data->f01_container || !data->irq_status) > + return 0; > + > error = rmi_read_block(rmi_dev, > data->f01_container->fd.data_base_addr + 1, > data->irq_status, data->num_of_irq_regs); > -- > 2.1.4 > -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Benjamin Tissoires <benjamin.tissoires@gmail.com> |
|---|---|
| Date | 2015-11-10 10:20 +0100 |
| Subject | Re: [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound |
| Message-ID | <qtdfP-39x-7@gated-at.bofh.it> |
| In reply to | #1266072 |
On Tue, Nov 10, 2015 at 12:16 AM, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote: > On Thu, Nov 05, 2015 at 03:37:25PM -0800, Andrew Duggan wrote: >> From: Benjamin Tissoires <benjamin.tissoires@redhat.com> >> >> If the device has been registered but is not populated, we should not >> process any incoming interrupt. >> Make sure the pointers we are following are valid. > > Why are the interrupts enabled when device is not ready? Hmm... Yes, maybe this should have been tackled at the smbus level. Sorting this out might also help in the various suspend/resume bugs we are experiencing. Cheers, Benjamin > >> >> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> >> Tested-by: Andrew Duggan <aduggan@synaptics.com> >> --- >> drivers/input/rmi4/rmi_driver.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c >> index 2fdc7e8..fe5f2f9 100644 >> --- a/drivers/input/rmi4/rmi_driver.c >> +++ b/drivers/input/rmi4/rmi_driver.c >> @@ -279,6 +279,9 @@ int rmi_process_interrupt_requests(struct rmi_device *rmi_dev) >> struct rmi_function *entry; >> int error; >> >> + if (!data || !data->f01_container || !data->irq_status) >> + return 0; >> + >> error = rmi_read_block(rmi_dev, >> data->f01_container->fd.data_base_addr + 1, >> data->irq_status, data->num_of_irq_regs); >> -- >> 2.1.4 >> > > -- > Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web