static uint32_t tid = 0;
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 */
iobuf = alloc_iob ( sizeof ( *path_record ) );
if ( ! iobuf )
/* Update path cache */
iob_put ( iobuf, completion->len );
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 = &ipoib_path_cache[ipoib_path_cache_idx];
memcpy ( &path->gid, &path_record->dgid,
*/
void ipoib_remove ( struct ib_device *ibdev ) {
struct net_device *netdev = ib_get_ownerdata ( ibdev );
+ struct ipoib_device *ipoib = netdev->priv;
unregister_netdev ( netdev );
+ ipoib_destroy_qset ( ipoib, &ipoib->data );
+ ipoib_destroy_qset ( ipoib, &ipoib->meta );
netdev_nullify ( netdev );
netdev_put ( netdev );
}
unsigned int i;
int rc;
- DBGC ( arbel, "Arbel %p command %02x in %zx%s out %zx%s\n",
- arbel, opcode, in_len,
- ( ( command & ARBEL_HCR_IN_MBOX ) ? "(mbox)" : "" ), out_len,
- ( ( command & ARBEL_HCR_OUT_MBOX ) ? "(mbox)" : "" ) );
+ DBGC2 ( arbel, "Arbel %p command %02x in %zx%s out %zx%s\n",
+ arbel, opcode, in_len,
+ ( ( command & ARBEL_HCR_IN_MBOX ) ? "(mbox)" : "" ), out_len,
+ ( ( command & ARBEL_HCR_OUT_MBOX ) ? "(mbox)" : "" ) );
/* Check that HCR is free */
if ( ( rc = arbel_cmd_wait ( arbel, &hcr ) ) != 0 ) {
opcode, opcode,
opcode_modifier, op_mod,
go, 1 );
-
- DBG_HD ( &hcr, sizeof ( hcr ) );
+ DBGC2_HD ( arbel, &hcr, sizeof ( hcr ) );
if ( in_len ) {
- size_t dump_len = in_len;
- if ( dump_len > 256 )
- dump_len = 256;
- // DBG ( "Input:\n" );
- // DBG_HD ( in, dump_len );
+ DBGC2 ( arbel, "Input:\n" );
+ DBGC2_HD ( arbel, in, ( ( in_len < 256 ) ? in_len : 256 ) );
}
/* Issue command */
hcr.u.dwords[3] = readl ( arbel->config + ARBEL_HCR_REG ( 3 ) );
hcr.u.dwords[4] = readl ( arbel->config + ARBEL_HCR_REG ( 4 ) );
memcpy ( out, out_buffer, out_len );
-
if ( out_len ) {
- size_t dump_len = out_len;
- if ( dump_len > 256 )
- dump_len = 256;
- // DBG ( "Output:\n" );
- // DBG_HD ( out, dump_len );
+ DBGC2 ( arbel, "Output:\n" );
+ DBGC2_HD ( arbel, out, ( ( out_len < 256 ) ? out_len : 256 ) );
}
return 0;
union arbelprm_doorbell_register *db_reg,
unsigned int offset ) {
- DBG ( "arbel_ring_doorbell %08lx:%08lx to %lx\n",
- db_reg->dword[0], db_reg->dword[1],
- virt_to_phys ( arbel->uar + offset ) );
+ DBGC2 ( arbel, "Arbel %p ringing doorbell %08lx:%08lx at %lx\n",
+ arbel, db_reg->dword[0], db_reg->dword[1],
+ virt_to_phys ( arbel->uar + offset ) );
barrier();
writel ( db_reg->dword[0], ( arbel->uar + offset + 0 ) );