From owner-freebsd-current@FreeBSD.ORG Fri Jan 15 23:00:44 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D81F106566B for ; Fri, 15 Jan 2010 23:00:44 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 30C958FC13 for ; Fri, 15 Jan 2010 23:00:43 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so161941qwd.7 for ; Fri, 15 Jan 2010 15:00:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:subject :message-id:reply-to:mime-version:content-type:content-disposition :user-agent; bh=zczvvA0IJr7uc5sLhfbacMNqOvcqP6aPEi6NJrPwj5Y=; b=opRX+1GLX7wh/u9iFyqgYFjKbNDyfMwTXiiEwpyz8cwBN3C1Mjn/u/LzkHgXpJHcKX opXIJcyIWD7WXQ/8CXQvP9tq3pkk4w5adyJLVRIZ1piCO3QEHQiekPph1qp0WWiGwbHE Jxxowl/fcyW0AozplCk1Xaay84s1+wpe74haA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:subject:message-id:reply-to:mime-version:content-type :content-disposition:user-agent; b=c738WwjW7veTRVolUMYcLpE8RIZA7Gt3D/UAOYfU1YNggoa5Kpwek7lymsk52YM5+I oaULaWHQXFWLJVqs9B2kTnKjU2r3AqaaSDM/YQUTl6B7RCWYZpN3ky8MfoRJ1DAtTqYc 2ClwdiNxs1BBOeJDhNXi0pXFR3qzNcmoIiRAA= Received: by 10.224.58.201 with SMTP id i9mr2717642qah.8.1263596437636; Fri, 15 Jan 2010 15:00:37 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 22sm2071913qyk.10.2010.01.15.15.00.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 15 Jan 2010 15:00:36 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 15 Jan 2010 14:59:57 -0800 From: Pyun YongHyeon Date: Fri, 15 Jan 2010 14:59:57 -0800 To: freebsd-current@FreeBSD.org Message-ID: <20100115225957.GL1228@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="rCwQ2Y43eQY6RBgR" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: CFT: bge(4) ASF handling X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 23:00:44 -0000 --rCwQ2Y43eQY6RBgR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, It seems bge(4) had long standing issues on ASF handling. Floris Bos sent me a patch that fixes ASF issues. While reading bge(4) I also noticed new handshake method was not enabled on all BCM575X family of controllers. So if you have ever experienced problems with ASF or you had to disable ASF in bge(hw.bge.allow_asf) please test attached patch with ASF and let me know how it goes on your box. Note, ASF handling was disabled except HEAD so you may have to enable it explicitly on your box with hw.bge.allow_asf tunable. I'm not sure but this would also have effects on bge(4) suspend/resume issues. So if you have BCM575X or higher controller and if you have problems with suspend/resume on bge(4) please give it try. Thanks. --rCwQ2Y43eQY6RBgR Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="bge.asf.diff" Index: sys/dev/bge/if_bge.c =================================================================== --- sys/dev/bge/if_bge.c (revision 202406) +++ sys/dev/bge/if_bge.c (working copy) @@ -2744,9 +2744,8 @@ & BGE_HWCFG_ASF) { sc->bge_asf_mode |= ASF_ENABLE; sc->bge_asf_mode |= ASF_STACKUP; - if (sc->bge_asicrev == BGE_ASICREV_BCM5750) { + if (BGE_IS_575X_PLUS(sc)) sc->bge_asf_mode |= ASF_NEW_HANDSHAKE; - } } } @@ -3677,7 +3676,7 @@ if (sc->bge_asf_count) sc->bge_asf_count --; else { - sc->bge_asf_count = 5; + sc->bge_asf_count = 2; bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW, BGE_FW_DRV_ALIVE); bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4); --rCwQ2Y43eQY6RBgR--