From owner-freebsd-stable@FreeBSD.ORG Sat Nov 4 02:45:19 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A88BC16A40F for ; Sat, 4 Nov 2006 02:45:19 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC95F43D49 for ; Sat, 4 Nov 2006 02:45:18 +0000 (GMT) (envelope-from jfvogel@gmail.com) Received: by py-out-1112.google.com with SMTP id z59so412858pyg for ; Fri, 03 Nov 2006 18:45:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=GyQAFgqYnGgcMgq/Y5N0sSWM+wTrORBK0fCD2tom2xuguYSjDvmBcwPeAKwlYJwI1M1KK7Lk9lkVYws4/1BjIj+hw0VqhY0HNRhmrUKVRTdF8DyoP8yVmitbyYUcQbs/ZNft2l9SOgJeRGDX2IGHFZo5pGWlju2Q6Q8BjFjVDjM= Received: by 10.35.46.11 with SMTP id y11mr4639882pyj.1162606593651; Fri, 03 Nov 2006 18:16:33 -0800 (PST) Received: by 10.35.118.6 with HTTP; Fri, 3 Nov 2006 18:16:33 -0800 (PST) Message-ID: <2a41acea0611031816n1af99819rdc6b99e9dd2deb7c@mail.gmail.com> Date: Fri, 3 Nov 2006 18:16:33 -0800 From: "Jack Vogel" To: freebsd-stable@freebsd.org, freebsd-net MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_43447_15205892.1162606593613" Cc: Subject: New em patch for 6.2 BETA 3 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2006 02:45:19 -0000 ------=_Part_43447_15205892.1162606593613 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I have been hard at work trying to understand and fix the remaining issues with the em driver. What I have here is a patch that has gotten rid of any issues that I can reproduce. It solves the intermittent watchdogs that have been happening. It also fixes the problem noted with jumbo frame tx I, and re, would very much appreciate any test feedback you can give on this code. I am happy with the changes, I hope these get rid of everyone's issues. Thanks to Gleb and Scott and John for all the help! Jack ------=_Part_43447_15205892.1162606593613 Content-Type: text/x-patch; name=em-stable.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_eu3t3js5 Content-Disposition: attachment; filename="em-stable.patch" ZGlmZiAtTmF1ciBzdGFibGUvZGV2L2VtL2lmX2VtLmMgamZ2L2Rldi9lbS9pZl9lbS5jCi0tLSBz dGFibGUvZGV2L2VtL2lmX2VtLmMJRnJpIE5vdiAgMyAwMjowMjoyOSAyMDA2CisrKyBqZnYvZGV2 L2VtL2lmX2VtLmMJU2F0IE5vdiAgNCAwOToxODo0OCAyMDA2CkBAIC0yMDQsNyArMjA0LDcgQEAK IHN0YXRpYyB2b2lkCWVtX3N0YXJ0KHN0cnVjdCBpZm5ldCAqKTsKIHN0YXRpYyB2b2lkCWVtX3N0 YXJ0X2xvY2tlZChzdHJ1Y3QgaWZuZXQgKmlmcCk7CiBzdGF0aWMgaW50CWVtX2lvY3RsKHN0cnVj dCBpZm5ldCAqLCB1X2xvbmcsIGNhZGRyX3QpOwotc3RhdGljIHZvaWQJZW1fd2F0Y2hkb2coc3Ry dWN0IGlmbmV0ICopOworc3RhdGljIHZvaWQJZW1fd2F0Y2hkb2codm9pZCAqKTsKIHN0YXRpYyB2 b2lkCWVtX2luaXQodm9pZCAqKTsKIHN0YXRpYyB2b2lkCWVtX2luaXRfbG9ja2VkKHN0cnVjdCBh ZGFwdGVyICopOwogc3RhdGljIHZvaWQJZW1fc3RvcCh2b2l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