From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 17 21:16:31 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E4F016A41C for ; Sun, 17 Jul 2005 21:16:31 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id B47A443D49 for ; Sun, 17 Jul 2005 21:16:30 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) X-Envelope-From: stsp@stsp.in-berlin.de X-Envelope-To: Received: from dice.seeling33.de (e178157109.adsl.alicedsl.de [85.178.157.109]) (authenticated bits=0) by einhorn.in-berlin.de (8.12.10/8.12.10/Debian-4) with ESMTP id j6HLGQAV024171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 17 Jul 2005 23:16:26 +0200 Received: by dice.seeling33.de (Postfix, from userid 1001) id C369833C25; Sun, 17 Jul 2005 23:16:25 +0200 (CEST) Date: Sun, 17 Jul 2005 23:16:25 +0200 From: Stefan Sperling To: freebsd-hackers@freebsd.org Message-ID: <20050717211625.GA7361@dice.seeling33.de> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Spam-Score: (-1.589) AWL,BAYES_00,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: rfc: wake on lan patches for review X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jul 2005 21:16:31 -0000 Hello Hackers, I have written a patch for the if_sis driver that enables wake on lan on the NatSemi DP8381[56] network chip. This did not work before because the driver needs to explicitely configure the card to enter wake on lan mode on system shutdown. I also added ioctls to make wake events configurable from userspace, and added an according 'wakeon ' command to ifconfig. The ioctls should be general enough to be used with other chips that require a similar configuration procedure for wake on lan. Before making efforts to get this committed I'd appreciate any comments and suggestions you may have. I'd especially appreciate people trying this at home if they have access to a network card with above mentioned chip. If you have a different card with wake on lan support that did not yet work as expected (i.e. your box does not wake up after shutting it down from FreeBSD), and have a datasheet available you might want to have a look at my code as an example on how to add wake on lan support to your card's driver. In my case, there wasn't much more to it than writing a couple of registers during the driver's shutdown procedure and implementing the new ioctls. You can find the patch at http://stsp.in-berlin.de/wol/ The patch applies cleanly to -current as of July 17th, and will probably apply to RELENG_6 just as well. regards, -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0