Deleted Added
full compact
if_sis.c (117126) if_sis.c (117208)
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. 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

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

51 * Both chips offer the standard bit-bang MII interface as well as
52 * an enchanced PHY interface which simplifies accessing MII registers.
53 *
54 * The only downside to this chipset is that RX descriptors must be
55 * longword aligned.
56 */
57
58#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. 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

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

51 * Both chips offer the standard bit-bang MII interface as well as
52 * an enchanced PHY interface which simplifies accessing MII registers.
53 *
54 * The only downside to this chipset is that RX descriptors must be
55 * longword aligned.
56 */
57
58#include <sys/cdefs.h>
59__FBSDID("$FreeBSD: head/sys/pci/if_sis.c 117126 2003-07-01 15:52:06Z scottl $");
59__FBSDID("$FreeBSD: head/sys/pci/if_sis.c 117208 2003-07-03 21:39:53Z imp $");
60
61#include <sys/param.h>
62#include <sys/systm.h>
63#include <sys/sockio.h>
64#include <sys/mbuf.h>
65#include <sys/malloc.h>
66#include <sys/kernel.h>
67#include <sys/socket.h>

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

1058 if (pci_get_device(dev) == SIS_DEVICEID_900)
1059 sc->sis_type = SIS_TYPE_900;
1060 if (pci_get_device(dev) == SIS_DEVICEID_7016)
1061 sc->sis_type = SIS_TYPE_7016;
1062 if (pci_get_vendor(dev) == NS_VENDORID)
1063 sc->sis_type = SIS_TYPE_83815;
1064
1065 sc->sis_rev = pci_read_config(dev, PCIR_REVID, 1);
60
61#include <sys/param.h>
62#include <sys/systm.h>
63#include <sys/sockio.h>
64#include <sys/mbuf.h>
65#include <sys/malloc.h>
66#include <sys/kernel.h>
67#include <sys/socket.h>

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

1058 if (pci_get_device(dev) == SIS_DEVICEID_900)
1059 sc->sis_type = SIS_TYPE_900;
1060 if (pci_get_device(dev) == SIS_DEVICEID_7016)
1061 sc->sis_type = SIS_TYPE_7016;
1062 if (pci_get_vendor(dev) == NS_VENDORID)
1063 sc->sis_type = SIS_TYPE_83815;
1064
1065 sc->sis_rev = pci_read_config(dev, PCIR_REVID, 1);
1066
1066#ifndef BURN_BRIDGES
1067 /*
1068 * Handle power management nonsense.
1069 */
1070 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
1071 u_int32_t iobase, membase, irq;
1072
1073 /* Save important PCI config data. */
1074 iobase = pci_read_config(dev, SIS_PCI_LOIO, 4);

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

1081 pci_get_powerstate(dev));
1082 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
1083
1084 /* Restore PCI config data. */
1085 pci_write_config(dev, SIS_PCI_LOIO, iobase, 4);
1086 pci_write_config(dev, SIS_PCI_LOMEM, membase, 4);
1087 pci_write_config(dev, SIS_PCI_INTLINE, irq, 4);
1088 }
1067 /*
1068 * Handle power management nonsense.
1069 */
1070 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
1071 u_int32_t iobase, membase, irq;
1072
1073 /* Save important PCI config data. */
1074 iobase = pci_read_config(dev, SIS_PCI_LOIO, 4);

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

1081 pci_get_powerstate(dev));
1082 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
1083
1084 /* Restore PCI config data. */
1085 pci_write_config(dev, SIS_PCI_LOIO, iobase, 4);
1086 pci_write_config(dev, SIS_PCI_LOMEM, membase, 4);
1087 pci_write_config(dev, SIS_PCI_INTLINE, irq, 4);
1088 }
1089
1089#endif
1090 /*
1091 * Map control/status registers.
1092 */
1093 pci_enable_busmaster(dev);
1094
1095 rid = SIS_RID;
1096 sc->sis_res = bus_alloc_resource(dev, SIS_RES, &rid,
1097 0, ~0, 1, RF_ACTIVE);

--- 1301 unchanged lines hidden ---
1090 /*
1091 * Map control/status registers.
1092 */
1093 pci_enable_busmaster(dev);
1094
1095 rid = SIS_RID;
1096 sc->sis_res = bus_alloc_resource(dev, SIS_RES, &rid,
1097 0, ~0, 1, RF_ACTIVE);

--- 1301 unchanged lines hidden ---