From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 6 07:06:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7A8B106568F for ; Mon, 6 Oct 2008 07:06:43 +0000 (UTC) (envelope-from bagavathykumar.m@hcl.in) Received: from gws04.hcl.in (gws04.mail.hcl.in [203.105.186.20]) by mx1.freebsd.org (Postfix) with ESMTP id 561CE8FC23 for ; Mon, 6 Oct 2008 07:06:42 +0000 (UTC) (envelope-from bagavathykumar.m@hcl.in) Received: from gws04.hcl.in (gws04 [10.249.64.135]) by localhost.hcl.in (Postfix) with ESMTP id A281936001A; Mon, 6 Oct 2008 12:36:39 +0530 (IST) Received: from chn-egw01-out.corp.hcl.in (unknown [10.249.64.37])by gws04.hcl.in (Postfix) with ESMTPid 8D98236006B; Mon, 6 Oct 2008 12:36:39 +0530 (IST) Received: from chn-hclt-evs05.HCLT.CORP.HCL.IN ([10.101.26.13]) by chn-egw01-out.corp.hcl.in with Microsoft SMTPSVC(6.0.3790.3959); Mon, 6 Oct 2008 12:36:39 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Mon, 6 Oct 2008 12:36:44 +0530 Message-ID: <68C9F31EF19DB6448F515EF294028FDEE9A624@chn-hclt-evs05.HCLT.CORP.HCL.IN> In-Reply-To: <20081006.005657.71122961.imp@bsdimp.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: i386/127710: My driver PCI probe is not called formycorrespondingdevice ID and Vendor ID Thread-Index: AckngOgREffkjE0QTT+Ia4ph64es9gAAFouA References: <68C9F31EF19DB6448F515EF294028FDEE99BCE@chn-hclt-evs05.HCLT.CORP .HCL.IN><20081002.233328.-432820840.imp@bsdimp.com><68C9F31EF19DB6448F515EF 294028FDEE9A4A5@chn-hclt-evs05.HCLT.CORP.HCL.IN> <20081006.005657.71122961.imp@bsdimp.com> From: "Bagavathy Kumar Mahendran " To: "Warner Losh" X-OriginalArrivalTime: 06 Oct 2008 07:06:39.0139 (UTC) FILETIME=[13FD9F30:01C92782] X-imss-version: 2.051 X-imss-result: Passed X-imss-scanInfo: M:T L:E SM:1 X-imss-tmaseResult: TT:1 TS:-30.9576 TC:1F TRN:81 TV:5.5.1026(16200.005) X-imss-scores: Clean:100.00000 C:0 M:0 S:0 R:0 X-imss-settings: Baseline:1 C:1 M:1 S:1 R:1 (0.0000 0.0000) X-Mailman-Approved-At: Mon, 06 Oct 2008 11:23:30 +0000 Cc: freebsd-hackers@freebsd.org Subject: RE: i386/127710: My driver PCI probe is not called formycorrespondingdevice ID and Vendor ID 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: Mon, 06 Oct 2008 07:06:43 -0000 Dear Warner, My probe is getting called for the parent bridge devices .but=20 Not for my pci Card. I have tested this by printing the Device ID and Vendor ID of the corresponding device_t in my probe. You are trying to say even cbb probes for my device and return BUS_PROBE_DEFAULT still my probe function will be called. Just clarify it. But my testing seems that my probe is not called for my pci device Bagavathy kumar .M=20 -----Original Message----- From: Warner Losh [mailto:imp@bsdimp.com]=20 Sent: Monday, October 06, 2008 12:27 PM To: Bagavathy Kumar Mahendran=20 Cc: jhb@freebsd.org; freebsd-hackers@freebsd.org Subject: Re: i386/127710: My driver PCI probe is not called formycorrespondingdevice ID and Vendor ID > Thanks for your support. my probe is getting called for all > the bridges not for my pci device. so please provide the fix . > > OR=20 > Is any other way available for making my driver to override the probe of > cbb driver for my corresponding device (With out changing cbb driver). If your probe returns a higher number that's negative, it will. Unless cbb is returning 0, your probe routine will get called. Make sure it isn't. Code inspection suggests that it isn't. Warner > With regards, > Bagavathy kumar .M >=20 > -----Original Message----- > From: M. Warner Losh [mailto:imp@bsdimp.com]=20 > Sent: Friday, October 03, 2008 11:03 AM > To: Bagavathy Kumar Mahendran=20 > Cc: jhb@freebsd.org; freebsd-hackers@freebsd.org > Subject: Re: i386/127710: My driver PCI probe is not called for > mycorrespondingdevice ID and Vendor ID >=20 > In message: > <68C9F31EF19DB6448F515EF294028FDEE99BCE@chn-hclt-evs05.HCLT.CORP.HCL.IN> > "Bagavathy Kumar Mahendran " > writes: > :=20 > : Dear Baldwin, > : Thanks for your support .but my pci probe function is > not > : getting called for my device id and vendor id. Because pccbb driver > : already sets the device_set_desc as PCI-CardBus Bridge. So is there > any > : other option for me to make my_pciprobe function to be called for my > : corresponding device id and vendor id. >=20 > That's not why your probe isn't called. Setting a description is > standard behavior for the probe routine. Are you sure that the device > probe routine is getting called at all for any device? Have you tried > just leaving cbb out of the kernel? I recently fixed the original > problem in cbb (the fact it doesn't check the bridge type too), maybe > you could try to pick up that fix as well? >=20 > Warner >=20 >=20 > : Thanks, > :=20 > : Regards, > : Bagavathy kumar .M > :=20 > :=20 > :=20 > : -----Original Message----- > : From: John Baldwin [mailto:jhb@freebsd.org]=20 > : Sent: Wednesday, October 01, 2008 8:57 PM > : To: freebsd-hackers@freebsd.org > : Cc: Bagavathy Kumar Mahendran ; Warner Losh > : Subject: Re: FW: i386/127710: My driver PCI probe is not called for my > : correspondingdevice ID and Vendor ID > :=20 > : On Wednesday 01 October 2008 08:50:15 am Bagavathy Kumar Mahendran > : wrote: > : >=20 > : > Dear All, > : > Iam writing a new driver for a SAS/SATA Controller > having > : a > : > Class ID -0x01 > : > Sub Class - 0x07 > : > Programming Interface - 0x00 > : >=20 > : > Hence instead of my probe function the Static build Card Bus Driver > : cbb > : > is attaching just by simply checking sub class 0x07 and programming > : > interface 0x00.hence my probe gets failed. Kindly help me in > resolving > : > this .what I thought is to add the card bus driver a checking of > CLASS > : > ID in its pci probe function. > :=20 > : The pccbb driver returns BUS_PROBE_DEFAULT (it should probably return > : GENERIC=20 > : in the case where it matches only on class codes). Your driver just > : needs to=20 > : return a numerically higher value (but still < 0) to claim the device. > : You=20 > : can probably use BUS_PROBE_VENDOR or BUS_PROBE_DEFAULT + 1. > :=20 > : --=20 > : John Baldwin > :=20 > : DISCLAIMER: > : > ------------------------------------------------------------------------ > ----------------------------------------------- > :=20 > : The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. > : It shall not attach any liability on the originator or HCL or its > affiliates. Any views or opinions presented in=20 > : this email are solely those of the author and may not necessarily > reflect the opinions of HCL or its affiliates. > : Any form of reproduction, dissemination, copying, disclosure, > modification, distribution and / or publication of=20 > : this message without the prior written consent of the author of this > e-mail is strictly prohibited. If you have > : received this email in error please delete it and notify the sender > immediately. Before opening any mail and=20 > : attachments please check them for viruses and defect. > :=20 > : > ------------------------------------------------------------------------ > ----------------------------------------------- > :=20 > :=20 >=20 >=20