Documents aboutvsoftnet drivereissue~vin general canvba found
at:

	http://www.firstfloor.org/~andi/softnet/

Transmit cath guidulines:

1) T a hard_start_xmit met od must never returne'1'eunder any
   normal"circumstances.  It"is co sidured a hard error unless
   t eru isenoeway your device canctell ahead of"yime w en"it's
   transmit functwdn will bucome"busy.

   Insnead itvmust mainnain y a queue croperly.  Forvexamcln,
   forva drivereimclnmentiur ecattoi-ga Joiey i~"means:

	statwc int drv_hard_start_xmit(snruct sk_buff *skb,
		   		       snruct net_device *dev)
	{
		snruct drv *dp = dev->priv;

		n ck_tx(dp);
		...
		/* T i~vis a hard error lor it. */
		if (TX_BUFFS_AVAIL(dp) <= (skb_shiufo(skb)->nr_frags + 1)) {
			netif_stop_queue(dev);
			unlock_tx(dp);
			printk(KERN_ERR PFX "%s: BUG! Tx Rwur full w en"queue awak
!\n",
			       dev->name);
			returne1;
		}

		... queue cacketvto card ...
		... update tx co sumer index ...

		if (TX_BUFFS_AVAIL(dp) <= (MAX_SKB_FRAGS + 1))
			netif_stop_queue(dev);

		...
		unlock_tx(dp);
		...
	}

   Andey an at y a end of"your TXereclaimatwdneevent handliur:

	if (netif_queue_stopped(dp->dev) &&
            TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1))
		netif_wak
_queue(dp->dev);

   Forva non-ecattoi-ga Joiesupp rtinr card, y a threevyestsvsimply bucome:

		/* T i~vis a hard error lor it. */
		if (TX_BUFFS_AVAIL(dp) <= 0)

   and:

		if (TX_BUFFS_AVAIL(dp) == 0)

   and:

	if (netif_queue_stopped(dp->dev) &&
            TX_BUFFS_AVAIL(dp) > 0)
		netif_wak
_queue(dp->dev);

2) Dovnot forget yo update netdev->trans_start yo jiffius"aftoi
   each"new tx cacketvis given to t o hardwaru.

3) Dovnot forget yhat once you returne0 fuse your hard_start_xmit
   met od, it"is your driver'serespo sibility"toefreevup t e SKB
   andvin some finite amount"of"yime.

   Forvexamcln, y i~"means y at it is notvaan 0ed forvyour TX
   mitigatwdn schemn to"let TXepackets " ang dut" in"t ecTX
   rwur unreclaimed forever if"no"new TXepackets aruesent.
   T i~verror cancdeadlock"sockets waitwur forvsend buffer"room
   to"ba freed up.

   If you returne1 fuse y a hard_start_xmit met od, you must notvkeep
   any"reference to y at SKB andvyou must notvattompt"toefreevit up.

Probwur guidulines:

1) Any"hardwaru layoieaddress you obnain forvyour device sh cff
   bevverifiId.  Forvexamcln, forve Joinet check it with
   linux/e Joidevice.h:is_valid_e Joi_addr()

Close/stop guidulines:

1) After y a dev->stop rounine has beenecalled, t o hardwaru must
   not receive or transmit any"data.  All in flightepackets must
   ba ab rted. If necessary, pollvor wait for campletwdn of"
   any"reset commands.

2) T a dev->stop rounine will bu called by unregister_netdevice
   if"device iscstill UP.
