Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4327 → Rev 4718

/branches/network/uspace/srv/pci/update-ids
1,6 → 1,6
#! /bin/bash
 
wget http://pciids.sourceforge.net/v2.2/pci.ids
wget -O pci.ids http://pciids.sourceforge.net/v2.2/pci.ids
 
cat > pci_ids.h <<EOF
/* DO NOT EDIT, THIS FILE IS AUTOMATICALLY GENERATED */
7,7 → 7,8
char *pci_ids[] = {
EOF
 
cat pci.ids | grep -v '^#.*' | grep -v '^$' | tr \" \' | sed -n 's/\(.*\)/"\1",/p' >> pci_ids.h
cat pci.ids | grep -v '^#.*' | grep -v '^$' | tr \" \' | \
sed -n 's/\(.*\)/"\1",/p' | sed 's/?/\\?/g' >> pci_ids.h
 
cat >> pci_ids.h <<EOF
""
/branches/network/uspace/srv/pci/libpci/i386-ports.c
79,14 → 79,14
d.func = 0;
for (d.dev = 0; d.dev < 32; d.dev++) {
u16 class, vendor;
if (m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
if ((m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
sizeof(class))
&& (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST)
|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA))
|| m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)))
|| (m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
sizeof(vendor))
&& (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL)
|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ))) {
|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))) {
a->debug("...outside the Asylum at 0/%02x/0",
d.dev);
return 1;
/branches/network/uspace/srv/pci/libpci/pci_ids.h
386,7 → 386,7
" 1043 c01b A9600XT/TD (Secondary)",
" 174b 7c28 Sapphire Radeon 9600XT (Secondary)",
" 1787 4003 Radeon 9600 XT (Secondary)",
" 4173 RV350 ?? [Radeon 9550] (Secondary)",
" 4173 RV350 \?\? [Radeon 9550] (Secondary)",
" 4237 Radeon 7000 IGP",
" 4242 R200 BB [Radeon All in Wonder 8500DV]",
" 1002 02aa Radeon 8500 AIW DV Edition",
668,7 → 668,7
" 1002 002a Rage 128 Pro AIW AGP",
" 1002 0048 Rage Fury Pro",
" 1002 2000 Rage Fury MAXX AGP 4x (TMDS) (VGA device)",
" 1002 2001 Rage Fury MAXX AGP 4x (TMDS) (Extra device?!)",
" 1002 2001 Rage Fury MAXX AGP 4x (TMDS) (Extra device\?!)",
" 5047 Rage 128 PG/PRO",
" 5048 Rage 128 PH/PRO AGP 2x",
" 5049 Rage 128 PI/PRO AGP 4x",
1635,7 → 1635,7
" 1028 0106 PowerEdge 4600",
" 1028 0121 PowerEdge 2650",
"102b Matrox Graphics, Inc.",
" 0010 MGA-I [Impression?]",
" 0010 MGA-I [Impression\?]",
" 0100 MGA 1064SG [Mystique]",
" 0518 MGA-II [Athena]",
" 0519 MGA 2064W [Millennium]",
2437,7 → 2437,7
" 9922 W99200F/W9922PF MPEG-1/2 Video Encoder",
" 9970 W9970CF",
"1051 Anigma, Inc.",
"1052 ?Young Micro Systems",
"1052 \?Young Micro Systems",
"1053 Young Micro Systems",
"1054 Hitachi, Ltd",
"1055 Efar Microsystems",
3048,7 → 3048,7
" 0369 Bt878 Video Capture",
" 1002 0001 TV-Wonder",
" 1002 0003 TV-Wonder/VE",
" 036c Bt879(??) Video Capture",
" 036c Bt879(\?\?) Video Capture",
" 13e9 0070 Win/TV (Video Section)",
" 036e Bt878 Video Capture",
" 0070 13eb WinTV Series",
4123,7 → 4123,7
" 01de Quadro FX 350",
" 10de 01dc Quadro FX Go350M",
" 01df GeForce 7300 GS",
" 01e0 nForce2 AGP (different version?)",
" 01e0 nForce2 AGP (different version\?)",
" 147b 1c09 NV7 Motherboard",
" 01e8 nForce2 AGP",
" 01ea nForce2 Memory Controller 0",
5096,7 → 5096,7
" 1113 1211 EN-1207D Fast Ethernet Adapter",
" 1216 EN-1216 Ethernet Adapter",
" 1113 2242 EN2242 10/100 Ethernet Mini-PCI Card",
" 111a 1020 SpeedStream 1020 PCI 10/100 Ethernet Adaptor [EN-1207F-TX ?]",
" 111a 1020 SpeedStream 1020 PCI 10/100 Ethernet Adaptor [EN-1207F-TX \?]",
" 1217 EN-1217 Ethernet Adapter",
" 5105 10Mbps Network card",
" 9211 EN-1207D Fast Ethernet Adapter",
6556,7 → 6556,7
"123e Simutech, Inc.",
"123f C-Cube Microsystems",
" 00e4 MPEG",
" 8120 E4?",
" 8120 E4\?",
" 11bd 0006 DV500 E4",
" 11bd 000a DV500 E4",
" 11bd 000f DV500 E4",
6632,7 → 6632,7
" 0640 Aries 16000P",
"125d ESS Technology",
" 0000 ES336H Fax Modem (Early Model)",
" 1948 Solo?",
" 1948 Solo\?",
" 1968 ES1968 Maestro 2",
" 1028 0085 ES1968 Maestro-2 PCI",
" 1033 8051 ES1968 Maestro-2 Audiodrive",
6922,7 → 6922,7
" 122d 4056 MSP3880SP-U",
" 122d 4057 MSP3880SP-A",
" 4311 Riptide HSF 56k PCI Modem",
" 127a 4311 Ring Modular? Riptide HSF RT HP Dom",
" 127a 4311 Ring Modular\? Riptide HSF RT HP Dom",
" 13e0 0210 HP-GVC",
" 4320 Riptide PCI Audio Controller",
" 1235 4320 Riptide PCI Audio Controller",
8382,7 → 8382,7
" 4325 BCM43xG 802.11b/g",
" 1414 0003 Wireless Notebook Adapter MN-720",
" 1414 0004 Wireless PCI Adapter MN-730",
" 4326 BCM4307 Chipcommon I/O Controller?",
" 4326 BCM4307 Chipcommon I/O Controller\?",
" 4401 BCM4401 100Base-T",
" 1043 80a8 A7V8X motherboard",
" 4402 BCM4402 Integrated 10/100BaseT",
8691,7 → 8691,7
"1504 KAISER Electronics",
"1505 ITA INGENIEURBURO FUR TESTAUFGABEN GmbH",
"1506 CHAMELEON Systems Inc",
"1507 Motorola ?? / HTEC",
"1507 Motorola \?\? / HTEC",
" 0001 MPC105 [Eagle]",
" 0002 MPC106 [Grackle]",
" 0003 MPC8240 [Kahlua]",
9467,7 → 9467,7
"270b Xantel Corporation",
"270f Chaintech Computer Co. Ltd",
"2711 AVID Technology Inc.",
"2a15 3D Vision(???)",
"2a15 3D Vision(\?\?\?)",
"3000 Hansol Electronics Inc.",
"3142 Post Impression Systems.",
"3388 Hint Corp",
/branches/network/uspace/srv/pci/libpci/names.c
150,7 → 150,7
int cat = -1;
int nest;
static const char parse_error[] = "Parse error";
int i;
size_t i;
 
*lino = 0;
for (i = 0; i < sizeof(pci_ids) / sizeof(char *); i++) {
330,7 → 330,7
iv = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", iv);
else if (v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0))
else if ((v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) != 0)
return (char *) v->name;
else
res = snprintf(buf, size, "Unknown vendor %04x", iv);
340,7 → 340,7
id = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", id);
else if (d = id_lookup(a, ID_DEVICE, iv, id, 0, 0))
else if ((d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) != 0)
return (char *) d->name;
else if (synth)
res = snprintf(buf, size, "Unknown device %04x", id);
370,7 → 370,7
isv = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", isv);
else if (v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0))
else if ((v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) != 0)
return (char *) v->name;
else if (synth)
res = snprintf(buf, size, "Unknown vendor %04x", isv);
384,7 → 384,7
isd = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", isd);
else if (d = id_lookup_subsys(a, iv, id, isv, isd))
else if ((d = id_lookup_subsys(a, iv, id, isv, isd)) != 0)
return (char *) d->name;
else if (synth)
res = snprintf(buf, size, "Unknown device %04x", isd);
415,9 → 415,9
icls = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", icls);
else if (cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0))
else if ((cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) != 0)
return (char *) cls->name;
else if (cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0))
else if ((cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) != 0)
res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
else if (synth)
res = snprintf(buf, size, "Class %04x", icls);
429,7 → 429,7
ipif = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%02x", ipif);
else if (pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0))
else if ((pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) != 0)
return (char *) pif->name;
else if (icls == 0x0101 && !(ipif & 0x70)) {
/* IDE controllers have complex prog-if semantics */
/branches/network/uspace/srv/pci/libpci/generic.c
29,7 → 29,7
for (dev = 0; dev < 32; dev++) {
t->dev = dev;
multi = 0;
for (t->func = 0; !t->func || multi && t->func < 8;
for (t->func = 0; !t->func || (multi && t->func < 8);
t->func++) {
u32 vd = pci_read_long(t, PCI_VENDOR_ID);
struct pci_dev *d;