diff options
author | Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> | 2012-12-10 08:42:54 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-09 18:51:41 -0500 |
commit | f8f991710b580878c88cfe49d918cfb0c9e15236 (patch) | |
tree | 1e37131ae101c0117343e79179191205ef7c4901 | |
parent | 89fb20256725e735601ea6439680956fa2ec4741 (diff) |
NFC: pn533: Fix urb->status handling
Fix text message to be more suitable for the error code and treat
ESHUTDOWN as an error not debug msg.
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/nfc/pn533.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c index d17ec6a664a0..898375d95f36 100644 --- a/drivers/nfc/pn533.c +++ b/drivers/nfc/pn533.c | |||
@@ -505,18 +505,19 @@ static void pn533_recv_response(struct urb *urb) | |||
505 | 505 | ||
506 | switch (urb->status) { | 506 | switch (urb->status) { |
507 | case 0: | 507 | case 0: |
508 | /* success */ | 508 | break; /* success */ |
509 | break; | ||
510 | case -ECONNRESET: | 509 | case -ECONNRESET: |
511 | case -ENOENT: | 510 | case -ENOENT: |
512 | case -ESHUTDOWN: | ||
513 | nfc_dev_dbg(&dev->interface->dev, | 511 | nfc_dev_dbg(&dev->interface->dev, |
514 | "Urb shutting down with status: %d", urb->status); | 512 | "The urb has been canceled (status %d)", |
513 | urb->status); | ||
515 | dev->wq_in_error = urb->status; | 514 | dev->wq_in_error = urb->status; |
516 | goto sched_wq; | 515 | goto sched_wq; |
516 | break; | ||
517 | case -ESHUTDOWN: | ||
517 | default: | 518 | default: |
518 | nfc_dev_err(&dev->interface->dev, | 519 | nfc_dev_err(&dev->interface->dev, |
519 | "Nonzero urb status received: %d", urb->status); | 520 | "Urb failure (status %d)", urb->status); |
520 | dev->wq_in_error = urb->status; | 521 | dev->wq_in_error = urb->status; |
521 | goto sched_wq; | 522 | goto sched_wq; |
522 | } | 523 | } |
@@ -562,18 +563,19 @@ static void pn533_recv_ack(struct urb *urb) | |||
562 | 563 | ||
563 | switch (urb->status) { | 564 | switch (urb->status) { |
564 | case 0: | 565 | case 0: |
565 | /* success */ | 566 | break; /* success */ |
566 | break; | ||
567 | case -ECONNRESET: | 567 | case -ECONNRESET: |
568 | case -ENOENT: | 568 | case -ENOENT: |
569 | case -ESHUTDOWN: | ||
570 | nfc_dev_dbg(&dev->interface->dev, | 569 | nfc_dev_dbg(&dev->interface->dev, |
571 | "Urb shutting down with status: %d", urb->status); | 570 | "The urb has been stopped (status %d)", |
571 | urb->status); | ||
572 | dev->wq_in_error = urb->status; | 572 | dev->wq_in_error = urb->status; |
573 | goto sched_wq; | 573 | goto sched_wq; |
574 | break; | ||
575 | case -ESHUTDOWN: | ||
574 | default: | 576 | default: |
575 | nfc_dev_err(&dev->interface->dev, | 577 | nfc_dev_err(&dev->interface->dev, |
576 | "Nonzero urb status received: %d", urb->status); | 578 | "Urb failure (status %d)", urb->status); |
577 | dev->wq_in_error = urb->status; | 579 | dev->wq_in_error = urb->status; |
578 | goto sched_wq; | 580 | goto sched_wq; |
579 | } | 581 | } |
@@ -981,17 +983,17 @@ static void pn533_send_complete(struct urb *urb) | |||
981 | 983 | ||
982 | switch (urb->status) { | 984 | switch (urb->status) { |
983 | case 0: | 985 | case 0: |
984 | /* success */ | 986 | break; /* success */ |
985 | break; | ||
986 | case -ECONNRESET: | 987 | case -ECONNRESET: |
987 | case -ENOENT: | 988 | case -ENOENT: |
988 | case -ESHUTDOWN: | ||
989 | nfc_dev_dbg(&dev->interface->dev, | 989 | nfc_dev_dbg(&dev->interface->dev, |
990 | "Urb shutting down with status: %d", urb->status); | 990 | "The urb has been stopped (status %d)", |
991 | urb->status); | ||
991 | break; | 992 | break; |
993 | case -ESHUTDOWN: | ||
992 | default: | 994 | default: |
993 | nfc_dev_dbg(&dev->interface->dev, | 995 | nfc_dev_err(&dev->interface->dev, |
994 | "Nonzero urb status received: %d", urb->status); | 996 | "Urb failure (status %d)", urb->status); |
995 | } | 997 | } |
996 | } | 998 | } |
997 | 999 | ||