aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/plip.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/plip.c')
-rw-r--r--drivers/net/plip.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/plip.c b/drivers/net/plip.c
index 00487f569cfd..3327e9fc7b51 100644
--- a/drivers/net/plip.c
+++ b/drivers/net/plip.c
@@ -372,8 +372,8 @@ plip_bh(struct work_struct *work)
372 372
373 nl->is_deferred = 0; 373 nl->is_deferred = 0;
374 f = connection_state_table[nl->connection]; 374 f = connection_state_table[nl->connection];
375 if ((r = (*f)(nl->dev, nl, snd, rcv)) != OK 375 if ((r = (*f)(nl->dev, nl, snd, rcv)) != OK &&
376 && (r = plip_bh_timeout_error(nl->dev, nl, snd, rcv, r)) != OK) { 376 (r = plip_bh_timeout_error(nl->dev, nl, snd, rcv, r)) != OK) {
377 nl->is_deferred = 1; 377 nl->is_deferred = 1;
378 schedule_delayed_work(&nl->deferred, 1); 378 schedule_delayed_work(&nl->deferred, 1);
379 } 379 }
@@ -416,9 +416,8 @@ plip_bh_timeout_error(struct net_device *dev, struct net_local *nl,
416 416
417 if (error != ERROR) { /* Timeout */ 417 if (error != ERROR) { /* Timeout */
418 nl->timeout_count++; 418 nl->timeout_count++;
419 if ((error == HS_TIMEOUT 419 if ((error == HS_TIMEOUT && nl->timeout_count <= 10) ||
420 && nl->timeout_count <= 10) 420 nl->timeout_count <= 3) {
421 || nl->timeout_count <= 3) {
422 spin_unlock_irq(&nl->lock); 421 spin_unlock_irq(&nl->lock);
423 /* Try again later */ 422 /* Try again later */
424 return TIMEOUT; 423 return TIMEOUT;
@@ -624,8 +623,8 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl,
624 if (plip_receive(nibble_timeout, dev, 623 if (plip_receive(nibble_timeout, dev,
625 &rcv->nibble, &rcv->length.b.msb)) 624 &rcv->nibble, &rcv->length.b.msb))
626 return TIMEOUT; 625 return TIMEOUT;
627 if (rcv->length.h > dev->mtu + dev->hard_header_len 626 if (rcv->length.h > dev->mtu + dev->hard_header_len ||
628 || rcv->length.h < 8) { 627 rcv->length.h < 8) {
629 printk(KERN_WARNING "%s: bogus packet size %d.\n", dev->name, rcv->length.h); 628 printk(KERN_WARNING "%s: bogus packet size %d.\n", dev->name, rcv->length.h);
630 return ERROR; 629 return ERROR;
631 } 630 }