Re: [PATCH 357] Mac89x0 Ethernet (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I found the original comments from Jeff Garzik...
>
> So I'd be grateful if anyone could fix (and test :-) the issue with
> net_send_packet().

Fixing this I could attempt (there's ample precedent in other net
drivers), testing would be left to someone else. Jeff basically said it
like it needs to be done: stop the queue when there's no more room on the
card, and restart it from the transmit complete interrupt.

The following patch should suffice (that's how its done in cs89x0.c as
well, see lengthy explanation there). If the queue is always stopped
before transmit, there is no way a second packet can normally come in
before the transmit complete interrupt wakes the queue (which it does
anyway).

	Michael

--- drivers/net/mac89x0.c.ms.org	2006-06-18 19:08:40.000000000 +0200
+++ drivers/net/mac89x0.c	2006-11-22 10:56:38.000000000 +0100
@@ -387,6 +387,7 @@
 	   ask the chip to start transmitting before the
 	   whole packet has been completely uploaded. */
 	local_irq_save(flags);
+	netif_stop_queue(dev);

 	/* initiate a transmit sequence */
 	writereg(dev, PP_TxCMD, lp->send_cmd);
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux