Skip to contentSkip to conversation

PCI: restore 2 missing pci ids

PATCH Jeff Garzik 4 participants 6 messages Feb 1, 2006 – Feb 2, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Linux Kernel Mailing List

tree e425ac74afc0b89f3a513290a2dd5e503d974906
parent 654143ee3a73b2793350b039a135d9cd3101147b
author Mark Rustad <[email protected]> Fri, 06 Jan 2006 14:47:29 -0800 committer Greg Kroah-Hartman <[email protected]> Wed, 01 Feb 2006 10:00:11 -0800

[PATCH] PCI: restore 2 missing pci ids

Somewhere between 2.6.14 and 2.6.15-rc3, some PCI ids were apparently removed. The ecc.c module, which is not a part of the kernel.org tree, but included in some distributions, fails to compile.

Quoted 6 lines
 include/linux/pci_ids.h |    2 ++
 1 files changed, 2 insertions(+)

Why was this applied? We could apply these patches all day, and get nothing else done. If it's not in the kernel tree, we shouldn't be worrying about it. Let the distros patch it in.

Jeff

#2 lore raw

Jeff,

Quoted 15 lines · Jeff Garzik
Quoted 8 lines · Linux Kernel Mailing List

tree e425ac74afc0b89f3a513290a2dd5e503d974906
parent 654143ee3a73b2793350b039a135d9cd3101147b
author Mark Rustad <[email protected]> Fri, 06 Jan 2006 14:47:29 -0800 committer Greg Kroah-Hartman <[email protected]> Wed, 01 Feb 2006 10:00:11 -0800 [PATCH] PCI: restore 2 missing pci ids
Somewhere between 2.6.14 and 2.6.15-rc3, some PCI ids were apparently removed. The ecc.c module, which is not a part of the kernel.org tree, but included in some distributions, fails to compile.

Quoted 5 lines
 include/linux/pci_ids.h |    2 ++
 1 files changed, 2 insertions(+)
Quoted 1 line

Why was this applied? We could apply these patches all day, and get nothing else done. If it's not in the kernel tree, we shouldn't be worrying about it. Let the distros patch it in.

Well, I offered the patch because I found that I suddenly needed it. I did not know why the ids had been removed, but it looks to me like edac is coming right along and will need the ids itself, so I sent the patch off.

Frankly, I was surprised that the patch was so quickly accepted. I perceive some difference of opinion on how PCI ids should be handled. Is there a consensus on a better way to handle ids? Why were the ids removed in the first place? THAT was worse than wasted effort.

Signature · 1 line
Mark Rustad, [email protected]
#3 lore raw
Quoted 2 lines · Mark Rustad

Why were the ids
removed in the first place?

Because they weren't used by anything in the tree.

Lee

#4 lore raw
Quoted 4 lines · Lee Revell
Quoted 1 line · Mark Rustad

Why were the ids removed in the first place?

Because they weren't used by anything in the tree.

Also, the new PCI-ID policy is to put the defines in the driver itself, near where it is used, instead of collecting them in a single file. The goal is to minimize the number of unused PCI IDs in the tree by keeping the definition near the usage.

Cheers,
Kyle Moffett

--
Somone asked me why I work on this free (http://www.fsf.org/philosophy/) software stuff and not get a real job. Charles Schulz had the best answer:

"Why do musicians compose symphonies and poets write poems? They do it because life wouldn't have any meaning for them if they didn't. That's why I draw cartoons. It's my life."
-- Charles Schulz

#5 lore raw
Quoted 11 lines · Kyle Moffett
Quoted 6 lines · Lee Revell
Quoted 1 line · Mark Rustad

Why were the ids removed in the first place?

Because they weren't used by anything in the tree.

Also, the new PCI-ID policy is to put the defines in the driver itself, near where it is used, instead of collecting them in a single file. The goal is to minimize the number of unused PCI IDs in the tree by keeping the definition near the usage.

No, if you do create a constant for a PCI ID, it still should go into include/linux/pci_ids.h.

Putting them in the driver will result in highly variable naming policies, which in turn means the constants are less grep-able than today.

Device IDs simply do not need an associated constant, if they are used only in a PCI ID table. Device IDs are arbitrary numbers that are normally only used once in a source file.

Vendor IDs are used repeatedly, and definitely belong in pci_ids.h. Device IDs make sense in pci_ids.h if they are used more than once.

Jeff

#6 lore raw
Quoted 9 lines · Jeff Garzik
Quoted 7 lines · Kyle Moffett
Quoted 5 lines · Lee Revell
Quoted 1 line · Mark Rustad

Why were the ids removed in the first place?

Because they weren't used by anything in the tree.

Also, the new PCI-ID policy is to put the defines in the driver itself, near where it is used, instead of collecting them in a single file. The goal is to minimize the number of unused PCI IDs in the tree by keeping the definition near the usage.

Quoted 7 lines

No, if you do create a constant for a PCI ID, it still should go into include/linux/pci_ids.h.

Putting them in the driver will result in highly variable naming policies, which in turn means the constants are less grep-able than today.

Device IDs simply do not need an associated constant, if they are used only in a PCI ID table. Device IDs are arbitrary numbers that are normally only used once in a source file.

Vendor IDs are used repeatedly, and definitely belong in pci_ids.h. Device IDs make sense in pci_ids.h if they are used more than once.

Thank you for explaining the policy. In this particular case, there was only one use of the ID in the file in question, so it could have simply been a hex constant, I guess. Of course my instinct is to avoid weird constants like this in source code, but I can learn to make an exception for this kind of thing.

Signature · 1 line
Mark Rustad, [email protected]