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
 {
542
 {
543
 	int rc;
543
 	int rc;
544
 	command_fields_t cmd_desc;
544
 	command_fields_t cmd_desc;
545
-	__u16 result[2];
545
+	union {
546
+		__u32 u32;
547
+		__u16 u16[2];
548
+	} result;
546
 
549
 
547
 	memset(&cmd_desc, 0, sizeof cmd_desc);
550
 	memset(&cmd_desc, 0, sizeof cmd_desc);
548
 
551
 
554
 
557
 
555
 	rc = cmd_invoke(&cmd_desc);
558
 	rc = cmd_invoke(&cmd_desc);
556
 	if (!rc) {
559
 	if (!rc) {
557
-		rc = gw_read_cr(HCR_BASE + 16, (__u32 *) result);
560
+		rc = gw_read_cr(HCR_BASE + 16, &result.u32);
558
 		if (!rc) {
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
 		eprintf("");
158
 		eprintf("");
159
 		return -1;
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
 	mad = get_send_wqe_buf(snd_wqe, 0);
163
 	mad = get_send_wqe_buf(snd_wqe, 0);
164
 	memset(mad, 0, 256);
164
 	memset(mad, 0, 256);

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

21
 
21
 
22
 #include "mt23108.h"
22
 #include "mt23108.h"
23
 #include "ib_driver.h"
23
 #include "ib_driver.h"
24
-#include "pci.h"
24
+#include <gpxe/pci.h>
25
 
25
 
26
 struct device_buffers_st {
26
 struct device_buffers_st {
27
 	union recv_wqe_u mads_qp_rcv_queue[NUM_MADS_RCV_WQES]
27
 	union recv_wqe_u mads_qp_rcv_queue[NUM_MADS_RCV_WQES]
203
 		eprintf("");
203
 		eprintf("");
204
 		return -1;
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
 		tavor_pci_dev.dev.bar[2] + UAR_IDX * 0x1000, tavor_pci_dev.uar);
207
 		tavor_pci_dev.dev.bar[2] + UAR_IDX * 0x1000, tavor_pci_dev.uar);
208
 
208
 
209
 	tprintf("");
209
 	tprintf("");
225
 
225
 
226
 	dev_buffers_p = bus_to_virt(tmp);
226
 	dev_buffers_p = bus_to_virt(tmp);
227
 	memreg_size = (__u32) (&memreg_size) - (__u32) dev_buffers_p;
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
 		dev_buffers_p, memreg_size);
229
 		dev_buffers_p, memreg_size);
230
 
230
 
231
 	return 0;
231
 	return 0;
551
 		tprintf("fw_rev_major=%d", qfw.fw_rev_major);
551
 		tprintf("fw_rev_major=%d", qfw.fw_rev_major);
552
 		tprintf("fw_rev_minor=%d", qfw.fw_rev_minor);
552
 		tprintf("fw_rev_minor=%d", qfw.fw_rev_minor);
553
 		tprintf("fw_rev_subminor=%d", qfw.fw_rev_subminor);
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
 	if (qfw.error_buf_start_h) {
559
 	if (qfw.error_buf_start_h) {
944
 	__u32 *psrc, *pdst;
944
 	__u32 *psrc, *pdst;
945
 	__u32 nds;
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
 		virt_to_bus(snd_wqe));
948
 		virt_to_bus(snd_wqe));
949
 
949
 
950
 	memset(&dbell, 0, sizeof dbell);
950
 	memset(&dbell, 0, sizeof dbell);
1068
 		/* update data */
1068
 		/* update data */
1069
 		qp->rcv_wq[i].wqe_cont.qp = qp;
1069
 		qp->rcv_wq[i].wqe_cont.qp = qp;
1070
 		qp->rcv_bufs[i] = ib_buffers.ipoib_rcv_buf[i];
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
 	/* init send queue WQEs list */
1074
 	/* init send queue WQEs list */
1401
 		eprintf("syndrome=0x%lx",
1401
 		eprintf("syndrome=0x%lx",
1402
 			EX_FLD(cqe.error_cqe, tavorprm_completion_with_error_st,
1402
 			EX_FLD(cqe.error_cqe, tavorprm_completion_with_error_st,
1403
 			       syndrome));
1403
 			       syndrome));
1404
-		eprintf("wqe_addr=0x%lx", wqe_p);
1404
+		eprintf("wqe_addr=%p", wqe_p);
1405
 		eprintf("wqe_size=0x%lx",
1405
 		eprintf("wqe_size=0x%lx",
1406
 			EX_FLD(cqe.error_cqe, tavorprm_completion_with_error_st,
1406
 			EX_FLD(cqe.error_cqe, tavorprm_completion_with_error_st,
1407
 			       wqe_size));
1407
 			       wqe_size));
1530
 	wqe->mpointer[1].lkey = dev_ib_data.mkey;
1530
 	wqe->mpointer[1].lkey = dev_ib_data.mkey;
1531
 	wqe->mpointer[1].byte_count = qp->rcv_buf_sz;
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
 	/* we do it only on the data segment since the control
1535
 	/* we do it only on the data segment since the control
1536
 	   segment is always owned by HW */
1536
 	   segment is always owned by HW */
1657
 	struct eq_st *eq = &dev_ib_data.eq;
1657
 	struct eq_st *eq = &dev_ib_data.eq;
1658
 
1658
 
1659
 	ptr = (__u32 *) (&(eq->eq_buf[eq->cons_idx]));
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
 	owner = (ptr[7] & 0x80000000) ? OWNER_HW : OWNER_SW;
1661
 	owner = (ptr[7] & 0x80000000) ? OWNER_HW : OWNER_SW;
1662
 	if (owner == OWNER_SW) {
1662
 	if (owner == OWNER_SW) {
1663
         tprintf("got eqe");
1663
         tprintf("got eqe");

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

21
 
21
 
22
 #include "mt25218.h"
22
 #include "mt25218.h"
23
 #include "ib_driver.h"
23
 #include "ib_driver.h"
24
-#include "pci.h"
24
+#include <gpxe/pci.h>
25
 
25
 
26
 #define MOD_INC(counter, max_count) (counter) = ((counter)+1) & ((max_count) - 1)
26
 #define MOD_INC(counter, max_count) (counter) = ((counter)+1) & ((max_count) - 1)
27
 
27
 
159
 		eprintf("");
159
 		eprintf("");
160
 		return -1;
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
 		memfree_pci_dev.dev.bar[2] + UAR_IDX * 0x1000,
163
 		memfree_pci_dev.dev.bar[2] + UAR_IDX * 0x1000,
164
 		memfree_pci_dev.uar);
164
 		memfree_pci_dev.uar);
165
 
165
 
183
 
183
 
184
 	dev_buffers_p = bus_to_virt(tmp);
184
 	dev_buffers_p = bus_to_virt(tmp);
185
 	memreg_size = (__u32) (&memreg_size) - (__u32) dev_buffers_p;
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
 		dev_buffers_p, memreg_size);
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
 		virt_to_bus(dev_buffers_p->inprm_buf));
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
 		virt_to_bus(dev_buffers_p->outprm_buf));
192
 		virt_to_bus(dev_buffers_p->outprm_buf));
193
 
193
 
194
 	phys_mem.base =
194
 	phys_mem.base =
665
 		tprintf("fw_rev_major=%d", qfw.fw_rev_major);
665
 		tprintf("fw_rev_major=%d", qfw.fw_rev_major);
666
 		tprintf("fw_rev_minor=%d", qfw.fw_rev_minor);
666
 		tprintf("fw_rev_minor=%d", qfw.fw_rev_minor);
667
 		tprintf("fw_rev_subminor=%d", qfw.fw_rev_subminor);
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
 	uar_context_pa = phys_mem.base + phys_mem.offset +
840
 	uar_context_pa = phys_mem.base + phys_mem.offset +
841
 	    dev_ib_data.uar_idx * 4096;
841
 	    dev_ib_data.uar_idx * 4096;
842
 	uar_context_va = phys_to_virt(uar_context_pa);
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
 		uar_context_pa);
844
 		uar_context_pa);
845
 	dev_ib_data.uar_context_base = uar_context_va;
845
 	dev_ib_data.uar_context_base = uar_context_va;
846
 
846
 
859
 	phys_mem.offset += (1 << (map_obj.vpm_arr[0].log2_size + 12));
859
 	phys_mem.offset += (1 << (map_obj.vpm_arr[0].log2_size + 12));
860
 
860
 
861
 	init_hca.log_max_uars = log_max_uars;
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
 	prep_init_hca_buf(&init_hca, inprm);
863
 	prep_init_hca_buf(&init_hca, inprm);
864
 	rc = cmd_init_hca(inprm, MT_STRUCT_SIZE(arbelprm_init_hca_st));
864
 	rc = cmd_init_hca(inprm, MT_STRUCT_SIZE(arbelprm_init_hca_st));
865
 	if (rc) {
865
 	if (rc) {
1720
 		eprintf("vendor_syndrome=0x%lx",
1720
 		eprintf("vendor_syndrome=0x%lx",
1721
 			EX_FLD(cqe.error_cqe, arbelprm_completion_with_error_st,
1721
 			EX_FLD(cqe.error_cqe, arbelprm_completion_with_error_st,
1722
 			       vendor_code));
1722
 			       vendor_code));
1723
-		eprintf("wqe_addr=0x%lx", wqe_p);
1723
+		eprintf("wqe_addr=%p", wqe_p);
1724
 		eprintf("myqpn=0x%lx",
1724
 		eprintf("myqpn=0x%lx",
1725
 			EX_FLD(cqe.error_cqe, arbelprm_completion_with_error_st,
1725
 			EX_FLD(cqe.error_cqe, arbelprm_completion_with_error_st,
1726
 			       myqpn));
1726
 			       myqpn));

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

897
 
897
 
898
 	new_size = ib_cqe.count - GRH_SIZE;
898
 	new_size = ib_cqe.count - GRH_SIZE;
899
 	buf = get_rcv_wqe_buf(ib_cqe.wqe, 1);
899
 	buf = get_rcv_wqe_buf(ib_cqe.wqe, 1);
900
-	tprintf("buf=%lx", buf);
900
+	tprintf("buf=%p", buf);
901
 	rc = ipoib_handle_rcv(buf, &out_buf, &new_size, is_bcast_p);
901
 	rc = ipoib_handle_rcv(buf, &out_buf, &new_size, is_bcast_p);
902
 	if (rc) {
902
 	if (rc) {
903
 		eprintf("");
903
 		eprintf("");
944
 	ipoib_data.ipoib_qpn = ib_get_qpn(qph);
944
 	ipoib_data.ipoib_qpn = ib_get_qpn(qph);
945
 
945
 
946
 	if(print_info)
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
 	ipoib_data.bcast_av = ib_data.bcast_av;
949
 	ipoib_data.bcast_av = ib_data.bcast_av;
950
 	ipoib_data.port_gid_raw = ib_data.port_gid.raw;
950
 	ipoib_data.port_gid_raw = ib_data.port_gid.raw;

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

14
 #include "etherboot.h"
14
 #include "etherboot.h"
15
 /* to get the interface to the body of the program */
15
 /* to get the interface to the body of the program */
16
 #include "nic.h"
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
 #include "mt_version.c"
18
 #include "mt_version.c"
23
 #include "mt23108_imp.c"
19
 #include "mt23108_imp.c"

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

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

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

14
 #include "etherboot.h"
14
 #include "etherboot.h"
15
 /* to get the interface to the body of the program */
15
 /* to get the interface to the body of the program */
16
 #include "nic.h"
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
 #include "mt_version.c"
18
 #include "mt_version.c"
23
 #include "mt25218_imp.c"
19
 #include "mt25218_imp.c"

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

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

Loading…
Cancel
Save