Make this build with GCC 4.x.
This commit is contained in:
parent
c4a04b7ba4
commit
9021894476
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: agp.c,v 1.37 2006/01/16 22:59:36 christos Exp $ */
|
||||
/* $NetBSD: agp.c,v 1.38 2006/06/27 10:34:25 tron Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Doug Rabson
|
||||
|
@ -65,7 +65,7 @@
|
|||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.37 2006/01/16 22:59:36 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.38 2006/06/27 10:34:25 tron Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -313,6 +313,7 @@ agp_alloc_gatt(struct agp_softc *sc)
|
|||
u_int32_t apsize = AGP_GET_APERTURE(sc);
|
||||
u_int32_t entries = apsize >> AGP_PAGE_SHIFT;
|
||||
struct agp_gatt *gatt;
|
||||
caddr_t virtual;
|
||||
int dummyseg;
|
||||
|
||||
gatt = malloc(sizeof(struct agp_gatt), M_AGP, M_NOWAIT);
|
||||
|
@ -321,9 +322,10 @@ agp_alloc_gatt(struct agp_softc *sc)
|
|||
gatt->ag_entries = entries;
|
||||
|
||||
if (agp_alloc_dmamem(sc->as_dmat, entries * sizeof(u_int32_t),
|
||||
0, &gatt->ag_dmamap, (caddr_t *)&gatt->ag_virtual,
|
||||
&gatt->ag_physical, &gatt->ag_dmaseg, 1, &dummyseg) != 0)
|
||||
0, &gatt->ag_dmamap, &virtual, &gatt->ag_physical,
|
||||
&gatt->ag_dmaseg, 1, &dummyseg) != 0)
|
||||
return NULL;
|
||||
gatt->ag_virtual = (uint32_t *)virtual;
|
||||
|
||||
gatt->ag_size = entries * sizeof(u_int32_t);
|
||||
memset(gatt->ag_virtual, 0, gatt->ag_size);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: agp_i810.c,v 1.30 2006/05/14 21:45:00 elad Exp $ */
|
||||
/* $NetBSD: agp_i810.c,v 1.31 2006/06/27 10:34:25 tron Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Doug Rabson
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.30 2006/05/14 21:45:00 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.31 2006/06/27 10:34:25 tron Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -249,7 +249,9 @@ agp_i810_attach(struct device *parent, struct device *self, void *aux)
|
|||
gatt->ag_entries = AGP_GET_APERTURE(sc) >> AGP_PAGE_SHIFT;
|
||||
|
||||
if (isc->chiptype == CHIP_I810) {
|
||||
caddr_t virtual;
|
||||
int dummyseg;
|
||||
|
||||
/* Some i810s have on-chip memory called dcache */
|
||||
if (READ1(AGP_I810_DRT) & AGP_I810_DRT_POPULATED)
|
||||
isc->dcache_size = 4 * 1024 * 1024;
|
||||
|
@ -258,12 +260,13 @@ agp_i810_attach(struct device *parent, struct device *self, void *aux)
|
|||
|
||||
/* According to the specs the gatt on the i810 must be 64k */
|
||||
if (agp_alloc_dmamem(sc->as_dmat, 64 * 1024,
|
||||
0, &gatt->ag_dmamap, (caddr_t *)&gatt->ag_virtual,
|
||||
&gatt->ag_physical, &gatt->ag_dmaseg, 1, &dummyseg) != 0) {
|
||||
0, &gatt->ag_dmamap, &virtual, &gatt->ag_physical,
|
||||
&gatt->ag_dmaseg, 1, &dummyseg) != 0) {
|
||||
free(gatt, M_AGP);
|
||||
agp_generic_detach(sc);
|
||||
return ENOMEM;
|
||||
}
|
||||
gatt->ag_virtual = (uint32_t *)virtual;
|
||||
|
||||
gatt->ag_size = gatt->ag_entries * sizeof(u_int32_t);
|
||||
memset(gatt->ag_virtual, 0, gatt->ag_size);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atapi_wdc.c,v 1.99 2006/05/21 23:56:09 christos Exp $ */
|
||||
/* $NetBSD: atapi_wdc.c,v 1.100 2006/06/27 10:39:51 tron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Manuel Bouyer.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.99 2006/05/21 23:56:09 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.100 2006/06/27 10:39:51 tron Exp $");
|
||||
|
||||
#ifndef ATADEBUG
|
||||
#define ATADEBUG
|
||||
|
@ -300,9 +300,11 @@ wdc_atapi_probe_device(struct atapibus_softc *sc, int target)
|
|||
sa.sa_inqbuf.type = ATAPI_CFG_TYPE(id->atap_config);
|
||||
sa.sa_inqbuf.removable = id->atap_config & ATAPI_CFG_REMOV ?
|
||||
T_REMOV : T_FIXED;
|
||||
scsipi_strvis(model, 40, id->atap_model, 40);
|
||||
scsipi_strvis(serial_number, 20, id->atap_serial, 20);
|
||||
scsipi_strvis(firmware_revision, 8, id->atap_revision, 8);
|
||||
scsipi_strvis((u_char *)model, 40, id->atap_model, 40);
|
||||
scsipi_strvis((u_char *)serial_number, 20, id->atap_serial,
|
||||
20);
|
||||
scsipi_strvis((u_char *)firmware_revision, 8,
|
||||
id->atap_revision, 8);
|
||||
sa.sa_inqbuf.vendor = model;
|
||||
sa.sa_inqbuf.product = serial_number;
|
||||
sa.sa_inqbuf.revision = firmware_revision;
|
||||
|
|
Loading…
Reference in New Issue