Bug 175351
Summary: | displaced enumerated value knackers parport_pc | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | JW <ohtmvyyn> | ||||||
Component: | kernel | Assignee: | Dave Jones <davej> | ||||||
Status: | CLOSED UPSTREAM | QA Contact: | Brian Brock <bbrock> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 4 | CC: | pfrields, wtogami | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2005-12-12 23:38:45 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
JW
2005-12-09 08:51:03 UTC
Created attachment 122071 [details]
Puts parport_pc mobility_pp enum in right position
Created attachment 122072 [details]
Patch to correct mobility_pp ordering problem
Please discard previous patch because there is also another table entry that
must also be reordered. Now that I have discovered another table ordering
problem it would have probably been just as easy to adjust
parport_pc_pci_tbl[].
Never mind, this patch obsoletes the previous one and seems to work ok.
Only affects people trying to use syba, titan, avlab, aks, and netmos cards.
whats actually the problem here? I can't figure out why moving that enum to a different value actually fixes anything. From the diff, it seems you're just moving it from the 43rd member to the 33rd member. What am I missing here ? (You should probably post this upstream too to linux-kernel.org) (In reply to comment #3) > > From the diff, it seems you're just moving it from the 43rd member to the 33rd > member. What am I missing here ? > You have to read the code to understand. Look at parport_pc_pci_probe() and study the variable 'i' and how it is used. parport_pc_pci_tbl[].driver_data is enum type, and that enum is also used as an index into table cards[]. So cards[] must match ordering of enum. Actually my patch is wrong, because the printk (approx line 2960) should be using id->vendor instead of indexing into parport_pc_pci_tbl[] with driver_data. But cards[] *must* have correct ordering. I follow what you're saying with the table & enum having to be in sync, but what I'm failing to see is how they're out of sync. mobility_pp looks to be in the right place both before, and after your diff as you're moving its entry in both places. This really should be taken upstream, where people more familiar with this driver can comment. My changes did cure the problem. I know this because I made the changes, recompiled the modules, and tested them! Without the patch kernel printk's would show wrong vendor:device ids. It is all a bit more complicated than that anyhow. My original patch wasn't the best. In actual fact the tables should be constructed using [enum]={...} entries rather than the existing "/*enum*/{...}" entries. There is also a bug where _pci_tbl[enum].vendor is used instead of id->vendor etc. There is also bug where class of board is not checked (so that parport_serial never gets a chance). There are also changes needed to handle quirks for timedia serial/parallel cards which have wrong pci class. Surely you must have encountered these problems with your higher quality RHEL product? Or do you still get RHEL bugs fixed upstream? if its an issue in RHEL, no-one reported it, and actually yes, we do try to get things fixed upstream first, so that they get coverage testing before the patches land in RHEL. |