david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Cleaned up some debug messages.

This commit is contained in:
Michael Brown 2007-09-17 10:56:21 +01:00
parent ab191e45db
commit 32a7bbb1e3
2 changed files with 15 additions and 34 deletions

View File

@ -322,16 +322,6 @@ static int ipoib_get_path_record ( struct ipoib_device *ipoib,
static uint32_t tid = 0; static uint32_t tid = 0;
int rc; int rc;
int get_path_record(struct ib_gid *dgid, uint16_t *dlid_p,
uint8_t *sl_p, uint8_t *rate_p);
uint16_t tmp_dlid;
uint8_t tmp_sl;
uint8_t tmp_rate;
get_path_record ( gid, &tmp_dlid, &tmp_sl, &tmp_rate );
DBG ( "get_path_record() gives dlid = %04x, sl = %02x, rate = %02x\n",
tmp_dlid, tmp_sl, tmp_rate );
/* Allocate I/O buffer */ /* Allocate I/O buffer */
iobuf = alloc_iob ( sizeof ( *path_record ) ); iobuf = alloc_iob ( sizeof ( *path_record ) );
if ( ! iobuf ) if ( ! iobuf )
@ -513,10 +503,6 @@ static void ipoib_meta_complete_recv ( struct ib_device *ibdev __unused,
/* Update path cache */ /* Update path cache */
iob_put ( iobuf, completion->len ); iob_put ( iobuf, completion->len );
iob_pull ( iobuf, sizeof ( struct ib_global_route_header ) ); iob_pull ( iobuf, sizeof ( struct ib_global_route_header ) );
DBG ( "Metadata RX:\n" );
DBG_HD ( iobuf->data, iob_len ( iobuf ) );
path_record = iobuf->data; path_record = iobuf->data;
path = &ipoib_path_cache[ipoib_path_cache_idx]; path = &ipoib_path_cache[ipoib_path_cache_idx];
memcpy ( &path->gid, &path_record->dgid, memcpy ( &path->gid, &path_record->dgid,
@ -716,8 +702,11 @@ int ipoib_probe ( struct ib_device *ibdev ) {
*/ */
void ipoib_remove ( struct ib_device *ibdev ) { void ipoib_remove ( struct ib_device *ibdev ) {
struct net_device *netdev = ib_get_ownerdata ( ibdev ); struct net_device *netdev = ib_get_ownerdata ( ibdev );
struct ipoib_device *ipoib = netdev->priv;
unregister_netdev ( netdev ); unregister_netdev ( netdev );
ipoib_destroy_qset ( ipoib, &ipoib->data );
ipoib_destroy_qset ( ipoib, &ipoib->meta );
netdev_nullify ( netdev ); netdev_nullify ( netdev );
netdev_put ( netdev ); netdev_put ( netdev );
} }

View File

@ -138,10 +138,10 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
unsigned int i; unsigned int i;
int rc; int rc;
DBGC ( arbel, "Arbel %p command %02x in %zx%s out %zx%s\n", DBGC2 ( arbel, "Arbel %p command %02x in %zx%s out %zx%s\n",
arbel, opcode, in_len, arbel, opcode, in_len,
( ( command & ARBEL_HCR_IN_MBOX ) ? "(mbox)" : "" ), out_len, ( ( command & ARBEL_HCR_IN_MBOX ) ? "(mbox)" : "" ), out_len,
( ( command & ARBEL_HCR_OUT_MBOX ) ? "(mbox)" : "" ) ); ( ( command & ARBEL_HCR_OUT_MBOX ) ? "(mbox)" : "" ) );
/* Check that HCR is free */ /* Check that HCR is free */
if ( ( rc = arbel_cmd_wait ( arbel, &hcr ) ) != 0 ) { if ( ( rc = arbel_cmd_wait ( arbel, &hcr ) ) != 0 ) {
@ -168,14 +168,10 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
opcode, opcode, opcode, opcode,
opcode_modifier, op_mod, opcode_modifier, op_mod,
go, 1 ); go, 1 );
DBGC2_HD ( arbel, &hcr, sizeof ( hcr ) );
DBG_HD ( &hcr, sizeof ( hcr ) );
if ( in_len ) { if ( in_len ) {
size_t dump_len = in_len; DBGC2 ( arbel, "Input:\n" );
if ( dump_len > 256 ) DBGC2_HD ( arbel, in, ( ( in_len < 256 ) ? in_len : 256 ) );
dump_len = 256;
// DBG ( "Input:\n" );
// DBG_HD ( in, dump_len );
} }
/* Issue command */ /* Issue command */
@ -207,13 +203,9 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
hcr.u.dwords[3] = readl ( arbel->config + ARBEL_HCR_REG ( 3 ) ); hcr.u.dwords[3] = readl ( arbel->config + ARBEL_HCR_REG ( 3 ) );
hcr.u.dwords[4] = readl ( arbel->config + ARBEL_HCR_REG ( 4 ) ); hcr.u.dwords[4] = readl ( arbel->config + ARBEL_HCR_REG ( 4 ) );
memcpy ( out, out_buffer, out_len ); memcpy ( out, out_buffer, out_len );
if ( out_len ) { if ( out_len ) {
size_t dump_len = out_len; DBGC2 ( arbel, "Output:\n" );
if ( dump_len > 256 ) DBGC2_HD ( arbel, out, ( ( out_len < 256 ) ? out_len : 256 ) );
dump_len = 256;
// DBG ( "Output:\n" );
// DBG_HD ( out, dump_len );
} }
return 0; return 0;
@ -737,9 +729,9 @@ static void arbel_ring_doorbell ( struct arbel *arbel,
union arbelprm_doorbell_register *db_reg, union arbelprm_doorbell_register *db_reg,
unsigned int offset ) { unsigned int offset ) {
DBG ( "arbel_ring_doorbell %08lx:%08lx to %lx\n", DBGC2 ( arbel, "Arbel %p ringing doorbell %08lx:%08lx at %lx\n",
db_reg->dword[0], db_reg->dword[1], arbel, db_reg->dword[0], db_reg->dword[1],
virt_to_phys ( arbel->uar + offset ) ); virt_to_phys ( arbel->uar + offset ) );
barrier(); barrier();
writel ( db_reg->dword[0], ( arbel->uar + offset + 0 ) ); writel ( db_reg->dword[0], ( arbel->uar + offset + 0 ) );