Re: [PATCH] add PCI ROMs to sysfs

From: Jon Smirl (jonsmirl_at_yahoo.com)
Date: 07/30/04

  • Next message: Muli Ben-Yehuda: "Re: [patch] voluntary-preempt-2.6.8-rc2-mm1-M5"
    Date:	Fri, 30 Jul 2004 14:53:25 -0700 (PDT)
    To: Greg KH <greg@kroah.com>, Jesse Barnes <jbarnes@engr.sgi.com>
    
    

    Here's another grungy thing I needed to do to PCI. Multi-headed video
    cards don't really implement independent PCI devices even though they
    look like independent devices. I've heard that this behavior is needed
    for MS Windows compatibility.

    I'm missing a PCI call to claim ownership for the secondary device
    without also causing a second instance of my driver to be loaded.
    Here's the code I'm using, what's the right way to do this?

    struct pci_dev *secondary;
    /* check the next function on the same card */
    secondary = pci_find_slot(dev->pdev->bus->number, dev->pdev->devfn +
    1);
    if (secondary) {
            /* check if class is secondary video */
            if (secondary->class == 0x038000) {
                    DRM_DEBUG("registering secondary video head\n");
                    /* This code is need to bind the driver to the secondary device */
                    /* There is no direct pci call to do this, there should be one */
                    secondary->dev.driver = dev->pdev->dev.driver;
                    device_bind_driver(&secondary->dev);
                    /* dev->pdev->driver is not filled until after probe completes */
                    secondary->driver = to_pci_driver(dev->pdev->dev.driver);
                    pci_dev_get(secondary);
            }
    }

    =====
    Jon Smirl
    jonsmirl@yahoo.com

                    
    __________________________________
    Do you Yahoo!?
    Yahoo! Mail - 50x more storage than other providers!
    http://promotions.yahoo.com/new_mail
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Muli Ben-Yehuda: "Re: [patch] voluntary-preempt-2.6.8-rc2-mm1-M5"

    Relevant Pages

    • Re: Is there a user space pci rescan method?
      ... > Rolf Eike Beer wrote: ... >> Normally you will just remove and bring back one or two cards in the ... Or does the pci system a rescan ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: [BUG][2.6.8.1] serial driver hangs SMP kernel, but not the UP kernel
      ... Using setserial to setup ports for PCI ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] add PCI ROMs to sysfs
      ... > Here's another grungy thing I needed to do to PCI. ... > cards don't really implement independent PCI devices even though they ... > I'm missing a PCI call to claim ownership for the secondary device ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: DMA problems with 3+ Promise IDE controllers
      ... > three are doing DMA transfers at a time and the other waits. ... Could you explain why they can't coexist on the same PCI bus. ... more than two cards can co-exist on the same PCI bus. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ATI Radeon 9600se VS ATI X300se
      ... if Phil's motherboard only has PCI Express slot he should be aware ... higher end PCIex cards burn much hotter- think about system cooling. ... > computer that uses AGP graphics cards. ... Note that computers that use PCI Express 16 video cards ...
      (microsoft.public.windowsxp.hardware)