static void setup_storage_lists(struct qdio_q *q, struct qdio_irq *irq_ptr, void **sbals_array, int i) { struct qdio_q *prev; int j; DBF_HEX(&q, sizeof(void *)); q->sl = (struct sl *)((char *)q->slib + PAGE_SIZE / 2); /* fill in sbal */ for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; j++) { q->sbal[j] = *sbals_array++; WARN_ON((unsigned long)q->sbal[j] & 0xff); } /* fill in slib */ if (i > 0) { prev = (q->is_input_q) ? irq_ptr->input_qs[i - 1] : irq_ptr->output_qs[i - 1]; prev->slib->nsliba = (unsigned long)q->slib; } q->slib->sla = (unsigned long)q->sl; q->slib->slsba = (unsigned long)&q->slsb.val[0]; /* fill in sl */ for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; j++) q->sl->element[j].sbal = (unsigned long)q->sbal[j]; DBF_EVENT("sl-slsb-sbal"); DBF_HEX(q->sl, sizeof(void *)); DBF_HEX(&q->slsb, sizeof(void *)); DBF_HEX(q->sbal, sizeof(void *)); }
void qdio_allocate_dbf(struct qdio_initialize *init_data, struct qdio_irq *irq_ptr) { char text[20]; DBF_EVENT("qfmt:%1d", init_data->q_format); DBF_HEX(init_data->adapter_name, 8); DBF_EVENT("qpff%4x", init_data->qib_param_field_format); DBF_HEX(&init_data->qib_param_field, sizeof(void *)); DBF_HEX(&init_data->input_slib_elements, sizeof(void *)); DBF_HEX(&init_data->output_slib_elements, sizeof(void *)); DBF_EVENT("niq:%1d noq:%1d", init_data->no_input_qs, init_data->no_output_qs); DBF_HEX(&init_data->input_handler, sizeof(void *)); DBF_HEX(&init_data->output_handler, sizeof(void *)); DBF_HEX(&init_data->int_parm, sizeof(long)); DBF_HEX(&init_data->flags, sizeof(long)); DBF_HEX(&init_data->input_sbal_addr_array, sizeof(void *)); DBF_HEX(&init_data->output_sbal_addr_array, sizeof(void *)); DBF_EVENT("irq:%8lx", (unsigned long)irq_ptr); /* allocate trace view for the interface */ snprintf(text, 20, "qdio_%s", dev_name(&init_data->cdev->dev)); irq_ptr->debug_area = debug_register(text, 2, 1, 16); debug_register_view(irq_ptr->debug_area, &debug_hex_ascii_view); debug_set_level(irq_ptr->debug_area, DBF_WARN); DBF_DEV_EVENT(DBF_ERR, irq_ptr, "dbf created"); }