Deleted Added
full compact
if_ed_pci.c (130659) if_ed_pci.c (140468)
1/*-
2 * Copyright (c) 1996 Stefan Esser <se@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4 unchanged lines hidden (view full) ---

13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * Stefan Esser.
16 * 4. Modifications may be freely made to this file if the above conditions
17 * are met.
18 */
19
20#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1996 Stefan Esser <se@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4 unchanged lines hidden (view full) ---

13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * Stefan Esser.
16 * 4. Modifications may be freely made to this file if the above conditions
17 * are met.
18 */
19
20#include <sys/cdefs.h>
21__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed_pci.c 130659 2004-06-18 01:28:54Z imp $");
21__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed_pci.c 140468 2005-01-19 07:37:32Z imp $");
22
23#include <sys/param.h>
24#include <sys/systm.h>
25#include <sys/socket.h>
26#include <sys/kernel.h>
27
28#include <sys/module.h>
29#include <sys/bus.h>

--- 8 unchanged lines hidden (view full) ---

38
39#include <dev/pci/pcireg.h>
40#include <dev/pci/pcivar.h>
41
42#include <dev/ed/if_edvar.h>
43
44static struct _pcsid
45{
22
23#include <sys/param.h>
24#include <sys/systm.h>
25#include <sys/socket.h>
26#include <sys/kernel.h>
27
28#include <sys/module.h>
29#include <sys/bus.h>

--- 8 unchanged lines hidden (view full) ---

38
39#include <dev/pci/pcireg.h>
40#include <dev/pci/pcivar.h>
41
42#include <dev/ed/if_edvar.h>
43
44static struct _pcsid
45{
46 u_int32_t type;
46 uint32_t type;
47 const char *desc;
48} pci_ids[] =
49{
50 { 0x802910ec, "NE2000 PCI Ethernet (RealTek 8029)" },
51 { 0x50004a14, "NE2000 PCI Ethernet (NetVin 5000)" },
52 { 0x09401050, "NE2000 PCI Ethernet (ProLAN)" },
53 { 0x140111f6, "NE2000 PCI Ethernet (Compex)" },
54 { 0x30008e2e, "NE2000 PCI Ethernet (KTI)" },

--- 4 unchanged lines hidden (view full) ---

59};
60
61static int ed_pci_probe(device_t);
62static int ed_pci_attach(device_t);
63
64static int
65ed_pci_probe(device_t dev)
66{
47 const char *desc;
48} pci_ids[] =
49{
50 { 0x802910ec, "NE2000 PCI Ethernet (RealTek 8029)" },
51 { 0x50004a14, "NE2000 PCI Ethernet (NetVin 5000)" },
52 { 0x09401050, "NE2000 PCI Ethernet (ProLAN)" },
53 { 0x140111f6, "NE2000 PCI Ethernet (Compex)" },
54 { 0x30008e2e, "NE2000 PCI Ethernet (KTI)" },

--- 4 unchanged lines hidden (view full) ---

59};
60
61static int ed_pci_probe(device_t);
62static int ed_pci_attach(device_t);
63
64static int
65ed_pci_probe(device_t dev)
66{
67 u_int32_t type = pci_get_devid(dev);
67 uint32_t type = pci_get_devid(dev);
68 struct _pcsid *ep =pci_ids;
69
70 while (ep->type && ep->type != type)
71 ++ep;
72 if (ep->desc) {
73 device_set_desc(dev, ep->desc);
74 return (0);
75 }

--- 49 unchanged lines hidden ---
68 struct _pcsid *ep =pci_ids;
69
70 while (ep->type && ep->type != type)
71 ++ep;
72 if (ep->desc) {
73 device_set_desc(dev, ep->desc);
74 return (0);
75 }

--- 49 unchanged lines hidden ---