From b6f8e0ecf3aa769c7ce8a5dd69bdf3fead3e89a5 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 12 Nov 2008 14:37:29 -0800 Subject: [PATCH] --- yaml --- r: 118895 b: refs/heads/master c: ddd535c713c788f3c23c6548c4ba985a7593113c h: refs/heads/master i: 118893: bdaebc3d72df3c8570cd0ccbcd4f072a751dc291 118891: 217635408398915e837839776d5746c5238f9fe4 118887: 84585e7884c5f6f0ad7825278fd0e62e33f839f4 118879: 1bbc577a862b5a38b8358b1ac991671d90c97ae8 v: v3 --- [refs] | 2 +- trunk/drivers/net/niu.c | 3 +-- trunk/net/compat.c | 4 ++-- trunk/net/ipv4/tcp_htcp.c | 14 ++++++++++---- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 44ea29fe5444..1239a7afbe09 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f7cd168645dda3e9067f24fabbfa787f9a237488 +refs/heads/master: ddd535c713c788f3c23c6548c4ba985a7593113c diff --git a/trunk/drivers/net/niu.c b/trunk/drivers/net/niu.c index 9acb5d70a3ae..d8463b1c3df3 100644 --- a/trunk/drivers/net/niu.c +++ b/trunk/drivers/net/niu.c @@ -51,8 +51,7 @@ MODULE_VERSION(DRV_MODULE_VERSION); #ifndef readq static u64 readq(void __iomem *reg) { - return (((u64)readl(reg + 0x4UL) << 32) | - (u64)readl(reg)); + return ((u64) readl(reg)) | (((u64) readl(reg + 4UL)) << 32); } static void writeq(u64 val, void __iomem *reg) diff --git a/trunk/net/compat.c b/trunk/net/compat.c index 67fb6a3834a3..6ce1a1cadcc0 100644 --- a/trunk/net/compat.c +++ b/trunk/net/compat.c @@ -226,14 +226,14 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat return 0; /* XXX: return error? check spec. */ } - if (level == SOL_SOCKET && type == SO_TIMESTAMP) { + if (level == SOL_SOCKET && type == SCM_TIMESTAMP) { struct timeval *tv = (struct timeval *)data; ctv.tv_sec = tv->tv_sec; ctv.tv_usec = tv->tv_usec; data = &ctv; len = sizeof(ctv); } - if (level == SOL_SOCKET && type == SO_TIMESTAMPNS) { + if (level == SOL_SOCKET && type == SCM_TIMESTAMPNS) { struct timespec *ts = (struct timespec *)data; cts.tv_sec = ts->tv_sec; cts.tv_nsec = ts->tv_nsec; diff --git a/trunk/net/ipv4/tcp_htcp.c b/trunk/net/ipv4/tcp_htcp.c index af99776146ff..937549b8a921 100644 --- a/trunk/net/ipv4/tcp_htcp.c +++ b/trunk/net/ipv4/tcp_htcp.c @@ -69,9 +69,12 @@ static u32 htcp_cwnd_undo(struct sock *sk) const struct tcp_sock *tp = tcp_sk(sk); struct htcp *ca = inet_csk_ca(sk); - ca->last_cong = ca->undo_last_cong; - ca->maxRTT = ca->undo_maxRTT; - ca->old_maxB = ca->undo_old_maxB; + if (ca->undo_last_cong) { + ca->last_cong = ca->undo_last_cong; + ca->maxRTT = ca->undo_maxRTT; + ca->old_maxB = ca->undo_old_maxB; + ca->undo_last_cong = 0; + } return max(tp->snd_cwnd, (tp->snd_ssthresh << 7) / ca->beta); } @@ -268,7 +271,10 @@ static void htcp_state(struct sock *sk, u8 new_state) case TCP_CA_Open: { struct htcp *ca = inet_csk_ca(sk); - ca->last_cong = jiffies; + if (ca->undo_last_cong) { + ca->last_cong = jiffies; + ca->undo_last_cong = 0; + } } break; case TCP_CA_CWR: