agp_sis.c (159075) | agp_sis.c (173203) |
---|---|
1/*- 2 * Copyright (c) 2000 Doug Rabson 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Doug Rabson 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/agp/agp_sis.c 159075 2006-05-30 18:41:26Z jkim $"); | 28__FBSDID("$FreeBSD: head/sys/dev/agp/agp_sis.c 173203 2007-10-30 22:09:16Z jhb $"); |
29 30#include "opt_bus.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/malloc.h> 35#include <sys/kernel.h> 36#include <sys/module.h> --- 131 unchanged lines hidden (view full) --- 168 169 return 0; 170} 171 172static int 173agp_sis_detach(device_t dev) 174{ 175 struct agp_sis_softc *sc = device_get_softc(dev); | 29 30#include "opt_bus.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/malloc.h> 35#include <sys/kernel.h> 36#include <sys/module.h> --- 131 unchanged lines hidden (view full) --- 168 169 return 0; 170} 171 172static int 173agp_sis_detach(device_t dev) 174{ 175 struct agp_sis_softc *sc = device_get_softc(dev); |
176 int error; | |
177 | 176 |
178 error = agp_generic_detach(dev); 179 if (error) 180 return error; | 177 agp_free_cdev(dev); |
181 182 /* Disable the aperture.. */ 183 pci_write_config(dev, AGP_SIS_WINCTRL, 184 pci_read_config(dev, AGP_SIS_WINCTRL, 1) & ~3, 1); 185 186 /* and the TLB. */ 187 pci_write_config(dev, AGP_SIS_TLBCTRL, 0, 1); 188 189 /* Put the aperture back the way it started. */ 190 AGP_SET_APERTURE(dev, sc->initial_aperture); 191 192 agp_free_gatt(sc->gatt); | 178 179 /* Disable the aperture.. */ 180 pci_write_config(dev, AGP_SIS_WINCTRL, 181 pci_read_config(dev, AGP_SIS_WINCTRL, 1) & ~3, 1); 182 183 /* and the TLB. */ 184 pci_write_config(dev, AGP_SIS_TLBCTRL, 0, 1); 185 186 /* Put the aperture back the way it started. */ 187 AGP_SET_APERTURE(dev, sc->initial_aperture); 188 189 agp_free_gatt(sc->gatt); |
190 agp_free_res(dev); |
|
193 return 0; 194} 195 196static u_int32_t 197agp_sis_get_aperture(device_t dev) 198{ 199 int gws; 200 --- 95 unchanged lines hidden --- | 191 return 0; 192} 193 194static u_int32_t 195agp_sis_get_aperture(device_t dev) 196{ 197 int gws; 198 --- 95 unchanged lines hidden --- |