From owner-freebsd-hackers Thu Jul 18 15: 0:20 2002 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 BB6BE37B400 for ; Thu, 18 Jul 2002 15:00:17 -0700 (PDT) Received: from tomts24-srv.bellnexxia.net (tomts24.bellnexxia.net [209.226.175.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7FED43E64 for ; Thu, 18 Jul 2002 15:00:16 -0700 (PDT) (envelope-from matt@gsicomp.on.ca) Received: from xena.gsicomp.on.ca ([65.95.181.144]) by tomts24-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20020718220024.LAKX2648.tomts24-srv.bellnexxia.net@xena.gsicomp.on.ca>; Thu, 18 Jul 2002 18:00:24 -0400 Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g6IKkPX00110; Thu, 18 Jul 2002 16:46:25 -0400 (EDT) (envelope-from matt@gsicomp.on.ca) Message-ID: <002601c22ea6$7f2a4280$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Sabapathi, Vanishree" , References: <0E3FA95632D6D047BA649F95DAB60E57F6B2B0@EXA-ATLANTA.se.lsil.com> Subject: Re: Reg: Claiming a device which is already claimed by another driver. Date: Thu, 18 Jul 2002 18:00:14 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > Hi, > > I am writing a charecter driver for a pci-ide controller, my problem > > is that atapci driver already claims my device. So in essence I need to > > detach the atapci driver from my device and claim it.... > > I have tried using the bus_generic_detach to detach the atapci driver, but > > now how will I be able to attach to it?? If you're writing a new driver for a PCI-IDE controller, then you'll have to remove the default FreeBSD driver for that particular device from your kernel, so that the device isn't taken when you attempt to start your driver. This would require removing any of the 'device ata' lines from your kernel config, adding in the proper line for your new driver, rebuilding your kernel and then debugging from there. ('options ddb' is good when writing new kernel drivers.) -- Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message