diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/solos-pci.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index c54ecebc9a73..f27bd922574d 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
@@ -340,6 +340,12 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb | |||
340 | str = next_string(skb); | 340 | str = next_string(skb); |
341 | if (!str) | 341 | if (!str) |
342 | return -EIO; | 342 | return -EIO; |
343 | if (!strcmp(str, "ERROR")) { | ||
344 | dev_dbg(&card->dev->dev, "Status packet indicated Solos error on port %d (starting up?)\n", | ||
345 | port); | ||
346 | return 0; | ||
347 | } | ||
348 | |||
343 | rate_up = simple_strtol(str, &end, 10); | 349 | rate_up = simple_strtol(str, &end, 10); |
344 | if (*end) | 350 | if (*end) |
345 | return -EIO; | 351 | return -EIO; |
@@ -362,8 +368,7 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb | |||
362 | } | 368 | } |
363 | 369 | ||
364 | if (state == ATM_PHY_SIG_LOST) { | 370 | if (state == ATM_PHY_SIG_LOST) { |
365 | dev_info(&card->dev->dev, "Port %d ATM state: %s\n", | 371 | dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str); |
366 | port, state_str); | ||
367 | } else { | 372 | } else { |
368 | char *snr, *attn; | 373 | char *snr, *attn; |
369 | 374 | ||
@@ -374,7 +379,7 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb | |||
374 | if (!attn) | 379 | if (!attn) |
375 | return -EIO; | 380 | return -EIO; |
376 | 381 | ||
377 | dev_info(&card->dev->dev, "Port %d: %s (%d/%d kb/s%s%s%s%s)\n", | 382 | dev_info(&card->dev->dev, "Port %d: %s @%d/%d kb/s%s%s%s%s\n", |
378 | port, state_str, rate_down/1000, rate_up/1000, | 383 | port, state_str, rate_down/1000, rate_up/1000, |
379 | snr[0]?", SNR ":"", snr, attn[0]?", Attn ":"", attn); | 384 | snr[0]?", SNR ":"", snr, attn[0]?", Attn ":"", attn); |
380 | } | 385 | } |
@@ -663,7 +668,11 @@ void solos_bh(unsigned long card_arg) | |||
663 | break; | 668 | break; |
664 | 669 | ||
665 | case PKT_STATUS: | 670 | case PKT_STATUS: |
666 | process_status(card, port, skb); | 671 | if (process_status(card, port, skb) && |
672 | net_ratelimit()) { | ||
673 | dev_warn(&card->dev->dev, "Bad status packet of %d bytes on port %d:\n", skb->len, port); | ||
674 | print_buffer(skb); | ||
675 | } | ||
667 | dev_kfree_skb_any(skb); | 676 | dev_kfree_skb_any(skb); |
668 | break; | 677 | break; |
669 | 678 | ||