summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/pci-resource/update-pci-ids.pl
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2003-10-29 16:07:11 +0000
committerMystery Man <unknown@mandriva.org>2003-10-29 16:07:11 +0000
commitfa40f30b4253b1e05c46cc5e0c111176825b7623 (patch)
tree76cf2d26c0ce0ee7c6a2c1a1a2b65bc4d8e33029 /mdk-stage1/pci-resource/update-pci-ids.pl
parent327bd24f8e4291bd1882de1990dd7339f781a9cb (diff)
downloaddrakx-backup-do-not-use-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.tar
drakx-backup-do-not-use-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.tar.gz
drakx-backup-do-not-use-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.tar.bz2
drakx-backup-do-not-use-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.tar.xz
drakx-backup-do-not-use-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.zip
This commit was manufactured by cvs2svn to create tag 'Corpo_2_1_1'.Corpo_2_1_1
Diffstat (limited to 'mdk-stage1/pci-resource/update-pci-ids.pl')
-rwxr-xr-xmdk-stage1/pci-resource/update-pci-ids.pl42
1 files changed, 34 insertions, 8 deletions
diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl
index 73f1d151b..27ec62845 100755
--- a/mdk-stage1/pci-resource/update-pci-ids.pl
+++ b/mdk-stage1/pci-resource/update-pci-ids.pl
@@ -16,30 +16,56 @@ struct pci_module_map {
const char *module; /* module to load */
};
+struct pci_module_map_full {
+ unsigned short vendor; /* PCI vendor id */
+ unsigned short device; /* PCI device id */
+ unsigned short subvendor; /* PCI subvendor id */
+ unsigned short subdevice; /* PCI subdevice id */
+ const char *name; /* PCI human readable name */
+ const char *module; /* module to load */
+};
+
';
my %t = (
- network => 'network/main',
+ network => 'network/main|gigabit',
medias => 'disk/scsi|hardware_raid',
);
foreach my $type (keys %t) {
my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1:"$t{$type}"`);
- print "#ifndef DISABLE_".uc($type)."
-struct pci_module_map ${type}_pci_ids[] = {
-";
+ my (@entries, @entries_full);
foreach my $k (sort keys %$pci) {
my $v = $pci->{$k};
member($v->[0], @modules) or next;
- $k =~ /^(....)(....)/;
- printf qq|\t{ 0x%s, 0x%s, "%s", "%s" },\n|,
- $1, $2, $v->[1], $v->[0];
+ $k =~ /^(....)(....)(....)(....)/;
+ my $values = { vendor => $1, device => $2, subvendor => $3, subdevice => $4, driver => $v->[0], description => $v->[1] };
+ if ($values->{subdevice} eq 'ffff' && $values->{subvendor} eq 'ffff') {
+ push @entries, $values;
+ } else {
+ push @entries_full, $values;
+ }
}
+ print "#ifndef DISABLE_".uc($type)."
+struct pci_module_map ${type}_pci_ids[] = {
+";
+ printf qq|\t{ 0x%s, 0x%s, "%s", "%s" },\n|, $_->{vendor}, $_->{device}, $_->{description}, $_->{driver}
+ foreach @entries;
+ print "};
+unsigned int ${type}_num_ids = sizeof(${type}_pci_ids) / sizeof(struct pci_module_map);
+";
+
+ print "
+struct pci_module_map_full ${type}_pci_ids_full[] = {
+";
+ printf qq|\t{ 0x%s, 0x%s, 0x%s, 0x%s, "%s", "%s" },\n|, $_->{vendor}, $_->{device}, $_->{subvendor}, $_->{subdevice}, $_->{description}, $_->{driver}
+ foreach @entries_full;
print "};
-int ${type}_num_ids = sizeof(${type}_pci_ids) / sizeof(struct pci_module_map);
+unsigned int ${type}_num_ids_full = sizeof(${type}_pci_ids_full) / sizeof(struct pci_module_map_full);
+
#endif
";