Re: [BUG](-mm)pci_disable_device function clear bars_enabled element

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Grant Grundler wrote:
On Fri, Jun 02, 2006 at 11:57:36AM +0900, Kenji Kaneshige wrote:
...

As Rajesh pointed out, there are many drivers which initialize the
device with the wrong order. They should be fixed.


Then you also agree with the patch to pci.txt?

Yes. I agree with you.

I would like to
confirm the correct order to initialize the device again. Is the
following correct order?

  (1) pci_request_regions()
  (2) pci_enable_device()
  (3) request_irq()
  (4) free_irq()
  (5) pci_disable_device()
  (6) pci_release_regions()


Yes, that's what I would prefer and would like to see reccomended.
Would you like to see that order listed (like you have above)
in the pci.txt file?


I think that list would be very useful. But as you said, there are
other steps remaining than ones I came up with at once. I can't
deal with the steps of all of them...

BTW, Section 3 says "Before you do anything with the device you've
found, you need to enable it by calling pci_enable_device()...". I
think it would be one of the causes of misunderstanding the order
between pci_request_regions() and pci_enable_device().

Thanks,
Kenji Kaneshige


A less precise list is in the first section of Documentation/pci.txt.

[ TODO: Can someone define which kernel versions implement "new style"? ]

There's more to this list unfortunately:
	DMA mask settings, MSI support, power state

And probably a few more that I'm not thinking of right now.

Restructing the document to list the steps, indicate which
are optional, and describe each step in order is more than
I can deal with right now.  Section 3 and 5 cover most of
the material but aren't as clear as Kenji's list.

thanks,
grant


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux