summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2002-11-07 02:13:40 +0000
committersimokawa <simokawa@FreeBSD.org>2002-11-07 02:13:40 +0000
commit2d6271e925121cb79eabe7426b9fc41ae2b1a022 (patch)
tree94f7875ff451957dffb618e2bfa9d7fb6674954d
parentb2a02ec1dcd205bfacf188ec2d9458afea64c103 (diff)
downloadFreeBSD-src-2d6271e925121cb79eabe7426b9fc41ae2b1a022.zip
FreeBSD-src-2d6271e925121cb79eabe7426b9fc41ae2b1a022.tar.gz
- Fix printf warnings on 64bit plathome.
- Disable fw_vmaccess() because it's not used and unuseful 64bit plathome.
-rw-r--r--sys/dev/firewire/firewire.c12
-rw-r--r--sys/dev/firewire/fwohci.c2
-rw-r--r--sys/dev/firewire/sbp.c10
3 files changed, 17 insertions, 7 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c
index bdff903..9d7cadd 100644
--- a/sys/dev/firewire/firewire.c
+++ b/sys/dev/firewire/firewire.c
@@ -113,7 +113,9 @@ static void fw_bus_probe __P((struct firewire_comm *));
static void fw_bus_explore __P((struct firewire_comm *));
static void fw_bus_explore_callback __P((struct fw_xfer *));
static void fw_attach_dev __P((struct firewire_comm *));
+#ifdef FW_VMACCESS
static void fw_vmaccess __P((struct fw_xfer *));
+#endif
struct fw_xfer *asyreqq __P((struct firewire_comm *, u_int8_t, u_int8_t, u_int8_t,
u_int32_t, u_int32_t, void (*)__P((struct fw_xfer *))));
@@ -1604,9 +1606,11 @@ void fw_init(fc)
struct firewire_comm *fc;
{
int i;
+ struct csrdir *csrd;
+#ifdef FW_VMACCESS
struct fw_xfer *xfer;
struct fw_bind *fwb;
- struct csrdir *csrd;
+#endif
fc->max_asyretry = FW_MAXASYRTY;
@@ -1709,6 +1713,7 @@ void fw_init(fc)
#endif
+#ifdef FW_VMACCESS
xfer = fw_xfer_alloc();
if(xfer == NULL) return;
@@ -1726,6 +1731,7 @@ void fw_init(fc)
fwb->addrlen = 0xffffffff;
fwb->xfer = xfer;
fw_bindadd(fc, fwb);
+#endif
}
/*
* To lookup binded process from IEEE1394 address.
@@ -3152,6 +3158,8 @@ void fw_try_bmr(void *arg)
}
return;
}
+
+#ifdef FW_VMACCESS
/*
* Software implementation for physical memory block access.
* XXX:Too slow, usef for debug purpose only.
@@ -3226,6 +3234,8 @@ static void fw_vmaccess(struct fw_xfer *xfer){
/**/
return;
}
+#endif
+
/*
* CRC16 check-sum for IEEE1394 register blocks.
*/
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c
index 96b1f24..5ea29d3 100644
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -2000,7 +2000,7 @@ void print_db(volatile struct fwohcidb *db, u_int32_t ch, u_int32_t max){
"Cnt");
for( i = 0 ; i <= max ; i ++){
key = db[i].db.desc.cmd & OHCI_KEY_MASK;
- printf("%08x %s %s %s %s %5d %08x %08x %04x:%04x",
+ printf("%08tx %s %s %s %s %5d %08x %08x %04x:%04x",
vtophys(&db[i]),
dbcode[(db[i].db.desc.cmd >> 28) & 0xf],
dbkey[(db[i].db.desc.cmd >> 24) & 0x7],
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c
index d33d5a9..27359fc 100644
--- a/sys/dev/firewire/sbp.c
+++ b/sys/dev/firewire/sbp.c
@@ -1994,7 +1994,7 @@ sbp_execute_ocb(void *arg, bus_dma_segment_t *segments, int seg, int error)
SBP_DEBUG(1)
printf("sbp_execute_ocb: seg %d", seg);
for (i = 0; i < seg; i++)
- printf(", %x:%d", segments[i].ds_addr,
+ printf(", %tx:%zd", segments[i].ds_addr,
segments[i].ds_len);
printf("\n");
END_DEBUG
@@ -2003,7 +2003,7 @@ END_DEBUG
#if 1 /* XXX LSI Logic "< 16 byte" bug might be hit */
if (s->ds_len < 16)
printf("sbp_execute_ocb: warning, "
- "segment length(%d) is less than 16."
+ "segment length(%zd) is less than 16."
"(seg=%d/%d)\n", s->ds_len, i+1, seg);
#endif
ocb->ind_ptr[i].hi = htonl(s->ds_len << 16);
@@ -2038,7 +2038,7 @@ sbp_dequeue_ocb(struct sbp_dev *sdev, u_int32_t orb_lo)
next = STAILQ_NEXT(ocb, ocb);
flags = ocb->flags;
SBP_DEBUG(1)
- printf("orb: 0x%x next: 0x%x, flags %x\n",
+ printf("orb: 0x%tx next: 0x%x, flags %x\n",
vtophys(&ocb->orb[0]), ntohl(ocb->orb[1]), flags);
END_DEBUG
if (vtophys(&ocb->orb[0]) == orb_lo) {
@@ -2084,7 +2084,7 @@ sbp_enqueue_ocb(struct sbp_dev *sdev, struct sbp_ocb *ocb)
SBP_DEBUG(2)
sbp_show_sdev_info(sdev, 2);
- printf("sbp_enqueue_ocb orb=0x%x in physical memory\n", vtophys(&ocb->orb[0]));
+ printf("sbp_enqueue_ocb orb=0x%tx in physical memory\n", vtophys(&ocb->orb[0]));
END_DEBUG
prev = STAILQ_LAST(&sdev->ocbs, sbp_ocb, ocb);
STAILQ_INSERT_TAIL(&sdev->ocbs, ocb, ocb);
@@ -2097,7 +2097,7 @@ END_DEBUG
&& ((prev->flags & OCB_ACT_MASK) == OCB_ACT_CMD)
&& ((ocb->flags & OCB_ACT_MASK) == OCB_ACT_CMD)) {
SBP_DEBUG(1)
- printf("linking chain 0x%x -> 0x%x\n", vtophys(&prev->orb[0]),
+ printf("linking chain 0x%tx -> 0x%tx\n", vtophys(&prev->orb[0]),
vtophys(&ocb->orb[0]));
END_DEBUG
prev->flags |= OCB_RESERVED;
OpenPOWER on IntegriCloud