Re: i386/127710: My driver PCI probe is not calledformycorrespondingdevice ID and Vendor ID - FreeBSD

This is a discussion on Re: i386/127710: My driver PCI probe is not calledformycorrespondingdevice ID and Vendor ID - FreeBSD ; From: "Bagavathy Kumar Mahendran " Subject: RE: i386/127710: My driver PCI probe is not called formycorrespondingdevice ID and Vendor ID Date: Mon, 6 Oct 2008 12:36:44 +0530 > Dear Warner, > > My probe is getting called for the parent ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: i386/127710: My driver PCI probe is not calledformycorrespondingdevice ID and Vendor ID

  1. Re: i386/127710: My driver PCI probe is not calledformycorrespondingdevice ID and Vendor ID

    From: "Bagavathy Kumar Mahendran "
    Subject: RE: i386/127710: My driver PCI probe is not called formycorrespondingdevice ID and Vendor ID
    Date: Mon, 6 Oct 2008 12:36:44 +0530

    > Dear Warner,
    >
    > My probe is getting called for the parent bridge devices
    > .but
    > 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


    Can you send me the DRIVER_MODULE line in your driver?

    Warner

    > Bagavathy kumar .M
    >
    >
    > -----Original Message-----
    > From: Warner Losh [mailto:imp@bsdimp.com]
    > Sent: Monday, October 06, 2008 12:27 PM
    > To: Bagavathy Kumar Mahendran
    > 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
    > > 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
    > >
    > > -----Original Message-----
    > > From: M. Warner Losh [mailto:imp@bsdimp.com]
    > > Sent: Friday, October 03, 2008 11:03 AM
    > > To: Bagavathy Kumar Mahendran
    > > 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
    > >
    > > In message:
    > >

    > <68C9F31EF19DB6448F515EF294028FDEE99BCE@chn-hclt-evs05.HCLT.CORP.HCL.IN>
    > > "Bagavathy Kumar Mahendran "
    > > writes:
    > > :
    > > : 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.
    > >
    > > 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?
    > >
    > > Warner
    > >
    > >
    > > : Thanks,
    > > :
    > > : Regards,
    > > : Bagavathy kumar .M
    > > :
    > > :
    > > :
    > > : -----Original Message-----
    > > : From: John Baldwin [mailto:jhb@freebsd.org]
    > > : 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
    > > :
    > > : On Wednesday 01 October 2008 08:50:15 am Bagavathy Kumar Mahendran
    > > : wrote:
    > > : >
    > > : > Dear All,
    > > : > Iam writing a new driver for a SAS/SATA Controller
    > > having
    > > : a
    > > : > Class ID -0x01
    > > : > Sub Class - 0x07
    > > : > Programming Interface - 0x00
    > > : >
    > > : > 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.
    > > :
    > > : The pccbb driver returns BUS_PROBE_DEFAULT (it should probably

    > return
    > > : GENERIC
    > > : in the case where it matches only on class codes). Your driver just
    > > : needs to
    > > : return a numerically higher value (but still < 0) to claim the

    > device.
    > > : You
    > > : can probably use BUS_PROBE_VENDOR or BUS_PROBE_DEFAULT + 1.
    > > :
    > > : --
    > > : John Baldwin
    > > :
    > > : DISCLAIMER:
    > > :
    > >

    > ------------------------------------------------------------------------
    > > -----------------------------------------------
    > > :
    > > : 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
    > > : 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
    > > : 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
    > > : attachments please check them for viruses and defect.
    > > :
    > > :
    > >

    > ------------------------------------------------------------------------
    > > -----------------------------------------------
    > > :
    > > :
    > >
    > >

    >
    >

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/lis...reebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  2. RE: i386/127710: My driver PCI probe is notcalledformycorrespondingdevice ID and Vendor ID

    static int
    My_probe(device_t dev)
    {
    uint32_t progif;
    uint32_t subclass;
    uint32_t class;

    device_printf(dev, " Probe\n Vendor ID : 0x%x\n Device ID :
    0x%x\n",pci_get_vendor(dev), pci_get_device(dev));
    class = pci_get_class(dev);
    subclass = pci_get_subclass(dev);
    progif = pci_get_progif(dev);
    if (class == 0x1 && subclass == 0x07 && progif == 0x00) {

    printf("probe successful!\n");
    device_set_desc(dev, "My_Probe");
    return (BUS_PROBE_DEFAULT);
    }
    return (ENXIO);
    }
    Here above I have attached my pci probe. The vendor ID and Device ID of
    all the above PCI bridges are printing But instead of My_probe function
    for my PCI Card the probe of the cbb driver is called. This is the exact
    problem but when I remove the cbb driver from the kernel My_probe
    function is called for my PCI Card too.

    Regards,
    Bagavathy kumar .M


    -----Original Message-----
    From: Warner Losh [mailto:imp@bsdimp.com]
    Sent: Monday, October 06, 2008 12:56 PM
    To: Bagavathy Kumar Mahendran
    Cc: jhb@freebsd.org; freebsd-hackers@freebsd.org
    Subject: Re: i386/127710: My driver PCI probe is not
    calledformycorrespondingdevice ID and Vendor ID

    From: "Bagavathy Kumar Mahendran "
    Subject: RE: i386/127710: My driver PCI probe is not called
    formycorrespondingdevice ID and Vendor ID
    Date: Mon, 6 Oct 2008 12:36:44 +0530

    > Dear Warner,
    >
    > My probe is getting called for the parent bridge devices
    > .but
    > 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


    Can you send me the DRIVER_MODULE line in your driver?

    Warner

    > Bagavathy kumar .M
    >
    >
    > -----Original Message-----
    > From: Warner Losh [mailto:imp@bsdimp.com]
    > Sent: Monday, October 06, 2008 12:27 PM
    > To: Bagavathy Kumar Mahendran
    > 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
    > > 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
    > >
    > > -----Original Message-----
    > > From: M. Warner Losh [mailto:imp@bsdimp.com]
    > > Sent: Friday, October 03, 2008 11:03 AM
    > > To: Bagavathy Kumar Mahendran
    > > 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
    > >
    > > In message:
    > >

    >

    <68C9F31EF19DB6448F515EF294028FDEE99BCE@chn-hclt-evs05.HCLT.CORP.HCL.IN>
    > > "Bagavathy Kumar Mahendran "
    > > writes:
    > > :
    > > : 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.
    > >
    > > 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?
    > >
    > > Warner
    > >
    > >
    > > : Thanks,
    > > :
    > > : Regards,
    > > : Bagavathy kumar .M
    > > :
    > > :
    > > :
    > > : -----Original Message-----
    > > : From: John Baldwin [mailto:jhb@freebsd.org]
    > > : 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
    > > :
    > > : On Wednesday 01 October 2008 08:50:15 am Bagavathy Kumar Mahendran
    > > : wrote:
    > > : >
    > > : > Dear All,
    > > : > Iam writing a new driver for a SAS/SATA Controller
    > > having
    > > : a
    > > : > Class ID -0x01
    > > : > Sub Class - 0x07
    > > : > Programming Interface - 0x00
    > > : >
    > > : > 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.
    > > :
    > > : The pccbb driver returns BUS_PROBE_DEFAULT (it should probably

    > return
    > > : GENERIC
    > > : in the case where it matches only on class codes). Your driver

    just
    > > : needs to
    > > : return a numerically higher value (but still < 0) to claim the

    > device.
    > > : You
    > > : can probably use BUS_PROBE_VENDOR or BUS_PROBE_DEFAULT + 1.
    > > :
    > > : --
    > > : John Baldwin
    > > :
    > > : DISCLAIMER:
    > > :
    > >

    >

    ------------------------------------------------------------------------
    > > -----------------------------------------------
    > > :
    > > : 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
    > > : 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
    > > : 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
    > > : attachments please check them for viruses and defect.
    > > :
    > > :
    > >

    >

    ------------------------------------------------------------------------
    > > -----------------------------------------------
    > > :
    > > :
    > >
    > >

    >
    >

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/lis...reebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


+ Reply to Thread