Browse Source

Started fixing up compilation warnings.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
9d2c54735e

+ 6
- 3
src/drivers/net/mlx_ipoib/cmdif_comm.c View File

@@ -542,7 +542,10 @@ static int cmd_mgid_hash(__u8 * gid, __u16 * mgid_hash_p)
542 542
 {
543 543
 	int rc;
544 544
 	command_fields_t cmd_desc;
545
-	__u16 result[2];
545
+	union {
546
+		__u32 u32;
547
+		__u16 u16[2];
548
+	} result;
546 549
 
547 550
 	memset(&cmd_desc, 0, sizeof cmd_desc);
548 551
 
@@ -554,9 +557,9 @@ static int cmd_mgid_hash(__u8 * gid, __u16 * mgid_hash_p)
554 557
 
555 558
 	rc = cmd_invoke(&cmd_desc);
556 559
 	if (!rc) {
557
-		rc = gw_read_cr(HCR_BASE + 16, (__u32 *) result);
560
+		rc = gw_read_cr(HCR_BASE + 16, &result.u32);
558 561
 		if (!rc) {
559
-			*mgid_hash_p = result[0];
562
+			*mgid_hash_p = result.u16[0];
560 563
 		}
561 564
 	}
562 565
 

+ 1
- 1
src/drivers/net/mlx_ipoib/ib_mad.c View File

@@ -158,7 +158,7 @@ static int join_mc_group(__u32 * qkey_p, __u16 * mlid_p, __u8 join)
158 158
 		eprintf("");
159 159
 		return -1;
160 160
 	}
161
-	tprintf("allocated snd_wqe=0x%lx", snd_wqe);
161
+	tprintf("allocated snd_wqe=%p", snd_wqe);
162 162
 
163 163
 	mad = get_send_wqe_buf(snd_wqe, 0);
164 164
 	memset(mad, 0, 256);

+ 11
- 11
src/drivers/net/mlx_ipoib/ib_mt23108.c View File

@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "mt23108.h"
23 23
 #include "ib_driver.h"
24
-#include "pci.h"
24
+#include <gpxe/pci.h>
25 25
 
26 26
 struct device_buffers_st {
27 27
 	union recv_wqe_u mads_qp_rcv_queue[NUM_MADS_RCV_WQES]
@@ -203,7 +203,7 @@ static int ib_device_init(struct pci_device *dev)
203 203
 		eprintf("");
204 204
 		return -1;
205 205
 	}
206
-	tprintf("uar_base (pa:va) = 0x%lx 0x%lx",
206
+	tprintf("uar_base (pa:va) = 0x%lx %p",
207 207
 		tavor_pci_dev.dev.bar[2] + UAR_IDX * 0x1000, tavor_pci_dev.uar);
208 208
 
209 209
 	tprintf("");
@@ -225,7 +225,7 @@ static int init_dev_data(void)
225 225
 
226 226
 	dev_buffers_p = bus_to_virt(tmp);
227 227
 	memreg_size = (__u32) (&memreg_size) - (__u32) dev_buffers_p;
228
-	tprintf("src_buf=0x%lx, dev_buffers_p=0x%lx, memreg_size=0x%x", src_buf,
228
+	tprintf("src_buf=%p, dev_buffers_p=%p, memreg_size=0x%lx", src_buf,
229 229
 		dev_buffers_p, memreg_size);
230 230
 
231 231
 	return 0;
@@ -551,9 +551,9 @@ static int setup_hca(__u8 port, void **eq_p)
551 551
 		tprintf("fw_rev_major=%d", qfw.fw_rev_major);
552 552
 		tprintf("fw_rev_minor=%d", qfw.fw_rev_minor);
553 553
 		tprintf("fw_rev_subminor=%d", qfw.fw_rev_subminor);
554
-		tprintf("error_buf_start_h=0x%x", qfw.error_buf_start_h);
555
-		tprintf("error_buf_start_l=0x%x", qfw.error_buf_start_l);
556
-		tprintf("error_buf_size=%d", qfw.error_buf_size);
554
+		tprintf("error_buf_start_h=0x%lx", qfw.error_buf_start_h);
555
+		tprintf("error_buf_start_l=0x%lx", qfw.error_buf_start_l);
556
+		tprintf("error_buf_size=%ld", qfw.error_buf_size);
557 557
 	}
558 558
 
559 559
 	if (qfw.error_buf_start_h) {
@@ -944,7 +944,7 @@ static int post_send_req(void *qph, void *wqeh, __u8 num_gather)
944 944
 	__u32 *psrc, *pdst;
945 945
 	__u32 nds;
946 946
 
947
-	tprintf("snd_wqe=0x%lx, virt_to_bus(snd_wqe)=0x%lx", snd_wqe,
947
+	tprintf("snd_wqe=%p, virt_to_bus(snd_wqe)=0x%lx", snd_wqe,
948 948
 		virt_to_bus(snd_wqe));
949 949
 
950 950
 	memset(&dbell, 0, sizeof dbell);
@@ -1068,7 +1068,7 @@ static int create_ipoib_qp(void **qp_pp,
1068 1068
 		/* update data */
1069 1069
 		qp->rcv_wq[i].wqe_cont.qp = qp;
1070 1070
 		qp->rcv_bufs[i] = ib_buffers.ipoib_rcv_buf[i];
1071
-		tprintf("rcv_buf=%lx", qp->rcv_bufs[i]);
1071
+		tprintf("rcv_buf=%p", qp->rcv_bufs[i]);
1072 1072
 	}
1073 1073
 
1074 1074
 	/* init send queue WQEs list */
@@ -1401,7 +1401,7 @@ static int ib_poll_cq(void *cqh, struct ib_cqe_st *ib_cqe_p, u8 * num_cqes)
1401 1401
 		eprintf("syndrome=0x%lx",
1402 1402
 			EX_FLD(cqe.error_cqe, tavorprm_completion_with_error_st,
1403 1403
 			       syndrome));
1404
-		eprintf("wqe_addr=0x%lx", wqe_p);
1404
+		eprintf("wqe_addr=%p", wqe_p);
1405 1405
 		eprintf("wqe_size=0x%lx",
1406 1406
 			EX_FLD(cqe.error_cqe, tavorprm_completion_with_error_st,
1407 1407
 			       wqe_size));
@@ -1530,7 +1530,7 @@ static struct recv_wqe_st *alloc_rcv_wqe(struct udqp_st *qp)
1530 1530
 	wqe->mpointer[1].lkey = dev_ib_data.mkey;
1531 1531
 	wqe->mpointer[1].byte_count = qp->rcv_buf_sz;
1532 1532
 
1533
-	tprintf("rcv_buf=%lx\n", qp->rcv_bufs[new_entry]);
1533
+	tprintf("rcv_buf=%p\n", qp->rcv_bufs[new_entry]);
1534 1534
 
1535 1535
 	/* we do it only on the data segment since the control
1536 1536
 	   segment is always owned by HW */
@@ -1657,7 +1657,7 @@ static int poll_eq(struct ib_eqe_st *ib_eqe_p, __u8 * num_eqes)
1657 1657
 	struct eq_st *eq = &dev_ib_data.eq;
1658 1658
 
1659 1659
 	ptr = (__u32 *) (&(eq->eq_buf[eq->cons_idx]));
1660
-	tprintf("cons)idx=%d, addr(eqe)=%x, val=0x%x", eq->cons_idx, virt_to_bus(ptr), ptr[7]);
1660
+	tprintf("cons)idx=%ld, addr(eqe)=%lx, val=0x%lx", eq->cons_idx, virt_to_bus(ptr), ptr[7]);
1661 1661
 	owner = (ptr[7] & 0x80000000) ? OWNER_HW : OWNER_SW;
1662 1662
 	if (owner == OWNER_SW) {
1663 1663
         tprintf("got eqe");

+ 11
- 11
src/drivers/net/mlx_ipoib/ib_mt25218.c View File

@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "mt25218.h"
23 23
 #include "ib_driver.h"
24
-#include "pci.h"
24
+#include <gpxe/pci.h>
25 25
 
26 26
 #define MOD_INC(counter, max_count) (counter) = ((counter)+1) & ((max_count) - 1)
27 27
 
@@ -159,7 +159,7 @@ static int ib_device_init(struct pci_device *dev)
159 159
 		eprintf("");
160 160
 		return -1;
161 161
 	}
162
-	tprintf("uar_base (pa:va) = 0x%lx 0x%lx",
162
+	tprintf("uar_base (pa:va) = 0x%lx %p",
163 163
 		memfree_pci_dev.dev.bar[2] + UAR_IDX * 0x1000,
164 164
 		memfree_pci_dev.uar);
165 165
 
@@ -183,12 +183,12 @@ static int init_dev_data(void)
183 183
 
184 184
 	dev_buffers_p = bus_to_virt(tmp);
185 185
 	memreg_size = (__u32) (&memreg_size) - (__u32) dev_buffers_p;
186
-	tprintf("src_buf=0x%lx, dev_buffers_p=0x%lx, memreg_size=0x%x", src_buf,
186
+	tprintf("src_buf=%p, dev_buffers_p=%p, memreg_size=0x%lx", src_buf,
187 187
 		dev_buffers_p, memreg_size);
188 188
 
189
-	tprintf("inprm: va=0x%lx, pa=0x%lx", dev_buffers_p->inprm_buf,
189
+	tprintf("inprm: va=%p, pa=0x%lx", dev_buffers_p->inprm_buf,
190 190
 		virt_to_bus(dev_buffers_p->inprm_buf));
191
-	tprintf("outprm: va=0x%lx, pa=0x%lx", dev_buffers_p->outprm_buf,
191
+	tprintf("outprm: va=%p, pa=0x%lx", dev_buffers_p->outprm_buf,
192 192
 		virt_to_bus(dev_buffers_p->outprm_buf));
193 193
 
194 194
 	phys_mem.base =
@@ -665,9 +665,9 @@ static int setup_hca(__u8 port, void **eq_p)
665 665
 		tprintf("fw_rev_major=%d", qfw.fw_rev_major);
666 666
 		tprintf("fw_rev_minor=%d", qfw.fw_rev_minor);
667 667
 		tprintf("fw_rev_subminor=%d", qfw.fw_rev_subminor);
668
-		tprintf("error_buf_start_h=0x%x", qfw.error_buf_start_h);
669
-		tprintf("error_buf_start_l=0x%x", qfw.error_buf_start_l);
670
-		tprintf("error_buf_size=%d", qfw.error_buf_size);
668
+		tprintf("error_buf_start_h=0x%lx", qfw.error_buf_start_h);
669
+		tprintf("error_buf_start_l=0x%lx", qfw.error_buf_start_l);
670
+		tprintf("error_buf_size=%ld", qfw.error_buf_size);
671 671
 	}
672 672
 
673 673
 
@@ -840,7 +840,7 @@ static int setup_hca(__u8 port, void **eq_p)
840 840
 	uar_context_pa = phys_mem.base + phys_mem.offset +
841 841
 	    dev_ib_data.uar_idx * 4096;
842 842
 	uar_context_va = phys_to_virt(uar_context_pa);
843
-	tprintf("uar_context: va=0x%lx, pa=0x%lx", uar_context_va,
843
+	tprintf("uar_context: va=%p, pa=0x%lx", uar_context_va,
844 844
 		uar_context_pa);
845 845
 	dev_ib_data.uar_context_base = uar_context_va;
846 846
 
@@ -859,7 +859,7 @@ static int setup_hca(__u8 port, void **eq_p)
859 859
 	phys_mem.offset += (1 << (map_obj.vpm_arr[0].log2_size + 12));
860 860
 
861 861
 	init_hca.log_max_uars = log_max_uars;
862
-	tprintf("inprm: va=0x%lx, pa=0x%lx", inprm, virt_to_bus(inprm));
862
+	tprintf("inprm: va=%p, pa=0x%lx", inprm, virt_to_bus(inprm));
863 863
 	prep_init_hca_buf(&init_hca, inprm);
864 864
 	rc = cmd_init_hca(inprm, MT_STRUCT_SIZE(arbelprm_init_hca_st));
865 865
 	if (rc) {
@@ -1720,7 +1720,7 @@ static int ib_poll_cq(void *cqh, struct ib_cqe_st *ib_cqe_p, u8 * num_cqes)
1720 1720
 		eprintf("vendor_syndrome=0x%lx",
1721 1721
 			EX_FLD(cqe.error_cqe, arbelprm_completion_with_error_st,
1722 1722
 			       vendor_code));
1723
-		eprintf("wqe_addr=0x%lx", wqe_p);
1723
+		eprintf("wqe_addr=%p", wqe_p);
1724 1724
 		eprintf("myqpn=0x%lx",
1725 1725
 			EX_FLD(cqe.error_cqe, arbelprm_completion_with_error_st,
1726 1726
 			       myqpn));

+ 2
- 2
src/drivers/net/mlx_ipoib/ipoib.c View File

@@ -897,7 +897,7 @@ static int ipoib_read_packet(__u16 * prot_p, void *data, unsigned int *size_p,
897 897
 
898 898
 	new_size = ib_cqe.count - GRH_SIZE;
899 899
 	buf = get_rcv_wqe_buf(ib_cqe.wqe, 1);
900
-	tprintf("buf=%lx", buf);
900
+	tprintf("buf=%p", buf);
901 901
 	rc = ipoib_handle_rcv(buf, &out_buf, &new_size, is_bcast_p);
902 902
 	if (rc) {
903 903
 		eprintf("");
@@ -944,7 +944,7 @@ static int ipoib_init(struct pci_device *pci)
944 944
 	ipoib_data.ipoib_qpn = ib_get_qpn(qph);
945 945
 
946 946
 	if(print_info)
947
-		printf("local ipoib qpn=0x%x\n", ipoib_data.ipoib_qpn);
947
+		printf("local ipoib qpn=0x%lx\n", ipoib_data.ipoib_qpn);
948 948
 
949 949
 	ipoib_data.bcast_av = ib_data.bcast_av;
950 950
 	ipoib_data.port_gid_raw = ib_data.port_gid.raw;

+ 0
- 4
src/drivers/net/mlx_ipoib/mt23108.c View File

@@ -14,10 +14,6 @@ Skeleton NIC driver for Etherboot
14 14
 #include "etherboot.h"
15 15
 /* to get the interface to the body of the program */
16 16
 #include "nic.h"
17
-/* to get the PCI support functions, if this is a PCI NIC */
18
-#include "pci.h"
19
-/* to get the ISA support functions, if this is an ISA NIC */
20
-#include "isa.h"
21 17
 
22 18
 #include "mt_version.c"
23 19
 #include "mt23108_imp.c"

+ 1
- 1
src/drivers/net/mlx_ipoib/mt23108_imp.c View File

@@ -106,7 +106,7 @@ static void hd(void *where, int n)
106 106
 	int i;
107 107
 
108 108
 	while (n > 0) {
109
-		printf("%X ", where);
109
+		printf("%p ", where);
110 110
 		for (i = 0; i < ((n > 16) ? 16 : n); i++)
111 111
 			printf(" %hhX", ((char *)where)[i]);
112 112
 		printf("\n");

+ 0
- 4
src/drivers/net/mlx_ipoib/mt25218.c View File

@@ -14,10 +14,6 @@ Skeleton NIC driver for Etherboot
14 14
 #include "etherboot.h"
15 15
 /* to get the interface to the body of the program */
16 16
 #include "nic.h"
17
-/* to get the PCI support functions, if this is a PCI NIC */
18
-#include "pci.h"
19
-/* to get the ISA support functions, if this is an ISA NIC */
20
-#include "isa.h"
21 17
 
22 18
 #include "mt_version.c"
23 19
 #include "mt25218_imp.c"

+ 1
- 1
src/drivers/net/mlx_ipoib/mt25218_imp.c View File

@@ -106,7 +106,7 @@ static void hd(void *where, int n)
106 106
 	int i;
107 107
 
108 108
 	while (n > 0) {
109
-		printf("%X ", where);
109
+		printf("%p ", where);
110 110
 		for (i = 0; i < ((n > 16) ? 16 : n); i++)
111 111
 			printf(" %hhX", ((char *)where)[i]);
112 112
 		printf("\n");

Loading…
Cancel
Save