From: Ha, Tristram on
David Miller wrote:
> From: "Ha, Tristram" <Tristram.Ha(a)Micrel.Com>
> Date: Thu, 3 Dec 2009 13:30:03 -0800
>
>> From: Tristram Ha <Tristram.Ha(a)micrel.com>
>>
>> The Micrel KSZ8851 SNL Ethernet chip is used in the OMAP Beagle Zippy
combo board. Requesting
>> interrupt using level triggering flag hangs the system because the
interrupt handling routine
>> is called continually. Using edge triggering avoids this problem.
As a result, disabling
>> interrupt may not be necessary.
>>
>> Signed-off-by: Tristram Ha <Tristram.Ha(a)micrel.com>
>
> You say "may not be necessary", do you actually know for sure?
>
> This seems questionable, if the interrupt disabling was there for a
reason what has changed to
> make it such that it is no longer necessary?

I have tested the KSZ8851 SNL driver using the OMAP Beagle Zippy combo
board, developed by Tin Can Tools. Ben Dooks, who implemented the
original driver, has his own KSZ8851 SNL evaluation board, but he
probably did not run any performance test on the driver. I did sent him
the changes before so that he can verify on his board, but I have not
received any response.

So I really do not know if interrupt disabling is necessary or not. But
from my understanding of the SPI network driver model, it is almost
required the interrupt be edge triggered, as the hardware interrupt
cannot be disabled inside the actual interrupt handling routine. So if
the interrupt is level triggered, the interrupt routine will be called
continually, and there is no chance for the workqueue to disable the
interrupt. As the interrupt is edge triggered, I do not think the
interrupt needs to be disabled.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Ha, Tristram on
Ha, Tristram wrote:
> David Miller wrote:
>>
>> You say "may not be necessary", do you actually know for sure?
>>
>> This seems questionable, if the interrupt disabling was there for a
>> reason what has changed to make it such that it is no longer
necessary?
>
> I have tested the KSZ8851 SNL driver using the OMAP Beagle Zippy combo
board, developed by Tin
> Can Tools. Ben Dooks, who implemented the original driver, has his
own KSZ8851 SNL evaluation
> board, but he probably did not run any performance test on the driver.
I did sent him the
> changes before so that he can verify on his board, but I have not
received any response.
>
> So I really do not know if interrupt disabling is necessary or not.
But from my understanding
> of the SPI network driver model, it is almost required the interrupt
be edge triggered, as the
> hardware interrupt cannot be disabled inside the actual interrupt
handling routine. So if the
> interrupt is level triggered, the interrupt routine will be called
continually, and there is no
> chance for the workqueue to disable the interrupt. As the interrupt
is edge triggered, I do not
> think the interrupt needs to be disabled.

The "[PATCH 2.6.33] net: Fix ks8851 snl receive problem" I just
submitted turns off hardware interrupt during interrupt handling. That
makes the disable_irq() call really unnecessary when the interrupt is
edge-triggered. The code also works when the interrupt is
level-triggered under Beagle Zippy combo board, but theoretically the
disable_irq() is required when the interrupt is level-triggered. When I
first worked on the ks8851 driver I was using Linux 2.6.22, and the
level-triggered interrupt code did not work. That is why I changed the
code to edge-triggered.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/