From owner-freebsd-current Thu Sep 18 03:30:24 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA25659 for current-outgoing; Thu, 18 Sep 1997 03:30:24 -0700 (PDT) Received: from hydrogen.nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA25641 for ; Thu, 18 Sep 1997 03:30:19 -0700 (PDT) Received: (from jmg@localhost) by hydrogen.nike.efn.org (8.8.7/8.8.7) id DAA28551; Thu, 18 Sep 1997 03:29:36 -0700 (PDT) Message-ID: <19970918032936.05832@hydrogen.nike.efn.org> Date: Thu, 18 Sep 1997 03:29:36 -0700 From: John-Mark Gurney To: Luigi Rizzo Cc: freebsd-current@FreeBSD.ORG Subject: Re: sio aware pnp driver and resource conflict detection References: <19970918015212.63324@hydrogen.nike.efn.org> <199709180857.KAA09516@labinfo.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <199709180857.KAA09516@labinfo.iet.unipi.it>; from Luigi Rizzo on Thu, Sep 18, 1997 at 10:57:57AM +0200 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 2.2.1-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Luigi Rizzo scribbled this message on Sep 18: > > well... I was wondering if people would like for me to import my changes > > to make sio a PnP aware driver... I would provide a PnP flag that > > would prevent the card from being probed... > > perhaps you can do it the same ways as I did for the sound code, while > waiting for the extent stuff to be ready for prime time... well... a couple reasons... is because then once the extent stuff is ready for prime time, we will then have to go along and rip all that code out from PnP aware drivers... the only overhead is forcing you to malloc a struct with isa_device as a part.. but then we reclaim this space by reducing the size of struct pnp_device, which each driver has their own copy of it... so in the long run, memory use is actually lower (assuming more pnp drivers than pnp cards)... > > currently the pnp system doesn't prevent you from doing stupid things > > like configuring two pnp cards to colid with each other... and I could > > possibly fix this before the snap comes out... > > not sure this is worth the effort, in a manual config should not get in > the way of the user's will, however stupid it can be... good point.. but the problem is that right now pnp doesn't check for resource conflicts.. so if you config two pnp devices, and then they both probe/attach, they use the same resources.. while that would fail when one is an isa device... what we could do in the meantime is do something like the isa does now and use the reconfig if the attach routing changes the isa_device struct... the quickest fix (I am working on the best fix) would be to teach the attach routine to use the reconfig flag in isa_device, and teach pnp_configure about reconfig so that it will check resources (using haveseen_isadev) before attaching, then if attach returns with reconfig, just do what the isa code does currently in config_isadev_c... any takes for this? -- John-Mark Gurney Modem/FAX: +1 541 683 6954 Cu Networking Live in Peace, destroy Micro$oft, support free software, run FreeBSD