diff options
-rw-r--r-- | drivers/net/bnx2.c | 10 | ||||
-rw-r--r-- | include/linux/rtnetlink.h | 2 | ||||
-rw-r--r-- | net/core/pktgen.c | 5 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 14 |
4 files changed, 23 insertions, 8 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 24e7f9ab3f5a..854d80c330ec 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -3934,11 +3934,13 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code) | |||
3934 | /* Chip reset. */ | 3934 | /* Chip reset. */ |
3935 | REG_WR(bp, BNX2_PCICFG_MISC_CONFIG, val); | 3935 | REG_WR(bp, BNX2_PCICFG_MISC_CONFIG, val); |
3936 | 3936 | ||
3937 | /* Reading back any register after chip reset will hang the | ||
3938 | * bus on 5706 A0 and A1. The msleep below provides plenty | ||
3939 | * of margin for write posting. | ||
3940 | */ | ||
3937 | if ((CHIP_ID(bp) == CHIP_ID_5706_A0) || | 3941 | if ((CHIP_ID(bp) == CHIP_ID_5706_A0) || |
3938 | (CHIP_ID(bp) == CHIP_ID_5706_A1)) { | 3942 | (CHIP_ID(bp) == CHIP_ID_5706_A1)) |
3939 | current->state = TASK_UNINTERRUPTIBLE; | 3943 | msleep(20); |
3940 | schedule_timeout(HZ / 50); | ||
3941 | } | ||
3942 | 3944 | ||
3943 | /* Reset takes approximate 30 usec */ | 3945 | /* Reset takes approximate 30 usec */ |
3944 | for (i = 0; i < 10; i++) { | 3946 | for (i = 0; i < 10; i++) { |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index c91476ce314a..dff3192374f8 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -351,6 +351,8 @@ enum | |||
351 | #define RTAX_INITCWND RTAX_INITCWND | 351 | #define RTAX_INITCWND RTAX_INITCWND |
352 | RTAX_FEATURES, | 352 | RTAX_FEATURES, |
353 | #define RTAX_FEATURES RTAX_FEATURES | 353 | #define RTAX_FEATURES RTAX_FEATURES |
354 | RTAX_RTO_MIN, | ||
355 | #define RTAX_RTO_MIN RTAX_RTO_MIN | ||
354 | __RTAX_MAX | 356 | __RTAX_MAX |
355 | }; | 357 | }; |
356 | 358 | ||
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 7bae576ac115..4ad62d375373 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -3331,8 +3331,9 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev) | |||
3331 | } | 3331 | } |
3332 | 3332 | ||
3333 | if ((netif_queue_stopped(odev) || | 3333 | if ((netif_queue_stopped(odev) || |
3334 | netif_subqueue_stopped(odev, pkt_dev->skb->queue_mapping)) || | 3334 | (pkt_dev->skb && |
3335 | need_resched()) { | 3335 | netif_subqueue_stopped(odev, pkt_dev->skb->queue_mapping))) || |
3336 | need_resched()) { | ||
3336 | idle_start = getCurUs(); | 3337 | idle_start = getCurUs(); |
3337 | 3338 | ||
3338 | if (!netif_running(odev)) { | 3339 | if (!netif_running(odev)) { |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 9785df37a65f..1ee72127462b 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -555,6 +555,16 @@ static void tcp_event_data_recv(struct sock *sk, struct sk_buff *skb) | |||
555 | tcp_grow_window(sk, skb); | 555 | tcp_grow_window(sk, skb); |
556 | } | 556 | } |
557 | 557 | ||
558 | static u32 tcp_rto_min(struct sock *sk) | ||
559 | { | ||
560 | struct dst_entry *dst = __sk_dst_get(sk); | ||
561 | u32 rto_min = TCP_RTO_MIN; | ||
562 | |||
563 | if (dst_metric_locked(dst, RTAX_RTO_MIN)) | ||
564 | rto_min = dst->metrics[RTAX_RTO_MIN-1]; | ||
565 | return rto_min; | ||
566 | } | ||
567 | |||
558 | /* Called to compute a smoothed rtt estimate. The data fed to this | 568 | /* Called to compute a smoothed rtt estimate. The data fed to this |
559 | * routine either comes from timestamps, or from segments that were | 569 | * routine either comes from timestamps, or from segments that were |
560 | * known _not_ to have been retransmitted [see Karn/Partridge | 570 | * known _not_ to have been retransmitted [see Karn/Partridge |
@@ -616,13 +626,13 @@ static void tcp_rtt_estimator(struct sock *sk, const __u32 mrtt) | |||
616 | if (tp->mdev_max < tp->rttvar) | 626 | if (tp->mdev_max < tp->rttvar) |
617 | tp->rttvar -= (tp->rttvar-tp->mdev_max)>>2; | 627 | tp->rttvar -= (tp->rttvar-tp->mdev_max)>>2; |
618 | tp->rtt_seq = tp->snd_nxt; | 628 | tp->rtt_seq = tp->snd_nxt; |
619 | tp->mdev_max = TCP_RTO_MIN; | 629 | tp->mdev_max = tcp_rto_min(sk); |
620 | } | 630 | } |
621 | } else { | 631 | } else { |
622 | /* no previous measure. */ | 632 | /* no previous measure. */ |
623 | tp->srtt = m<<3; /* take the measured time to be rtt */ | 633 | tp->srtt = m<<3; /* take the measured time to be rtt */ |
624 | tp->mdev = m<<1; /* make sure rto = 3*rtt */ | 634 | tp->mdev = m<<1; /* make sure rto = 3*rtt */ |
625 | tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN); | 635 | tp->mdev_max = tp->rttvar = max(tp->mdev, tcp_rto_min(sk)); |
626 | tp->rtt_seq = tp->snd_nxt; | 636 | tp->rtt_seq = tp->snd_nxt; |
627 | } | 637 | } |
628 | } | 638 | } |