Module Name: src
Committed By: martin
Date: Thu Sep 12 20:16:51 UTC 2013
Modified Files:
src/sys/dev/ieee1394: fwohci.c
Log Message:
Make it compilable with gcc 4.8.1
To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/dev/ieee1394/fwohci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ieee1394/fwohci.c
diff -u src/sys/dev/ieee1394/fwohci.c:1.134 src/sys/dev/ieee1394/fwohci.c:1.135
--- src/sys/dev/ieee1394/fwohci.c:1.134 Sun Apr 7 07:42:20 2013
+++ src/sys/dev/ieee1394/fwohci.c Thu Sep 12 20:16:51 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fwohci.c,v 1.134 2013/04/07 07:42:20 kiyohara Exp $ */
+/* $NetBSD: fwohci.c,v 1.135 2013/09/12 20:16:51 martin Exp $ */
/*-
* Copyright (c) 2003 Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
*
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.134 2013/04/07 07:42:20 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.135 2013/09/12 20:16:51 martin Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -919,13 +919,10 @@ fwohci_itxbuf_enable(struct firewire_com
struct fw_xferq *it;
uint32_t stat;
int cycle_match, cycle_now, ldesc, err = 0;
- unsigned short tag, ich;
dbch = &sc->it[dmach];
it = &dbch->xferq;
- tag = (it->flag >> 6) & 3;
- ich = it->flag & 0x3f;
if ((dbch->flags & FWOHCI_DBCH_INIT) == 0) {
dbch->ndb = it->bnpacket * it->bnchunk;
dbch->ndesc = 3;
@@ -2194,7 +2191,10 @@ fwohci_tbuf_update(struct fwohci_softc *
struct fwohcidb *db;
struct fw_bulkxfer *chunk;
struct fw_xferq *it;
- uint32_t stat, count;
+ uint32_t stat;
+#if 0
+ uint32_t count;
+#endif
int w = 0, ldesc;
it = fc->it[dmach];
@@ -2209,8 +2209,12 @@ fwohci_tbuf_update(struct fwohci_softc *
FWOHCI_DMA_READ(db[ldesc].db.desc.res) >> OHCI_STATUS_SHIFT;
db = ((struct fwohcidb_tr *)(chunk->start))->db;
/* timestamp */
+#if 0
count =
FWOHCI_DMA_READ(db[ldesc].db.desc.res) & OHCI_COUNT_MASK;
+#else
+ (void)FWOHCI_DMA_READ(db[ldesc].db.desc.res);
+#endif
if (stat == 0)
break;
STAILQ_REMOVE_HEAD(&it->stdma, link);
@@ -2344,8 +2348,12 @@ static void
dump_db(struct fwohci_softc *sc, uint32_t ch)
{
struct fwohci_dbch *dbch;
- struct fwohcidb_tr *cp = NULL, *pp, *np = NULL;
- struct fwohcidb *curr = NULL, *prev, *next = NULL;
+ struct fwohcidb_tr *cp = NULL, *pp;
+ struct fwohcidb *curr = NULL;
+#if 0
+ struct fwohcidb_tr *np = NULL;
+ struct fwohcidb *prev, *next = NULL;
+#endif
int idb, jdb;
uint32_t cmd;
@@ -2368,21 +2376,27 @@ dump_db(struct fwohci_softc *sc, uint32_
return;
}
pp = dbch->top;
+#if 0
prev = pp->db;
+#endif
for (idb = 0; idb < dbch->ndb; idb++) {
cp = STAILQ_NEXT(pp, link);
if (cp == NULL) {
curr = NULL;
goto outdb;
}
+#if 0
np = STAILQ_NEXT(cp, link);
+#endif
for (jdb = 0; jdb < dbch->ndesc; jdb++)
if ((cmd & 0xfffffff0) == cp->bus_addr) {
curr = cp->db;
+#if 0
if (np != NULL)
next = np->db;
else
next = NULL;
+#endif
goto outdb;
}
pp = STAILQ_NEXT(pp, link);
@@ -2390,7 +2404,9 @@ dump_db(struct fwohci_softc *sc, uint32_
curr = NULL;
goto outdb;
}
+#if 0
prev = pp->db;
+#endif
}
outdb:
if (curr != NULL) {
@@ -2486,7 +2502,7 @@ print_db(struct fwohcidb_tr *db_tr, stru
static void
fwohci_txbufdb(struct fwohci_softc *sc, int dmach, struct fw_bulkxfer *bulkxfer)
{
- struct fwohcidb_tr *db_tr, *fdb_tr;
+ struct fwohcidb_tr *db_tr /*, *fdb_tr */;
struct fwohci_dbch *dbch;
struct fwohcidb *db;
struct fw_pkt *fp;
@@ -2500,8 +2516,8 @@ fwohci_txbufdb(struct fwohci_softc *sc,
chtag = sc->it[dmach].xferq.flag & 0xff;
db_tr = (struct fwohcidb_tr *)(bulkxfer->start);
- fdb_tr = (struct fwohcidb_tr *)(bulkxfer->end);
/*
+ fdb_tr = (struct fwohcidb_tr *)(bulkxfer->end);
aprint_normal(sc->fc.dev, "DB %08x %08x %08x\n", bulkxfer, db_tr->bus_addr, fdb_tr->bus_addr);
*/
for (idb = 0; idb < dbch->xferq.bnpacket; idb++) {