forked from Minki/linux
qeth: improving debug message handling
Improving debug message handling, moving ipa into messages from kernel to dbf, some cleanups and typo fixes. Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
b7624ec1cf
commit
d11ba0c40f
@ -34,59 +34,53 @@
|
||||
|
||||
#include "qeth_core_mpc.h"
|
||||
|
||||
#define KMSG_COMPONENT "qeth"
|
||||
|
||||
/**
|
||||
* Debug Facility stuff
|
||||
*/
|
||||
#define QETH_DBF_SETUP_NAME "qeth_setup"
|
||||
#define QETH_DBF_SETUP_LEN 8
|
||||
#define QETH_DBF_SETUP_PAGES 8
|
||||
#define QETH_DBF_SETUP_NR_AREAS 1
|
||||
#define QETH_DBF_SETUP_LEVEL 5
|
||||
enum qeth_dbf_names {
|
||||
QETH_DBF_SETUP,
|
||||
QETH_DBF_QERR,
|
||||
QETH_DBF_TRACE,
|
||||
QETH_DBF_MSG,
|
||||
QETH_DBF_SENSE,
|
||||
QETH_DBF_MISC,
|
||||
QETH_DBF_CTRL,
|
||||
QETH_DBF_INFOS /* must be last element */
|
||||
};
|
||||
|
||||
#define QETH_DBF_MISC_NAME "qeth_misc"
|
||||
#define QETH_DBF_MISC_LEN 128
|
||||
#define QETH_DBF_MISC_PAGES 2
|
||||
#define QETH_DBF_MISC_NR_AREAS 1
|
||||
#define QETH_DBF_MISC_LEVEL 2
|
||||
struct qeth_dbf_info {
|
||||
char name[DEBUG_MAX_NAME_LEN];
|
||||
int pages;
|
||||
int areas;
|
||||
int len;
|
||||
int level;
|
||||
struct debug_view *view;
|
||||
debug_info_t *id;
|
||||
};
|
||||
|
||||
#define QETH_DBF_DATA_NAME "qeth_data"
|
||||
#define QETH_DBF_DATA_LEN 96
|
||||
#define QETH_DBF_DATA_PAGES 8
|
||||
#define QETH_DBF_DATA_NR_AREAS 1
|
||||
#define QETH_DBF_DATA_LEVEL 2
|
||||
|
||||
#define QETH_DBF_CONTROL_NAME "qeth_control"
|
||||
#define QETH_DBF_CONTROL_LEN 256
|
||||
#define QETH_DBF_CONTROL_PAGES 8
|
||||
#define QETH_DBF_CONTROL_NR_AREAS 1
|
||||
#define QETH_DBF_CONTROL_LEVEL 5
|
||||
|
||||
#define QETH_DBF_TRACE_NAME "qeth_trace"
|
||||
#define QETH_DBF_TRACE_LEN 8
|
||||
#define QETH_DBF_TRACE_PAGES 4
|
||||
#define QETH_DBF_TRACE_NR_AREAS 1
|
||||
#define QETH_DBF_TRACE_LEVEL 3
|
||||
|
||||
#define QETH_DBF_SENSE_NAME "qeth_sense"
|
||||
#define QETH_DBF_SENSE_LEN 64
|
||||
#define QETH_DBF_SENSE_PAGES 2
|
||||
#define QETH_DBF_SENSE_NR_AREAS 1
|
||||
#define QETH_DBF_SENSE_LEVEL 2
|
||||
|
||||
#define QETH_DBF_QERR_NAME "qeth_qerr"
|
||||
#define QETH_DBF_QERR_LEN 8
|
||||
#define QETH_DBF_QERR_PAGES 2
|
||||
#define QETH_DBF_QERR_NR_AREAS 1
|
||||
#define QETH_DBF_QERR_LEVEL 2
|
||||
#define QETH_DBF_CTRL_LEN 256
|
||||
|
||||
#define QETH_DBF_TEXT(name, level, text) \
|
||||
do { \
|
||||
debug_text_event(qeth_dbf_##name, level, text); \
|
||||
} while (0)
|
||||
debug_text_event(qeth_dbf[QETH_DBF_##name].id, level, text)
|
||||
|
||||
#define QETH_DBF_HEX(name, level, addr, len) \
|
||||
debug_event(qeth_dbf[QETH_DBF_##name].id, level, (void *)(addr), len)
|
||||
|
||||
#define QETH_DBF_MESSAGE(level, text...) \
|
||||
debug_sprintf_event(qeth_dbf[QETH_DBF_MSG].id, level, text)
|
||||
|
||||
#define QETH_DBF_TEXT_(name, level, text...) \
|
||||
do { \
|
||||
debug_event(qeth_dbf_##name, level, (void *)(addr), len); \
|
||||
if (qeth_dbf_passes(qeth_dbf[QETH_DBF_##name].id, level)) { \
|
||||
char *dbf_txt_buf = \
|
||||
get_cpu_var(QETH_DBF_TXT_BUF); \
|
||||
sprintf(dbf_txt_buf, text); \
|
||||
debug_text_event(qeth_dbf[QETH_DBF_##name].id, \
|
||||
level, dbf_txt_buf); \
|
||||
put_cpu_var(QETH_DBF_TXT_BUF); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Allow to sort out low debug levels early to avoid wasted sprints */
|
||||
@ -826,13 +820,8 @@ void qeth_core_remove_osn_attributes(struct device *);
|
||||
|
||||
/* exports for qeth discipline device drivers */
|
||||
extern struct qeth_card_list_struct qeth_core_card_list;
|
||||
extern debug_info_t *qeth_dbf_setup;
|
||||
extern debug_info_t *qeth_dbf_data;
|
||||
extern debug_info_t *qeth_dbf_misc;
|
||||
extern debug_info_t *qeth_dbf_control;
|
||||
extern debug_info_t *qeth_dbf_trace;
|
||||
extern debug_info_t *qeth_dbf_sense;
|
||||
extern debug_info_t *qeth_dbf_qerr;
|
||||
|
||||
extern struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS];
|
||||
|
||||
void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int);
|
||||
int qeth_threads_running(struct qeth_card *, unsigned long);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -230,7 +230,7 @@ static struct ipa_cmd_names qeth_ipa_cmd_names[] = {
|
||||
{IPA_CMD_STARTLAN, "startlan"},
|
||||
{IPA_CMD_STOPLAN, "stoplan"},
|
||||
{IPA_CMD_SETVMAC, "setvmac"},
|
||||
{IPA_CMD_DELVMAC, "delvmca"},
|
||||
{IPA_CMD_DELVMAC, "delvmac"},
|
||||
{IPA_CMD_SETGMAC, "setgmac"},
|
||||
{IPA_CMD_DELGMAC, "delgmac"},
|
||||
{IPA_CMD_SETVLAN, "setvlan"},
|
||||
|
@ -31,7 +31,7 @@ int qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *queue,
|
||||
int skbs_in_buffer;
|
||||
int buffers_needed = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpcbfc");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpcbfc");
|
||||
while (elements_needed > 0) {
|
||||
buffers_needed++;
|
||||
if (atomic_read(&queue->bufs[index].state) !=
|
||||
@ -51,7 +51,7 @@ static void qeth_eddp_free_context(struct qeth_eddp_context *ctx)
|
||||
{
|
||||
int i;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpfctx");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpfctx");
|
||||
for (i = 0; i < ctx->num_pages; ++i)
|
||||
free_page((unsigned long)ctx->pages[i]);
|
||||
kfree(ctx->pages);
|
||||
@ -76,7 +76,7 @@ void qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *buf)
|
||||
{
|
||||
struct qeth_eddp_context_reference *ref;
|
||||
|
||||
QETH_DBF_TEXT(trace, 6, "eddprctx");
|
||||
QETH_DBF_TEXT(TRACE, 6, "eddprctx");
|
||||
while (!list_empty(&buf->ctx_list)) {
|
||||
ref = list_entry(buf->ctx_list.next,
|
||||
struct qeth_eddp_context_reference, list);
|
||||
@ -91,7 +91,7 @@ static int qeth_eddp_buf_ref_context(struct qeth_qdio_out_buffer *buf,
|
||||
{
|
||||
struct qeth_eddp_context_reference *ref;
|
||||
|
||||
QETH_DBF_TEXT(trace, 6, "eddprfcx");
|
||||
QETH_DBF_TEXT(TRACE, 6, "eddprfcx");
|
||||
ref = kmalloc(sizeof(struct qeth_eddp_context_reference), GFP_ATOMIC);
|
||||
if (ref == NULL)
|
||||
return -ENOMEM;
|
||||
@ -112,7 +112,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
|
||||
int must_refcnt = 1;
|
||||
int i;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpfibu");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpfibu");
|
||||
while (elements > 0) {
|
||||
buf = &queue->bufs[index];
|
||||
if (atomic_read(&buf->state) != QETH_QDIO_BUF_EMPTY) {
|
||||
@ -166,7 +166,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
|
||||
}
|
||||
out_check:
|
||||
if (!queue->do_pack) {
|
||||
QETH_DBF_TEXT(trace, 6, "fillbfnp");
|
||||
QETH_DBF_TEXT(TRACE, 6, "fillbfnp");
|
||||
/* set state to PRIMED -> will be flushed */
|
||||
if (buf->next_element_to_fill > 0) {
|
||||
atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED);
|
||||
@ -175,7 +175,7 @@ out_check:
|
||||
} else {
|
||||
if (queue->card->options.performance_stats)
|
||||
queue->card->perf_stats.skbs_sent_pack++;
|
||||
QETH_DBF_TEXT(trace, 6, "fillbfpa");
|
||||
QETH_DBF_TEXT(TRACE, 6, "fillbfpa");
|
||||
if (buf->next_element_to_fill >=
|
||||
QETH_MAX_BUFFER_ELEMENTS(queue->card)) {
|
||||
/*
|
||||
@ -199,7 +199,7 @@ static void qeth_eddp_create_segment_hdrs(struct qeth_eddp_context *ctx,
|
||||
int pkt_len;
|
||||
struct qeth_eddp_element *element;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpcrsh");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpcrsh");
|
||||
page = ctx->pages[ctx->offset >> PAGE_SHIFT];
|
||||
page_offset = ctx->offset % PAGE_SIZE;
|
||||
element = &ctx->elements[ctx->num_elements];
|
||||
@ -257,7 +257,7 @@ static void qeth_eddp_copy_data_tcp(char *dst, struct qeth_eddp_data *eddp,
|
||||
int copy_len;
|
||||
u8 *src;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpcdtc");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpcdtc");
|
||||
if (skb_shinfo(eddp->skb)->nr_frags == 0) {
|
||||
skb_copy_from_linear_data_offset(eddp->skb, eddp->skb_offset,
|
||||
dst, len);
|
||||
@ -305,7 +305,7 @@ static void qeth_eddp_create_segment_data_tcp(struct qeth_eddp_context *ctx,
|
||||
struct qeth_eddp_element *element;
|
||||
int first_lap = 1;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpcsdt");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpcsdt");
|
||||
page = ctx->pages[ctx->offset >> PAGE_SHIFT];
|
||||
page_offset = ctx->offset % PAGE_SIZE;
|
||||
element = &ctx->elements[ctx->num_elements];
|
||||
@ -346,7 +346,7 @@ static __wsum qeth_eddp_check_tcp4_hdr(struct qeth_eddp_data *eddp,
|
||||
{
|
||||
__wsum phcsum; /* pseudo header checksum */
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpckt4");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpckt4");
|
||||
eddp->th.tcp.h.check = 0;
|
||||
/* compute pseudo header checksum */
|
||||
phcsum = csum_tcpudp_nofold(eddp->nh.ip4.h.saddr, eddp->nh.ip4.h.daddr,
|
||||
@ -361,7 +361,7 @@ static __wsum qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp,
|
||||
__be32 proto;
|
||||
__wsum phcsum; /* pseudo header checksum */
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpckt6");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpckt6");
|
||||
eddp->th.tcp.h.check = 0;
|
||||
/* compute pseudo header checksum */
|
||||
phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.saddr,
|
||||
@ -378,7 +378,7 @@ static struct qeth_eddp_data *qeth_eddp_create_eddp_data(struct qeth_hdr *qh,
|
||||
{
|
||||
struct qeth_eddp_data *eddp;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpcrda");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpcrda");
|
||||
eddp = kzalloc(sizeof(struct qeth_eddp_data), GFP_ATOMIC);
|
||||
if (eddp) {
|
||||
eddp->nhl = nhl;
|
||||
@ -398,7 +398,7 @@ static void __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
|
||||
int data_len;
|
||||
__wsum hcsum;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpftcp");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpftcp");
|
||||
eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl;
|
||||
if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) {
|
||||
eddp->skb_offset += sizeof(struct ethhdr);
|
||||
@ -457,7 +457,7 @@ static int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
|
||||
{
|
||||
struct qeth_eddp_data *eddp = NULL;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpficx");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpficx");
|
||||
/* create our segmentation headers and copy original headers */
|
||||
if (skb->protocol == htons(ETH_P_IP))
|
||||
eddp = qeth_eddp_create_eddp_data(qhdr,
|
||||
@ -473,7 +473,7 @@ static int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
|
||||
tcp_hdrlen(skb));
|
||||
|
||||
if (eddp == NULL) {
|
||||
QETH_DBF_TEXT(trace, 2, "eddpfcnm");
|
||||
QETH_DBF_TEXT(TRACE, 2, "eddpfcnm");
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) {
|
||||
@ -499,7 +499,7 @@ static void qeth_eddp_calc_num_pages(struct qeth_eddp_context *ctx,
|
||||
{
|
||||
int skbs_per_page;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "eddpcanp");
|
||||
QETH_DBF_TEXT(TRACE, 5, "eddpcanp");
|
||||
/* can we put multiple skbs in one page? */
|
||||
skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->gso_size + hdr_len);
|
||||
if (skbs_per_page > 1) {
|
||||
@ -524,30 +524,30 @@ static struct qeth_eddp_context *qeth_eddp_create_context_generic(
|
||||
u8 *addr;
|
||||
int i;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "creddpcg");
|
||||
QETH_DBF_TEXT(TRACE, 5, "creddpcg");
|
||||
/* create the context and allocate pages */
|
||||
ctx = kzalloc(sizeof(struct qeth_eddp_context), GFP_ATOMIC);
|
||||
if (ctx == NULL) {
|
||||
QETH_DBF_TEXT(trace, 2, "ceddpcn1");
|
||||
QETH_DBF_TEXT(TRACE, 2, "ceddpcn1");
|
||||
return NULL;
|
||||
}
|
||||
ctx->type = QETH_LARGE_SEND_EDDP;
|
||||
qeth_eddp_calc_num_pages(ctx, skb, hdr_len);
|
||||
if (ctx->elements_per_skb > QETH_MAX_BUFFER_ELEMENTS(card)) {
|
||||
QETH_DBF_TEXT(trace, 2, "ceddpcis");
|
||||
QETH_DBF_TEXT(TRACE, 2, "ceddpcis");
|
||||
kfree(ctx);
|
||||
return NULL;
|
||||
}
|
||||
ctx->pages = kcalloc(ctx->num_pages, sizeof(u8 *), GFP_ATOMIC);
|
||||
if (ctx->pages == NULL) {
|
||||
QETH_DBF_TEXT(trace, 2, "ceddpcn2");
|
||||
QETH_DBF_TEXT(TRACE, 2, "ceddpcn2");
|
||||
kfree(ctx);
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; i < ctx->num_pages; ++i) {
|
||||
addr = (u8 *)get_zeroed_page(GFP_ATOMIC);
|
||||
if (addr == NULL) {
|
||||
QETH_DBF_TEXT(trace, 2, "ceddpcn3");
|
||||
QETH_DBF_TEXT(TRACE, 2, "ceddpcn3");
|
||||
ctx->num_pages = i;
|
||||
qeth_eddp_free_context(ctx);
|
||||
return NULL;
|
||||
@ -557,7 +557,7 @@ static struct qeth_eddp_context *qeth_eddp_create_context_generic(
|
||||
ctx->elements = kcalloc(ctx->num_elements,
|
||||
sizeof(struct qeth_eddp_element), GFP_ATOMIC);
|
||||
if (ctx->elements == NULL) {
|
||||
QETH_DBF_TEXT(trace, 2, "ceddpcn4");
|
||||
QETH_DBF_TEXT(TRACE, 2, "ceddpcn4");
|
||||
qeth_eddp_free_context(ctx);
|
||||
return NULL;
|
||||
}
|
||||
@ -573,7 +573,7 @@ static struct qeth_eddp_context *qeth_eddp_create_context_tcp(
|
||||
{
|
||||
struct qeth_eddp_context *ctx = NULL;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "creddpct");
|
||||
QETH_DBF_TEXT(TRACE, 5, "creddpct");
|
||||
if (skb->protocol == htons(ETH_P_IP))
|
||||
ctx = qeth_eddp_create_context_generic(card, skb,
|
||||
(sizeof(struct qeth_hdr) +
|
||||
@ -584,14 +584,14 @@ static struct qeth_eddp_context *qeth_eddp_create_context_tcp(
|
||||
sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) +
|
||||
tcp_hdrlen(skb));
|
||||
else
|
||||
QETH_DBF_TEXT(trace, 2, "cetcpinv");
|
||||
QETH_DBF_TEXT(TRACE, 2, "cetcpinv");
|
||||
|
||||
if (ctx == NULL) {
|
||||
QETH_DBF_TEXT(trace, 2, "creddpnl");
|
||||
QETH_DBF_TEXT(TRACE, 2, "creddpnl");
|
||||
return NULL;
|
||||
}
|
||||
if (qeth_eddp_fill_context_tcp(ctx, skb, qhdr)) {
|
||||
QETH_DBF_TEXT(trace, 2, "ceddptfe");
|
||||
QETH_DBF_TEXT(TRACE, 2, "ceddptfe");
|
||||
qeth_eddp_free_context(ctx);
|
||||
return NULL;
|
||||
}
|
||||
@ -603,12 +603,12 @@ struct qeth_eddp_context *qeth_eddp_create_context(struct qeth_card *card,
|
||||
struct sk_buff *skb, struct qeth_hdr *qhdr,
|
||||
unsigned char sk_protocol)
|
||||
{
|
||||
QETH_DBF_TEXT(trace, 5, "creddpc");
|
||||
QETH_DBF_TEXT(TRACE, 5, "creddpc");
|
||||
switch (sk_protocol) {
|
||||
case IPPROTO_TCP:
|
||||
return qeth_eddp_create_context_tcp(card, skb, qhdr);
|
||||
default:
|
||||
QETH_DBF_TEXT(trace, 2, "eddpinvp");
|
||||
QETH_DBF_TEXT(TRACE, 2, "eddpinvp");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -622,7 +622,7 @@ void qeth_tso_fill_header(struct qeth_card *card, struct qeth_hdr *qhdr,
|
||||
struct iphdr *iph = ip_hdr(skb);
|
||||
struct ipv6hdr *ip6h = ipv6_hdr(skb);
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "tsofhdr");
|
||||
QETH_DBF_TEXT(TRACE, 5, "tsofhdr");
|
||||
|
||||
/*fix header to TSO values ...*/
|
||||
hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO;
|
||||
|
@ -22,16 +22,7 @@
|
||||
#include "qeth_core.h"
|
||||
#include "qeth_core_offl.h"
|
||||
|
||||
#define QETH_DBF_TEXT_(name, level, text...) \
|
||||
do { \
|
||||
if (qeth_dbf_passes(qeth_dbf_##name, level)) { \
|
||||
char *dbf_txt_buf = get_cpu_var(qeth_l2_dbf_txt_buf); \
|
||||
sprintf(dbf_txt_buf, text); \
|
||||
debug_text_event(qeth_dbf_##name, level, dbf_txt_buf); \
|
||||
put_cpu_var(qeth_l2_dbf_txt_buf); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QETH_DBF_TXT_BUF qeth_l2_dbf_txt_buf
|
||||
static DEFINE_PER_CPU(char[256], qeth_l2_dbf_txt_buf);
|
||||
|
||||
static int qeth_l2_set_offline(struct ccwgroup_device *);
|
||||
@ -87,7 +78,7 @@ static int qeth_l2_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
rc = -EOPNOTSUPP;
|
||||
}
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(trace, 2, "ioce%d", rc);
|
||||
QETH_DBF_TEXT_(TRACE, 2, "ioce%d", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -141,7 +132,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card,
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
__u8 *mac;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "L2Sgmacb");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2Sgmacb");
|
||||
cmd = (struct qeth_ipa_cmd *) data;
|
||||
mac = &cmd->data.setdelmac.mac[0];
|
||||
/* MAC already registered, needed in couple/uncouple case */
|
||||
@ -162,7 +153,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card,
|
||||
|
||||
static int qeth_l2_send_setgroupmac(struct qeth_card *card, __u8 *mac)
|
||||
{
|
||||
QETH_DBF_TEXT(trace, 2, "L2Sgmac");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2Sgmac");
|
||||
return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETGMAC,
|
||||
qeth_l2_send_setgroupmac_cb);
|
||||
}
|
||||
@ -174,7 +165,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card,
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
__u8 *mac;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "L2Dgmacb");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2Dgmacb");
|
||||
cmd = (struct qeth_ipa_cmd *) data;
|
||||
mac = &cmd->data.setdelmac.mac[0];
|
||||
if (cmd->hdr.return_code)
|
||||
@ -187,7 +178,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card,
|
||||
|
||||
static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac)
|
||||
{
|
||||
QETH_DBF_TEXT(trace, 2, "L2Dgmac");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2Dgmac");
|
||||
return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELGMAC,
|
||||
qeth_l2_send_delgroupmac_cb);
|
||||
}
|
||||
@ -289,15 +280,15 @@ static int qeth_l2_send_setdelvlan_cb(struct qeth_card *card,
|
||||
{
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "L2sdvcb");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2sdvcb");
|
||||
cmd = (struct qeth_ipa_cmd *) data;
|
||||
if (cmd->hdr.return_code) {
|
||||
PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. "
|
||||
"Continuing\n", cmd->data.setdelvlan.vlan_id,
|
||||
QETH_CARD_IFNAME(card), cmd->hdr.return_code);
|
||||
QETH_DBF_TEXT_(trace, 2, "L2VL%4x", cmd->hdr.command);
|
||||
QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code);
|
||||
QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command);
|
||||
QETH_DBF_TEXT_(TRACE, 2, "L2%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_TEXT_(TRACE, 2, "err%d", cmd->hdr.return_code);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -308,7 +299,7 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i,
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
struct qeth_cmd_buffer *iob;
|
||||
|
||||
QETH_DBF_TEXT_(trace, 4, "L2sdv%x", ipacmd);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "L2sdv%x", ipacmd);
|
||||
iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
|
||||
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
||||
cmd->data.setdelvlan.vlan_id = i;
|
||||
@ -319,7 +310,7 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i,
|
||||
static void qeth_l2_process_vlans(struct qeth_card *card, int clear)
|
||||
{
|
||||
struct qeth_vlan_vid *id;
|
||||
QETH_DBF_TEXT(trace, 3, "L2prcvln");
|
||||
QETH_DBF_TEXT(TRACE, 3, "L2prcvln");
|
||||
spin_lock_bh(&card->vlanlock);
|
||||
list_for_each_entry(id, &card->vid_list, list) {
|
||||
if (clear)
|
||||
@ -337,7 +328,7 @@ static void qeth_l2_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
struct qeth_vlan_vid *id;
|
||||
|
||||
QETH_DBF_TEXT_(trace, 4, "aid:%d", vid);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "aid:%d", vid);
|
||||
id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC);
|
||||
if (id) {
|
||||
id->vid = vid;
|
||||
@ -355,7 +346,7 @@ static void qeth_l2_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
|
||||
struct qeth_vlan_vid *id, *tmpid = NULL;
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
|
||||
QETH_DBF_TEXT_(trace, 4, "kid:%d", vid);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "kid:%d", vid);
|
||||
spin_lock_bh(&card->vlanlock);
|
||||
list_for_each_entry(id, &card->vid_list, list) {
|
||||
if (id->vid == vid) {
|
||||
@ -376,8 +367,8 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(setup , 2, "stopcard");
|
||||
QETH_DBF_HEX(setup, 2, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(SETUP , 2, "stopcard");
|
||||
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
|
||||
|
||||
qeth_set_allowed_threads(card, 0, 1);
|
||||
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD))
|
||||
@ -396,7 +387,7 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
|
||||
if (!card->use_hard_stop) {
|
||||
__u8 *mac = &card->dev->dev_addr[0];
|
||||
rc = qeth_l2_send_delmac(card, mac);
|
||||
QETH_DBF_TEXT_(setup, 2, "Lerr%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "Lerr%d", rc);
|
||||
}
|
||||
card->state = CARD_STATE_SOFTSETUP;
|
||||
}
|
||||
@ -465,8 +456,8 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card,
|
||||
break;
|
||||
default:
|
||||
dev_kfree_skb_any(skb);
|
||||
QETH_DBF_TEXT(trace, 3, "inbunkno");
|
||||
QETH_DBF_HEX(control, 3, hdr, QETH_DBF_CONTROL_LEN);
|
||||
QETH_DBF_TEXT(TRACE, 3, "inbunkno");
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
|
||||
continue;
|
||||
}
|
||||
card->dev->last_rx = jiffies;
|
||||
@ -484,7 +475,7 @@ static int qeth_l2_send_setdelmac(struct qeth_card *card, __u8 *mac,
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
struct qeth_cmd_buffer *iob;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "L2sdmac");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2sdmac");
|
||||
iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
|
||||
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
||||
cmd->data.setdelmac.mac_length = OSA_ADDR_LEN;
|
||||
@ -498,10 +489,10 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card,
|
||||
{
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "L2Smaccb");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2Smaccb");
|
||||
cmd = (struct qeth_ipa_cmd *) data;
|
||||
if (cmd->hdr.return_code) {
|
||||
QETH_DBF_TEXT_(trace, 2, "L2er%x", cmd->hdr.return_code);
|
||||
QETH_DBF_TEXT_(TRACE, 2, "L2er%x", cmd->hdr.return_code);
|
||||
card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
|
||||
cmd->hdr.return_code = -EIO;
|
||||
} else {
|
||||
@ -520,7 +511,7 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card,
|
||||
|
||||
static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac)
|
||||
{
|
||||
QETH_DBF_TEXT(trace, 2, "L2Setmac");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2Setmac");
|
||||
return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC,
|
||||
qeth_l2_send_setmac_cb);
|
||||
}
|
||||
@ -531,10 +522,10 @@ static int qeth_l2_send_delmac_cb(struct qeth_card *card,
|
||||
{
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "L2Dmaccb");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2Dmaccb");
|
||||
cmd = (struct qeth_ipa_cmd *) data;
|
||||
if (cmd->hdr.return_code) {
|
||||
QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code);
|
||||
QETH_DBF_TEXT_(TRACE, 2, "err%d", cmd->hdr.return_code);
|
||||
cmd->hdr.return_code = -EIO;
|
||||
return 0;
|
||||
}
|
||||
@ -545,7 +536,7 @@ static int qeth_l2_send_delmac_cb(struct qeth_card *card,
|
||||
|
||||
static int qeth_l2_send_delmac(struct qeth_card *card, __u8 *mac)
|
||||
{
|
||||
QETH_DBF_TEXT(trace, 2, "L2Delmac");
|
||||
QETH_DBF_TEXT(TRACE, 2, "L2Delmac");
|
||||
if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))
|
||||
return 0;
|
||||
return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELVMAC,
|
||||
@ -557,8 +548,8 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card)
|
||||
int rc = 0;
|
||||
char vendor_pre[] = {0x02, 0x00, 0x00};
|
||||
|
||||
QETH_DBF_TEXT(setup, 2, "doL2init");
|
||||
QETH_DBF_TEXT_(setup, 2, "doL2%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_TEXT(SETUP, 2, "doL2init");
|
||||
QETH_DBF_TEXT_(SETUP, 2, "doL2%s", CARD_BUS_ID(card));
|
||||
|
||||
rc = qeth_query_setadapterparms(card);
|
||||
if (rc) {
|
||||
@ -572,10 +563,10 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card)
|
||||
PRINT_WARN("couldn't get MAC address on "
|
||||
"device %s: x%x\n",
|
||||
CARD_BUS_ID(card), rc);
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
return rc;
|
||||
}
|
||||
QETH_DBF_HEX(setup, 2, card->dev->dev_addr, OSA_ADDR_LEN);
|
||||
QETH_DBF_HEX(SETUP, 2, card->dev->dev_addr, OSA_ADDR_LEN);
|
||||
} else {
|
||||
random_ether_addr(card->dev->dev_addr);
|
||||
memcpy(card->dev->dev_addr, vendor_pre, 3);
|
||||
@ -589,21 +580,21 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p)
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "setmac");
|
||||
QETH_DBF_TEXT(TRACE, 3, "setmac");
|
||||
|
||||
if (qeth_l2_verify_dev(dev) != QETH_REAL_CARD) {
|
||||
QETH_DBF_TEXT(trace, 3, "setmcINV");
|
||||
QETH_DBF_TEXT(TRACE, 3, "setmcINV");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (card->info.type == QETH_CARD_TYPE_OSN) {
|
||||
PRINT_WARN("Setting MAC address on %s is not supported.\n",
|
||||
dev->name);
|
||||
QETH_DBF_TEXT(trace, 3, "setmcOSN");
|
||||
QETH_DBF_TEXT(TRACE, 3, "setmcOSN");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
QETH_DBF_TEXT_(trace, 3, "%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_HEX(trace, 3, addr->sa_data, OSA_ADDR_LEN);
|
||||
QETH_DBF_TEXT_(TRACE, 3, "%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_HEX(TRACE, 3, addr->sa_data, OSA_ADDR_LEN);
|
||||
rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]);
|
||||
if (!rc)
|
||||
rc = qeth_l2_send_setmac(card, addr->sa_data);
|
||||
@ -618,7 +609,7 @@ static void qeth_l2_set_multicast_list(struct net_device *dev)
|
||||
if (card->info.type == QETH_CARD_TYPE_OSN)
|
||||
return ;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "setmulti");
|
||||
QETH_DBF_TEXT(TRACE, 3, "setmulti");
|
||||
qeth_l2_del_all_mc(card);
|
||||
spin_lock_bh(&card->mclock);
|
||||
for (dm = dev->mc_list; dm; dm = dm->next)
|
||||
@ -644,7 +635,7 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
|
||||
struct qeth_eddp_context *ctx = NULL;
|
||||
|
||||
QETH_DBF_TEXT(trace, 6, "l2xmit");
|
||||
QETH_DBF_TEXT(TRACE, 6, "l2xmit");
|
||||
|
||||
if ((card->state != CARD_STATE_UP) || !card->lan_online) {
|
||||
card->stats.tx_carrier_errors++;
|
||||
@ -756,7 +747,7 @@ static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev,
|
||||
int index;
|
||||
int i;
|
||||
|
||||
QETH_DBF_TEXT(trace, 6, "qdinput");
|
||||
QETH_DBF_TEXT(TRACE, 6, "qdinput");
|
||||
card = (struct qeth_card *) card_ptr;
|
||||
net_dev = card->dev;
|
||||
if (card->options.performance_stats) {
|
||||
@ -765,11 +756,11 @@ static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev,
|
||||
}
|
||||
if (status & QDIO_STATUS_LOOK_FOR_ERROR) {
|
||||
if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) {
|
||||
QETH_DBF_TEXT(trace, 1, "qdinchk");
|
||||
QETH_DBF_TEXT_(trace, 1, "%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_TEXT_(trace, 1, "%04X%04X", first_element,
|
||||
QETH_DBF_TEXT(TRACE, 1, "qdinchk");
|
||||
QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", first_element,
|
||||
count);
|
||||
QETH_DBF_TEXT_(trace, 1, "%04X%04X", queue, status);
|
||||
QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", queue, status);
|
||||
qeth_schedule_recovery(card);
|
||||
return;
|
||||
}
|
||||
@ -794,13 +785,13 @@ static int qeth_l2_open(struct net_device *dev)
|
||||
{
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "qethopen");
|
||||
QETH_DBF_TEXT(TRACE, 4, "qethopen");
|
||||
if (card->state != CARD_STATE_SOFTSETUP)
|
||||
return -ENODEV;
|
||||
|
||||
if ((card->info.type != QETH_CARD_TYPE_OSN) &&
|
||||
(!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))) {
|
||||
QETH_DBF_TEXT(trace, 4, "nomacadr");
|
||||
QETH_DBF_TEXT(TRACE, 4, "nomacadr");
|
||||
return -EPERM;
|
||||
}
|
||||
card->data.state = CH_STATE_UP;
|
||||
@ -818,7 +809,7 @@ static int qeth_l2_stop(struct net_device *dev)
|
||||
{
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "qethstop");
|
||||
QETH_DBF_TEXT(TRACE, 4, "qethstop");
|
||||
netif_tx_disable(dev);
|
||||
card->dev->flags &= ~IFF_UP;
|
||||
if (card->state == CARD_STATE_UP)
|
||||
@ -934,8 +925,8 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
||||
enum qeth_card_states recover_flag;
|
||||
|
||||
BUG_ON(!card);
|
||||
QETH_DBF_TEXT(setup, 2, "setonlin");
|
||||
QETH_DBF_HEX(setup, 2, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(SETUP, 2, "setonlin");
|
||||
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
|
||||
|
||||
qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
|
||||
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
|
||||
@ -947,23 +938,23 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
||||
recover_flag = card->state;
|
||||
rc = ccw_device_set_online(CARD_RDEV(card));
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
return -EIO;
|
||||
}
|
||||
rc = ccw_device_set_online(CARD_WDEV(card));
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
return -EIO;
|
||||
}
|
||||
rc = ccw_device_set_online(CARD_DDEV(card));
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
rc = qeth_core_hardsetup_card(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "2err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
|
||||
goto out_remove;
|
||||
}
|
||||
|
||||
@ -977,11 +968,11 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
||||
qeth_print_status_message(card);
|
||||
|
||||
/* softsetup */
|
||||
QETH_DBF_TEXT(setup, 2, "softsetp");
|
||||
QETH_DBF_TEXT(SETUP, 2, "softsetp");
|
||||
|
||||
rc = qeth_send_startlan(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
if (rc == 0xe080) {
|
||||
PRINT_WARN("LAN on card %s if offline! "
|
||||
"Waiting for STARTLAN from card.\n",
|
||||
@ -1001,7 +992,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
||||
|
||||
rc = qeth_init_qdio_queues(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "6err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
|
||||
goto out_remove;
|
||||
}
|
||||
card->state = CARD_STATE_SOFTSETUP;
|
||||
@ -1048,8 +1039,8 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev,
|
||||
int rc = 0, rc2 = 0, rc3 = 0;
|
||||
enum qeth_card_states recover_flag;
|
||||
|
||||
QETH_DBF_TEXT(setup, 3, "setoffl");
|
||||
QETH_DBF_HEX(setup, 3, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(SETUP, 3, "setoffl");
|
||||
QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *));
|
||||
|
||||
if (card->dev && netif_carrier_ok(card->dev))
|
||||
netif_carrier_off(card->dev);
|
||||
@ -1065,7 +1056,7 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev,
|
||||
if (!rc)
|
||||
rc = (rc2) ? rc2 : rc3;
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
if (recover_flag == CARD_STATE_UP)
|
||||
card->state = CARD_STATE_RECOVER;
|
||||
/* let user_space know that device is offline */
|
||||
@ -1084,11 +1075,11 @@ static int qeth_l2_recover(void *ptr)
|
||||
int rc = 0;
|
||||
|
||||
card = (struct qeth_card *) ptr;
|
||||
QETH_DBF_TEXT(trace, 2, "recover1");
|
||||
QETH_DBF_HEX(trace, 2, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(TRACE, 2, "recover1");
|
||||
QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *));
|
||||
if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
|
||||
return 0;
|
||||
QETH_DBF_TEXT(trace, 2, "recover2");
|
||||
QETH_DBF_TEXT(TRACE, 2, "recover2");
|
||||
PRINT_WARN("Recovery of device %s started ...\n",
|
||||
CARD_BUS_ID(card));
|
||||
card->use_hard_stop = 1;
|
||||
@ -1139,12 +1130,12 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len,
|
||||
unsigned long flags;
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "osndctrd");
|
||||
QETH_DBF_TEXT(TRACE, 5, "osndctrd");
|
||||
|
||||
wait_event(card->wait_q,
|
||||
atomic_cmpxchg(&card->write.irq_pending, 0, 1) == 0);
|
||||
qeth_prepare_control_data(card, len, iob);
|
||||
QETH_DBF_TEXT(trace, 6, "osnoirqp");
|
||||
QETH_DBF_TEXT(TRACE, 6, "osnoirqp");
|
||||
spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags);
|
||||
rc = ccw_device_start(card->write.ccwdev, &card->write.ccw,
|
||||
(addr_t) iob, 0, 0);
|
||||
@ -1152,7 +1143,7 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len,
|
||||
if (rc) {
|
||||
PRINT_WARN("qeth_osn_send_control_data: "
|
||||
"ccw_device_start rc = %i\n", rc);
|
||||
QETH_DBF_TEXT_(trace, 2, " err%d", rc);
|
||||
QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
|
||||
qeth_release_buffer(iob->channel, iob);
|
||||
atomic_set(&card->write.irq_pending, 0);
|
||||
wake_up(&card->wait_q);
|
||||
@ -1165,7 +1156,7 @@ static int qeth_osn_send_ipa_cmd(struct qeth_card *card,
|
||||
{
|
||||
u16 s1, s2;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "osndipa");
|
||||
QETH_DBF_TEXT(TRACE, 4, "osndipa");
|
||||
|
||||
qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2);
|
||||
s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len);
|
||||
@ -1183,7 +1174,7 @@ int qeth_osn_assist(struct net_device *dev, void *data, int data_len)
|
||||
struct qeth_card *card;
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "osnsdmc");
|
||||
QETH_DBF_TEXT(TRACE, 2, "osnsdmc");
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
card = netdev_priv(dev);
|
||||
@ -1205,7 +1196,7 @@ int qeth_osn_register(unsigned char *read_dev_no, struct net_device **dev,
|
||||
{
|
||||
struct qeth_card *card;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "osnreg");
|
||||
QETH_DBF_TEXT(TRACE, 2, "osnreg");
|
||||
*dev = qeth_l2_netdev_by_devno(read_dev_no);
|
||||
if (*dev == NULL)
|
||||
return -ENODEV;
|
||||
@ -1224,7 +1215,7 @@ void qeth_osn_deregister(struct net_device *dev)
|
||||
{
|
||||
struct qeth_card *card;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "osndereg");
|
||||
QETH_DBF_TEXT(TRACE, 2, "osndereg");
|
||||
if (!dev)
|
||||
return;
|
||||
card = netdev_priv(dev);
|
||||
|
@ -13,16 +13,7 @@
|
||||
|
||||
#include "qeth_core.h"
|
||||
|
||||
#define QETH_DBF_TEXT_(name, level, text...) \
|
||||
do { \
|
||||
if (qeth_dbf_passes(qeth_dbf_##name, level)) { \
|
||||
char *dbf_txt_buf = get_cpu_var(qeth_l3_dbf_txt_buf); \
|
||||
sprintf(dbf_txt_buf, text); \
|
||||
debug_text_event(qeth_dbf_##name, level, dbf_txt_buf); \
|
||||
put_cpu_var(qeth_l3_dbf_txt_buf); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QETH_DBF_TXT_BUF qeth_l3_dbf_txt_buf
|
||||
DECLARE_PER_CPU(char[256], qeth_l3_dbf_txt_buf);
|
||||
|
||||
struct qeth_ipaddr {
|
||||
|
@ -259,7 +259,7 @@ static int __qeth_l3_insert_ip_todo(struct qeth_card *card,
|
||||
addr->users += add ? 1 : -1;
|
||||
if (add && (addr->type == QETH_IP_TYPE_NORMAL) &&
|
||||
qeth_l3_is_addr_covered_by_ipato(card, addr)) {
|
||||
QETH_DBF_TEXT(trace, 2, "tkovaddr");
|
||||
QETH_DBF_TEXT(TRACE, 2, "tkovaddr");
|
||||
addr->set_flags |= QETH_IPA_SETIP_TAKEOVER_FLAG;
|
||||
}
|
||||
list_add_tail(&addr->entry, card->ip_tbd_list);
|
||||
@ -273,13 +273,13 @@ static int qeth_l3_delete_ip(struct qeth_card *card, struct qeth_ipaddr *addr)
|
||||
unsigned long flags;
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "delip");
|
||||
QETH_DBF_TEXT(TRACE, 4, "delip");
|
||||
|
||||
if (addr->proto == QETH_PROT_IPV4)
|
||||
QETH_DBF_HEX(trace, 4, &addr->u.a4.addr, 4);
|
||||
QETH_DBF_HEX(TRACE, 4, &addr->u.a4.addr, 4);
|
||||
else {
|
||||
QETH_DBF_HEX(trace, 4, &addr->u.a6.addr, 8);
|
||||
QETH_DBF_HEX(trace, 4, ((char *)&addr->u.a6.addr) + 8, 8);
|
||||
QETH_DBF_HEX(TRACE, 4, &addr->u.a6.addr, 8);
|
||||
QETH_DBF_HEX(TRACE, 4, ((char *)&addr->u.a6.addr) + 8, 8);
|
||||
}
|
||||
spin_lock_irqsave(&card->ip_lock, flags);
|
||||
rc = __qeth_l3_insert_ip_todo(card, addr, 0);
|
||||
@ -292,12 +292,12 @@ static int qeth_l3_add_ip(struct qeth_card *card, struct qeth_ipaddr *addr)
|
||||
unsigned long flags;
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "addip");
|
||||
QETH_DBF_TEXT(TRACE, 4, "addip");
|
||||
if (addr->proto == QETH_PROT_IPV4)
|
||||
QETH_DBF_HEX(trace, 4, &addr->u.a4.addr, 4);
|
||||
QETH_DBF_HEX(TRACE, 4, &addr->u.a4.addr, 4);
|
||||
else {
|
||||
QETH_DBF_HEX(trace, 4, &addr->u.a6.addr, 8);
|
||||
QETH_DBF_HEX(trace, 4, ((char *)&addr->u.a6.addr) + 8, 8);
|
||||
QETH_DBF_HEX(TRACE, 4, &addr->u.a6.addr, 8);
|
||||
QETH_DBF_HEX(TRACE, 4, ((char *)&addr->u.a6.addr) + 8, 8);
|
||||
}
|
||||
spin_lock_irqsave(&card->ip_lock, flags);
|
||||
rc = __qeth_l3_insert_ip_todo(card, addr, 1);
|
||||
@ -326,10 +326,10 @@ static void qeth_l3_delete_mc_addresses(struct qeth_card *card)
|
||||
struct qeth_ipaddr *iptodo;
|
||||
unsigned long flags;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "delmc");
|
||||
QETH_DBF_TEXT(TRACE, 4, "delmc");
|
||||
iptodo = qeth_l3_get_addr_buffer(QETH_PROT_IPV4);
|
||||
if (!iptodo) {
|
||||
QETH_DBF_TEXT(trace, 2, "dmcnomem");
|
||||
QETH_DBF_TEXT(TRACE, 2, "dmcnomem");
|
||||
return;
|
||||
}
|
||||
iptodo->type = QETH_IP_TYPE_DEL_ALL_MC;
|
||||
@ -430,14 +430,14 @@ static void qeth_l3_set_ip_addr_list(struct qeth_card *card)
|
||||
unsigned long flags;
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "sdiplist");
|
||||
QETH_DBF_HEX(trace, 2, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(TRACE, 2, "sdiplist");
|
||||
QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *));
|
||||
|
||||
spin_lock_irqsave(&card->ip_lock, flags);
|
||||
tbd_list = card->ip_tbd_list;
|
||||
card->ip_tbd_list = kmalloc(sizeof(struct list_head), GFP_ATOMIC);
|
||||
if (!card->ip_tbd_list) {
|
||||
QETH_DBF_TEXT(trace, 0, "silnomem");
|
||||
QETH_DBF_TEXT(TRACE, 0, "silnomem");
|
||||
card->ip_tbd_list = tbd_list;
|
||||
spin_unlock_irqrestore(&card->ip_lock, flags);
|
||||
return;
|
||||
@ -488,7 +488,7 @@ static void qeth_l3_clear_ip_list(struct qeth_card *card, int clean,
|
||||
struct qeth_ipaddr *addr, *tmp;
|
||||
unsigned long flags;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "clearip");
|
||||
QETH_DBF_TEXT(TRACE, 4, "clearip");
|
||||
spin_lock_irqsave(&card->ip_lock, flags);
|
||||
/* clear todo list */
|
||||
list_for_each_entry_safe(addr, tmp, card->ip_tbd_list, entry) {
|
||||
@ -546,7 +546,7 @@ static int qeth_l3_send_setdelmc(struct qeth_card *card,
|
||||
struct qeth_cmd_buffer *iob;
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "setdelmc");
|
||||
QETH_DBF_TEXT(TRACE, 4, "setdelmc");
|
||||
|
||||
iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto);
|
||||
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
||||
@ -584,8 +584,8 @@ static int qeth_l3_send_setdelip(struct qeth_card *card,
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
__u8 netmask[16];
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "setdelip");
|
||||
QETH_DBF_TEXT_(trace, 4, "flags%02X", flags);
|
||||
QETH_DBF_TEXT(TRACE, 4, "setdelip");
|
||||
QETH_DBF_TEXT_(TRACE, 4, "flags%02X", flags);
|
||||
|
||||
iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto);
|
||||
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
||||
@ -614,7 +614,7 @@ static int qeth_l3_send_setrouting(struct qeth_card *card,
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
struct qeth_cmd_buffer *iob;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "setroutg");
|
||||
QETH_DBF_TEXT(TRACE, 4, "setroutg");
|
||||
iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETRTG, prot);
|
||||
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
||||
cmd->data.setrtg.type = (type);
|
||||
@ -667,7 +667,7 @@ int qeth_l3_setrouting_v4(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "setrtg4");
|
||||
QETH_DBF_TEXT(TRACE, 3, "setrtg4");
|
||||
|
||||
qeth_l3_correct_routing_type(card, &card->options.route4.type,
|
||||
QETH_PROT_IPV4);
|
||||
@ -687,7 +687,7 @@ int qeth_l3_setrouting_v6(struct qeth_card *card)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "setrtg6");
|
||||
QETH_DBF_TEXT(TRACE, 3, "setrtg6");
|
||||
#ifdef CONFIG_QETH_IPV6
|
||||
|
||||
if (!qeth_is_supported(card, IPA_IPV6))
|
||||
@ -731,7 +731,7 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card,
|
||||
unsigned long flags;
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "addipato");
|
||||
QETH_DBF_TEXT(TRACE, 2, "addipato");
|
||||
spin_lock_irqsave(&card->ip_lock, flags);
|
||||
list_for_each_entry(ipatoe, &card->ipato.entries, entry) {
|
||||
if (ipatoe->proto != new->proto)
|
||||
@ -757,7 +757,7 @@ void qeth_l3_del_ipato_entry(struct qeth_card *card,
|
||||
struct qeth_ipato_entry *ipatoe, *tmp;
|
||||
unsigned long flags;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "delipato");
|
||||
QETH_DBF_TEXT(TRACE, 2, "delipato");
|
||||
spin_lock_irqsave(&card->ip_lock, flags);
|
||||
list_for_each_entry_safe(ipatoe, tmp, &card->ipato.entries, entry) {
|
||||
if (ipatoe->proto != proto)
|
||||
@ -785,11 +785,11 @@ int qeth_l3_add_vipa(struct qeth_card *card, enum qeth_prot_versions proto,
|
||||
ipaddr = qeth_l3_get_addr_buffer(proto);
|
||||
if (ipaddr) {
|
||||
if (proto == QETH_PROT_IPV4) {
|
||||
QETH_DBF_TEXT(trace, 2, "addvipa4");
|
||||
QETH_DBF_TEXT(TRACE, 2, "addvipa4");
|
||||
memcpy(&ipaddr->u.a4.addr, addr, 4);
|
||||
ipaddr->u.a4.mask = 0;
|
||||
} else if (proto == QETH_PROT_IPV6) {
|
||||
QETH_DBF_TEXT(trace, 2, "addvipa6");
|
||||
QETH_DBF_TEXT(TRACE, 2, "addvipa6");
|
||||
memcpy(&ipaddr->u.a6.addr, addr, 16);
|
||||
ipaddr->u.a6.pfxlen = 0;
|
||||
}
|
||||
@ -821,11 +821,11 @@ void qeth_l3_del_vipa(struct qeth_card *card, enum qeth_prot_versions proto,
|
||||
ipaddr = qeth_l3_get_addr_buffer(proto);
|
||||
if (ipaddr) {
|
||||
if (proto == QETH_PROT_IPV4) {
|
||||
QETH_DBF_TEXT(trace, 2, "delvipa4");
|
||||
QETH_DBF_TEXT(TRACE, 2, "delvipa4");
|
||||
memcpy(&ipaddr->u.a4.addr, addr, 4);
|
||||
ipaddr->u.a4.mask = 0;
|
||||
} else if (proto == QETH_PROT_IPV6) {
|
||||
QETH_DBF_TEXT(trace, 2, "delvipa6");
|
||||
QETH_DBF_TEXT(TRACE, 2, "delvipa6");
|
||||
memcpy(&ipaddr->u.a6.addr, addr, 16);
|
||||
ipaddr->u.a6.pfxlen = 0;
|
||||
}
|
||||
@ -850,11 +850,11 @@ int qeth_l3_add_rxip(struct qeth_card *card, enum qeth_prot_versions proto,
|
||||
ipaddr = qeth_l3_get_addr_buffer(proto);
|
||||
if (ipaddr) {
|
||||
if (proto == QETH_PROT_IPV4) {
|
||||
QETH_DBF_TEXT(trace, 2, "addrxip4");
|
||||
QETH_DBF_TEXT(TRACE, 2, "addrxip4");
|
||||
memcpy(&ipaddr->u.a4.addr, addr, 4);
|
||||
ipaddr->u.a4.mask = 0;
|
||||
} else if (proto == QETH_PROT_IPV6) {
|
||||
QETH_DBF_TEXT(trace, 2, "addrxip6");
|
||||
QETH_DBF_TEXT(TRACE, 2, "addrxip6");
|
||||
memcpy(&ipaddr->u.a6.addr, addr, 16);
|
||||
ipaddr->u.a6.pfxlen = 0;
|
||||
}
|
||||
@ -886,11 +886,11 @@ void qeth_l3_del_rxip(struct qeth_card *card, enum qeth_prot_versions proto,
|
||||
ipaddr = qeth_l3_get_addr_buffer(proto);
|
||||
if (ipaddr) {
|
||||
if (proto == QETH_PROT_IPV4) {
|
||||
QETH_DBF_TEXT(trace, 2, "addrxip4");
|
||||
QETH_DBF_TEXT(TRACE, 2, "addrxip4");
|
||||
memcpy(&ipaddr->u.a4.addr, addr, 4);
|
||||
ipaddr->u.a4.mask = 0;
|
||||
} else if (proto == QETH_PROT_IPV6) {
|
||||
QETH_DBF_TEXT(trace, 2, "addrxip6");
|
||||
QETH_DBF_TEXT(TRACE, 2, "addrxip6");
|
||||
memcpy(&ipaddr->u.a6.addr, addr, 16);
|
||||
ipaddr->u.a6.pfxlen = 0;
|
||||
}
|
||||
@ -910,15 +910,15 @@ static int qeth_l3_register_addr_entry(struct qeth_card *card,
|
||||
int cnt = 3;
|
||||
|
||||
if (addr->proto == QETH_PROT_IPV4) {
|
||||
QETH_DBF_TEXT(trace, 2, "setaddr4");
|
||||
QETH_DBF_HEX(trace, 3, &addr->u.a4.addr, sizeof(int));
|
||||
QETH_DBF_TEXT(TRACE, 2, "setaddr4");
|
||||
QETH_DBF_HEX(TRACE, 3, &addr->u.a4.addr, sizeof(int));
|
||||
} else if (addr->proto == QETH_PROT_IPV6) {
|
||||
QETH_DBF_TEXT(trace, 2, "setaddr6");
|
||||
QETH_DBF_HEX(trace, 3, &addr->u.a6.addr, 8);
|
||||
QETH_DBF_HEX(trace, 3, ((char *)&addr->u.a6.addr) + 8, 8);
|
||||
QETH_DBF_TEXT(TRACE, 2, "setaddr6");
|
||||
QETH_DBF_HEX(TRACE, 3, &addr->u.a6.addr, 8);
|
||||
QETH_DBF_HEX(TRACE, 3, ((char *)&addr->u.a6.addr) + 8, 8);
|
||||
} else {
|
||||
QETH_DBF_TEXT(trace, 2, "setaddr?");
|
||||
QETH_DBF_HEX(trace, 3, addr, sizeof(struct qeth_ipaddr));
|
||||
QETH_DBF_TEXT(TRACE, 2, "setaddr?");
|
||||
QETH_DBF_HEX(TRACE, 3, addr, sizeof(struct qeth_ipaddr));
|
||||
}
|
||||
do {
|
||||
if (addr->is_multicast)
|
||||
@ -927,10 +927,10 @@ static int qeth_l3_register_addr_entry(struct qeth_card *card,
|
||||
rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_SETIP,
|
||||
addr->set_flags);
|
||||
if (rc)
|
||||
QETH_DBF_TEXT(trace, 2, "failed");
|
||||
QETH_DBF_TEXT(TRACE, 2, "failed");
|
||||
} while ((--cnt > 0) && rc);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT(trace, 2, "FAILED");
|
||||
QETH_DBF_TEXT(TRACE, 2, "FAILED");
|
||||
qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf);
|
||||
PRINT_WARN("Could not register IP address %s (rc=0x%x/%d)\n",
|
||||
buf, rc, rc);
|
||||
@ -944,15 +944,15 @@ static int qeth_l3_deregister_addr_entry(struct qeth_card *card,
|
||||
int rc = 0;
|
||||
|
||||
if (addr->proto == QETH_PROT_IPV4) {
|
||||
QETH_DBF_TEXT(trace, 2, "deladdr4");
|
||||
QETH_DBF_HEX(trace, 3, &addr->u.a4.addr, sizeof(int));
|
||||
QETH_DBF_TEXT(TRACE, 2, "deladdr4");
|
||||
QETH_DBF_HEX(TRACE, 3, &addr->u.a4.addr, sizeof(int));
|
||||
} else if (addr->proto == QETH_PROT_IPV6) {
|
||||
QETH_DBF_TEXT(trace, 2, "deladdr6");
|
||||
QETH_DBF_HEX(trace, 3, &addr->u.a6.addr, 8);
|
||||
QETH_DBF_HEX(trace, 3, ((char *)&addr->u.a6.addr) + 8, 8);
|
||||
QETH_DBF_TEXT(TRACE, 2, "deladdr6");
|
||||
QETH_DBF_HEX(TRACE, 3, &addr->u.a6.addr, 8);
|
||||
QETH_DBF_HEX(TRACE, 3, ((char *)&addr->u.a6.addr) + 8, 8);
|
||||
} else {
|
||||
QETH_DBF_TEXT(trace, 2, "deladdr?");
|
||||
QETH_DBF_HEX(trace, 3, addr, sizeof(struct qeth_ipaddr));
|
||||
QETH_DBF_TEXT(TRACE, 2, "deladdr?");
|
||||
QETH_DBF_HEX(TRACE, 3, addr, sizeof(struct qeth_ipaddr));
|
||||
}
|
||||
if (addr->is_multicast)
|
||||
rc = qeth_l3_send_setdelmc(card, addr, IPA_CMD_DELIPM);
|
||||
@ -960,7 +960,7 @@ static int qeth_l3_deregister_addr_entry(struct qeth_card *card,
|
||||
rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_DELIP,
|
||||
addr->del_flags);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT(trace, 2, "failed");
|
||||
QETH_DBF_TEXT(TRACE, 2, "failed");
|
||||
/* TODO: re-activate this warning as soon as we have a
|
||||
* clean mirco code
|
||||
qeth_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf);
|
||||
@ -1000,7 +1000,7 @@ static int qeth_l3_send_setadp_mode(struct qeth_card *card, __u32 command,
|
||||
struct qeth_cmd_buffer *iob;
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "adpmode");
|
||||
QETH_DBF_TEXT(TRACE, 4, "adpmode");
|
||||
|
||||
iob = qeth_get_adapter_cmd(card, command,
|
||||
sizeof(struct qeth_ipacmd_setadpparms));
|
||||
@ -1015,7 +1015,7 @@ static int qeth_l3_setadapter_hstr(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "adphstr");
|
||||
QETH_DBF_TEXT(TRACE, 4, "adphstr");
|
||||
|
||||
if (qeth_adp_supported(card, IPA_SETADP_SET_BROADCAST_MODE)) {
|
||||
rc = qeth_l3_send_setadp_mode(card,
|
||||
@ -1048,13 +1048,13 @@ static int qeth_l3_setadapter_parms(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(setup, 2, "setadprm");
|
||||
QETH_DBF_TEXT(SETUP, 2, "setadprm");
|
||||
|
||||
if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
|
||||
PRINT_WARN("set adapter parameters not supported "
|
||||
"on device %s.\n",
|
||||
CARD_BUS_ID(card));
|
||||
QETH_DBF_TEXT(setup, 2, " notsupp");
|
||||
QETH_DBF_TEXT(SETUP, 2, " notsupp");
|
||||
return 0;
|
||||
}
|
||||
rc = qeth_query_setadapterparms(card);
|
||||
@ -1083,7 +1083,7 @@ static int qeth_l3_default_setassparms_cb(struct qeth_card *card,
|
||||
{
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "defadpcb");
|
||||
QETH_DBF_TEXT(TRACE, 4, "defadpcb");
|
||||
|
||||
cmd = (struct qeth_ipa_cmd *) data;
|
||||
if (cmd->hdr.return_code == 0) {
|
||||
@ -1096,7 +1096,7 @@ static int qeth_l3_default_setassparms_cb(struct qeth_card *card,
|
||||
if (cmd->data.setassparms.hdr.assist_no == IPA_INBOUND_CHECKSUM &&
|
||||
cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) {
|
||||
card->info.csum_mask = cmd->data.setassparms.data.flags_32bit;
|
||||
QETH_DBF_TEXT_(trace, 3, "csum:%d", card->info.csum_mask);
|
||||
QETH_DBF_TEXT_(TRACE, 3, "csum:%d", card->info.csum_mask);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1108,7 +1108,7 @@ static struct qeth_cmd_buffer *qeth_l3_get_setassparms_cmd(
|
||||
struct qeth_cmd_buffer *iob;
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "getasscm");
|
||||
QETH_DBF_TEXT(TRACE, 4, "getasscm");
|
||||
iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot);
|
||||
|
||||
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
||||
@ -1130,7 +1130,7 @@ static int qeth_l3_send_setassparms(struct qeth_card *card,
|
||||
int rc;
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "sendassp");
|
||||
QETH_DBF_TEXT(TRACE, 4, "sendassp");
|
||||
|
||||
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
||||
if (len <= sizeof(__u32))
|
||||
@ -1149,7 +1149,7 @@ static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
|
||||
int rc;
|
||||
struct qeth_cmd_buffer *iob;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "simassp6");
|
||||
QETH_DBF_TEXT(TRACE, 4, "simassp6");
|
||||
iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code,
|
||||
0, QETH_PROT_IPV6);
|
||||
rc = qeth_l3_send_setassparms(card, iob, 0, 0,
|
||||
@ -1165,7 +1165,7 @@ static int qeth_l3_send_simple_setassparms(struct qeth_card *card,
|
||||
int length = 0;
|
||||
struct qeth_cmd_buffer *iob;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "simassp4");
|
||||
QETH_DBF_TEXT(TRACE, 4, "simassp4");
|
||||
if (data)
|
||||
length = sizeof(__u32);
|
||||
iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code,
|
||||
@ -1179,7 +1179,7 @@ static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "ipaarp");
|
||||
QETH_DBF_TEXT(TRACE, 3, "ipaarp");
|
||||
|
||||
if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
|
||||
PRINT_WARN("ARP processing not supported "
|
||||
@ -1200,7 +1200,7 @@ static int qeth_l3_start_ipa_ip_fragmentation(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "ipaipfrg");
|
||||
QETH_DBF_TEXT(TRACE, 3, "ipaipfrg");
|
||||
|
||||
if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) {
|
||||
PRINT_INFO("Hardware IP fragmentation not supported on %s\n",
|
||||
@ -1223,7 +1223,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "stsrcmac");
|
||||
QETH_DBF_TEXT(TRACE, 3, "stsrcmac");
|
||||
|
||||
if (!card->options.fake_ll)
|
||||
return -EOPNOTSUPP;
|
||||
@ -1247,7 +1247,7 @@ static int qeth_l3_start_ipa_vlan(struct qeth_card *card)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "strtvlan");
|
||||
QETH_DBF_TEXT(TRACE, 3, "strtvlan");
|
||||
|
||||
if (!qeth_is_supported(card, IPA_FULL_VLAN)) {
|
||||
PRINT_WARN("VLAN not supported on %s\n",
|
||||
@ -1271,7 +1271,7 @@ static int qeth_l3_start_ipa_multicast(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "stmcast");
|
||||
QETH_DBF_TEXT(TRACE, 3, "stmcast");
|
||||
|
||||
if (!qeth_is_supported(card, IPA_MULTICASTING)) {
|
||||
PRINT_WARN("Multicast not supported on %s\n",
|
||||
@ -1297,7 +1297,7 @@ static int qeth_l3_query_ipassists_cb(struct qeth_card *card,
|
||||
{
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(setup, 2, "qipasscb");
|
||||
QETH_DBF_TEXT(SETUP, 2, "qipasscb");
|
||||
|
||||
cmd = (struct qeth_ipa_cmd *) data;
|
||||
if (cmd->hdr.prot_version == QETH_PROT_IPV4) {
|
||||
@ -1307,9 +1307,9 @@ static int qeth_l3_query_ipassists_cb(struct qeth_card *card,
|
||||
card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported;
|
||||
card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled;
|
||||
}
|
||||
QETH_DBF_TEXT(setup, 2, "suppenbl");
|
||||
QETH_DBF_TEXT_(setup, 2, "%x", cmd->hdr.ipa_supported);
|
||||
QETH_DBF_TEXT_(setup, 2, "%x", cmd->hdr.ipa_enabled);
|
||||
QETH_DBF_TEXT(SETUP, 2, "suppenbl");
|
||||
QETH_DBF_TEXT_(SETUP, 2, "%x", cmd->hdr.ipa_supported);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "%x", cmd->hdr.ipa_enabled);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1319,7 +1319,7 @@ static int qeth_l3_query_ipassists(struct qeth_card *card,
|
||||
int rc;
|
||||
struct qeth_cmd_buffer *iob;
|
||||
|
||||
QETH_DBF_TEXT_(setup, 2, "qipassi%i", prot);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "qipassi%i", prot);
|
||||
iob = qeth_get_ipacmd_buffer(card, IPA_CMD_QIPASSIST, prot);
|
||||
rc = qeth_send_ipa_cmd(card, iob, qeth_l3_query_ipassists_cb, NULL);
|
||||
return rc;
|
||||
@ -1330,7 +1330,7 @@ static int qeth_l3_softsetup_ipv6(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "softipv6");
|
||||
QETH_DBF_TEXT(TRACE, 3, "softipv6");
|
||||
|
||||
if (card->info.type == QETH_CARD_TYPE_IQD)
|
||||
goto out;
|
||||
@ -1375,7 +1375,7 @@ static int qeth_l3_start_ipa_ipv6(struct qeth_card *card)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "strtipv6");
|
||||
QETH_DBF_TEXT(TRACE, 3, "strtipv6");
|
||||
|
||||
if (!qeth_is_supported(card, IPA_IPV6)) {
|
||||
PRINT_WARN("IPv6 not supported on %s\n",
|
||||
@ -1392,7 +1392,7 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "stbrdcst");
|
||||
QETH_DBF_TEXT(TRACE, 3, "stbrdcst");
|
||||
card->info.broadcast_capable = 0;
|
||||
if (!qeth_is_supported(card, IPA_FILTERING)) {
|
||||
PRINT_WARN("Broadcast not supported on %s\n",
|
||||
@ -1462,7 +1462,7 @@ static int qeth_l3_start_ipa_checksum(struct qeth_card *card)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "strtcsum");
|
||||
QETH_DBF_TEXT(TRACE, 3, "strtcsum");
|
||||
|
||||
if (card->options.checksum_type == NO_CHECKSUMMING) {
|
||||
PRINT_WARN("Using no checksumming on %s.\n",
|
||||
@ -1493,7 +1493,7 @@ static int qeth_l3_start_ipa_tso(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "sttso");
|
||||
QETH_DBF_TEXT(TRACE, 3, "sttso");
|
||||
|
||||
if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) {
|
||||
PRINT_WARN("Outbound TSO not supported on %s\n",
|
||||
@ -1518,7 +1518,7 @@ static int qeth_l3_start_ipa_tso(struct qeth_card *card)
|
||||
|
||||
static int qeth_l3_start_ipassists(struct qeth_card *card)
|
||||
{
|
||||
QETH_DBF_TEXT(trace, 3, "strtipas");
|
||||
QETH_DBF_TEXT(TRACE, 3, "strtipas");
|
||||
qeth_l3_start_ipa_arp_processing(card); /* go on*/
|
||||
qeth_l3_start_ipa_ip_fragmentation(card); /* go on*/
|
||||
qeth_l3_start_ipa_source_mac(card); /* go on*/
|
||||
@ -1538,7 +1538,7 @@ static int qeth_l3_put_unique_id(struct qeth_card *card)
|
||||
struct qeth_cmd_buffer *iob;
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(trace, 2, "puniqeid");
|
||||
QETH_DBF_TEXT(TRACE, 2, "puniqeid");
|
||||
|
||||
if ((card->info.unique_id & UNIQUE_ID_NOT_BY_CARD) ==
|
||||
UNIQUE_ID_NOT_BY_CARD)
|
||||
@ -1575,7 +1575,7 @@ static int qeth_l3_iqd_read_initial_mac(struct qeth_card *card)
|
||||
struct qeth_cmd_buffer *iob;
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(setup, 2, "hsrmac");
|
||||
QETH_DBF_TEXT(SETUP, 2, "hsrmac");
|
||||
|
||||
iob = qeth_get_ipacmd_buffer(card, IPA_CMD_CREATE_ADDR,
|
||||
QETH_PROT_IPV6);
|
||||
@ -1616,7 +1616,7 @@ static int qeth_l3_get_unique_id(struct qeth_card *card)
|
||||
struct qeth_cmd_buffer *iob;
|
||||
struct qeth_ipa_cmd *cmd;
|
||||
|
||||
QETH_DBF_TEXT(setup, 2, "guniqeid");
|
||||
QETH_DBF_TEXT(SETUP, 2, "guniqeid");
|
||||
|
||||
if (!qeth_is_supported(card, IPA_IPV6)) {
|
||||
card->info.unique_id = UNIQUE_ID_IF_CREATE_ADDR_FAILED |
|
||||
@ -1649,7 +1649,7 @@ static void qeth_l3_add_mc(struct qeth_card *card, struct in_device *in4_dev)
|
||||
struct ip_mc_list *im4;
|
||||
char buf[MAX_ADDR_LEN];
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "addmc");
|
||||
QETH_DBF_TEXT(TRACE, 4, "addmc");
|
||||
for (im4 = in4_dev->mc_list; im4; im4 = im4->next) {
|
||||
qeth_l3_get_mac_for_ipm(im4->multiaddr, buf, in4_dev->dev);
|
||||
ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV4);
|
||||
@ -1669,7 +1669,7 @@ static void qeth_l3_add_vlan_mc(struct qeth_card *card)
|
||||
struct vlan_group *vg;
|
||||
int i;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "addmcvl");
|
||||
QETH_DBF_TEXT(TRACE, 4, "addmcvl");
|
||||
if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL))
|
||||
return;
|
||||
|
||||
@ -1693,7 +1693,7 @@ static void qeth_l3_add_multicast_ipv4(struct qeth_card *card)
|
||||
{
|
||||
struct in_device *in4_dev;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "chkmcv4");
|
||||
QETH_DBF_TEXT(TRACE, 4, "chkmcv4");
|
||||
in4_dev = in_dev_get(card->dev);
|
||||
if (in4_dev == NULL)
|
||||
return;
|
||||
@ -1711,7 +1711,7 @@ static void qeth_l3_add_mc6(struct qeth_card *card, struct inet6_dev *in6_dev)
|
||||
struct ifmcaddr6 *im6;
|
||||
char buf[MAX_ADDR_LEN];
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "addmc6");
|
||||
QETH_DBF_TEXT(TRACE, 4, "addmc6");
|
||||
for (im6 = in6_dev->mc_list; im6 != NULL; im6 = im6->next) {
|
||||
ndisc_mc_map(&im6->mca_addr, buf, in6_dev->dev, 0);
|
||||
ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV6);
|
||||
@ -1732,7 +1732,7 @@ static void qeth_l3_add_vlan_mc6(struct qeth_card *card)
|
||||
struct vlan_group *vg;
|
||||
int i;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "admc6vl");
|
||||
QETH_DBF_TEXT(TRACE, 4, "admc6vl");
|
||||
if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL))
|
||||
return;
|
||||
|
||||
@ -1756,7 +1756,7 @@ static void qeth_l3_add_multicast_ipv6(struct qeth_card *card)
|
||||
{
|
||||
struct inet6_dev *in6_dev;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "chkmcv6");
|
||||
QETH_DBF_TEXT(TRACE, 4, "chkmcv6");
|
||||
if (!qeth_is_supported(card, IPA_IPV6))
|
||||
return ;
|
||||
in6_dev = in6_dev_get(card->dev);
|
||||
@ -1777,7 +1777,7 @@ static void qeth_l3_free_vlan_addresses4(struct qeth_card *card,
|
||||
struct in_ifaddr *ifa;
|
||||
struct qeth_ipaddr *addr;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "frvaddr4");
|
||||
QETH_DBF_TEXT(TRACE, 4, "frvaddr4");
|
||||
|
||||
in_dev = in_dev_get(vlan_group_get_device(card->vlangrp, vid));
|
||||
if (!in_dev)
|
||||
@ -1803,7 +1803,7 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card,
|
||||
struct inet6_ifaddr *ifa;
|
||||
struct qeth_ipaddr *addr;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "frvaddr6");
|
||||
QETH_DBF_TEXT(TRACE, 4, "frvaddr6");
|
||||
|
||||
in6_dev = in6_dev_get(vlan_group_get_device(card->vlangrp, vid));
|
||||
if (!in6_dev)
|
||||
@ -1838,7 +1838,7 @@ static void qeth_l3_vlan_rx_register(struct net_device *dev,
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
unsigned long flags;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "vlanreg");
|
||||
QETH_DBF_TEXT(TRACE, 4, "vlanreg");
|
||||
spin_lock_irqsave(&card->vlanlock, flags);
|
||||
card->vlangrp = grp;
|
||||
spin_unlock_irqrestore(&card->vlanlock, flags);
|
||||
@ -1876,7 +1876,7 @@ static void qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
unsigned long flags;
|
||||
|
||||
QETH_DBF_TEXT_(trace, 4, "kid:%d", vid);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "kid:%d", vid);
|
||||
spin_lock_irqsave(&card->vlanlock, flags);
|
||||
/* unregister IP addresses of vlan device */
|
||||
qeth_l3_free_vlan_addresses(card, vid);
|
||||
@ -2006,8 +2006,8 @@ static void qeth_l3_process_inbound_buffer(struct qeth_card *card,
|
||||
break;
|
||||
default:
|
||||
dev_kfree_skb_any(skb);
|
||||
QETH_DBF_TEXT(trace, 3, "inbunkno");
|
||||
QETH_DBF_HEX(control, 3, hdr, QETH_DBF_CONTROL_LEN);
|
||||
QETH_DBF_TEXT(TRACE, 3, "inbunkno");
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2074,7 +2074,7 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev)
|
||||
card = netdev_priv(vlan_dev_info(dev)->real_dev);
|
||||
if (card->options.layer2)
|
||||
card = NULL;
|
||||
QETH_DBF_TEXT_(trace, 4, "%d", rc);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "%d", rc);
|
||||
return card ;
|
||||
}
|
||||
|
||||
@ -2082,8 +2082,8 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
QETH_DBF_TEXT(setup, 2, "stopcard");
|
||||
QETH_DBF_HEX(setup, 2, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(SETUP, 2, "stopcard");
|
||||
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
|
||||
|
||||
qeth_set_allowed_threads(card, 0, 1);
|
||||
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD))
|
||||
@ -2096,7 +2096,7 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
|
||||
if (!card->use_hard_stop) {
|
||||
rc = qeth_send_stoplan(card);
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
}
|
||||
card->state = CARD_STATE_SOFTSETUP;
|
||||
}
|
||||
@ -2110,7 +2110,7 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
|
||||
(card->info.type != QETH_CARD_TYPE_IQD)) {
|
||||
rc = qeth_l3_put_unique_id(card);
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(setup, 2, "2err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
|
||||
}
|
||||
qeth_qdio_clear_card(card, 0);
|
||||
qeth_clear_qdio_buffers(card);
|
||||
@ -2129,7 +2129,7 @@ static void qeth_l3_set_multicast_list(struct net_device *dev)
|
||||
{
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "setmulti");
|
||||
QETH_DBF_TEXT(TRACE, 3, "setmulti");
|
||||
qeth_l3_delete_mc_addresses(card);
|
||||
qeth_l3_add_multicast_ipv4(card);
|
||||
#ifdef CONFIG_QETH_IPV6
|
||||
@ -2169,7 +2169,7 @@ static int qeth_l3_arp_set_no_entries(struct qeth_card *card, int no_entries)
|
||||
int tmp;
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "arpstnoe");
|
||||
QETH_DBF_TEXT(TRACE, 3, "arpstnoe");
|
||||
|
||||
/*
|
||||
* currently GuestLAN only supports the ARP assist function
|
||||
@ -2223,17 +2223,17 @@ static int qeth_l3_arp_query_cb(struct qeth_card *card,
|
||||
int uentry_size;
|
||||
int i;
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "arpquecb");
|
||||
QETH_DBF_TEXT(TRACE, 4, "arpquecb");
|
||||
|
||||
qinfo = (struct qeth_arp_query_info *) reply->param;
|
||||
cmd = (struct qeth_ipa_cmd *) data;
|
||||
if (cmd->hdr.return_code) {
|
||||
QETH_DBF_TEXT_(trace, 4, "qaer1%i", cmd->hdr.return_code);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "qaer1%i", cmd->hdr.return_code);
|
||||
return 0;
|
||||
}
|
||||
if (cmd->data.setassparms.hdr.return_code) {
|
||||
cmd->hdr.return_code = cmd->data.setassparms.hdr.return_code;
|
||||
QETH_DBF_TEXT_(trace, 4, "qaer2%i", cmd->hdr.return_code);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "qaer2%i", cmd->hdr.return_code);
|
||||
return 0;
|
||||
}
|
||||
qdata = &cmd->data.setassparms.data.query_arp;
|
||||
@ -2255,17 +2255,17 @@ static int qeth_l3_arp_query_cb(struct qeth_card *card,
|
||||
/* check if there is enough room in userspace */
|
||||
if ((qinfo->udata_len - qinfo->udata_offset) <
|
||||
qdata->no_entries * uentry_size){
|
||||
QETH_DBF_TEXT_(trace, 4, "qaer3%i", -ENOMEM);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "qaer3%i", -ENOMEM);
|
||||
cmd->hdr.return_code = -ENOMEM;
|
||||
PRINT_WARN("query ARP user space buffer is too small for "
|
||||
"the returned number of ARP entries. "
|
||||
"Aborting query!\n");
|
||||
goto out_error;
|
||||
}
|
||||
QETH_DBF_TEXT_(trace, 4, "anore%i",
|
||||
QETH_DBF_TEXT_(TRACE, 4, "anore%i",
|
||||
cmd->data.setassparms.hdr.number_of_replies);
|
||||
QETH_DBF_TEXT_(trace, 4, "aseqn%i", cmd->data.setassparms.hdr.seq_no);
|
||||
QETH_DBF_TEXT_(trace, 4, "anoen%i", qdata->no_entries);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "aseqn%i", cmd->data.setassparms.hdr.seq_no);
|
||||
QETH_DBF_TEXT_(TRACE, 4, "anoen%i", qdata->no_entries);
|
||||
|
||||
if (qinfo->mask_bits & QETH_QARP_STRIP_ENTRIES) {
|
||||
/* strip off "media specific information" */
|
||||
@ -2301,7 +2301,7 @@ static int qeth_l3_send_ipa_arp_cmd(struct qeth_card *card,
|
||||
unsigned long),
|
||||
void *reply_param)
|
||||
{
|
||||
QETH_DBF_TEXT(trace, 4, "sendarp");
|
||||
QETH_DBF_TEXT(TRACE, 4, "sendarp");
|
||||
|
||||
memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE);
|
||||
memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data),
|
||||
@ -2317,7 +2317,7 @@ static int qeth_l3_arp_query(struct qeth_card *card, char __user *udata)
|
||||
int tmp;
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "arpquery");
|
||||
QETH_DBF_TEXT(TRACE, 3, "arpquery");
|
||||
|
||||
if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/
|
||||
IPA_ARP_PROCESSING)) {
|
||||
@ -2362,7 +2362,7 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card,
|
||||
int tmp;
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "arpadent");
|
||||
QETH_DBF_TEXT(TRACE, 3, "arpadent");
|
||||
|
||||
/*
|
||||
* currently GuestLAN only supports the ARP assist function
|
||||
@ -2404,7 +2404,7 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card,
|
||||
int tmp;
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "arprment");
|
||||
QETH_DBF_TEXT(TRACE, 3, "arprment");
|
||||
|
||||
/*
|
||||
* currently GuestLAN only supports the ARP assist function
|
||||
@ -2443,7 +2443,7 @@ static int qeth_l3_arp_flush_cache(struct qeth_card *card)
|
||||
int rc;
|
||||
int tmp;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "arpflush");
|
||||
QETH_DBF_TEXT(TRACE, 3, "arpflush");
|
||||
|
||||
/*
|
||||
* currently GuestLAN only supports the ARP assist function
|
||||
@ -2552,14 +2552,14 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
rc = -EOPNOTSUPP;
|
||||
}
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(trace, 2, "ioce%d", rc);
|
||||
QETH_DBF_TEXT_(TRACE, 2, "ioce%d", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
|
||||
struct sk_buff *skb, int ipv, int cast_type)
|
||||
{
|
||||
QETH_DBF_TEXT(trace, 6, "fillhdr");
|
||||
QETH_DBF_TEXT(TRACE, 6, "fillhdr");
|
||||
|
||||
memset(hdr, 0, sizeof(struct qeth_hdr));
|
||||
hdr->hdr.l3.id = QETH_HEADER_TYPE_LAYER3;
|
||||
@ -2638,7 +2638,7 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
|
||||
struct qeth_eddp_context *ctx = NULL;
|
||||
|
||||
QETH_DBF_TEXT(trace, 6, "l3xmit");
|
||||
QETH_DBF_TEXT(TRACE, 6, "l3xmit");
|
||||
|
||||
if ((card->info.type == QETH_CARD_TYPE_IQD) &&
|
||||
(skb->protocol != htons(ETH_P_IPV6)) &&
|
||||
@ -2799,7 +2799,7 @@ static int qeth_l3_open(struct net_device *dev)
|
||||
{
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "qethopen");
|
||||
QETH_DBF_TEXT(TRACE, 4, "qethopen");
|
||||
if (card->state != CARD_STATE_SOFTSETUP)
|
||||
return -ENODEV;
|
||||
card->data.state = CH_STATE_UP;
|
||||
@ -2816,7 +2816,7 @@ static int qeth_l3_stop(struct net_device *dev)
|
||||
{
|
||||
struct qeth_card *card = netdev_priv(dev);
|
||||
|
||||
QETH_DBF_TEXT(trace, 4, "qethstop");
|
||||
QETH_DBF_TEXT(TRACE, 4, "qethstop");
|
||||
netif_tx_disable(dev);
|
||||
card->dev->flags &= ~IFF_UP;
|
||||
if (card->state == CARD_STATE_UP)
|
||||
@ -2982,7 +2982,7 @@ static void qeth_l3_qdio_input_handler(struct ccw_device *ccwdev,
|
||||
int index;
|
||||
int i;
|
||||
|
||||
QETH_DBF_TEXT(trace, 6, "qdinput");
|
||||
QETH_DBF_TEXT(TRACE, 6, "qdinput");
|
||||
card = (struct qeth_card *) card_ptr;
|
||||
net_dev = card->dev;
|
||||
if (card->options.performance_stats) {
|
||||
@ -2991,11 +2991,11 @@ static void qeth_l3_qdio_input_handler(struct ccw_device *ccwdev,
|
||||
}
|
||||
if (status & QDIO_STATUS_LOOK_FOR_ERROR) {
|
||||
if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) {
|
||||
QETH_DBF_TEXT(trace, 1, "qdinchk");
|
||||
QETH_DBF_TEXT_(trace, 1, "%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_TEXT_(trace, 1, "%04X%04X",
|
||||
QETH_DBF_TEXT(TRACE, 1, "qdinchk");
|
||||
QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card));
|
||||
QETH_DBF_TEXT_(TRACE, 1, "%04X%04X",
|
||||
first_element, count);
|
||||
QETH_DBF_TEXT_(trace, 1, "%04X%04X", queue, status);
|
||||
QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", queue, status);
|
||||
qeth_schedule_recovery(card);
|
||||
return;
|
||||
}
|
||||
@ -3059,8 +3059,8 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
||||
enum qeth_card_states recover_flag;
|
||||
|
||||
BUG_ON(!card);
|
||||
QETH_DBF_TEXT(setup, 2, "setonlin");
|
||||
QETH_DBF_HEX(setup, 2, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(SETUP, 2, "setonlin");
|
||||
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
|
||||
|
||||
qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
|
||||
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
|
||||
@ -3072,23 +3072,23 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
||||
recover_flag = card->state;
|
||||
rc = ccw_device_set_online(CARD_RDEV(card));
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
return -EIO;
|
||||
}
|
||||
rc = ccw_device_set_online(CARD_WDEV(card));
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
return -EIO;
|
||||
}
|
||||
rc = ccw_device_set_online(CARD_DDEV(card));
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
rc = qeth_core_hardsetup_card(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "2err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
|
||||
goto out_remove;
|
||||
}
|
||||
|
||||
@ -3101,11 +3101,11 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
||||
qeth_print_status_message(card);
|
||||
|
||||
/* softsetup */
|
||||
QETH_DBF_TEXT(setup, 2, "softsetp");
|
||||
QETH_DBF_TEXT(SETUP, 2, "softsetp");
|
||||
|
||||
rc = qeth_send_startlan(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
if (rc == 0xe080) {
|
||||
PRINT_WARN("LAN on card %s if offline! "
|
||||
"Waiting for STARTLAN from card.\n",
|
||||
@ -3119,21 +3119,21 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
||||
|
||||
rc = qeth_l3_setadapter_parms(card);
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(setup, 2, "2err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
|
||||
rc = qeth_l3_start_ipassists(card);
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(setup, 2, "3err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc);
|
||||
rc = qeth_l3_setrouting_v4(card);
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(setup, 2, "4err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "4err%d", rc);
|
||||
rc = qeth_l3_setrouting_v6(card);
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(setup, 2, "5err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc);
|
||||
netif_tx_disable(card->dev);
|
||||
|
||||
rc = qeth_init_qdio_queues(card);
|
||||
if (rc) {
|
||||
QETH_DBF_TEXT_(setup, 2, "6err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
|
||||
goto out_remove;
|
||||
}
|
||||
card->state = CARD_STATE_SOFTSETUP;
|
||||
@ -3172,8 +3172,8 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
|
||||
int rc = 0, rc2 = 0, rc3 = 0;
|
||||
enum qeth_card_states recover_flag;
|
||||
|
||||
QETH_DBF_TEXT(setup, 3, "setoffl");
|
||||
QETH_DBF_HEX(setup, 3, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(SETUP, 3, "setoffl");
|
||||
QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *));
|
||||
|
||||
if (card->dev && netif_carrier_ok(card->dev))
|
||||
netif_carrier_off(card->dev);
|
||||
@ -3189,7 +3189,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
|
||||
if (!rc)
|
||||
rc = (rc2) ? rc2 : rc3;
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(setup, 2, "1err%d", rc);
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
if (recover_flag == CARD_STATE_UP)
|
||||
card->state = CARD_STATE_RECOVER;
|
||||
/* let user_space know that device is offline */
|
||||
@ -3208,11 +3208,11 @@ static int qeth_l3_recover(void *ptr)
|
||||
int rc = 0;
|
||||
|
||||
card = (struct qeth_card *) ptr;
|
||||
QETH_DBF_TEXT(trace, 2, "recover1");
|
||||
QETH_DBF_HEX(trace, 2, &card, sizeof(void *));
|
||||
QETH_DBF_TEXT(TRACE, 2, "recover1");
|
||||
QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *));
|
||||
if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
|
||||
return 0;
|
||||
QETH_DBF_TEXT(trace, 2, "recover2");
|
||||
QETH_DBF_TEXT(TRACE, 2, "recover2");
|
||||
PRINT_WARN("Recovery of device %s started ...\n",
|
||||
CARD_BUS_ID(card));
|
||||
card->use_hard_stop = 1;
|
||||
@ -3258,7 +3258,7 @@ static int qeth_l3_ip_event(struct notifier_block *this,
|
||||
if (dev_net(dev) != &init_net)
|
||||
return NOTIFY_DONE;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "ipevent");
|
||||
QETH_DBF_TEXT(TRACE, 3, "ipevent");
|
||||
card = qeth_l3_get_card_from_dev(dev);
|
||||
if (!card)
|
||||
return NOTIFY_DONE;
|
||||
@ -3305,7 +3305,7 @@ static int qeth_l3_ip6_event(struct notifier_block *this,
|
||||
struct qeth_ipaddr *addr;
|
||||
struct qeth_card *card;
|
||||
|
||||
QETH_DBF_TEXT(trace, 3, "ip6event");
|
||||
QETH_DBF_TEXT(TRACE, 3, "ip6event");
|
||||
|
||||
card = qeth_l3_get_card_from_dev(dev);
|
||||
if (!card)
|
||||
@ -3348,7 +3348,7 @@ static int qeth_l3_register_notifiers(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "regnotif");
|
||||
QETH_DBF_TEXT(TRACE, 5, "regnotif");
|
||||
rc = register_inetaddr_notifier(&qeth_l3_ip_notifier);
|
||||
if (rc)
|
||||
return rc;
|
||||
@ -3367,7 +3367,7 @@ static int qeth_l3_register_notifiers(void)
|
||||
static void qeth_l3_unregister_notifiers(void)
|
||||
{
|
||||
|
||||
QETH_DBF_TEXT(trace, 5, "unregnot");
|
||||
QETH_DBF_TEXT(TRACE, 5, "unregnot");
|
||||
BUG_ON(unregister_inetaddr_notifier(&qeth_l3_ip_notifier));
|
||||
#ifdef CONFIG_QETH_IPV6
|
||||
BUG_ON(unregister_inet6addr_notifier(&qeth_l3_ip6_notifier));
|
||||
|
Loading…
Reference in New Issue
Block a user