Manfred Spraul wrote:
Ayaz Abdulla wrote:

    if (nv_alloc_rx(dev)) {
-        spin_lock(&np->lock);
+        spin_lock_irqsave(&np->lock, flags);
Tiny point:
there is not need for irqsave(): we are in timer context, that guarantees:
- bottom half disabled
- interrupts enabled

Just use spin_lock_irq() and spin_unlock_irq().


I was assuming this function is called either from within irq handler or timer expiry and thats why I used "irqsave". But if interrupts are disabled in timer context, I can change the code.

@@ -2882,11 +2900,12 @@
    writel(mask, base + NvRegIrqMask);
    pci_push(base);
[within nv_do_nic_poll(): reenable the interrupts that were disabled to prevent a livelock within the irq handler]


That is what I am doing. The mask field is set to the appropriate interrupts that we want to re-enable.

I still don't understand how this works for the msi-x case:
nv_nic_irq_tx writes NVREG_IRQ_TX_ALL to NvRegIrqMask to disable the tx interrupts. nv_do_nic_poll does exactly the same thing, and this should reenable them. Is that correct?
If yes, please add a comment.

That is how the msi-x interrupt masking works. It is XOR logic. I can add a comment.


--
   Manfred
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to