Date: Thu, 24 Jan 2008 10:55:45 GMT From: Rafal Jaworowski <raj@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133996 for review Message-ID: <200801241055.m0OAtj9f026662@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133996 Change 133996 by raj@raj_mimi on 2008/01/24 10:55:33 TSEC: Handle erroneous RX frames properly. This fix allows to properly recycle BDs when a malformed frame arrives (overrun, long, short, CRC errors etc.); prior to this an endless condition occured leading to a TSEC hang (could be mostly observed on 1Gbps links with not CAT6 cables, or otherwise flaky connections). Also update (c). Affected files ... .. //depot/projects/e500/sys/dev/tsec/if_tsec.c#5 edit Differences ... ==== //depot/projects/e500/sys/dev/tsec/if_tsec.c#5 (text+ko) ==== @@ -1,7 +1,9 @@ /*- - * Copyright (C) 2006, 2007 Semihalf, Piotr Kruszynski <ppk@semihalf.com> + * Copyright (C) 2006-2008 Semihalf * All rights reserved. * + * Written by: Piotr Kruszynski <ppk@semihalf.com> + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -1363,8 +1365,10 @@ if (flags & (TSEC_RXBD_LG | TSEC_RXBD_SH | TSEC_RXBD_NO | TSEC_RXBD_CR | TSEC_RXBD_OV | TSEC_RXBD_TR)) { - device_printf(dev, "Unexpected flags in RX frame: " - "0x%x\n", flags); + + rx_desc->length = 0; + rx_desc->flags = (rx_desc->flags & ~TSEC_RXBD_ZEROONINIT) | + TSEC_RXBD_E | TSEC_RXBD_I; continue; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801241055.m0OAtj9f026662>