From owner-freebsd-tokenring Wed Apr 22 10:38:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA28961 for freebsd-tokenring-outgoing; Wed, 22 Apr 1998 10:38:47 -0700 (PDT) (envelope-from owner-freebsd-tokenring@FreeBSD.ORG) Received: from heathers2.stdio.com (lile@heathers2.stdio.com [199.89.192.5]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA28956 for ; Wed, 22 Apr 1998 17:38:38 GMT (envelope-from lile@stdio.com) Received: (from lile@localhost) by heathers2.stdio.com (8.8.8/8.8.8) id NAA25712; Wed, 22 Apr 1998 13:36:20 -0400 (EDT) Date: Wed, 22 Apr 1998 13:36:19 -0400 (EDT) From: "Larry S. Lile" To: Paul Norton cc: George Morgan , freebsd-tokenring@FreeBSD.ORG Subject: Re: code updated In-Reply-To: <199804221535.IAA03736@grumpy.ccnvhi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-tokenring@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 22 Apr 1998, Paul Norton wrote: > Larry S. Lile writes: > > > > > > On Wed, 22 Apr 1998, George Morgan wrote: > > > > > > Do we have any concensus on what the default badrate should be? > > > > > > For backward compatibility sake we should have 4 Mbps as the default, but > > > since UNIX users usually consider themselves as power users, maybe we > > > should set it to 16 Mbps :) > > 99.99% of your users will be at 16Mbps. > > > You are probably right, some of the older cards can only run at 4Mbps > > and wont tell you any different and 16Mbps cards usually autodetect > > and report correctly. > > Older cards won't autodetect. They just beacon your ring if set > incorrectly. All IBM shared-RAM adapters and compatibles will tell you > the ring speed on either open or init (I can't remember offhand) so a > default isn't used in these cases (these are set by dip switch or > configuration program anyway.) Autodetecting adapters fail on open > with a particular error code if inserting at the wrong speed, so you > can reset the speed and retry the open. In these cases the default is > the last speed it successfully opened at, stored in nonvolatile > storage on the adapter. So I guess my question is what is the purpose > of having a default hard-coded someplace in the kernel? The purpose is for consistency, the ethernet and other drivers make sure that they have a sane value available. The added benefit it that if someone forgets to set something they can be kept from crashing the kernel. These things are more just sanity numbers, what would happen if your baudrate was 0? What if you received a packet with 50000 bytes (because someone else stepped on you mbuf)? Chances are if you write your code correctly and dont do any thing incredibly stupid you will never see these. The attach routine will not touch your baudrate or mtu if you have already set them. It is just there as a safety net. Larry lile@stdio.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-tokenring" in the body of the message