Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1563252 > unrolled thread
| Started by | Larry Finger <Larry.Finger@lwfinger.net> |
|---|---|
| First post | 2017-01-20 03:50 +0100 |
| Last post | 2017-01-20 17:40 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] rtlwifi: rtl8192x: Enabling and disabling hardware interrupts after enabling local irq flags Larry Finger <Larry.Finger@lwfinger.net> - 2017-01-20 03:50 +0100
Re: Re: [PATCH] rtlwifi: rtl8192x: Enabling and disabling hardware interrupts after enabling local irq flags "Lino Sanfilippo" <LinoSanfilippo@gmx.de> - 2017-01-20 12:30 +0100
Re: [PATCH] rtlwifi: rtl8192x: Enabling and disabling hardware interrupts after enabling local irq flags Larry Finger <Larry.Finger@lwfinger.net> - 2017-01-20 17:40 +0100
| From | Larry Finger <Larry.Finger@lwfinger.net> |
|---|---|
| Date | 2017-01-20 03:50 +0100 |
| Subject | Re: [PATCH] rtlwifi: rtl8192x: Enabling and disabling hardware interrupts after enabling local irq flags |
| Message-ID | <t1xr4-1mW-17@gated-at.bofh.it> |
On 01/19/2017 04:14 AM, Bharat Kumar Gogada wrote: > -Realtek 8192CE chipset maintains local irq flags after enabling/disabling > hardware interrupts. > -Hardware interrupts are enabled before enabling the local irq > flags(these flags are being checked in interrupt handler), > leading to race condition on some RP, where the irq line between > bridge and GIC goes high at ASSERT_INTx and goes low only > at DEASSERT_INTx. In this kind of RP by the time ASSERT_INTx is seen > irq_enable flag is still set to false, resulting in continuous > interrupts seen by CPU as DEASSERT_INTx cannot be sent since > flag is still false and making CPU stall. > -Changing the sequence of setting these irq flags. > > Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com> > --- This patch should be enhanced with the smb_xx() calls as suggested by by Lino. The subject should be changed. I would suggest something like "rtlwifi: rtl8192ce: Prevent race condition when enabling interrupts", as it explains the condition you are preventing. The other PCI drivers also have the same problem. Do you want to prepare the patches, or should I do it? Larry
[toc] | [next] | [standalone]
| From | "Lino Sanfilippo" <LinoSanfilippo@gmx.de> |
|---|---|
| Date | 2017-01-20 12:30 +0100 |
| Message-ID | <t1Fyh-6Cb-9@gated-at.bofh.it> |
| In reply to | #1563252 |
Hi,
>
>
> This patch should be enhanced with the smb_xx() calls as suggested by by Lino.
>
If you do this, please place the smp_rmb() before the if condition in the irq
handler like
smp_rmb();
if (rtlpci->irq_enabled == 0) {
return ret;
as I think that the suggestion I made before was not correct (sorry for the
confusion).
Regards,
Lino
[toc] | [prev] | [next] | [standalone]
| From | Larry Finger <Larry.Finger@lwfinger.net> |
|---|---|
| Date | 2017-01-20 17:40 +0100 |
| Message-ID | <t1Koi-19S-31@gated-at.bofh.it> |
| In reply to | #1563252 |
On 01/20/2017 08:14 AM, Bharat Kumar Gogada wrote: > > On 01/19/2017 04:14 AM, Bharat Kumar Gogada wrote: >>> -Realtek 8192CE chipset maintains local irq flags after enabling/disabling >>> hardware interrupts. >>> -Hardware interrupts are enabled before enabling the local irq >>> flags(these flags are being checked in interrupt handler), >>> leading to race condition on some RP, where the irq line between >>> bridge and GIC goes high at ASSERT_INTx and goes low only >>> at DEASSERT_INTx. In this kind of RP by the time ASSERT_INTx is seen >>> irq_enable flag is still set to false, resulting in continuous >>> interrupts seen by CPU as DEASSERT_INTx cannot be sent since >>> flag is still false and making CPU stall. >>> -Changing the sequence of setting these irq flags. >>> >>> Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com> >>> --- >> >> This patch should be enhanced with the smb_xx() calls as suggested by by Lino. >> >> The subject should be changed. I would suggest something like "rtlwifi: >> rtl8192ce: Prevent race condition when enabling interrupts", as it explains the >> condition you are preventing. >> >> The other PCI drivers also have the same problem. Do you want to prepare the >> patches, or should I do it? >> > Thanks Larry. Please send out the patches adding the above enhancements suggested by Lino. I have prepared a patch fixing all the drivers. By the way, what CPU hardware showed this problem? Larry
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web