PERFORCE change 133996 for review

Rafal Jaworowski raj at FreeBSD.org
Thu Jan 24 02:55:46 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133996

Change 133996 by raj at 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 at semihalf.com>
+ * Copyright (C) 2006-2008 Semihalf
  * All rights reserved.
  *
+ * Written by: Piotr Kruszynski <ppk at 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;
 		}
 


More information about the p4-projects mailing list