Re: [PATCH] r8169: don't call napi_disable if not doing NAPI

2007-10-29 Thread Romano Giannetti

On Fri, 2007-10-26 at 11:33 -0700, Stephen Hemminger wrote:
 Don't call napi_disable if not configured.
 And make sure that any misuse of napi_xxx in future fails
 with a compile error.
 
 Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
 

This fix the problem for me (at least, after 8 suspend/resume cycles). 
Thanks.

Tested-by: Romano Giannetti [EMAIL PROTECTED]

-- 
Sorry for the disclaimer --- ¡I cannot stop it!



--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso 
del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, 
le informamos que cualquier forma de distribución, reproducción o uso de esta 
comunicación y/o de la información contenida en la misma están estrictamente 
prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por 
favor, notifíquelo inmediatamente al remitente contestando a este mensaje y 
proceda a continuación a destruirlo. Gracias por su colaboración.

This communication contains confidential information. It is for the exclusive 
use of the intended addressee. If you are not the intended addressee, please 
note that any form of distribution, copying or use of this communication or the 
information in it is strictly prohibited by law. If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this message. Thank you for your cooperation. 
-
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


Re: [PATCH] r8169: don't call napi_disable if not doing NAPI

2007-10-28 Thread Romano Giannetti

On Fri, 2007-10-26 at 11:33 -0700, Stephen Hemminger wrote:
 Don't call napi_disable if not configured.
 And make sure that any misuse of napi_xxx in future fails
 with a compile error.

Will test as soon as possible (been without internet in the week end). 
Thanks.

As a bonus, I tried more thing, and I had a signal form lockdep. You can
find it here:

http://www.dea.icai.upcomillas.es/romano/linux/info/2624rc1_5/

patching and compiling now.

Romano 

-- 
Sorry for the disclaimer --- ¡I cannot stop it!



--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso 
del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, 
le informamos que cualquier forma de distribución, reproducción o uso de esta 
comunicación y/o de la información contenida en la misma están estrictamente 
prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por 
favor, notifíquelo inmediatamente al remitente contestando a este mensaje y 
proceda a continuación a destruirlo. Gracias por su colaboración.

This communication contains confidential information. It is for the exclusive 
use of the intended addressee. If you are not the intended addressee, please 
note that any form of distribution, copying or use of this communication or the 
information in it is strictly prohibited by law. If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this message. Thank you for your cooperation. 
-
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


[PATCH] r8169: don't call napi_disable if not doing NAPI

2007-10-26 Thread Stephen Hemminger
Don't call napi_disable if not configured.
And make sure that any misuse of napi_xxx in future fails
with a compile error.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

--- a/drivers/net/r8169.c   2007-10-24 21:38:43.0 -0700
+++ b/drivers/net/r8169.c   2007-10-26 11:27:02.0 -0700
@@ -392,7 +392,9 @@ struct rtl8169_private {
void __iomem *mmio_addr;/* memory map physical address */
struct pci_dev *pci_dev;/* Index of PCI device */
struct net_device *dev;
+#ifdef CONFIG_R8169_NAPI
struct napi_struct napi;
+#endif
spinlock_t lock;/* spin lock flag */
u32 msg_enable;
int chipset;
@@ -2989,13 +2991,16 @@ static void rtl8169_down(struct net_devi
 {
struct rtl8169_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp-mmio_addr;
-   unsigned int poll_locked = 0;
unsigned int intrmask;
 
rtl8169_delete_timer(dev);
 
netif_stop_queue(dev);
 
+#ifdef CONFIG_R8169_NAPI
+   napi_disable(tp-napi);
+#endif
+
 core_down:
spin_lock_irq(tp-lock);
 
@@ -3009,11 +3014,6 @@ core_down:
 
synchronize_irq(dev-irq);
 
-   if (!poll_locked) {
-   napi_disable(tp-napi);
-   poll_locked++;
-   }
-
/* Give a racing hard_start_xmit a few cycles to complete. */
synchronize_sched();  /* FIXME: should this be synchronize_irq()? */
 
-
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