mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 23:31:39 +00:00
Started fixing up compilation warnings.
This commit is contained in:
parent
d0974ec716
commit
9d2c54735e
@ -542,7 +542,10 @@ static int cmd_mgid_hash(__u8 * gid, __u16 * mgid_hash_p)
|
||||
{
|
||||
int rc;
|
||||
command_fields_t cmd_desc;
|
||||
__u16 result[2];
|
||||
union {
|
||||
__u32 u32;
|
||||
__u16 u16[2];
|
||||
} result;
|
||||
|
||||
memset(&cmd_desc, 0, sizeof cmd_desc);
|
||||
|
||||
@ -554,9 +557,9 @@ static int cmd_mgid_hash(__u8 * gid, __u16 * mgid_hash_p)
|
||||
|
||||
rc = cmd_invoke(&cmd_desc);
|
||||
if (!rc) {
|
||||
rc = gw_read_cr(HCR_BASE + 16, (__u32 *) result);
|
||||
rc = gw_read_cr(HCR_BASE + 16, &result.u32);
|
||||
if (!rc) {
|
||||
*mgid_hash_p = result[0];
|
||||
*mgid_hash_p = result.u16[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ static int join_mc_group(__u32 * qkey_p, __u16 * mlid_p, __u8 join)
|
||||
eprintf("");
|
||||
return -1;
|
||||
}
|
||||
tprintf("allocated snd_wqe=0x%lx", snd_wqe);
|
||||
tprintf("allocated snd_wqe=%p", snd_wqe);
|
||||
|
||||
mad = get_send_wqe_buf(snd_wqe, 0);
|
||||
memset(mad, 0, 256);
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "mt23108.h"
|
||||
#include "ib_driver.h"
|
||||
#include "pci.h"
|
||||
#include <gpxe/pci.h>
|
||||
|
||||
struct device_buffers_st {
|
||||
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)
|
||||
eprintf("");
|
||||
return -1;
|
||||
}
|
||||
tprintf("uar_base (pa:va) = 0x%lx 0x%lx",
|
||||
tprintf("uar_base (pa:va) = 0x%lx %p",
|
||||
tavor_pci_dev.dev.bar[2] + UAR_IDX * 0x1000, tavor_pci_dev.uar);
|
||||
|
||||
tprintf("");
|
||||
@ -225,7 +225,7 @@ static int init_dev_data(void)
|
||||
|
||||
dev_buffers_p = bus_to_virt(tmp);
|
||||
memreg_size = (__u32) (&memreg_size) - (__u32) dev_buffers_p;
|
||||
tprintf("src_buf=0x%lx, dev_buffers_p=0x%lx, memreg_size=0x%x", src_buf,
|
||||
tprintf("src_buf=%p, dev_buffers_p=%p, memreg_size=0x%lx", src_buf,
|
||||
dev_buffers_p, memreg_size);
|
||||
|
||||
return 0;
|
||||
@ -551,9 +551,9 @@ static int setup_hca(__u8 port, void **eq_p)
|
||||
tprintf("fw_rev_major=%d", qfw.fw_rev_major);
|
||||
tprintf("fw_rev_minor=%d", qfw.fw_rev_minor);
|
||||
tprintf("fw_rev_subminor=%d", qfw.fw_rev_subminor);
|
||||
tprintf("error_buf_start_h=0x%x", qfw.error_buf_start_h);
|
||||
tprintf("error_buf_start_l=0x%x", qfw.error_buf_start_l);
|
||||
tprintf("error_buf_size=%d", qfw.error_buf_size);
|
||||
tprintf("error_buf_start_h=0x%lx", qfw.error_buf_start_h);
|
||||
tprintf("error_buf_start_l=0x%lx", qfw.error_buf_start_l);
|
||||
tprintf("error_buf_size=%ld", qfw.error_buf_size);
|
||||
}
|
||||
|
||||
if (qfw.error_buf_start_h) {
|
||||
@ -944,7 +944,7 @@ static int post_send_req(void *qph, void *wqeh, __u8 num_gather)
|
||||
__u32 *psrc, *pdst;
|
||||
__u32 nds;
|
||||
|
||||
tprintf("snd_wqe=0x%lx, virt_to_bus(snd_wqe)=0x%lx", snd_wqe,
|
||||
tprintf("snd_wqe=%p, virt_to_bus(snd_wqe)=0x%lx", snd_wqe,
|
||||
virt_to_bus(snd_wqe));
|
||||
|
||||
memset(&dbell, 0, sizeof dbell);
|
||||
@ -1068,7 +1068,7 @@ static int create_ipoib_qp(void **qp_pp,
|
||||
/* update data */
|
||||
qp->rcv_wq[i].wqe_cont.qp = qp;
|
||||
qp->rcv_bufs[i] = ib_buffers.ipoib_rcv_buf[i];
|
||||
tprintf("rcv_buf=%lx", qp->rcv_bufs[i]);
|
||||
tprintf("rcv_buf=%p", qp->rcv_bufs[i]);
|
||||
}
|
||||
|
||||
/* 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)
|
||||
eprintf("syndrome=0x%lx",
|
||||
EX_FLD(cqe.error_cqe, tavorprm_completion_with_error_st,
|
||||
syndrome));
|
||||
eprintf("wqe_addr=0x%lx", wqe_p);
|
||||
eprintf("wqe_addr=%p", wqe_p);
|
||||
eprintf("wqe_size=0x%lx",
|
||||
EX_FLD(cqe.error_cqe, tavorprm_completion_with_error_st,
|
||||
wqe_size));
|
||||
@ -1530,7 +1530,7 @@ static struct recv_wqe_st *alloc_rcv_wqe(struct udqp_st *qp)
|
||||
wqe->mpointer[1].lkey = dev_ib_data.mkey;
|
||||
wqe->mpointer[1].byte_count = qp->rcv_buf_sz;
|
||||
|
||||
tprintf("rcv_buf=%lx\n", qp->rcv_bufs[new_entry]);
|
||||
tprintf("rcv_buf=%p\n", qp->rcv_bufs[new_entry]);
|
||||
|
||||
/* we do it only on the data segment since the control
|
||||
segment is always owned by HW */
|
||||
@ -1657,7 +1657,7 @@ static int poll_eq(struct ib_eqe_st *ib_eqe_p, __u8 * num_eqes)
|
||||
struct eq_st *eq = &dev_ib_data.eq;
|
||||
|
||||
ptr = (__u32 *) (&(eq->eq_buf[eq->cons_idx]));
|
||||
tprintf("cons)idx=%d, addr(eqe)=%x, val=0x%x", eq->cons_idx, virt_to_bus(ptr), ptr[7]);
|
||||
tprintf("cons)idx=%ld, addr(eqe)=%lx, val=0x%lx", eq->cons_idx, virt_to_bus(ptr), ptr[7]);
|
||||
owner = (ptr[7] & 0x80000000) ? OWNER_HW : OWNER_SW;
|
||||
if (owner == OWNER_SW) {
|
||||
tprintf("got eqe");
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "mt25218.h"
|
||||
#include "ib_driver.h"
|
||||
#include "pci.h"
|
||||
#include <gpxe/pci.h>
|
||||
|
||||
#define MOD_INC(counter, max_count) (counter) = ((counter)+1) & ((max_count) - 1)
|
||||
|
||||
@ -159,7 +159,7 @@ static int ib_device_init(struct pci_device *dev)
|
||||
eprintf("");
|
||||
return -1;
|
||||
}
|
||||
tprintf("uar_base (pa:va) = 0x%lx 0x%lx",
|
||||
tprintf("uar_base (pa:va) = 0x%lx %p",
|
||||
memfree_pci_dev.dev.bar[2] + UAR_IDX * 0x1000,
|
||||
memfree_pci_dev.uar);
|
||||
|
||||
@ -183,12 +183,12 @@ static int init_dev_data(void)
|
||||
|
||||
dev_buffers_p = bus_to_virt(tmp);
|
||||
memreg_size = (__u32) (&memreg_size) - (__u32) dev_buffers_p;
|
||||
tprintf("src_buf=0x%lx, dev_buffers_p=0x%lx, memreg_size=0x%x", src_buf,
|
||||
tprintf("src_buf=%p, dev_buffers_p=%p, memreg_size=0x%lx", src_buf,
|
||||
dev_buffers_p, memreg_size);
|
||||
|
||||
tprintf("inprm: va=0x%lx, pa=0x%lx", dev_buffers_p->inprm_buf,
|
||||
tprintf("inprm: va=%p, pa=0x%lx", dev_buffers_p->inprm_buf,
|
||||
virt_to_bus(dev_buffers_p->inprm_buf));
|
||||
tprintf("outprm: va=0x%lx, pa=0x%lx", dev_buffers_p->outprm_buf,
|
||||
tprintf("outprm: va=%p, pa=0x%lx", dev_buffers_p->outprm_buf,
|
||||
virt_to_bus(dev_buffers_p->outprm_buf));
|
||||
|
||||
phys_mem.base =
|
||||
@ -665,9 +665,9 @@ static int setup_hca(__u8 port, void **eq_p)
|
||||
tprintf("fw_rev_major=%d", qfw.fw_rev_major);
|
||||
tprintf("fw_rev_minor=%d", qfw.fw_rev_minor);
|
||||
tprintf("fw_rev_subminor=%d", qfw.fw_rev_subminor);
|
||||
tprintf("error_buf_start_h=0x%x", qfw.error_buf_start_h);
|
||||
tprintf("error_buf_start_l=0x%x", qfw.error_buf_start_l);
|
||||
tprintf("error_buf_size=%d", qfw.error_buf_size);
|
||||
tprintf("error_buf_start_h=0x%lx", qfw.error_buf_start_h);
|
||||
tprintf("error_buf_start_l=0x%lx", qfw.error_buf_start_l);
|
||||
tprintf("error_buf_size=%ld", qfw.error_buf_size);
|
||||
}
|
||||
|
||||
|
||||
@ -840,7 +840,7 @@ static int setup_hca(__u8 port, void **eq_p)
|
||||
uar_context_pa = phys_mem.base + phys_mem.offset +
|
||||
dev_ib_data.uar_idx * 4096;
|
||||
uar_context_va = phys_to_virt(uar_context_pa);
|
||||
tprintf("uar_context: va=0x%lx, pa=0x%lx", uar_context_va,
|
||||
tprintf("uar_context: va=%p, pa=0x%lx", uar_context_va,
|
||||
uar_context_pa);
|
||||
dev_ib_data.uar_context_base = uar_context_va;
|
||||
|
||||
@ -859,7 +859,7 @@ static int setup_hca(__u8 port, void **eq_p)
|
||||
phys_mem.offset += (1 << (map_obj.vpm_arr[0].log2_size + 12));
|
||||
|
||||
init_hca.log_max_uars = log_max_uars;
|
||||
tprintf("inprm: va=0x%lx, pa=0x%lx", inprm, virt_to_bus(inprm));
|
||||
tprintf("inprm: va=%p, pa=0x%lx", inprm, virt_to_bus(inprm));
|
||||
prep_init_hca_buf(&init_hca, inprm);
|
||||
rc = cmd_init_hca(inprm, MT_STRUCT_SIZE(arbelprm_init_hca_st));
|
||||
if (rc) {
|
||||
@ -1720,7 +1720,7 @@ static int ib_poll_cq(void *cqh, struct ib_cqe_st *ib_cqe_p, u8 * num_cqes)
|
||||
eprintf("vendor_syndrome=0x%lx",
|
||||
EX_FLD(cqe.error_cqe, arbelprm_completion_with_error_st,
|
||||
vendor_code));
|
||||
eprintf("wqe_addr=0x%lx", wqe_p);
|
||||
eprintf("wqe_addr=%p", wqe_p);
|
||||
eprintf("myqpn=0x%lx",
|
||||
EX_FLD(cqe.error_cqe, arbelprm_completion_with_error_st,
|
||||
myqpn));
|
||||
|
@ -897,7 +897,7 @@ static int ipoib_read_packet(__u16 * prot_p, void *data, unsigned int *size_p,
|
||||
|
||||
new_size = ib_cqe.count - GRH_SIZE;
|
||||
buf = get_rcv_wqe_buf(ib_cqe.wqe, 1);
|
||||
tprintf("buf=%lx", buf);
|
||||
tprintf("buf=%p", buf);
|
||||
rc = ipoib_handle_rcv(buf, &out_buf, &new_size, is_bcast_p);
|
||||
if (rc) {
|
||||
eprintf("");
|
||||
@ -944,7 +944,7 @@ static int ipoib_init(struct pci_device *pci)
|
||||
ipoib_data.ipoib_qpn = ib_get_qpn(qph);
|
||||
|
||||
if(print_info)
|
||||
printf("local ipoib qpn=0x%x\n", ipoib_data.ipoib_qpn);
|
||||
printf("local ipoib qpn=0x%lx\n", ipoib_data.ipoib_qpn);
|
||||
|
||||
ipoib_data.bcast_av = ib_data.bcast_av;
|
||||
ipoib_data.port_gid_raw = ib_data.port_gid.raw;
|
||||
|
@ -14,10 +14,6 @@ Skeleton NIC driver for Etherboot
|
||||
#include "etherboot.h"
|
||||
/* to get the interface to the body of the program */
|
||||
#include "nic.h"
|
||||
/* to get the PCI support functions, if this is a PCI NIC */
|
||||
#include "pci.h"
|
||||
/* to get the ISA support functions, if this is an ISA NIC */
|
||||
#include "isa.h"
|
||||
|
||||
#include "mt_version.c"
|
||||
#include "mt23108_imp.c"
|
||||
|
@ -106,7 +106,7 @@ static void hd(void *where, int n)
|
||||
int i;
|
||||
|
||||
while (n > 0) {
|
||||
printf("%X ", where);
|
||||
printf("%p ", where);
|
||||
for (i = 0; i < ((n > 16) ? 16 : n); i++)
|
||||
printf(" %hhX", ((char *)where)[i]);
|
||||
printf("\n");
|
||||
|
@ -14,10 +14,6 @@ Skeleton NIC driver for Etherboot
|
||||
#include "etherboot.h"
|
||||
/* to get the interface to the body of the program */
|
||||
#include "nic.h"
|
||||
/* to get the PCI support functions, if this is a PCI NIC */
|
||||
#include "pci.h"
|
||||
/* to get the ISA support functions, if this is an ISA NIC */
|
||||
#include "isa.h"
|
||||
|
||||
#include "mt_version.c"
|
||||
#include "mt25218_imp.c"
|
||||
|
@ -106,7 +106,7 @@ static void hd(void *where, int n)
|
||||
int i;
|
||||
|
||||
while (n > 0) {
|
||||
printf("%X ", where);
|
||||
printf("%p ", where);
|
||||
for (i = 0; i < ((n > 16) ? 16 : n); i++)
|
||||
printf(" %hhX", ((char *)where)[i]);
|
||||
printf("\n");
|
||||
|
Loading…
Reference in New Issue
Block a user