Date: Sat, 19 Sep 2009 13:00:23 GMT From: Bruce Cran <bruce.cran@gmail.com> To: freebsd-net@FreeBSD.org Subject: Re: kern/64556: [sis] if_sis short cable fix problems with NetGear FA311's Message-ID: <200909191300.n8JD0NsX062669@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/64556; it has been noted by GNATS. From: Bruce Cran <bruce.cran@gmail.com> To: bug-followup@FreeBSD.org, tom@hur.st Cc: Subject: Re: kern/64556: [sis] if_sis short cable fix problems with NetGear FA311's Date: Sat, 19 Sep 2009 13:52:43 +0100 --0016e6dd98d78297b20473edb9f4 Content-Type: text/plain; charset=ISO-8859-1 The problem is caused when the CPU can't keep up with packet processing, causing an RX overrun to occur. On a 1.2GHz AthlonXP based system I can get errors to occur if for example I run a grep over /usr/src - with a 500MHz CPU I guess it would have trouble keeping up at all. With both ttcp's running, 50% of the CPU time is taken up processing interrupts from the card. Not resetting the card when an error occurs seems to have no detrimental effect, so I've put together a patch which just logs the error in the if_ierrors interface field. The patch also reduces the delay when setting the short cable fix from 100ms to 100us. -- Bruce Cran --0016e6dd98d78297b20473edb9f4 Content-Type: text/plain; charset=US-ASCII; name="if_sis.c.diff.txt" Content-Disposition: attachment; filename="if_sis.c.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fzscswvn0 LS0tIHN5cy9kZXYvc2lzL2lmX3Npcy5jLm9yaWcJMjAwOS0wOS0xOCAyMDozMTo1My4wMDAwMDAw MDAgKzAxMDAKKysrIHN5cy9kZXYvc2lzL2lmX3Npcy5jCTIwMDktMDktMTkgMDI6NDI6NTcuMDAw MDAwMDAwICswMTAwCkBAIC0xNDgzLDE1ICsxNDgzLDYgQEAKIAlyZXR1cm4gKHJ4X25wa3RzKTsK IH0KIAotc3RhdGljIHZvaWQKLXNpc19yeGVvYyhzdHJ1Y3Qgc2lzX3NvZnRjICpzYykKLXsKLQot CVNJU19MT0NLX0FTU0VSVChzYyk7Ci0Jc2lzX3J4ZW9mKHN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mY7CiAJCWlmICgocmVnICYgMHgw MDgwKSA9PSAwIHx8IChyZWcgPiAweGQ4ICYmIHJlZyA8PSAweGZmKSkgewogCQkJZGV2aWNlX3By aW50ZihzYy0+c2lzX2RldiwK --0016e6dd98d78297b20473edb9f4--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909191300.n8JD0NsX062669>