Re: [PATCH] misplaced pci_enable_device()s in drivers/sound/

Marcus Meissner (Marcus.Meissner@caldera.de)
Wed, 18 Apr 2001 19:20:36 +0200


On Wed, Apr 18, 2001 at 12:55:50PM -0400, Jeff Garzik wrote:
> Marcus Meissner wrote:
> > Several pci_enable_device()s in drivers/sound happen _after_ accessing
> > PCI resources. I have moved them before the relevant first accesses.
>
> cool
>
> > if (!RSRCISIOREGION(pcidev, 0))
> > return -1;
>
> can you replace this mess while you are cleaning stuff up. this, for
> example, should be
> if (!(pci_resource_flags(pcidev,) & IORESOURCE_IO))
>
> There is also pci_resource_start and pci_resource_len.
>
> > iobase = SILLY_PCI_BASE_ADDRESS(pcidev);
>
> pci_resource_start

THere is also some pci dma stuff which probably got changed.

> patch looks ok to me, but those would be nice additions...

I am a bit afraid to break stuff doing this without testing, but I will
do it for the cards I have access to.

Is there a 'HOW TO DO IT' PCI driver?

drivers/net/pci-skeleton.c looks up to date, is it?

Ciao, Marcus
-
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/