[PKTGEN]: Fix multiqueue oops.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=378be2c08314fc46e3f814fa264ff8ebdb79712f
Commit: 378be2c08314fc46e3f814fa264ff8ebdb79712f
Parent: 594a9dfae7113d9601b2c353754c40d0b7e00a03
Author: Robert Olsson <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 15:43:14 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 15:43:14 2007 -0700

[PKTGEN]: Fix multiqueue oops.

Initially pkt_dev can be NULL this causes netif_subqueue_stopped to
oops. The patch below should cure it. But maybe the pktgen TX logic
should be reworked to better support the new multiqueue support.

Signed-off-by: Robert Olsson <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/pktgen.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 7bae576..4ad62d3 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)
}
 
if ((netif_queue_stopped(odev) ||
-netif_subqueue_stopped(odev, pkt_dev->skb->queue_mapping)) ||
-need_resched()) {
+(pkt_dev->skb &&
+ netif_subqueue_stopped(odev, pkt_dev->skb->queue_mapping))) ||
+   need_resched()) {
idle_start = getCurUs();
 
if (!netif_running(odev)) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[BNX2]: Use msleep().

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8e54588161577435d64dfb5cfdf40a73a5705ea0
Commit: 8e54588161577435d64dfb5cfdf40a73a5705ea0
Parent: b07d68b5ca4d55a16fab223d63d5fb36f89ff42f
Author: Arjan van de Ven <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 14:34:43 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 14:34:43 2007 -0700

[BNX2]: Use msleep().

bnx2.c (incorrectly) sets current->state directly to
TASK_UNINTERRUPTIBLE, without going through set_task_state(). However
all the code wants to do is an msleep so just make it do that instead...

Signed-off-by: Arjan van de Ven <[EMAIL PROTECTED]>
Acked-by: Michael Chan <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/bnx2.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 24e7f9a..0091860 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -3935,10 +3935,8 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
REG_WR(bp, BNX2_PCICFG_MISC_CONFIG, val);
 
if ((CHIP_ID(bp) == CHIP_ID_5706_A0) ||
-   (CHIP_ID(bp) == CHIP_ID_5706_A1)) {
-   current->state = TASK_UNINTERRUPTIBLE;
-   schedule_timeout(HZ / 50);
-   }
+   (CHIP_ID(bp) == CHIP_ID_5706_A1))
+   msleep(20);
 
/* Reset takes approximate 30 usec */
for (i = 0; i < 10; i++) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[BNX2]: Add write posting comment.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=594a9dfae7113d9601b2c353754c40d0b7e00a03
Commit: 594a9dfae7113d9601b2c353754c40d0b7e00a03
Parent: 8e54588161577435d64dfb5cfdf40a73a5705ea0
Author: Michael Chan <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 15:39:42 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 15:39:42 2007 -0700

[BNX2]: Add write posting comment.

Add comment to explain why we cannot read back after chip reset
before delaying.

Signed-off-by: Michael Chan <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/bnx2.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 0091860..854d80c 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -3934,6 +3934,10 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
/* Chip reset. */
REG_WR(bp, BNX2_PCICFG_MISC_CONFIG, val);
 
+   /* Reading back any register after chip reset will hang the
+* bus on 5706 A0 and A1.  The msleep below provides plenty
+* of margin for write posting.
+*/
if ((CHIP_ID(bp) == CHIP_ID_5706_A0) ||
(CHIP_ID(bp) == CHIP_ID_5706_A1))
msleep(20);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[TCP]: Allow minimum RTO to be configurable via routing metrics.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=05bb1fad1cde025a864a90cfeb98dcbefe78a44a
Commit: 05bb1fad1cde025a864a90cfeb98dcbefe78a44a
Parent: 378be2c08314fc46e3f814fa264ff8ebdb79712f
Author: David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 22:10:28 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 22:10:28 2007 -0700

[TCP]: Allow minimum RTO to be configurable via routing metrics.

Cell phone networks do link layer retransmissions and other
things that cause unnecessary timeout retransmits.  So allow
the minimum RTO to be inflated per-route to deal with this.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/linux/rtnetlink.h |2 ++
 net/ipv4/tcp_input.c  |   14 --
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index c91476c..dff3192 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -351,6 +351,8 @@ enum
 #define RTAX_INITCWND RTAX_INITCWND
RTAX_FEATURES,
 #define RTAX_FEATURES RTAX_FEATURES
+   RTAX_RTO_MIN,
+#define RTAX_RTO_MIN RTAX_RTO_MIN
__RTAX_MAX
 };
 
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 9785df3..1ee7212 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)
tcp_grow_window(sk, skb);
 }
 
+static u32 tcp_rto_min(struct sock *sk)
+{
+   struct dst_entry *dst = __sk_dst_get(sk);
+   u32 rto_min = TCP_RTO_MIN;
+
+   if (dst_metric_locked(dst, RTAX_RTO_MIN))
+   rto_min = dst->metrics[RTAX_RTO_MIN-1];
+   return rto_min;
+}
+
 /* Called to compute a smoothed rtt estimate. The data fed to this
  * routine either comes from timestamps, or from segments that were
  * known _not_ to have been retransmitted [see Karn/Partridge
@@ -616,13 +626,13 @@ static void tcp_rtt_estimator(struct sock *sk, const 
__u32 mrtt)
if (tp->mdev_max < tp->rttvar)
tp->rttvar -= (tp->rttvar-tp->mdev_max)>>2;
tp->rtt_seq = tp->snd_nxt;
-   tp->mdev_max = TCP_RTO_MIN;
+   tp->mdev_max = tcp_rto_min(sk);
}
} else {
/* no previous measure. */
tp->srtt = m<<3;/* take the measured time to be rtt */
tp->mdev = m<<1;/* make sure rto = 3*rtt */
-   tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN);
+   tp->mdev_max = tp->rttvar = max(tp->mdev, tcp_rto_min(sk));
tp->rtt_seq = tp->snd_nxt;
}
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: properly clean up fragment and ordering queues during FWD-TSN.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ea2dfb3733d53ac98b17756435d1f99e25490357
Commit: ea2dfb3733d53ac98b17756435d1f99e25490357
Parent: b07d68b5ca4d55a16fab223d63d5fb36f89ff42f
Author: Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 13 17:01:19 2007 -0400
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Wed Aug 29 13:34:33 2007 -0400

SCTP: properly clean up fragment and ordering queues during FWD-TSN.

When we recieve a FWD-TSN (meaning the peer has abandoned the data),
we need to clean up any partially received messages that may be
hanging out on the re-assembly or re-ordering queues.  This is
a MUST requirement that was not properly done before.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 include/net/sctp/ulpqueue.h |1 +
 net/sctp/sm_sideeffect.c|3 ++
 net/sctp/ulpqueue.c |   75 +++---
 3 files changed, 66 insertions(+), 13 deletions(-)

diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h
index 39ea3f4..cd33270 100644
--- a/include/net/sctp/ulpqueue.h
+++ b/include/net/sctp/ulpqueue.h
@@ -83,6 +83,7 @@ int sctp_clear_pd(struct sock *sk, struct sctp_association 
*asoc);
 /* Skip over an SSN. */
 void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn);
 
+void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32);
 #endif /* __sctp_ulpqueue_h__ */
 
 
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index d9fad4f..1907318 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1130,6 +1130,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
/* Move the Cumulattive TSN Ack ahead. */
sctp_tsnmap_skip(&asoc->peer.tsn_map, cmd->obj.u32);
 
+   /* purge the fragmentation queue */
+   sctp_ulpq_reasm_flushtsn(&asoc->ulpq, cmd->obj.u32);
+
/* Abort any in progress partial delivery. */
sctp_ulpq_abort_pd(&asoc->ulpq, GFP_ATOMIC);
break;
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 34eb977..fa0ba2a 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -659,6 +659,46 @@ done:
return retval;
 }
 
+/*
+ * Flush out stale fragments from the reassembly queue when processing
+ * a Forward TSN.
+ *
+ * RFC 3758, Section 3.6
+ *
+ * After receiving and processing a FORWARD TSN, the data receiver MUST
+ * take cautions in updating its re-assembly queue.  The receiver MUST
+ * remove any partially reassembled message, which is still missing one
+ * or more TSNs earlier than or equal to the new cumulative TSN point.
+ * In the event that the receiver has invoked the partial delivery API,
+ * a notification SHOULD also be generated to inform the upper layer API
+ * that the message being partially delivered will NOT be completed.
+ */
+void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *ulpq, __u32 fwd_tsn)
+{
+   struct sk_buff *pos, *tmp;
+   struct sctp_ulpevent *event;
+   __u32 tsn;
+
+   if (skb_queue_empty(&ulpq->reasm))
+   return;
+
+   skb_queue_walk_safe(&ulpq->reasm, pos, tmp) {
+   event = sctp_skb2event(pos);
+   tsn = event->tsn;
+
+   /* Since the entire message must be abandoned by the
+* sender (item A3 in Section 3.5, RFC 3758), we can
+* free all fragments on the list that are less then
+* or equal to ctsn_point
+*/
+   if (TSN_lte(tsn, fwd_tsn)) {
+   __skb_unlink(pos, &ulpq->reasm);
+   sctp_ulpevent_free(event);
+   } else
+   break;
+   }
+}
+
 /* Helper function to gather skbs that have possibly become
  * ordered by an an incoming chunk.
  */
@@ -794,7 +834,7 @@ static struct sctp_ulpevent *sctp_ulpq_order(struct 
sctp_ulpq *ulpq,
 /* Helper function to gather skbs that have possibly become
  * ordered by forward tsn skipping their dependencies.
  */
-static inline void sctp_ulpq_reap_ordered(struct sctp_ulpq *ulpq)
+static inline void sctp_ulpq_reap_ordered(struct sctp_ulpq *ulpq, __u16 sid)
 {
struct sk_buff *pos, *tmp;
struct sctp_ulpevent *cevent;
@@ -813,31 +853,40 @@ static inline void sctp_ulpq_reap_ordered(struct 
sctp_ulpq *ulpq)
csid = cevent->stream;
cssn = cevent->ssn;
 
-   if (cssn != sctp_ssn_peek(in, csid))
+   /* Have we gone too far?  */
+   if (csid > sid)
break;
 
-   /* Found it, so mark in the ssnmap. */
-   sctp_ssn_next(in, csid);
+   /* Have we not gone far enough?  */
+   if (csid < sid)
+   continue;
+
+   /* see if this ssn has been marked by

SCTP: Assign stream sequence numbers to the entire message

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab3e5e7b65dde661f5eb86b445496c596728
Commit: ab3e5e7b65dde661f5eb86b445496c596728
Parent: ea2dfb3733d53ac98b17756435d1f99e25490357
Author: Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 16:51:42 2007 -0400
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Wed Aug 29 13:34:34 2007 -0400

SCTP: Assign stream sequence numbers to the entire message

Currently we only assign the sequence number to a packet that
we are about to transmit.  This however breaks the Partial
Reliability extensions, because it's possible for us to
never transmit a packet, i.e. it expires before we get to send
it.  In such cases, if the message contained multiple SCTP
fragments, and we did manage to send the first part of the
message, the Stream sequence numbers would get into invalid
state and cause receiver to stall.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/sm_make_chunk.c |   35 +++
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 51c4d7f..2b1129a 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1174,25 +1174,36 @@ out:
  */
 void sctp_chunk_assign_ssn(struct sctp_chunk *chunk)
 {
+   struct sctp_datamsg *msg;
+   struct sctp_chunk *lchunk;
+   struct sctp_stream *stream;
__u16 ssn;
__u16 sid;
 
if (chunk->has_ssn)
return;
 
-   /* This is the last possible instant to assign a SSN. */
-   if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) {
-   ssn = 0;
-   } else {
-   sid = ntohs(chunk->subh.data_hdr->stream);
-   if (chunk->chunk_hdr->flags & SCTP_DATA_LAST_FRAG)
-   ssn = sctp_ssn_next(&chunk->asoc->ssnmap->out, sid);
-   else
-   ssn = sctp_ssn_peek(&chunk->asoc->ssnmap->out, sid);
-   }
+   /* All fragments will be on the same stream */
+   sid = ntohs(chunk->subh.data_hdr->stream);
+   stream = &chunk->asoc->ssnmap->out;
 
-   chunk->subh.data_hdr->ssn = htons(ssn);
-   chunk->has_ssn = 1;
+   /* Now assign the sequence number to the entire message.
+* All fragments must have the same stream sequence number.
+*/
+   msg = chunk->msg;
+   list_for_each_entry(lchunk, &msg->chunks, frag_list) {
+   if (lchunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) {
+   ssn = 0;
+   } else {
+   if (lchunk->chunk_hdr->flags & SCTP_DATA_LAST_FRAG)
+   ssn = sctp_ssn_next(stream, sid);
+   else
+   ssn = sctp_ssn_peek(stream, sid);
+   }
+
+   lchunk->subh.data_hdr->ssn = htons(ssn);
+   lchunk->has_ssn = 1;
+   }
 }
 
 /* Helper function to assign a TSN if needed.  This assumes that both
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: Fix sctp_addto_chunk() to add pad with correct length

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8d614ade511fef11f992d6a73e538d33b3b81f12
Commit: 8d614ade511fef11f992d6a73e538d33b3b81f12
Parent: ab3e5e7b65dde661f5eb86b445496c596728
Author: Wei Yongjun <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 6 13:55:47 2007 +0800
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 11:56:17 2007 -0400

SCTP: Fix sctp_addto_chunk() to add pad with correct length

At function sctp_addto_chunk(), it do pad before add payload to chunk if
chunk length is not 4-byte alignment. But it do pad with a bad length.
This patch fixed this probleam.

Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]>
Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/sm_make_chunk.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 2b1129a..93df833 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1128,7 +1128,7 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, 
const void *data)
void *target;
void *padding;
int chunklen = ntohs(chunk->chunk_hdr->length);
-   int padlen = chunklen % 4;
+   int padlen = WORD_ROUND(chunklen) - chunklen;
 
padding = skb_put(chunk->skb, padlen);
target = skb_put(chunk->skb, len);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: Fix to encode PROTOCOL VIOLATION error cause correctly

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=00f1c2df2a1c4903f4daa1333bafeb6dcbc9591d
Commit: 00f1c2df2a1c4903f4daa1333bafeb6dcbc9591d
Parent: 8d614ade511fef11f992d6a73e538d33b3b81f12
Author: Wei Yongjun <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 21 15:50:01 2007 +0800
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 13:50:48 2007 -0400

SCTP: Fix to encode PROTOCOL VIOLATION error cause correctly

PROTOCOL VIOLATION error cause in ABORT is bad encode when make abort
chunk. When SCTP encode ABORT chunk with PROTOCOL VIOLATION error cause,
it just add the error messages to PROTOCOL VIOLATION error cause, the
rest four bytes(struct sctp_paramhdr) is just add to the chunk, not
change the length of error cause. This cause the ABORT chunk to be a bad
format. The chunk is like this:

ABORT chunk
  Chunk type: ABORT (6)
  Chunk flags: 0x00
  Chunk length: 72 (*1)
  Protocol violation cause
Cause code: Protocol violation (0x000d)
Cause length: 62 (*2)
Cause information: 5468652063756D756C61746976652074736E2061636B2062...
Cause padding: 
[Needless] 00030010
Chunk Length(*1) = 72 but Cause length(*2) only 62, not include the
extend 4 bytes.
((72 - sizeof(chunk_hdr)) = 68) != (62 +3) / 4 * 4

Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]>
Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 include/net/sctp/sm.h  |2 +-
 include/net/sctp/structs.h |1 +
 net/sctp/sm_make_chunk.c   |   73 +++
 net/sctp/sm_statefuns.c|4 +-
 4 files changed, 56 insertions(+), 24 deletions(-)

diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 73cb994..991c85b 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -214,7 +214,7 @@ struct sctp_chunk *sctp_make_shutdown_ack(const struct 
sctp_association *asoc,
  const struct sctp_chunk *);
 struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *,
  const struct sctp_chunk *);
-void sctp_init_cause(struct sctp_chunk *, __be16 cause, const void *, size_t);
+void sctp_init_cause(struct sctp_chunk *, __be16 cause, size_t);
 struct sctp_chunk *sctp_make_abort(const struct sctp_association *,
  const struct sctp_chunk *,
  const size_t hint);
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ee4559b..c0d5848 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -726,6 +726,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int 
off, int len,
  struct iovec *data);
 void sctp_chunk_free(struct sctp_chunk *);
 void  *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data);
+void  *sctp_addto_param(struct sctp_chunk *, int len, const void *data);
 struct sctp_chunk *sctp_chunkify(struct sk_buff *,
 const struct sctp_association *,
 struct sock *);
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 93df833..adc5e59 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -110,7 +110,7 @@ static const struct sctp_paramhdr prsctp_param = {
  * abort chunk.
  */
 void  sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
- const void *payload, size_t paylen)
+ size_t paylen)
 {
sctp_errhdr_t err;
__u16 len;
@@ -120,7 +120,6 @@ void  sctp_init_cause(struct sctp_chunk *chunk, __be16 
cause_code,
len = sizeof(sctp_errhdr_t) + paylen;
err.length  = htons(len);
chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), 
&err);
-   sctp_addto_chunk(chunk, paylen, payload);
 }
 
 /* 3.3.2 Initiation (INIT) (1)
@@ -780,8 +779,8 @@ struct sctp_chunk *sctp_make_abort_no_data(
 
/* Put the tsn back into network byte order.  */
payload = htonl(tsn);
-   sctp_init_cause(retval, SCTP_ERROR_NO_DATA, (const void *)&payload,
-   sizeof(payload));
+   sctp_init_cause(retval, SCTP_ERROR_NO_DATA, sizeof(payload));
+   sctp_addto_chunk(retval, sizeof(payload), (const void *)&payload);
 
/* RFC 2960 6.4 Multi-homed SCTP Endpoints
 *
@@ -823,7 +822,8 @@ struct sctp_chunk *sctp_make_abort_user(const struct 
sctp_association *asoc,
goto err_copy;
}
 
-   sctp_init_cause(retval, SCTP_ERROR_USER_ABORT, payload, paylen);
+   sctp_init_cause(retval, SCTP_ERROR_USER_ABORT, paylen);
+   sctp_addto_chunk(retval, paylen, payload);
 
if (paylen)
kfree(payload);
@@ -850,15 +850,17 @@ struct sctp_chunk *sctp_make_abort_violation(
struct sctp_paramhdr phdr;
 
retval = sctp_make_a

SCTP: Use net_ratelimit to suppress error messages print too fast

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d99fa42963a5ae394cf1df9d5bb739eb378a189b
Commit: d99fa42963a5ae394cf1df9d5bb739eb378a189b
Parent: 00f1c2df2a1c4903f4daa1333bafeb6dcbc9591d
Author: Wei Yongjun <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 27 11:19:24 2007 +0800
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 13:52:56 2007 -0400

SCTP: Use net_ratelimit to suppress error messages print too fast

When multi bundling SHUTDOWN-ACK message is received in ESTAB state,
this will cause "sctp protocol violation state" message print many times.
If SHUTDOWN-ACK is bundled 300 times in one packet, message will be
print 300 times. The same problem also exists when received unexpected
HEARTBEAT-ACK message which is bundled message times.

This patch used net_ratelimit() to suppress error messages print too fast.

Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]>
Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/sm_sideeffect.c |5 +++--
 net/sctp/sm_statefuns.c  |   26 ++
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index 1907318..8d78900 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1013,8 +1013,9 @@ static int sctp_side_effects(sctp_event_t event_type, 
sctp_subtype_t subtype,
break;
 
case SCTP_DISPOSITION_VIOLATION:
-   printk(KERN_ERR "sctp protocol violation state %d "
-  "chunkid %d\n", state, subtype.chunk);
+   if (net_ratelimit())
+   printk(KERN_ERR "sctp protocol violation state %d "
+  "chunkid %d\n", state, subtype.chunk);
break;
 
case SCTP_DISPOSITION_NOT_IMPL:
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 350d476..276e26d 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1032,19 +1032,21 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct 
sctp_endpoint *ep,
/* This should never happen, but lets log it if so.  */
if (unlikely(!link)) {
if (from_addr.sa.sa_family == AF_INET6) {
-   printk(KERN_WARNING
-  "%s association %p could not find address "
-  NIP6_FMT "\n",
-  __FUNCTION__,
-  asoc,
-  NIP6(from_addr.v6.sin6_addr));
+   if (net_ratelimit())
+   printk(KERN_WARNING
+   "%s association %p could not find address "
+   NIP6_FMT "\n",
+   __FUNCTION__,
+   asoc,
+   NIP6(from_addr.v6.sin6_addr));
} else {
-   printk(KERN_WARNING
-  "%s association %p could not find address "
-  NIPQUAD_FMT "\n",
-  __FUNCTION__,
-  asoc,
-  NIPQUAD(from_addr.v4.sin_addr.s_addr));
+   if (net_ratelimit())
+   printk(KERN_WARNING
+   "%s association %p could not find address "
+   NIPQUAD_FMT "\n",
+   __FUNCTION__,
+   asoc,
+   NIPQUAD(from_addr.v4.sin_addr.s_addr));
}
return SCTP_DISPOSITION_DISCARD;
}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: Pick the correct port when binding to 0.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2772b495efe341a02c867bc3a03d7362bd336832
Commit: 2772b495efe341a02c867bc3a03d7362bd336832
Parent: d99fa42963a5ae394cf1df9d5bb739eb378a189b
Author: Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 21 14:24:30 2007 +0900
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 13:55:20 2007 -0400

SCTP: Pick the correct port when binding to 0.

sctp_bindx() allows the use of unspecified port.  The problem is
that every address we bind to ends up selecting a new port if
the user specified port 0.  This patch allows re-use of the
already selected port when the port from bindx was 0.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/socket.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 01c6364..de79212 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -353,6 +353,7 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union 
sctp_addr *addr, int len)
 * The function sctp_get_port_local() does duplicate address
 * detection.
 */
+   addr->v4.sin_port = htons(snum);
if ((ret = sctp_get_port_local(sk, addr))) {
if (ret == (long) sk) {
/* This endpoint has a conflicting address. */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: Uncomfirmed transports can't become Inactive

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc75689a4c4eb94b2fd7e3870347b9237ab39503
Commit: cc75689a4c4eb94b2fd7e3870347b9237ab39503
Parent: 2772b495efe341a02c867bc3a03d7362bd336832
Author: Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 24 19:30:25 2007 +0900
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 13:55:41 2007 -0400

SCTP: Uncomfirmed transports can't become Inactive

Do not set Unconfirmed transports to Inactive state.  This may
result in an inactive association being destroyed since we start
counting errors on "inactive" transports against the association.
This was found at the SCTP interop event.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/associola.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 498edb0..2ad1caf 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -727,7 +727,12 @@ void sctp_assoc_control_transport(struct sctp_association 
*asoc,
break;
 
case SCTP_TRANSPORT_DOWN:
-   transport->state = SCTP_INACTIVE;
+   /* if the transort was never confirmed, do not transition it
+* to inactive state.
+*/
+   if (transport->state != SCTP_UNCONFIRMED)
+   transport->state = SCTP_INACTIVE;
+
spc_state = SCTP_ADDR_UNREACHABLE;
break;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: Do not retransmit chunks that are newer then rtt.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0ce92910bc04e107b2f3f2048f07e94f570035d
Commit: d0ce92910bc04e107b2f3f2048f07e94f570035d
Parent: cc75689a4c4eb94b2fd7e3870347b9237ab39503
Author: Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 24 19:37:46 2007 +0900
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 13:56:06 2007 -0400

SCTP: Do not retransmit chunks that are newer then rtt.

When performing a retransmit, do not include the chunk if
it was sent less then 1 rtt ago.  The reason is that we
may receive the SACK very soon and wouldn't retransmit.
Suggested by Randy Stewart.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/outqueue.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 992f361..28f4fe7 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -421,6 +421,13 @@ void sctp_retransmit_mark(struct sctp_outq *q,
 */
if ((fast_retransmit && (chunk->fast_retransmit > 0)) ||
   (!fast_retransmit && !chunk->tsn_gap_acked)) {
+   /* If this chunk was sent less then 1 rto ago, do not
+* retransmit this chunk, but give the peer time
+* to acknowlege it.
+*/
+   if ((jiffies - chunk->sent_at) < transport->rto)
+   continue;
+
/* RFC 2960 6.2.1 Processing a Received SACK
 *
 * C) Any time a DATA chunk is marked for
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: Correctly disable listening when backlog is 0.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=498d63071ef378e201979e441aefcc6565702ca7
Commit: 498d63071ef378e201979e441aefcc6565702ca7
Parent: d0ce92910bc04e107b2f3f2048f07e94f570035d
Author: Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 14:03:58 2007 -0400
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 14:03:58 2007 -0400

SCTP: Correctly disable listening when backlog is 0.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/socket.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index de79212..3335460 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5203,6 +5203,7 @@ SCTP_STATIC int sctp_seqpacket_listen(struct sock *sk, 
int backlog)
 
sctp_unhash_endpoint(ep);
sk->sk_state = SCTP_SS_CLOSED;
+   return 0;
}
 
/* Return if we are already listening. */
@@ -5250,6 +5251,7 @@ SCTP_STATIC int sctp_stream_listen(struct sock *sk, int 
backlog)
 
sctp_unhash_endpoint(ep);
sk->sk_state = SCTP_SS_CLOSED;
+   return 0;
}
 
if (sctp_sstate(sk, LISTENING))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: Abort on COOKIE-ECHO if backlog is exceeded.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=609ee4679b8a0831257552dd2b0e54f509ba0c77
Commit: 609ee4679b8a0831257552dd2b0e54f509ba0c77
Parent: 498d63071ef378e201979e441aefcc6565702ca7
Author: Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 03:10:59 2007 +0900
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 14:12:25 2007 -0400

SCTP: Abort on COOKIE-ECHO if backlog is exceeded.

Currently we abort on the INIT chunk we our backlog is currenlty
exceeded.  Delay this about untill COOKIE-ECHO to give the user
time to accept the socket.  Also, make sure that we treat
sk_max_backlog of 0 as no connections allowed.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/sm_statefuns.c |   21 ++---
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 276e26d..177528e 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -264,7 +264,6 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct 
sctp_endpoint *ep,
struct sctp_chunk *err_chunk;
struct sctp_packet *packet;
sctp_unrecognized_param_t *unk_param;
-   struct sock *sk;
int len;
 
/* 6.10 Bundling
@@ -285,16 +284,6 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct 
sctp_endpoint *ep,
if (ep == sctp_sk((sctp_get_ctl_sock()))->ep)
return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
 
-   sk = ep->base.sk;
-   /* If the endpoint is not listening or if the number of associations
-* on the TCP-style socket exceed the max backlog, respond with an
-* ABORT.
-*/
-   if (!sctp_sstate(sk, LISTENING) ||
-   (sctp_style(sk, TCP) &&
-sk_acceptq_is_full(sk)))
-   return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
-
/* 3.1 A packet containing an INIT chunk MUST have a zero Verification
 * Tag.
 */
@@ -590,6 +579,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct 
sctp_endpoint *ep,
struct sctp_ulpevent *ev, *ai_ev = NULL;
int error = 0;
struct sctp_chunk *err_chk_p;
+   struct sock *sk;
 
/* If the packet is an OOTB packet which is temporarily on the
 * control endpoint, respond with an ABORT.
@@ -605,6 +595,15 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct 
sctp_endpoint *ep,
if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
 
+   /* If the endpoint is not listening or if the number of associations
+* on the TCP-style socket exceed the max backlog, respond with an
+* ABORT.
+*/
+   sk = ep->base.sk;
+   if (!sctp_sstate(sk, LISTENING) ||
+   (sctp_style(sk, TCP) && sk_acceptq_is_full(sk)))
+   return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
+
/* "Decode" the chunk.  We have no optional parameters so we
 * are in good shape.
 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: Fix to handle invalid parameter length correctly

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb243a1a9fef4aaff262a5dd14f987070d37229b
Commit: cb243a1a9fef4aaff262a5dd14f987070d37229b
Parent: 609ee4679b8a0831257552dd2b0e54f509ba0c77
Author: Wei Yongjun <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 6 13:55:58 2007 +0800
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 16:44:27 2007 -0400

SCTP: Fix to handle invalid parameter length correctly

If an INIT with invalid parameter length look like this:
Parameter Type : 1
Parameter Length: 800
and not contain any payload, SCTP will ignore this  parameter and send
back a INIT-ACK.
This patch is fix to handle this invalid parameter length correctly.

Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]>
Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/sm_make_chunk.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index adc5e59..79856c9 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1833,7 +1833,7 @@ int sctp_verify_init(const struct sctp_association *asoc,
 * VIOLATION error.  We build the ERROR chunk here and let the normal
 * error handling code build and send the packet.
 */
-   if (param.v < (void*)chunk->chunk_end - sizeof(sctp_paramhdr_t)) {
+   if (param.v != (void*)chunk->chunk_end) {
sctp_process_inv_paramlength(asoc, param.p, chunk, errp);
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[BRIDGE]: Packets leaking out of disabled/blocked ports.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df1c0b8468b34628ed12b103804a4576cd9af8bb
Commit: df1c0b8468b34628ed12b103804a4576cd9af8bb
Parent: b91ddd843751947e2f81dfc8a86c5c21cbe07158
Author: Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 22:15:35 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 22:15:35 2007 -0700

[BRIDGE]: Packets leaking out of disabled/blocked ports.

This patch fixes some packet leakage in bridge.  The bridging code was
allowing forward table entries to be generated even if a device was
being blocked. The fix is to not add forwarding database entries
unless the port is active.

The bug arose as part of the conversion to processing STP frames
through normal receive path (in 2.6.17).

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
Acked-by: John W. Linville <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/bridge/br_fdb.c   |5 +
 net/bridge/br_input.c |3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 69b7097..eb57502 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -384,6 +384,11 @@ void br_fdb_update(struct net_bridge *br, struct 
net_bridge_port *source,
if (hold_time(br) == 0)
return;
 
+   /* ignore packets unless we are using this port */
+   if (!(source->state == BR_STATE_LEARNING ||
+ source->state == BR_STATE_FORWARDING))
+   return;
+
fdb = fdb_find(head, addr);
if (likely(fdb)) {
/* attempt to update an entry for a local interface */
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 5c18595..6f468fc 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -101,9 +101,8 @@ static int br_handle_local_finish(struct sk_buff *skb)
 {
struct net_bridge_port *p = rcu_dereference(skb->dev->br_port);
 
-   if (p && p->state != BR_STATE_DISABLED)
+   if (p)
br_fdb_update(p->br, p, eth_hdr(skb)->h_source);
-
return 0;/* process further */
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[BRIDGE]: Fix OOPS when bridging device without ethtool.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b4a488d1824a2cc3514f9ee1298d805bd5edc893
Commit: b4a488d1824a2cc3514f9ee1298d805bd5edc893
Parent: df1c0b8468b34628ed12b103804a4576cd9af8bb
Author: Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 22:16:22 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 22:16:22 2007 -0700

[BRIDGE]: Fix OOPS when bridging device without ethtool.

Bridge code calls ethtool to get speed. The conversion to using
only ethtool_ops broke the case of devices without ethtool_ops.
This is a new regression in 2.6.23.

Rearranged the switch to a logical order, and use gcc initializer.

Ps: speed should have been part of the network device structure from
the start rather than burying it in ethtool.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
Acked-by: Matthew Wilcox <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/bridge/br_if.c |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 749f0e8..9272f12 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -33,17 +33,17 @@
  */
 static int port_cost(struct net_device *dev)
 {
-   if (dev->ethtool_ops->get_settings) {
-   struct ethtool_cmd ecmd = { ETHTOOL_GSET };
-   int err = dev->ethtool_ops->get_settings(dev, &ecmd);
-   if (!err) {
+   if (dev->ethtool_ops && dev->ethtool_ops->get_settings) {
+   struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET, };
+
+   if (!dev->ethtool_ops->get_settings(dev, &ecmd)) {
switch(ecmd.speed) {
-   case SPEED_100:
-   return 19;
-   case SPEED_1000:
-   return 4;
case SPEED_1:
return 2;
+   case SPEED_1000:
+   return 4;
+   case SPEED_100:
+   return 19;
case SPEED_10:
return 100;
}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NET_SCHED] sch_prio.c: remove duplicate call of tc_classify()

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dbaaa07a60edf71670b484a65e14400ab40c84f7
Commit: dbaaa07a60edf71670b484a65e14400ab40c84f7
Parent: b4a488d1824a2cc3514f9ee1298d805bd5edc893
Author: Lucas Nussbaum <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 22:35:46 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 22:35:46 2007 -0700

[NET_SCHED] sch_prio.c: remove duplicate call of tc_classify()

When CONFIG_NET_CLS_ACT is enabled, tc_classify() is called twice in
prio_classify(). This causes "interesting" behaviour: with the setup
below, packets are duplicated, sent twice to ifb0, and then loop in and
out of ifb0.

The patch uses the previously calculated return value in the switch,
which is probably what Patrick had in mind in commit
bdba91ec70fb5ccbdeb1c7068319adc6ea9e1a7d -- maybe Patrick can
double-check this?

-- example setup --
ifconfig ifb0 up
tc qdisc add dev ifb0 root netem delay 2s
tc qdisc add dev $ETH root handle 1: prio
tc filter add dev $ETH parent 1: protocol ip prio 10 u32 \
 match ip dst 172.24.110.6/32 flowid 1:1 \
 action mirred egress redirect dev ifb0
ping -c1 172.24.110.6

Signed-off-by: Lucas Nussbaum <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sched/sch_prio.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 4a49db6..abd82fc 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -44,7 +44,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int 
*qerr)
if (TC_H_MAJ(skb->priority) != sch->handle) {
err = tc_classify(skb, q->filter_list, &res);
 #ifdef CONFIG_NET_CLS_ACT
-   switch (tc_classify(skb, q->filter_list, &res)) {
+   switch (err) {
case TC_ACT_STOLEN:
case TC_ACT_QUEUED:
*qerr = NET_XMIT_SUCCESS;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NETFILTER]: xt_tcpudp: fix wrong struct in udp_checkentry

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a289d70d74c39a8e6938619f967fc6cd70ce1798
Commit: a289d70d74c39a8e6938619f967fc6cd70ce1798
Parent: dbaaa07a60edf71670b484a65e14400ab40c84f7
Author: Jesper Bengtsson <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 22:36:43 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 22:36:43 2007 -0700

[NETFILTER]: xt_tcpudp: fix wrong struct in udp_checkentry

It doesn't seem to have any effect on the x86 architecture but it does
have effect on the Axis CRIS architecture.

Signed-off-by: Jesper Bengtsson <[EMAIL PROTECTED]>
Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/xt_tcpudp.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/xt_tcpudp.c b/net/netfilter/xt_tcpudp.c
index ab7d845..223f9bd 100644
--- a/net/netfilter/xt_tcpudp.c
+++ b/net/netfilter/xt_tcpudp.c
@@ -188,7 +188,7 @@ udp_checkentry(const char *tablename,
   void *matchinfo,
   unsigned int hook_mask)
 {
-   const struct xt_tcp *udpinfo = matchinfo;
+   const struct xt_udp *udpinfo = matchinfo;
 
/* Must specify no unknown invflags */
return !(udpinfo->invflags & ~XT_UDP_INV_MASK);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PKTGEN]: Remove write-only variable.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88282c6ecf0dacefda6090b0289d35e8a3cc6221
Commit: 88282c6ecf0dacefda6090b0289d35e8a3cc6221
Parent: a289d70d74c39a8e6938619f967fc6cd70ce1798
Author: Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 22:46:36 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 22:46:36 2007 -0700

[PKTGEN]: Remove write-only variable.

The pktgen_thread.pid is set to current->pid and is never used
after this. So remove this at all.

Found during isolating the explicit pid/tgid usage.

Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
Acked-by: Sukadev Bhattiprolu <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/pktgen.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 4ad62d3..36fdea7 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -380,7 +380,6 @@ struct pktgen_thread {
/* Field for thread to receive "posted" events terminate, stop ifs etc. 
*/
 
u32 control;
-   int pid;
int cpu;
 
wait_queue_head_t queue;
@@ -3463,8 +3462,6 @@ static int pktgen_thread_worker(void *arg)
 
init_waitqueue_head(&t->queue);
 
-   t->pid = current->pid;
-
pr_debug("pktgen: starting pktgen/%d:  pid=%d\n", cpu, current->pid);
 
max_before_softirq = t->max_before_softirq;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC64]: Fix type and constant sizes wrt. sun4u IMAP/ICLR handling.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6e69d6068cc2aa545544189a1ee4d2e1a32ad591
Commit: 6e69d6068cc2aa545544189a1ee4d2e1a32ad591
Parent: 2d8348b429b4ae5cc47449c787881221fe43af4b
Author: David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 14:25:32 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 23:06:50 2007 -0700

[SPARC64]: Fix type and constant sizes wrt. sun4u IMAP/ICLR handling.

Sometimes we were using 32-bit values and the top bits were
getting inadvertantly chopped off.  This will matter for the
forthcoming Fire controller MSI support.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 arch/sparc64/kernel/irq.c |2 +-
 include/asm-sparc64/irq.h |   22 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 384abf4..51b8875 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -308,7 +308,7 @@ static void sun4u_irq_disable(unsigned int virt_irq)
 
if (likely(data)) {
unsigned long imap = data->imap;
-   u32 tmp = upa_readq(imap);
+   unsigned long tmp = upa_readq(imap);
 
tmp &= ~IMAP_VALID;
upa_writeq(tmp, imap);
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h
index e6c436e..c041e10 100644
--- a/include/asm-sparc64/irq.h
+++ b/include/asm-sparc64/irq.h
@@ -16,21 +16,21 @@
 #include 
 
 /* IMAP/ICLR register defines */
-#define IMAP_VALID 0x8000  /* IRQ Enabled  */
-#define IMAP_TID_UPA   0x7c00  /* UPA TargetID */
-#define IMAP_TID_JBUS  0x7c00  /* JBUS TargetID*/
+#define IMAP_VALID 0x8000UL/* IRQ Enabled  */
+#define IMAP_TID_UPA   0x7c00UL/* UPA TargetID */
+#define IMAP_TID_JBUS  0x7c00UL/* JBUS TargetID*/
 #define IMAP_TID_SHIFT 26
-#define IMAP_AID_SAFARI0x7c00  /* Safari AgentID   
*/
+#define IMAP_AID_SAFARI0x7c00UL/* Safari AgentID   
*/
 #define IMAP_AID_SHIFT 26
-#define IMAP_NID_SAFARI0x03e0  /* Safari NodeID
*/
+#define IMAP_NID_SAFARI0x03e0UL/* Safari NodeID
*/
 #define IMAP_NID_SHIFT 21
-#define IMAP_IGN   0x07c0  /* IRQ Group Number */
-#define IMAP_INO   0x003f  /* IRQ Number   */
-#define IMAP_INR   0x07ff  /* Full interrupt number*/
+#define IMAP_IGN   0x07c0UL/* IRQ Group Number */
+#define IMAP_INO   0x003fUL/* IRQ Number   */
+#define IMAP_INR   0x07ffUL/* Full interrupt number*/
 
-#define ICLR_IDLE  0x  /* Idle state   */
-#define ICLR_TRANSMIT  0x0001  /* Transmit state   */
-#define ICLR_PENDING   0x0003  /* Pending state*/
+#define ICLR_IDLE  0xUL/* Idle state   */
+#define ICLR_TRANSMIT  0x0001UL/* Transmit state   */
+#define ICLR_PENDING   0x0003UL/* Pending state*/
 
 /* The largest number of unique interrupt sources we support.
  * If this needs to ever be larger than 255, you need to change
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC64]: Fix several bugs in MSI handling.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f92c329364c0bf2d3a356da5e8759fbe349f9d1
Commit: 5f92c329364c0bf2d3a356da5e8759fbe349f9d1
Parent: 6e69d6068cc2aa545544189a1ee4d2e1a32ad591
Author: David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 22:27:28 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 23:06:51 2007 -0700

[SPARC64]: Fix several bugs in MSI handling.

1) sun4{u,v}_build_msi() have improper return value handling.

   We should always return negative error codes, instead of
   using the magic value "0" which could in fact be a valid
   MSI number.

2) sun4{u,v}_build_msi() should return -ENOMEM instead of
   calling prom_prom() halt with kzalloc() of the interrupt
   data fails.

3) We 'remembered' the MSI number using a singleton in the
   struct device archdata area, this doesn't work for MSI-X
   which can cause multiple MSIs assosciated with one device.

   Delete that archdata member, and instead store the MSI
   number in the IRQ chip data area.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 arch/sparc64/kernel/irq.c   |   25 ++---
 arch/sparc64/kernel/pci.c   |1 -
 arch/sparc64/kernel/pci_sun4v.c |   18 --
 include/asm-sparc64/device.h|2 --
 include/asm-sparc64/irq.h   |3 +++
 5 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 51b8875..2395609 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -217,8 +217,27 @@ struct irq_handler_data {
void(*pre_handler)(unsigned int, void *, void *);
void*pre_handler_arg1;
void*pre_handler_arg2;
+
+   u32 msi;
 };
 
+void sparc64_set_msi(unsigned int virt_irq, u32 msi)
+{
+   struct irq_handler_data *data = get_irq_chip_data(virt_irq);
+
+   if (data)
+   data->msi = msi;
+}
+
+u32 sparc64_get_msi(unsigned int virt_irq)
+{
+   struct irq_handler_data *data = get_irq_chip_data(virt_irq);
+
+   if (data)
+   return data->msi;
+   return 0x;
+}
+
 static inline struct ino_bucket *virt_irq_to_bucket(unsigned int virt_irq)
 {
unsigned int real_irq = virt_to_real_irq(virt_irq);
@@ -741,7 +760,7 @@ unsigned int sun4v_build_msi(u32 devhandle, unsigned int 
*virt_irq_p,
break;
}
if (devino >= msi_end)
-   return 0;
+   return -ENOSPC;
 
sysino = sun4v_devino_to_sysino(devhandle, devino);
bucket = &ivector_table[sysino];
@@ -755,8 +774,8 @@ unsigned int sun4v_build_msi(u32 devhandle, unsigned int 
*virt_irq_p,
 
data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
if (unlikely(!data)) {
-   prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n");
-   prom_halt();
+   virt_irq_free(*virt_irq_p);
+   return -ENOMEM;
}
set_irq_chip_data(bucket->virt_irq, data);
 
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 3d93e92..139b4cf 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -393,7 +393,6 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
sd->host_controller = pbm;
sd->prom_node = node;
sd->op = of_find_device_by_node(node);
-   sd->msi_num = 0x;
 
sd = &sd->op->dev.archdata;
sd->iommu = pbm->iommu;
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index 466f4aa..da724b1 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -940,13 +940,13 @@ static int pci_sun4v_setup_msi_irq(unsigned int 
*virt_irq_p,
if (msi_num < 0)
return msi_num;
 
-   devino = sun4v_build_msi(pbm->devhandle, virt_irq_p,
-pbm->msiq_first_devino,
-(pbm->msiq_first_devino +
- pbm->msiq_num));
-   err = -ENOMEM;
-   if (!devino)
+   err = sun4v_build_msi(pbm->devhandle, virt_irq_p,
+ pbm->msiq_first_devino,
+ (pbm->msiq_first_devino +
+  pbm->msiq_num));
+   if (err < 0)
goto out_err;
+   devino = err;
 
msiqid = ((devino - pbm->msiq_first_devino) +
  pbm->msiq_first);
@@ -971,7 +971,7 @@ static int pci_sun4v_setup_msi_irq(unsigned int *virt_irq_p,
if (pci_sun4v_msi_setvalid(pbm->devhandle, msi_num, HV_MSIVALID_VALID))
goto out_err;
 
-   pdev->dev.archdata.msi_num = msi_num;
+   sparc64_set_msi(*virt_irq_p, msi_num);
 
if (entry->msi_attrib.is_64) {
msg.address_

SLUB: Force inlining for functions in slub_def.h

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa137f9d29d30592774c727ec5cfcf9891e576fa
Commit: aa137f9d29d30592774c727ec5cfcf9891e576fa
Parent: d66ac4752e891f319fa931ab72efb3352fafa50b
Author: Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 00:48:45 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:09:21 2007 -0700

SLUB: Force inlining for functions in slub_def.h

Some compilers (especially older gcc releases) may skip inlining
sometimes which will lead to link failures.  Force the inlining of
keyfunctions in slub_def.h to avoid these issues.

Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
Acked-by: Jan Dittmer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/slub_def.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 124270d..7496207 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -78,7 +78,7 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 
1];
  * Sorry that the following has to be that ugly but some versions of GCC
  * have trouble with constant propagation and loops.
  */
-static inline int kmalloc_index(size_t size)
+static __always_inline int kmalloc_index(size_t size)
 {
if (!size)
return 0;
@@ -133,7 +133,7 @@ static inline int kmalloc_index(size_t size)
  * This ought to end up with a global pointer to the right cache
  * in kmalloc_caches.
  */
-static inline struct kmem_cache *kmalloc_slab(size_t size)
+static __always_inline struct kmem_cache *kmalloc_slab(size_t size)
 {
int index = kmalloc_index(size);
 
@@ -166,7 +166,7 @@ static inline struct kmem_cache *kmalloc_slab(size_t size)
 void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
 void *__kmalloc(size_t size, gfp_t flags);
 
-static inline void *kmalloc(size_t size, gfp_t flags)
+static __always_inline void *kmalloc(size_t size, gfp_t flags)
 {
if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) {
struct kmem_cache *s = kmalloc_slab(size);
@@ -183,7 +183,7 @@ static inline void *kmalloc(size_t size, gfp_t flags)
 void *__kmalloc_node(size_t size, gfp_t flags, int node);
 void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
 
-static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
+static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
 {
if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) {
struct kmem_cache *s = kmalloc_slab(size);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


revert "eCryptfs: fix lookup error for special files"

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=060d11b0b35d13eb2251fd08403d900b71df5791
Commit: 060d11b0b35d13eb2251fd08403d900b71df5791
Parent: aa137f9d29d30592774c727ec5cfcf9891e576fa
Author: Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:16 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

revert "eCryptfs: fix lookup error for special files"

This patch got appied twice.

Cc: Ryusuke Konishi <[EMAIL PROTECTED]>
Cc: Michael Halcrow <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/ecryptfs/inode.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 5d40ad1..131954b 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -357,10 +357,6 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, 
struct dentry *dentry,
ecryptfs_printk(KERN_DEBUG, "Is a special file; returning\n");
goto out;
}
-   if (special_file(lower_inode->i_mode)) {
-   ecryptfs_printk(KERN_DEBUG, "Is a special file; returning\n");
-   goto out;
-   }
if (!nd) {
ecryptfs_printk(KERN_DEBUG, "We have a NULL nd, just leave"
"as we *think* we are about to unlink\n");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


uml: fix linker script alignment bugs

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c7ec16da5adc1c1b341b2a83bde7add17dcf811a
Commit: c7ec16da5adc1c1b341b2a83bde7add17dcf811a
Parent: 641916881322a2dee5b120d509a3bdd05a502510
Author: Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:17 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

uml: fix linker script alignment bugs

Fix a class of bugs in the UML linker scripts which caused section boundary
variables to sometimes not line up with their sections.

Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/kernel/dyn.lds.S|   12 ++-
 arch/um/kernel/uml.lds.S|   11 +-
 include/asm-um/common.lds.S |  230 ---
 3 files changed, 143 insertions(+), 110 deletions(-)

diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index 2454774..4185090 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -71,11 +71,13 @@ SECTIONS
 *(.gnu.warning)
 
 . = ALIGN(4096);
-__syscall_stub_start = .;
-*(.__syscall_stub*)
-__syscall_stub_end = .;
-. = ALIGN(4096);
   } =0x90909090
+  . = ALIGN(4096);
+  .syscall_stub : {
+   __syscall_stub_start = .;
+   *(.__syscall_stub*)
+   __syscall_stub_end = .;
+  }
   .fini   : {
 KEEP (*(.fini))
   } =0x90909090
@@ -138,8 +140,8 @@ SECTIONS
   .got: { *(.got.plt) *(.got) }
   _edata = .;
   PROVIDE (edata = .);
-  __bss_start = .;
   .bss: {
+   __bss_start = .;
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index 307b937..81acdc2 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -44,12 +44,13 @@ SECTIONS
 /* .gnu.warning sections are handled specially by elf32.em.  */
 *(.gnu.warning)
 *(.gnu.linkonce.t*)
+  }
 
-. = ALIGN(4096);
-__syscall_stub_start = .;
-*(.__syscall_stub*)
-__syscall_stub_end = .;
-. = ALIGN(4096);
+  . = ALIGN(4096);
+  .syscall_stub : {
+   __syscall_stub_start = .;
+   *(.__syscall_stub*)
+   __syscall_stub_end = .;
   }
 
   #include "asm/common.lds.S"
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S
dissimilarity index 63%
index e3f010b..cb02486 100644
--- a/include/asm-um/common.lds.S
+++ b/include/asm-um/common.lds.S
@@ -1,100 +1,130 @@
-#include 
-
-  .fini  : { *(.fini)} =0x9090
-  _etext = .;
-  PROVIDE (etext = .);
-
-  . = ALIGN(4096);
-  _sdata = .;
-  PROVIDE (sdata = .);
-
-  RODATA
-
-  .unprotected : { *(.unprotected) }
-  . = ALIGN(4096);
-  PROVIDE (_unprotected_end = .);
-
-  . = ALIGN(4096);
-  .note : { *(.note.*) }
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  BUG_TABLE
-
-  __uml_setup_start = .;
-  .uml.setup.init : { *(.uml.setup.init) }
-  __uml_setup_end = .;
-   
-  __uml_help_start = .;
-  .uml.help.init : { *(.uml.help.init) }
-  __uml_help_end = .;
-   
-  __uml_postsetup_start = .;
-  .uml.postsetup.init : { *(.uml.postsetup.init) }
-  __uml_postsetup_end = .;
-   
-  __setup_start = .;
-  .init.setup : { *(.init.setup) }
-  __setup_end = .;
-
-  . = ALIGN(32);
-  __per_cpu_start = . ; 
-  .data.percpu : { *(.data.percpu) }
-  __per_cpu_end = . ;
-   
-  __initcall_start = .;
-  .initcall.init : {
-   INITCALLS
-  }
-  __initcall_end = .;
-
-  __con_initcall_start = .;
-  .con_initcall.init : { *(.con_initcall.init) }
-  __con_initcall_end = .;
-
-  __uml_initcall_start = .;
-  .uml.initcall.init : { *(.uml.initcall.init) }
-  __uml_initcall_end = .;
-  __init_end = .;
-
-  SECURITY_INIT
-
-  __exitcall_begin = .;
-  .exitcall : { *(.exitcall.exit) }
-  __exitcall_end = .;
-
-  __uml_exitcall_begin = .;
-  .uml.exitcall : { *(.uml.exitcall.exit) }
-  __uml_exitcall_end = .;
-
-  . = ALIGN(4);
-  __alt_instructions = .;
-  .altinstructions : { *(.altinstructions) }
-  __alt_instructions_end = .;
-  .altinstr_replacement : { *(.altinstr_replacement) }
-  /* .exit.text is discard at runtime, not link time, to deal with references
- from .altinstructions and .eh_frame */
-  .exit.text : { *(.exit.text) }
-  .exit.data : { *(.exit.data) }
-
-  __preinit_array_start = .;
-  .preinit_array : { *(.preinit_array) }
-  __preinit_array_end = .;
-  __init_array_start = .;
-  .init_array : { *(.init_array) }
-  __init_array_end = .;
-  __fini_array_start = .;
-  .fini_array : { *(.fini_array) }
-  __fini_array_end = .;
-
-   . = ALIGN(4096);
-  __initramfs_start = .;
-  .init.ramfs : { *(.init.ramfs) }
-  __initramfs_end = .;
-
-  /* Sections to be discarded */
-  /DISCARD/ : {
-   *(.exitcall.exit)
-  }
-
+#include 
+
+  .fini  : { *(.fini)} =0x9090
+  _etext = .;
+  PROVIDE (etext =

uml: fix x86_64 core dump crash

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d1254b12c93e1e586137a2ffef71fd33cf273f35
Commit: d1254b12c93e1e586137a2ffef71fd33cf273f35
Parent: c7ec16da5adc1c1b341b2a83bde7add17dcf811a
Author: Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:20 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

uml: fix x86_64 core dump crash

Stop UML crashing when trying to dump a process core on x86_64.  This is the
minimal fix to stop the crash - more things are broken here, and patches are
forthcoming.

The immediate thing to do is define ELF_CORE_COPY_REGS and
ELF_CORE_COPY_FPREGS.  Defining ELF_CORE_COPY_FPREGS allows dump_fpu to go
away.  It is defined in terms of save_fp_registers, so that needs to be 
added.

Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/os-Linux/sys-x86_64/registers.c |   15 +++
 arch/um/sys-x86_64/ptrace.c |6 
 include/asm-um/elf-x86_64.h |   40 +++
 3 files changed, 55 insertions(+), 6 deletions(-)

diff --git a/arch/um/os-Linux/sys-x86_64/registers.c 
b/arch/um/os-Linux/sys-x86_64/registers.c
index e6fc217..9467315 100644
--- a/arch/um/os-Linux/sys-x86_64/registers.c
+++ b/arch/um/os-Linux/sys-x86_64/registers.c
@@ -4,6 +4,7 @@
  */
 
 #include 
+#include 
 #include 
 #include "ptrace_user.h"
 #include "uml-config.h"
@@ -17,6 +18,20 @@
 static unsigned long exec_regs[MAX_REG_NR];
 static unsigned long exec_fp_regs[HOST_FP_SIZE];
 
+int save_fp_registers(int pid, unsigned long *fp_regs)
+{
+   if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
+   return -errno;
+   return 0;
+}
+
+int restore_fp_registers(int pid, unsigned long *fp_regs)
+{
+   if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
+   return -errno;
+   return 0;
+}
+
 void init_thread_registers(union uml_pt_regs *to)
 {
memcpy(to->skas.regs, exec_regs, sizeof(to->skas.regs));
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86_64/ptrace.c
index 55b66e0..1970d78 100644
--- a/arch/um/sys-x86_64/ptrace.c
+++ b/arch/um/sys-x86_64/ptrace.c
@@ -156,12 +156,6 @@ int is_syscall(unsigned long addr)
return(instr == 0x050f);
 }
 
-int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu )
-{
-   panic("dump_fpu");
-   return(1);
-}
-
 int get_fpregs(unsigned long buf, struct task_struct *child)
 {
panic("get_fpregs");
diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h
index 8a8246d..bfe27aa 100644
--- a/include/asm-um/elf-x86_64.h
+++ b/include/asm-um/elf-x86_64.h
@@ -6,7 +6,9 @@
 #ifndef __UM_ELF_X86_64_H
 #define __UM_ELF_X86_64_H
 
+#include 
 #include 
+#include "skas.h"
 
 /* x86-64 relocation types, taken from asm-x86_64/elf.h */
 #define R_X86_64_NONE  0   /* No reloc */
@@ -64,6 +66,44 @@ typedef struct { } elf_fpregset_t;
PT_REGS_R15(regs) = 0; \
 } while (0)
 
+#define ELF_CORE_COPY_REGS(pr_reg, regs)   \
+   (pr_reg)[0] = (regs)->regs.gp[0];   \
+   (pr_reg)[1] = (regs)->regs.gp[1];   \
+   (pr_reg)[2] = (regs)->regs.gp[2];   \
+   (pr_reg)[3] = (regs)->regs.gp[3];   \
+   (pr_reg)[4] = (regs)->regs.gp[4];   \
+   (pr_reg)[5] = (regs)->regs.gp[5];   \
+   (pr_reg)[6] = (regs)->regs.gp[6];   \
+   (pr_reg)[7] = (regs)->regs.gp[7];   \
+   (pr_reg)[8] = (regs)->regs.gp[8];   \
+   (pr_reg)[9] = (regs)->regs.gp[9];   \
+   (pr_reg)[10] = (regs)->regs.gp[10]; \
+   (pr_reg)[11] = (regs)->regs.gp[11]; \
+   (pr_reg)[12] = (regs)->regs.gp[12]; \
+   (pr_reg)[13] = (regs)->regs.gp[13]; \
+   (pr_reg)[14] = (regs)->regs.gp[14]; \
+   (pr_reg)[15] = (regs)->regs.gp[15]; \
+   (pr_reg)[16] = (regs)->regs.gp[16]; \
+   (pr_reg)[17] = (regs)->regs.gp[17]; \
+   (pr_reg)[18] = (regs)->regs.gp[18]; \
+   (pr_reg)[19] = (regs)->regs.gp[19]; \
+   (pr_reg)[20] = (regs)->regs.gp[20]; \
+   (pr_reg)[21] = current->thread.arch.fs; \
+   (pr_reg)[22] = 0;   \
+   (pr_reg)[23] = 0;   \
+   (pr_reg)[24] = 0;   \
+   (pr_reg)[25] = 0;   \
+   (pr_reg)[26] = 0;
+
+static inline int elf_core_copy_fpregs(struc

fix rcu_read_lock() in page migraton

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=989f89c57e6361e7d16fbd9572b5da7d313b073d
Commit: 989f89c57e6361e7d16fbd9572b5da7d313b073d
Parent: d1254b12c93e1e586137a2ffef71fd33cf273f35
Author: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:21 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

fix rcu_read_lock() in page migraton

In migration fallback path, write_page() or lock_page() will be called.
This causes sleep with holding rcu_read_lock().
For avoding that, just do rcu_lock if the page is Anon.(this is enough.)

Signed-off-by: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
Acked-by: Christoph Lameter <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/migrate.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 37c73b9..e2fdbce 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -611,6 +611,7 @@ static int unmap_and_move(new_page_t get_new_page, unsigned 
long private,
int rc = 0;
int *result = NULL;
struct page *newpage = get_new_page(page, private, &result);
+   int rcu_locked = 0;
 
if (!newpage)
return -ENOMEM;
@@ -636,8 +637,13 @@ static int unmap_and_move(new_page_t get_new_page, 
unsigned long private,
 * we cannot notice that anon_vma is freed while we migrates a page.
 * This rcu_read_lock() delays freeing anon_vma pointer until the end
 * of migration. File cache pages are no problem because of page_lock()
+* File Caches may use write_page() or lock_page() in migration, then,
+* just care Anon page here.
 */
-   rcu_read_lock();
+   if (PageAnon(page)) {
+   rcu_read_lock();
+   rcu_locked = 1;
+   }
/*
 * This is a corner case handling.
 * When a new swap-cache is read into, it is linked to LRU
@@ -656,7 +662,8 @@ static int unmap_and_move(new_page_t get_new_page, unsigned 
long private,
if (rc)
remove_migration_ptes(page, page);
 rcu_unlock:
-   rcu_read_unlock();
+   if (rcu_locked)
+   rcu_read_unlock();
 
 unlock:
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


UDF: handle wrong superblock better

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bcec44770cc65660369ae17b4e44be027a64a46c
Commit: bcec44770cc65660369ae17b4e44be027a64a46c
Parent: 989f89c57e6361e7d16fbd9572b5da7d313b073d
Author: Jan Kara <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:22 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

UDF: handle wrong superblock better

If UDF superblock is incorrect, we can fail to find a table of free /
allocated space and consequently Oops.  Handle this situation more
gracefully by ignoring the broken UDF partition.

Signed-off-by: Jan Kara <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/udf/super.c |   26 ++
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 382be7b..c68a6e7 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -89,7 +89,7 @@ static int udf_find_fileset(struct super_block *, 
kernel_lb_addr *,
 static void udf_load_pvoldesc(struct super_block *, struct buffer_head *);
 static void udf_load_fileset(struct super_block *, struct buffer_head *,
 kernel_lb_addr *);
-static void udf_load_partdesc(struct super_block *, struct buffer_head *);
+static int udf_load_partdesc(struct super_block *, struct buffer_head *);
 static void udf_open_lvid(struct super_block *);
 static void udf_close_lvid(struct super_block *);
 static unsigned int udf_count_free(struct super_block *);
@@ -877,7 +877,7 @@ static void udf_load_fileset(struct super_block *sb, struct 
buffer_head *bh,
  root->logicalBlockNum, root->partitionReferenceNum);
 }
 
-static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
+static int udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
 {
struct partitionDesc *p;
int i;
@@ -912,6 +912,11 @@ static void udf_load_partdesc(struct super_block *sb, 
struct buffer_head *bh)
 
UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table 
=
udf_iget(sb, loc);
+   if 
(!UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table) {
+   udf_debug("cannot load 
unallocSpaceTable (part %d)\n",
+   i);
+   return 1;
+   }
UDF_SB_PARTFLAGS(sb,i) |= 
UDF_PART_FLAG_UNALLOC_TABLE;
udf_debug("unallocSpaceTable (part %d) 
@ %ld\n",
  i, 
UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table->i_ino);
@@ -938,6 +943,11 @@ static void udf_load_partdesc(struct super_block *sb, 
struct buffer_head *bh)
 
UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table 
=
udf_iget(sb, loc);
+   if 
(!UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table) {
+   udf_debug("cannot load 
freedSpaceTable (part %d)\n",
+   i);
+   return 1;
+   }
UDF_SB_PARTFLAGS(sb,i) |= 
UDF_PART_FLAG_FREED_TABLE;
udf_debug("freedSpaceTable (part %d) @ 
%ld\n",
  i, 
UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table->i_ino);
@@ -966,6 +976,7 @@ static void udf_load_partdesc(struct super_block *sb, 
struct buffer_head *bh)
  le16_to_cpu(p->partitionNumber), i, 
UDF_SB_PARTTYPE(sb,i),
  UDF_SB_PARTROOT(sb,i), UDF_SB_PARTLEN(sb,i));
}
+   return 0;
 }
 
 static int udf_load_logicalvol(struct super_block *sb, struct buffer_head *bh,
@@ -1177,12 +1188,19 @@ static int udf_process_sequence(struct super_block *sb, 
long block, long lastblo
udf_load_logicalvol(sb, bh, fileset);
} else if (i == VDS_POS_PARTITION_DESC) {
struct buffer_head *bh2 = NULL;
-   udf_load_partdesc(sb, bh);
+   if (udf_load_partdesc(sb, bh)) {
+   brelse(bh);
+   return 1;
+   }
for (j = vds[i].block + 1; j <  
vds[VDS_POS_TERMINATING_DESC].block; j++) {
bh2 = udf_read_tagged(sb, j, j, &ident);
gd = (struct generic_desc *)bh2-

process_zones(): fix recovery code

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=641916881322a2dee5b120d509a3bdd05a502510
Commit: 641916881322a2dee5b120d509a3bdd05a502510
Parent: 060d11b0b35d13eb2251fd08403d900b71df5791
Author: Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:17 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

process_zones(): fix recovery code

Don't try to free memory which we didn't allocate.

Acked-by: Christoph Lameter <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/page_alloc.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6427653..1a8c595 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2345,6 +2345,8 @@ static int __cpuinit process_zones(int cpu)
return 0;
 bad:
for_each_zone(dzone) {
+   if (!populated_zone(dzone))
+   continue;
if (dzone == zone)
break;
kfree(zone_pcp(dzone, cpu));
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fix possible NULL pointer dereference in udf_table_free_blocks()

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f5cc15dac55d4943176f84681f37aa48094ffa8b
Commit: f5cc15dac55d4943176f84681f37aa48094ffa8b
Parent: bcec44770cc65660369ae17b4e44be027a64a46c
Author: Jan Kara <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:22 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

Fix possible NULL pointer dereference in udf_table_free_blocks()

Fix possible NULL pointer dereference when freeing blocks in case table of
free space is used.  Also fix handling of the case when we need to move
extent from one block to another one to make space for indirect extent.
BTW: Nobody seem to have ever used this code.

Signed-off-by: Jan Kara <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/udf/balloc.c |   10 --
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c
index 276f720..87e87dc 100644
--- a/fs/udf/balloc.c
+++ b/fs/udf/balloc.c
@@ -540,26 +540,24 @@ static void udf_table_free_blocks(struct super_block *sb,
if (epos.offset + adsize > sb->s_blocksize) {
loffset = epos.offset;
aed->lengthAllocDescs = cpu_to_le32(adsize);
-   sptr = UDF_I_DATA(inode) + epos.offset -
-   udf_file_entry_alloc_offset(inode) +
-   UDF_I_LENEATTR(inode) - adsize;
+   sptr = UDF_I_DATA(table) + epos.offset - adsize;
dptr = epos.bh->b_data + sizeof(struct 
allocExtDesc);
memcpy(dptr, sptr, adsize);
epos.offset = sizeof(struct allocExtDesc) + 
adsize;
} else {
loffset = epos.offset + adsize;
aed->lengthAllocDescs = cpu_to_le32(0);
-   sptr = oepos.bh->b_data + epos.offset;
-   epos.offset = sizeof(struct allocExtDesc);
-
if (oepos.bh) {
+   sptr = oepos.bh->b_data + epos.offset;
aed = (struct allocExtDesc 
*)oepos.bh->b_data;
aed->lengthAllocDescs =

cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) + adsize);
} else {
+   sptr = UDF_I_DATA(table) + epos.offset;
UDF_I_LENALLOC(table) += adsize;
mark_inode_dirty(table);
}
+   epos.offset = sizeof(struct allocExtDesc);
}
if (UDF_SB_UDFREV(sb) >= 0x0200)
udf_new_tag(epos.bh->b_data, TAG_IDENT_AED, 3, 
1,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fix font dependency for SGI Newport console driver

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c24c55c75a0d799be07ad6c1a7ff4ccfe25da75b
Commit: c24c55c75a0d799be07ad6c1a7ff4ccfe25da75b
Parent: f5cc15dac55d4943176f84681f37aa48094ffa8b
Author: Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:23 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

Fix font dependency for SGI Newport console driver

We better select a font when the newport driver is a module or the user
experience might suffer.

Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
Cc: "Antonino A. Daplas" <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/video/console/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 5db6b1e..a22ccf9 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -182,7 +182,7 @@ config FONT_8x8
 
 config FONT_8x16
bool "VGA 8x16 font" if FONTS
-   depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE 
|| USB_SISUSBVGA_CON 
+   depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || 
USB_SISUSBVGA_CON
default y if !SPARC && !FONTS
help
  This is the "high resolution" font for the VGA frame buffer (the one
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Assign task_struct.exit_code before taskstats_exit()

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f2ab6d8889422c1f5354f014e8bef337b1d1bade
Commit: f2ab6d8889422c1f5354f014e8bef337b1d1bade
Parent: c24c55c75a0d799be07ad6c1a7ff4ccfe25da75b
Author: Jonathan Lim <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:23 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

Assign task_struct.exit_code before taskstats_exit()

taskstats.ac_exitcode is assigned to task_struct.exit_code in 
bacct_add_tsk()
through the following kernel function calls:

  do_exit()
taskstats_exit()
  fill_pid()
bacct_add_tsk()

The problem is that in do_exit(), task_struct.exit_code is set to 'code' 
only
after taskstats_exit() has been called.  So we need to move the assignment
before taskstats_exit().

Signed-off-by: Jonathan Lim <[EMAIL PROTECTED]>
Cc: Balbir Singh <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/exit.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index 9578c1a..06b24b3 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -975,6 +975,7 @@ fastcall NORET_TYPE void do_exit(long code)
if (unlikely(tsk->audit_context))
audit_free(tsk);
 
+   tsk->exit_code = code;
taskstats_exit(tsk, group_dead);
 
exit_mm(tsk);
@@ -996,7 +997,6 @@ fastcall NORET_TYPE void do_exit(long code)
if (tsk->binfmt)
module_put(tsk->binfmt->module);
 
-   tsk->exit_code = code;
proc_exit_connector(tsk);
exit_task_namespaces(tsk);
exit_notify(tsk);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SPI driver hotplug/coldplug fixes

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fc3ba9525b50ea0d1670357ece21ebedcee507ae
Commit: fc3ba9525b50ea0d1670357ece21ebedcee507ae
Parent: f2ab6d8889422c1f5354f014e8bef337b1d1bade
Author: David Brownell <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:24 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

SPI driver hotplug/coldplug fixes

Update various SPI drivers so they properly support

  - coldplug through "modprobe $(cat /sys/devices/.../modalias)"

  - hotplug through "modprobe $(MODALIAS)"

The basic rule for platform, SPI, and (new style) I2C drivers is just
to make sure that modprobing the driver name works.  In this case, all
the relevant drivers are platform drivers, and this patch either

  (a)   Changes the driver name, if no in-tree code would break;
this is simpler and thus preferable in the long term.

  (b)   Adds MODULE_ALIAS directives, when in-tree platforms declare
devices using the current driver name; less desirable.

Most systems will link SPI controller drivers statically, but
there's no point in being needlessly broken.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Cc: Jean Delvare <[EMAIL PROTECTED]>
Acked-by: Andrei Konovalov <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/spi/spi_bfin5xx.c  |3 ++-
 drivers/spi/spi_imx.c  |2 +-
 drivers/spi/spi_mpc83xx.c  |1 +
 drivers/spi/spi_s3c24xx.c  |1 +
 drivers/spi/spi_s3c24xx_gpio.c |2 +-
 drivers/spi/spi_txx9.c |1 +
 drivers/spi/xilinx_spi.c   |2 +-
 7 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 48587c2..f540ed7 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -1303,8 +1303,9 @@ static int bfin5xx_spi_resume(struct platform_device 
*pdev)
 #define bfin5xx_spi_resume NULL
 #endif /* CONFIG_PM */
 
+MODULE_ALIAS("bfin-spi-master");   /* for platform bus hotplug */
 static struct platform_driver bfin5xx_spi_driver = {
-   .driver = {
+   .driver = {
.name   = "bfin-spi-master",
.owner  = THIS_MODULE,
},
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index aee9ad6..bd9177f 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -1735,7 +1735,7 @@ static int spi_imx_resume(struct platform_device *pdev)
 
 static struct platform_driver driver = {
.driver = {
-   .name = "imx-spi",
+   .name = "spi_imx",
.bus = &platform_bus_type,
.owner = THIS_MODULE,
},
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 2adf856..fcbf1b8 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -530,6 +530,7 @@ static int __devexit mpc83xx_spi_remove(struct 
platform_device *dev)
return 0;
 }
 
+MODULE_ALIAS("mpc83xx_spi");   /* for platform bus hotplug */
 static struct platform_driver mpc83xx_spi_driver = {
.probe = mpc83xx_spi_probe,
.remove = __devexit_p(mpc83xx_spi_remove),
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 5cf4812..e9b683f 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -427,6 +427,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev)
 #define s3c24xx_spi_resume  NULL
 #endif
 
+MODULE_ALIAS("s3c2410_spi");   /* for platform bus hotplug */
 static struct platform_driver s3c24xx_spidrv = {
.probe  = s3c24xx_spi_probe,
.remove = s3c24xx_spi_remove,
diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c
index 611ac22..0fa25e2 100644
--- a/drivers/spi/spi_s3c24xx_gpio.c
+++ b/drivers/spi/spi_s3c24xx_gpio.c
@@ -180,7 +180,7 @@ static struct platform_driver s3c2410_spigpio_drv = {
 .suspend   = s3c2410_spigpio_suspend,
 .resume= s3c2410_spigpio_resume,
 .driver= {
-   .name   = "s3c24xx-spi-gpio",
+   .name   = "spi_s3c24xx_gpio",
.owner  = THIS_MODULE,
 },
 };
diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c
index 08e981c..f6c3677 100644
--- a/drivers/spi/spi_txx9.c
+++ b/drivers/spi/spi_txx9.c
@@ -450,6 +450,7 @@ static int __exit txx9spi_remove(struct platform_device 
*dev)
return 0;
 }
 
+MODULE_ALIAS("txx9spi");   /* for platform bus hotplug */
 static struct platform_driver txx9spi_driver = {
.remove = __exit_p(txx9spi_remove),
.driver = {
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index f0bf9a6..5d

slub: do not fail if we cannot register a slab with sysfs

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d540fb71552b9f2c542bea967200c48be2d8ef6
Commit: 5d540fb71552b9f2c542bea967200c48be2d8ef6
Parent: 4ccdb4c8727c9963c7aa0d6301df283cf1f8a731
Author: Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:26 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

slub: do not fail if we cannot register a slab with sysfs

Do not BUG() if we cannot register a slab with sysfs.  Just print an error.
 The only consequence of not registering is that the slab cache is not
visible via /sys/slab.  A BUG() may not be visible that early during boot
and we have had multiple issues here already.

Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
Acked-by: David S. Miller <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/slub.c |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 04151da..7defe84 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3813,7 +3813,9 @@ static int __init slab_sysfs_init(void)
 
list_for_each_entry(s, &slab_caches, list) {
err = sysfs_slab_add(s);
-   BUG_ON(err);
+   if (err)
+   printk(KERN_ERR "SLUB: Unable to add boot slab %s"
+   " to sysfs\n", s->name);
}
 
while (alias_list) {
@@ -3821,7 +3823,9 @@ static int __init slab_sysfs_init(void)
 
alias_list = alias_list->next;
err = sysfs_slab_alias(al->s, al->name);
-   BUG_ON(err);
+   if (err)
+   printk(KERN_ERR "SLUB: Unable to add boot slab alias"
+   " %s to sysfs\n", s->name);
kfree(al);
}
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


spi: correct name for spi_txx9

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ccdb4c8727c9963c7aa0d6301df283cf1f8a731
Commit: 4ccdb4c8727c9963c7aa0d6301df283cf1f8a731
Parent: fc3ba9525b50ea0d1670357ece21ebedcee507ae
Author: Atsushi Nemoto <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:25 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

spi: correct name for spi_txx9

Correct the name of the spi_txx9 driver (and their in-tree user)
instead of MODULE_ALIAS workaround.  This would be preferable in the
long term.

Signed-off-by: Atsushi Nemoto <[EMAIL PROTECTED]>
Acked-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/mips/tx4938/toshiba_rbtx4938/setup.c |2 +-
 drivers/spi/spi_txx9.c|3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c 
b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
index 84ebff7..f236b1f 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
@@ -1108,7 +1108,7 @@ static void __init txx9_spi_init(unsigned long base, int 
irq)
.flags  = IORESOURCE_IRQ,
},
};
-   platform_device_register_simple("txx9spi", 0,
+   platform_device_register_simple("spi_txx9", 0,
res, ARRAY_SIZE(res));
 }
 
diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c
index f6c3677..b7f4bb2 100644
--- a/drivers/spi/spi_txx9.c
+++ b/drivers/spi/spi_txx9.c
@@ -450,11 +450,10 @@ static int __exit txx9spi_remove(struct platform_device 
*dev)
return 0;
 }
 
-MODULE_ALIAS("txx9spi");   /* for platform bus hotplug */
 static struct platform_driver txx9spi_driver = {
.remove = __exit_p(txx9spi_remove),
.driver = {
-   .name = "txx9spi",
+   .name = "spi_txx9",
.owner = THIS_MODULE,
},
 };
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


setpgid(child) fails if the child was forked by sub-thread

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b07e35f94a7b6a059f889b904529ee907dc0634d
Commit: b07e35f94a7b6a059f889b904529ee907dc0634d
Parent: 5d540fb71552b9f2c542bea967200c48be2d8ef6
Author: Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:27 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

setpgid(child) fails if the child was forked by sub-thread

Spotted by Marcin Kowalczyk <[EMAIL PROTECTED]>.

sys_setpgid(child) fails if the child was forked by sub-thread.

Fix the "is it our child" check. The previous commit
ee0acf90d320c29916ba8c5c1b2e908d81f5057d was not complete.

(this patch asks for the new same_thread_group() helper, but mainline 
doesn't
 have it yet).

Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
Acked-by: Roland McGrath <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Tested-by: "Marcin 'Qrczak' Kowalczyk" <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/sys.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index 449b81b..1b33b05 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1442,7 +1442,6 @@ asmlinkage long sys_times(struct tms __user * tbuf)
  * Auch. Had to add the 'did_exec' flag to conform completely to POSIX.
  * LBT 04.03.94
  */
-
 asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
 {
struct task_struct *p;
@@ -1470,7 +1469,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
if (!thread_group_leader(p))
goto out;
 
-   if (p->real_parent == group_leader) {
+   if (p->real_parent->tgid == group_leader->tgid) {
err = -EPERM;
if (task_session(p) != task_session(group_leader))
goto out;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f3de4be9d5f8551d7880a1f1f5231a30e0161b1f
Commit: f3de4be9d5f8551d7880a1f1f5231a30e0161b1f
Parent: b07e35f94a7b6a059f889b904529ee907dc0634d
Author: Rafael J. Wysocki <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:29 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION

Dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION introduced by commit
296699de6bdc717189a331ab6bbe90e05c94db06 "Introduce CONFIG_SUSPEND for
suspend-to-Ram and standby" are incorrect, as they don't cover the facts 
that
(1) not all architectures support suspend and (2) SMP hibernation is only
possible on X86 and PPC64 (if CONFIG_PPC64_SWSUSP is set).

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/x86_64/defconfig |1 -
 include/linux/cpu.h   |6 +++---
 kernel/cpu.c  |4 ++--
 kernel/power/Kconfig  |   41 +++--
 4 files changed, 36 insertions(+), 16 deletions(-)

diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index e64f65c..b091c5e 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -201,7 +201,6 @@ CONFIG_PM=y
 # CONFIG_PM_DEBUG is not set
 CONFIG_HIBERNATION=y
 CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
 
 #
 # ACPI (Advanced Configuration and Power Interface) Support
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 1d5ded0..0ad72c4 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -126,16 +126,16 @@ static inline void cpuhotplug_mutex_unlock(struct mutex 
*cpu_hp_mutex)
 static inline int cpu_is_offline(int cpu) { return 0; }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-#ifdef CONFIG_SUSPEND_SMP
+#ifdef CONFIG_PM_SLEEP_SMP
 extern int suspend_cpu_hotplug;
 
 extern int disable_nonboot_cpus(void);
 extern void enable_nonboot_cpus(void);
-#else
+#else /* !CONFIG_PM_SLEEP_SMP */
 #define suspend_cpu_hotplug0
 
 static inline int disable_nonboot_cpus(void) { return 0; }
 static inline void enable_nonboot_cpus(void) {}
-#endif
+#endif /* !CONFIG_PM_SLEEP_SMP */
 
 #endif /* _LINUX_CPU_H_ */
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 181ae70..38033db 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -273,7 +273,7 @@ int __cpuinit cpu_up(unsigned int cpu)
return err;
 }
 
-#ifdef CONFIG_SUSPEND_SMP
+#ifdef CONFIG_PM_SLEEP_SMP
 static cpumask_t frozen_cpus;
 
 int disable_nonboot_cpus(void)
@@ -334,4 +334,4 @@ void enable_nonboot_cpus(void)
 out:
mutex_unlock(&cpu_add_remove_lock);
 }
-#endif
+#endif /* CONFIG_PM_SLEEP_SMP */
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 412859f..c8580a1 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -72,15 +72,10 @@ config PM_TRACE
CAUTION: this option will cause your machine's real-time clock to be
set to an invalid time after a resume.
 
-config SUSPEND_SMP_POSSIBLE
-   bool
-   depends on (X86 && !X86_VOYAGER) || (PPC64 && (PPC_PSERIES || PPC_PMAC))
-   depends on SMP
-   default y
-
-config SUSPEND_SMP
+config PM_SLEEP_SMP
bool
-   depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP
+   depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
+   depends on PM_SLEEP
select HOTPLUG_CPU
default y
 
@@ -89,20 +84,46 @@ config PM_SLEEP
depends on SUSPEND || HIBERNATION
default y
 
+config SUSPEND_UP_POSSIBLE
+   bool
+   depends on (X86 && !X86_VOYAGER) || PPC || ARM || BLACKFIN || MIPS \
+  || SUPERH || FRV
+   depends on !SMP
+   default y
+
+config SUSPEND_SMP_POSSIBLE
+   bool
+   depends on (X86 && !X86_VOYAGER) \
+  || (PPC && (PPC_PSERIES || PPC_PMAC)) || ARM
+   depends on SMP
+   default y
+
 config SUSPEND
bool "Suspend to RAM and standby"
depends on PM
-   depends on !SMP || SUSPEND_SMP_POSSIBLE
+   depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
default y
---help---
  Allow the system to enter sleep states in which main memory is
  powered and thus its contents are preserved, such as the
  suspend-to-RAM state (i.e. the ACPI S3 state).
 
+config HIBERNATION_UP_POSSIBLE
+   bool
+   depends on X86 || PPC64_SWSUSP || FRV || PPC32
+   depends on !SMP
+   default y
+
+config HIBERNATION_SMP_POSSIBLE
+   bool
+   depends on (X86 && !X86_VOYAGER) || PPC64_SWSUSP
+   depends on SMP
+   default y
+
 config HIBERNATION
bool "Hibernation (aka 'suspend to disk')"
depends on PM && SWAP
-   depends on ((X86 || PPC64_SWSUSP || FRV || PPC32) && !SMP) || 
SUSPEND_SMP_POSSIBLE
+   depends on HIBERNATION_UP_POSSIBLE |

Fix typo in atmel_spi.c

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=85787a2bea516b76a013eea7f5f3fad12c5a6417
Commit: 85787a2bea516b76a013eea7f5f3fad12c5a6417
Parent: f79abb828e1d851387def4247eb3f9477fe03234
Author: Andrew Victor <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:32 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

Fix typo in atmel_spi.c

Fix cut 'n paste bug in Atmel SPI driver.

Signed-off-by: Andrew Victor <[EMAIL PROTECTED]>
Acked-by: David Brownell <[EMAIL PROTECTED]>
Acked-by: Haavard Skinnemoen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/spi/atmel_spi.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index ad14405..b046974 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -251,7 +251,7 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct 
spi_transfer *xfer)
xfer->rx_dma = dma_map_single(dev,
xfer->rx_buf, xfer->len,
DMA_FROM_DEVICE);
-   if (dma_mapping_error(xfer->tx_dma)) {
+   if (dma_mapping_error(xfer->rx_dma)) {
if (xfer->tx_buf)
dma_unmap_single(dev,
xfer->tx_dma, xfer->len,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Add MAINTAINERS entry for IOC3 serial driver

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb109a0eb44cea24e83e7176473011fa41507b8b
Commit: cb109a0eb44cea24e83e7176473011fa41507b8b
Parent: f3de4be9d5f8551d7880a1f1f5231a30e0161b1f
Author: Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:30 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

Add MAINTAINERS entry for IOC3 serial driver

The IOC3 is a multifunction device but not in sense of the PCI
specification.  Currently its ethernet and serial functionality are
supported by two separate drivers authored and maintained by different
people, so MAINTAINERS should reflect that.

Cc: Patrick Gefre <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 MAINTAINERS |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 48ca8b4..9ccac7f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2057,12 +2057,18 @@ L:  
http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
 W: http://ipw2200.sourceforge.net
 S: Supported
 
-IOC3 DRIVER
+IOC3 ETHERNET DRIVER
 P: Ralf Baechle
 M: [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 S: Maintained
 
+IOC3 SERIAL DRIVER
+P: Pat Gefre
+M: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+S: Maintained
+
 IP MASQUERADING:
 P: Juanjo Ciarlante
 M: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


eCryptfs: fix possible fault in ecryptfs_sync_page

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2aeb3db17fc33443d21b11d7121c5627d55717c6
Commit: 2aeb3db17fc33443d21b11d7121c5627d55717c6
Parent: 85787a2bea516b76a013eea7f5f3fad12c5a6417
Author: Ryusuke Konishi <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:33 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

eCryptfs: fix possible fault in ecryptfs_sync_page

This will avoid a possible fault in ecryptfs_sync_page().

In the function, eCryptfs calls sync_page() method of a lower filesystem
without checking its existence.  However, there are many filesystems that
don't have this method including network filesystems such as NFS, AFS, and
so forth.  They may fail when an eCryptfs page is waiting for lock.

Signed-off-by: Ryusuke Konishi <[EMAIL PROTECTED]>
Acked-by: Michael Halcrow <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/ecryptfs/mmap.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index e4ab7bc..fd3f94d 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -834,7 +834,8 @@ static void ecryptfs_sync_page(struct page *page)
ecryptfs_printk(KERN_DEBUG, "find_lock_page failed\n");
return;
}
-   lower_page->mapping->a_ops->sync_page(lower_page);
+   if (lower_page->mapping->a_ops->sync_page)
+   lower_page->mapping->a_ops->sync_page(lower_page);
ecryptfs_printk(KERN_DEBUG, "Unlocking page with index = [0x%.16x]\n",
lower_page->index);
unlock_page(lower_page);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fix modpost warning in serial driver

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f79abb828e1d851387def4247eb3f9477fe03234
Commit: f79abb828e1d851387def4247eb3f9477fe03234
Parent: cb109a0eb44cea24e83e7176473011fa41507b8b
Author: Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:31 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

Fix modpost warning in serial driver

This is triggered if PCI && !HOTPLUG.

  MODPOST vmlinux.o
WARNING: vmlinux.o(.data+0xc910): Section mismatch: reference to 
.init.text:pci_ite887x_init (between 'pci_serial_quirks' and 'serial_pci_tbl')

Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/serial/8250_pci.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index bd66339..1ea1ed8 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -610,7 +610,7 @@ static int pci_netmos_init(struct pci_dev *dev)
 /* enable IO_Space bit */
 #define ITE_887x_POSIO_ENABLE  (1 << 31)
 
-static int __devinit pci_ite887x_init(struct pci_dev *dev)
+static int pci_ite887x_init(struct pci_dev *dev)
 {
/* inta_addr are the configuration addresses of the ITE */
static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


userns: don't leak root user

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=99db67bc04af0f2e8cb710ac92aaeb9af135a7c6
Commit: 99db67bc04af0f2e8cb710ac92aaeb9af135a7c6
Parent: 59845b1ffd9121e5ef474ea5f27405fd7a83c85b
Author: Alexey Dobriyan <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:34 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

userns: don't leak root user

Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]>
Acked-by: Cedric Le Goater <[EMAIL PROTECTED]>
Acked-by: Serge Hallyn <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/user_namespace.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index d055d98..85af942 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -81,6 +81,7 @@ void free_user_ns(struct kref *kref)
struct user_namespace *ns;
 
ns = container_of(kref, struct user_namespace, kref);
+   free_uid(ns->root_user);
kfree(ns);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


MAINTAINERS: update DCO info

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4500371e050af18e606c25ee5cc8b030868d3089
Commit: 4500371e050af18e606c25ee5cc8b030868d3089
Parent: 60187d2708caa870f0825d753df1612ea688eb9e
Author: Randy Dunlap <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:37 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

MAINTAINERS: update DCO info

Drop the URL for DCO (URL is invalid).  Also, point to SubmittingPatches
for the current DCO.

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 MAINTAINERS |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9ccac7f..52269f1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -44,9 +44,10 @@ trivial patch so apply some common sense.
or does something very odd once a month document it.
 
PLEASE remember that submissions must be made under the terms
-   of the OSDL certificate of contribution
-   (http://www.osdl.org/newsroom/press_releases/2004/2004_05_24_dco.html)
-   and should include a Signed-off-by: line.
+   of the OSDL certificate of contribution and should include a
+   Signed-off-by: line.  The current version of this "Developer's
+   Certificate of Origin" (DCO) is listed in the file
+   Documentation/SubmittingPatches.
 
 6. Make sure you have the right to send any changes you make. If you
do changes at work you may find your employer owns the patch
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


i2c-piix4: Fix SB700 PCI device ID

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=60693e5a9a2063b87d4dbe8029816c814b3fa84e
Commit: 60693e5a9a2063b87d4dbe8029816c814b3fa84e
Parent: 4500371e050af18e606c25ee5cc8b030868d3089
Author: Shane Huang <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:38 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

i2c-piix4: Fix SB700 PCI device ID

We find that SB700 and SB800 use the same SMBus device ID as SB600, which is
0x4385, instead of the already submitted 0x4395.

Besides removing the wrong SB700 device ID, add SB800 support to kernel, by
renaming the PCI_DEVICE_ID_ATI_IXP600_SMBUS into
PCI_DEVICE_ID_ATI_SBX00_SMBUS.

Signed-off-by: Shane Huang <[EMAIL PROTECTED]>
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 Documentation/i2c/busses/i2c-piix4 |2 +-
 drivers/i2c/busses/Kconfig |1 +
 drivers/i2c/busses/i2c-piix4.c |6 ++
 include/linux/pci_ids.h|3 +--
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/Documentation/i2c/busses/i2c-piix4 
b/Documentation/i2c/busses/i2c-piix4
index fa0c786..cf6b6cb 100644
--- a/Documentation/i2c/busses/i2c-piix4
+++ b/Documentation/i2c/busses/i2c-piix4
@@ -6,7 +6,7 @@ Supported adapters:
 Datasheet: Publicly available at the Intel website
   * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges
 Datasheet: Only available via NDA from ServerWorks
-  * ATI IXP200, IXP300, IXP400, SB600 and SB700 southbridges
+  * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges
 Datasheet: Not publicly available
   * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
 Datasheet: Publicly available at the SMSC website http://www.smsc.com
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 1842f52..9f3a4cd 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -208,6 +208,7 @@ config I2C_PIIX4
ATI IXP400
ATI SB600
ATI SB700
+   ATI SB800
Serverworks OSB4
Serverworks CSB5
Serverworks CSB6
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index debc76c..167e413 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -23,7 +23,7 @@
Supports:
Intel PIIX4, 440MX
Serverworks OSB4, CSB5, CSB6, HT-1000
-   ATI IXP200, IXP300, IXP400, SB600, SB700
+   ATI IXP200, IXP300, IXP400, SB600, SB700, SB800
SMSC Victory66
 
Note: we assume there can only be one device, with one SMBus interface.
@@ -397,9 +397,7 @@ static struct pci_device_id piix4_ids[] = {
  .driver_data = 0 },
{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS),
  .driver_data = 0 },
-   { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SMBUS),
- .driver_data = 0 },
-   { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SMBUS),
+   { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS),
  .driver_data = 0 },
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4),
  .driver_data = 0 },
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 06d23e1..17168f3 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -374,10 +374,9 @@
 #define PCI_DEVICE_ID_ATI_IXP400_SATA   0x4379
 #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a
 #define PCI_DEVICE_ID_ATI_IXP600_SATA  0x4380
-#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385
+#define PCI_DEVICE_ID_ATI_SBX00_SMBUS  0x4385
 #define PCI_DEVICE_ID_ATI_IXP600_IDE   0x438c
 #define PCI_DEVICE_ID_ATI_IXP700_SATA  0x4390
-#define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395
 #define PCI_DEVICE_ID_ATI_IXP700_IDE   0x439c
 
 #define PCI_VENDOR_ID_VLSI 0x1004
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sigqueue_free: fix the race with collect_signal()

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=60187d2708caa870f0825d753df1612ea688eb9e
Commit: 60187d2708caa870f0825d753df1612ea688eb9e
Parent: 99db67bc04af0f2e8cb710ac92aaeb9af135a7c6
Author: Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:35 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

sigqueue_free: fix the race with collect_signal()

Spotted by taoyue <[EMAIL PROTECTED]> and Jeremy Katz <[EMAIL PROTECTED]>.

collect_signal: sigqueue_free:

list_del_init(&first->list);
if (!list_empty(&q->list)) {
// not taken
}
q->flags &= ~SIGQUEUE_PREALLOC;

__sigqueue_free(first); __sigqueue_free(q);

Now, __sigqueue_free() is called twice on the same "struct sigqueue" with 
the
obviously bad implications.

In particular, this double free breaks the array_cache->avail logic, so the
same sigqueue could be "allocated" twice, and the bug can manifest itself 
via
the "impossible" BUG_ON(!SIGQUEUE_PREALLOC) in sigqueue_free/send_sigqueue.

Hopefully this can explain these mysterious bug-reports, see

http://marc.info/?t=11876692653
http://marc.info/?t=11846627305

Alexey Dobriyan reports this patch makes the difference for the testcase, 
but
nobody has an access to the application which opened the problems 
originally.

Also, this patch removes tasklist lock/unlock, ->siglock is enough.

Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
Cc: taoyue <[EMAIL PROTECTED]>
Cc: Jeremy Katz <[EMAIL PROTECTED]>
Cc: Sukadev Bhattiprolu <[EMAIL PROTECTED]>
Cc: Alexey Dobriyan <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Cc: Roland McGrath <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/signal.c |   19 +--
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index ad63109..3169bed 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1300,20 +1300,19 @@ struct sigqueue *sigqueue_alloc(void)
 void sigqueue_free(struct sigqueue *q)
 {
unsigned long flags;
+   spinlock_t *lock = ¤t->sighand->siglock;
+
BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
/*
 * If the signal is still pending remove it from the
-* pending queue.
+* pending queue. We must hold ->siglock while testing
+* q->list to serialize with collect_signal().
 */
-   if (unlikely(!list_empty(&q->list))) {
-   spinlock_t *lock = ¤t->sighand->siglock;
-   read_lock(&tasklist_lock);
-   spin_lock_irqsave(lock, flags);
-   if (!list_empty(&q->list))
-   list_del_init(&q->list);
-   spin_unlock_irqrestore(lock, flags);
-   read_unlock(&tasklist_lock);
-   }
+   spin_lock_irqsave(lock, flags);
+   if (!list_empty(&q->list))
+   list_del_init(&q->list);
+   spin_unlock_irqrestore(lock, flags);
+
q->flags &= ~SIGQUEUE_PREALLOC;
__sigqueue_free(q);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


MAINTAINERS, order NETERION alphabetically

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4a58448b0a375f7198de34dd0d3e2881afeaf025
Commit: 4a58448b0a375f7198de34dd0d3e2881afeaf025
Parent: 60693e5a9a2063b87d4dbe8029816c814b3fa84e
Author: Jiri Slaby <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:39 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

MAINTAINERS, order NETERION alphabetically

MAINTAINERS, order NETERION alphabetically

Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 MAINTAINERS |   26 +-
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 52269f1..9c54a5e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2601,6 +2601,19 @@ M:   [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 S: Maintained
 
+NETERION (S2IO) Xframe 10GbE DRIVER
+P: Ramkrishna Vepa
+M: [EMAIL PROTECTED]
+P: Rastapur Santosh
+M: [EMAIL PROTECTED]
+P: Sivakumar Subramani
+M: [EMAIL PROTECTED]
+P: Sreenivasa Honnur
+M: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
+S: Supported
+
 NETFILTER/IPTABLES/IPCHAINS
 P: Rusty Russell
 P: Marc Boucher
@@ -2741,19 +2754,6 @@ M:   [EMAIL PROTECTED]
 L: [EMAIL PROTECTED] (subscribers-only)
 S: Maintained
 
-NETERION (S2IO) Xframe 10GbE DRIVER
-P: Ramkrishna Vepa
-M: [EMAIL PROTECTED]
-P: Rastapur Santosh
-M: [EMAIL PROTECTED]
-P: Sivakumar Subramani
-M: [EMAIL PROTECTED]
-P: Sreenivasa Honnur
-M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
-W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
-S: Supported
-
 OPENCORES I2C BUS DRIVER
 P: Peter Korsgaard
 M: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


request_irq: fix DEBUG_SHIRQ handling

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59845b1ffd9121e5ef474ea5f27405fd7a83c85b
Commit: 59845b1ffd9121e5ef474ea5f27405fd7a83c85b
Parent: 2aeb3db17fc33443d21b11d7121c5627d55717c6
Author: Jarek Poplawski <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:34 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

request_irq: fix DEBUG_SHIRQ handling

Mariusz Kozlowski reported lockdep's warning:

> =
> [ INFO: inconsistent lock state ]
> 2.6.23-rc2-mm1 #7
> -
> inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
> ifconfig/5492 [HC0[0]:SC0[0]:HE1:SE1] takes:
>  (&tp->lock){+...}, at: [] rtl8139_interrupt+0x27/0x46b 
[8139too]
> {in-hardirq-W} state was registered at:
>   [] __lock_acquire+0x949/0x11ac
>   [] lock_acquire+0x99/0xb2
>   [] _spin_lock+0x35/0x42
>   [] rtl8139_interrupt+0x27/0x46b [8139too]
>   [] handle_IRQ_event+0x28/0x59
>   [] handle_level_irq+0xad/0x10b
>   [] do_IRQ+0x93/0xd0
>   [] common_interrupt+0x2e/0x34
...
> other info that might help us debug this:
> 1 lock held by ifconfig/5492:
>  #0:  (rtnl_mutex){--..}, at: [] mutex_lock+0x1c/0x1f
>
> stack backtrace:
...
>  [] _spin_lock+0x35/0x42
>  [] rtl8139_interrupt+0x27/0x46b [8139too]
>  [] free_irq+0x11b/0x146
>  [] rtl8139_close+0x8a/0x14a [8139too]
>  [] dev_close+0x57/0x74
...

This shows that a driver's irq handler was running both in hard interrupt
and process contexts with irqs enabled. The latter was done during
free_irq() call and was possible only with CONFIG_DEBUG_SHIRQ enabled.
This was fixed by another patch.

But similar problem is possible with request_irq(): any locks taken from
irq handler could be vulnerable - especially with soft interrupts. This
patch fixes it by disabling local interrupts during handler's run. (It
seems, disabling softirqs should be enough, but it needs more checking
on possible races or other special cases).

Reported-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
Signed-off-by: Jarek Poplawski <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/irq/manage.c |   11 ---
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 853aefb..7230d91 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -547,14 +547,11 @@ int request_irq(unsigned int irq, irq_handler_t handler,
 * We do this before actually registering it, to make sure that
 * a 'real' IRQ doesn't run in parallel with our fake
 */
-   if (irqflags & IRQF_DISABLED) {
-   unsigned long flags;
+   unsigned long flags;
 
-   local_irq_save(flags);
-   handler(irq, dev_id);
-   local_irq_restore(flags);
-   } else
-   handler(irq, dev_id);
+   local_irq_save(flags);
+   handler(irq, dev_id);
+   local_irq_restore(flags);
}
 #endif
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Page migration: Do not accept invalid nodes in the target nodeset

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b42d28b2a04b3c9830eb865288239d45eccc402
Commit: 3b42d28b2a04b3c9830eb865288239d45eccc402
Parent: dec4ad86c2fbea062e9ef9caa6d6e79f7c5e0b12
Author: Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 00:12:08 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

Page migration: Do not accept invalid nodes in the target nodeset

Page migration currently does not check if the target of the move contains
nodes that that are invalid (if root attempts to migrate pages)
and may try to allocate from invalid nodes if these are specified
leading to oopses.

Return -EINVAL if an offline node is specified.

Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
Cc: Shaohua Li <[EMAIL PROTECTED]>
Cc: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/mempolicy.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 172abff..bb54b88 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -955,6 +955,11 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long 
maxnode,
goto out;
}
 
+   if (!nodes_subset(new, node_online_map)) {
+   err = -EINVAL;
+   goto out;
+   }
+
err = security_task_movememory(task);
if (err)
goto out;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


hugepage: fix broken check for offset alignment in hugepage mappings

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dec4ad86c2fbea062e9ef9caa6d6e79f7c5e0b12
Commit: dec4ad86c2fbea062e9ef9caa6d6e79f7c5e0b12
Parent: 4a58448b0a375f7198de34dd0d3e2881afeaf025
Author: David Gibson <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:40 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

hugepage: fix broken check for offset alignment in hugepage mappings

For hugepage mappings, the file offset, like the address and size, needs to
be aligned to the size of a hugepage.

In commit 68589bc353037f233fe510ad9ff432338c95db66, the check for this was
moved into prepare_hugepage_range() along with the address and size checks.
 But since BenH's rework of the get_unmapped_area() paths leading up to
commit 4b1d89290b62bb2db476c94c82cf7442aab440c8, prepare_hugepage_range()
is only called for MAP_FIXED mappings, not for other mappings.  This means
we're no longer ever checking for an aligned offset - I've confirmed that
mmap() will (apparently) succeed with a misaligned offset on both powerpc
and i386 at least.

This patch restores the check, removing it from prepare_hugepage_range()
and putting it back into hugetlbfs_file_mmap().  I'm putting it there,
rather than in the get_unmapped_area() path so it only needs to go in one
place, than separately in the half-dozen or so arch-specific
implementations of hugetlb_get_unmapped_area().

Signed-off-by: David Gibson <[EMAIL PROTECTED]>
Cc: Adam Litke <[EMAIL PROTECTED]>
Cc: Andi Kleen <[EMAIL PROTECTED]>
Cc: "David S. Miller" <[EMAIL PROTECTED]>
Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/i386/mm/hugetlbpage.c|2 +-
 arch/ia64/mm/hugetlbpage.c|6 ++
 arch/sparc64/mm/hugetlbpage.c |2 +-
 fs/hugetlbfs/inode.c  |   15 ++-
 include/linux/hugetlb.h   |   10 +++---
 5 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
index efdf95a..6c06d9c 100644
--- a/arch/i386/mm/hugetlbpage.c
+++ b/arch/i386/mm/hugetlbpage.c
@@ -367,7 +367,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long 
addr,
return -ENOMEM;
 
if (flags & MAP_FIXED) {
-   if (prepare_hugepage_range(addr, len, pgoff))
+   if (prepare_hugepage_range(addr, len))
return -EINVAL;
return addr;
}
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index d22861c..a9ff685 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -75,10 +75,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long 
*addr, pte_t *ptep)
  * Don't actually need to do any preparation, but need to make sure
  * the address is in the right region.
  */
-int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t 
pgoff)
+int prepare_hugepage_range(unsigned long addr, unsigned long len)
 {
-   if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
-   return -EINVAL;
if (len & ~HPAGE_MASK)
return -EINVAL;
if (addr & ~HPAGE_MASK)
@@ -151,7 +149,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, 
unsigned long addr, u
 
/* Handle MAP_FIXED */
if (flags & MAP_FIXED) {
-   if (prepare_hugepage_range(addr, len, pgoff))
+   if (prepare_hugepage_range(addr, len))
return -EINVAL;
return addr;
}
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index eaba9b7..6cfab2e 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -175,7 +175,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long 
addr,
return -ENOMEM;
 
if (flags & MAP_FIXED) {
-   if (prepare_hugepage_range(addr, len, pgoff))
+   if (prepare_hugepage_range(addr, len))
return -EINVAL;
return addr;
}
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index c848a19..950c2fb 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -82,14 +82,19 @@ static int hugetlbfs_file_mmap(struct file *file, struct 
vm_area_struct *vma)
int ret;
 
/*
-* vma alignment has already been checked by prepare_hugepage_range.
-* If you add any error returns here, do so after setting VM_HUGETLB,
-* so is_vm_hugetlb_page tests below unmap_region go the right way
-* when do_mmap_pgoff unwinds (may be important on powerpc and ia64).
+* vma address alignment (but not the pgoff alignment) has
+* already been checked by prepare_hugepage_range.  If you add
+

libata-core: Allow translation setting to fail

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=18b2466c3050e23c98bb69bd3f35295ff8164851
Commit: 18b2466c3050e23c98bb69bd3f35295ff8164851
Parent: 2d8348b429b4ae5cc47449c787881221fe43af4b
Author: Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 8 14:28:49 2007 +0100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 03:37:55 2007 -0400

libata-core: Allow translation setting to fail

On some early drives (pre ATA1) this feature is not supported. If it
fails then we know the drive geometry is the hardware geometry and the
one we tried to set anyway so just carry on.

Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-core.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 2ad4dda..9cf46bf 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3985,6 +3985,11 @@ static unsigned int ata_dev_init_params(struct 
ata_device *dev,
tf.device |= (heads - 1) & 0x0f; /* max head = num. of heads - 1 */
 
err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
+   /* A clean abort indicates an original or just out of spec drive
+  and we should continue as we issue the setup based on the
+  drive reported working geometry */
+   if (err_mask == AC_ERR_DEV && (tf.feature & ATA_ABORTED))
+   err_mask = 0;
 
DPRINTK("EXIT, err_mask=%x\n", err_mask);
return err_mask;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ata_piix: IDE mode SATA patch for Intel Tolapai

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c5cf0ffa71d32c03607d287b76483479afb0bcd3
Commit: c5cf0ffa71d32c03607d287b76483479afb0bcd3
Parent: 18b2466c3050e23c98bb69bd3f35295ff8164851
Author: Jason Gaston <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 21:36:56 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 03:48:49 2007 -0400

ata_piix: IDE mode SATA patch for Intel Tolapai

Resend trying to remove 8-bit characters in the email.

This patch adds the Intel Tolapai IDE mode SATA controller DID's.

Signed-off-by:  Jason Gaston <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/ata_piix.c |   27 +++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 071d274..127deb8 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -130,6 +130,7 @@ enum {
ich6m_sata_ahci = 8,
ich8_sata_ahci  = 9,
piix_pata_mwdma = 10,   /* PIIX3 MWDMA only */
+   tolapai_sata_ahci   = 11,
 
/* constants for mapping table */
P0  = 0,  /* port 0 */
@@ -253,6 +254,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
{ 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
/* SATA Controller IDE (ICH9M) */
{ 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+   /* SATA Controller IDE (Tolapai) */
+   { 0x8086, 0x5028, PCI_ANY_ID, PCI_ANY_ID, 0, 0, tolapai_sata_ahci },
 
{ } /* terminate list */
 };
@@ -441,12 +444,25 @@ static const struct piix_map_db ich8_map_db = {
},
 };
 
+static const struct piix_map_db tolapai_map_db = {
+.mask = 0x3,
+.port_enable = 0x3,
+.map = {
+/* PM   PS   SM   SS   MAP */
+{  P0,  NA,  P1,  NA }, /* 00b */
+{  RV,  RV,  RV,  RV }, /* 01b */
+{  RV,  RV,  RV,  RV }, /* 10b */
+{  RV,  RV,  RV,  RV },
+},
+};
+
 static const struct piix_map_db *piix_map_db_table[] = {
[ich5_sata] = &ich5_map_db,
[ich6_sata] = &ich6_map_db,
[ich6_sata_ahci]= &ich6_map_db,
[ich6m_sata_ahci]   = &ich6m_map_db,
[ich8_sata_ahci]= &ich8_map_db,
+   [tolapai_sata_ahci] = &tolapai_map_db,
 };
 
 static struct ata_port_info piix_port_info[] = {
@@ -560,6 +576,17 @@ static struct ata_port_info piix_port_info[] = {
.mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but 
slow */
.port_ops   = &piix_pata_ops,
},
+
+   /* tolapai_sata_ahci: 11: */
+   {
+   .sht= &piix_sht,
+   .flags  = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
+ PIIX_FLAG_AHCI,
+   .pio_mask   = 0x1f, /* pio0-4 */
+   .mwdma_mask = 0x07, /* mwdma0-2 */
+   .udma_mask  = ATA_UDMA6,
+   .port_ops   = &piix_sata_ops,
+   },
 };
 
 static struct pci_bits piix_enable_bits[] = {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ata: add ATA_MWDMA* and ATA_SWDMA* defines

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=91a6d4ed333a47003f07636b3bd143521e0bbad1
Commit: 91a6d4ed333a47003f07636b3bd143521e0bbad1
Parent: c5cf0ffa71d32c03607d287b76483479afb0bcd3
Author: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 27 19:35:22 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 04:00:19 2007 -0400

ata: add ATA_MWDMA* and ATA_SWDMA* defines

Cc: Jeff Garzik <[EMAIL PROTECTED]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 include/linux/ata.h |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/linux/ata.h b/include/linux/ata.h
index 23a22df..c043c1c 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -73,6 +73,19 @@ enum {
ATA_PIO5= ATA_PIO4 | (1 << 5),
ATA_PIO6= ATA_PIO5 | (1 << 6),
 
+   ATA_SWDMA0  = (1 << 0),
+   ATA_SWDMA1  = ATA_SWDMA0 | (1 << 1),
+   ATA_SWDMA2  = ATA_SWDMA1 | (1 << 2),
+
+   ATA_SWDMA2_ONLY = (1 << 2),
+
+   ATA_MWDMA0  = (1 << 0),
+   ATA_MWDMA1  = ATA_MWDMA0 | (1 << 1),
+   ATA_MWDMA2  = ATA_MWDMA1 | (1 << 2),
+
+   ATA_MWDMA12_ONLY= (1 << 1) | (1 << 2),
+   ATA_MWDMA2_ONLY = (1 << 2),
+
ATA_UDMA0   = (1 << 0),
ATA_UDMA1   = ATA_UDMA0 | (1 << 1),
ATA_UDMA2   = ATA_UDMA1 | (1 << 2),
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ata_piix: add Satellite U200 to broken suspend list

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3cc0b9d3baeb6103d87743e4737a4b6eda30d399
Commit: 3cc0b9d3baeb6103d87743e4737a4b6eda30d399
Parent: 91a6d4ed333a47003f07636b3bd143521e0bbad1
Author: Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Sat Aug 25 08:31:02 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 04:00:19 2007 -0400

ata_piix: add Satellite U200 to broken suspend list

Satellite U200 also shares the problem.  Add it to the broken suspend
list.  Original patch from John Schember.

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
Cc: John Schember <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/ata_piix.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 127deb8..22752e4 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -935,6 +935,13 @@ static int piix_broken_suspend(void)
},
},
{
+   .ident = "Satellite U200",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+   DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U200"),
+   },
+   },
+   {
.ident = "Satellite U205",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pata_marvell: Add more identifiers

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d36ee189f392ea89de85124a0b58477bb0f2e0a6
Commit: d36ee189f392ea89de85124a0b58477bb0f2e0a6
Parent: 3cc0b9d3baeb6103d87743e4737a4b6eda30d399
Author: Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 23 20:19:55 2007 +0100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 04:00:19 2007 -0400

pata_marvell: Add more identifiers

This replaces the patch which incorrectly removed the 6145

Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/pata_marvell.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 87594c0..ae206f3 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -192,6 +192,8 @@ static int marvell_init_one (struct pci_dev *pdev, const 
struct pci_device_id *i
 
 static const struct pci_device_id marvell_pci_tbl[] = {
{ PCI_DEVICE(0x11AB, 0x6101), },
+   { PCI_DEVICE(0x11AB, 0x6121), },
+   { PCI_DEVICE(0x11AB, 0x6123), },
{ PCI_DEVICE(0x11AB, 0x6145), },
{ } /* terminate list */
 };
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sata_promise: FastTrack TX4200 is a second-generation chip

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7f9992a23190418592f0810900e4f91546ec41da
Commit: 7f9992a23190418592f0810900e4f91546ec41da
Parent: d36ee189f392ea89de85124a0b58477bb0f2e0a6
Author: Mikael Pettersson <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 10:25:37 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 04:14:44 2007 -0400

sata_promise: FastTrack TX4200 is a second-generation chip

This patch corrects sata_promise to classify FastTrack TX4200
(DID 3515/3519) as a second-generation chip. Promise's partial-
source FT TX4200 driver confirms this classification.

Treating it as a first-generation chip causes several problems:
1. Detection failures. This is a recent regression triggered by
   the hotplug-enabling changes in 2.6.23-rc1.
2. Various "failed to resume link for reset" warnings.

This patch fixes .

Thanks to Stephen Ziemba for reporting the bug and for testing the fix.

Signed-off-by: Mikael Pettersson <[EMAIL PROTECTED]>
Tested-by: Stephen Ziemba <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/sata_promise.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index d39ebc2..25698cf 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -45,7 +45,7 @@
 #include "sata_promise.h"
 
 #define DRV_NAME   "sata_promise"
-#define DRV_VERSION"2.09"
+#define DRV_VERSION"2.10"
 
 enum {
PDC_MAX_PORTS   = 4,
@@ -328,8 +328,8 @@ static const struct pci_device_id pdc_ata_pci_tbl[] = {
 
{ PCI_VDEVICE(PROMISE, 0x3318), board_20319 },
{ PCI_VDEVICE(PROMISE, 0x3319), board_20319 },
-   { PCI_VDEVICE(PROMISE, 0x3515), board_20319 },
-   { PCI_VDEVICE(PROMISE, 0x3519), board_20319 },
+   { PCI_VDEVICE(PROMISE, 0x3515), board_40518 },
+   { PCI_VDEVICE(PROMISE, 0x3519), board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3d17), board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3d18), board_40518 },
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ata_piix: implement IOCFG bit18 quirk

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43a98f05d99205687ddf74089e79a8312c8c5f90
Commit: 43a98f05d99205687ddf74089e79a8312c8c5f90
Parent: 16c55b038033d8f6f7601996dfae44399666d9ab
Author: Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 23 10:15:18 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 04:27:47 2007 -0400

ata_piix: implement IOCFG bit18 quirk

Some notebooks need bit18 of IOCFG to be cleared for the drive bay to
work even though the bit is NOOP according to the datasheet.  This
patch implement IOCFG bit18 quirk and apply it to Clevo M570U.

  http://bugzilla.kernel.org/show_bug.cgi?id=8051

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
Cc: D. Angelis <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/ata_piix.c |   36 
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 22752e4..0ff96a0 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1173,6 +1173,39 @@ static void __devinit piix_init_sata_map(struct pci_dev 
*pdev,
hpriv->map = map;
 }
 
+static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
+{
+   static struct dmi_system_id sysids[] = {
+   {
+   /* Clevo M570U sets IOCFG bit 18 if the cdrom
+* isn't used to boot the system which
+* disables the channel.
+*/
+   .ident = "M570U",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "Clevo Co."),
+   DMI_MATCH(DMI_PRODUCT_NAME, "M570U"),
+   },
+   },
+   };
+   u32 iocfg;
+
+   if (!dmi_check_system(sysids))
+   return;
+
+   /* The datasheet says that bit 18 is NOOP but certain systems
+* seem to use it to disable a channel.  Clear the bit on the
+* affected systems.
+*/
+   pci_read_config_dword(pdev, PIIX_IOCFG, &iocfg);
+   if (iocfg & (1 << 18)) {
+   dev_printk(KERN_INFO, &pdev->dev,
+  "applying IOCFG bit18 quirk\n");
+   iocfg &= ~(1 << 18);
+   pci_write_config_dword(pdev, PIIX_IOCFG, iocfg);
+   }
+}
+
 /**
  * piix_init_one - Register PIIX ATA PCI device with kernel services
  * @pdev: PCI device to register
@@ -1234,6 +1267,9 @@ static int piix_init_one (struct pci_dev *pdev, const 
struct pci_device_id *ent)
  piix_map_db_table[ent->driver_data]);
}
 
+   /* apply IOCFG bit18 quirk */
+   piix_iocfg_bit18_quirk(pdev);
+
/* On ICH5, some BIOSen disable the interrupt using the
 * PCI_COMMAND_INTX_DISABLE bit added in PCI 2.3.
 * On ICH6, this bit has the same effect, but only when
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


libata: implement BROKEN_HPA horkage and apply it to affected drives

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=16c55b038033d8f6f7601996dfae44399666d9ab
Commit: 16c55b038033d8f6f7601996dfae44399666d9ab
Parent: 7f9992a23190418592f0810900e4f91546ec41da
Author: Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:58:33 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 04:21:13 2007 -0400

libata: implement BROKEN_HPA horkage and apply it to affected drives

Some drives choke on READ_NATIVE_MAX_ADDRESS[_EXT].  Implement
ATA_HORKAGE_BROKEN_HPA and apply it to affected drives.

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-core.c |   11 ---
 include/linux/libata.h|1 +
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9cf46bf..a3ee087 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1911,8 +1911,9 @@ int ata_dev_configure(struct ata_device *dev)
dev->flags |= ATA_DFLAG_FLUSH_EXT;
}
 
-   if (ata_id_hpa_enabled(dev->id))
-   dev->n_sectors = ata_hpa_resize(dev);
+   if (!(dev->horkage & ATA_HORKAGE_BROKEN_HPA) &&
+   ata_id_hpa_enabled(dev->id))
+   dev->n_sectors = ata_hpa_resize(dev);
 
/* config NCQ */
ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc));
@@ -3795,7 +3796,11 @@ static const struct ata_blacklist_entry 
ata_device_blacklist [] = {
{ "ST9160821AS","3.CLF",ATA_HORKAGE_NONCQ, },
{ "SAMSUNG HD401LJ","ZZ100-15", ATA_HORKAGE_NONCQ, },
 
-   /* Devices with NCQ limits */
+   /* devices which puke on READ_NATIVE_MAX */
+   { "HDS724040KLSA80","KFAOA20N", ATA_HORKAGE_BROKEN_HPA, },
+   { "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA },
+   { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA },
+   { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA },
 
/* End Marker */
{ }
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 41978a5..a67bb90 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -303,6 +303,7 @@ enum {
ATA_HORKAGE_NODMA   = (1 << 1), /* DMA problems */
ATA_HORKAGE_NONCQ   = (1 << 2), /* Don't use NCQ */
ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */
+   ATA_HORKAGE_BROKEN_HPA  = (1 << 4), /* Broken HPA */
 };
 
 enum hsm_task_states {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sched: fix sleeper bonus limit

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f01d519e60a6ca1a7d9be9f2d73c5f521383992
Commit: 5f01d519e60a6ca1a7d9be9f2d73c5f521383992
Parent: b07d68b5ca4d55a16fab223d63d5fb36f89ff42f
Author: Mike Galbraith <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 12:53:24 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 12:53:24 2007 +0200

sched: fix sleeper bonus limit

There is an Amarok song switch time increase (regression) under
hefty load.

What is happening is that sleeper_bonus is never consumed, and only
rarely goes below runtime_limit, so for the most part, Amarok isn't
getting any bonus at all.  We're keeping sleeper_bonus right at
runtime_limit (sched_latency == sched_runtime_limit == 40ms) forever, ie
we don't consume if we're lower that that, and don't add if we're above
it.  One Amarok thread waking (or anybody else) will push us past the
threshold, so the next thread waking gets nada, but will reap pain from
the previous thread waking until we drop back to runtime_limit.  It
looks to me like under load, some random task gets a bonus, and
everybody else pays, whether deserving or not.

This diff fixed the regression for me at any load rate.

Signed-off-by: Mike Galbraith <[EMAIL PROTECTED]>
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index ee37718..9f53d49 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -354,7 +354,7 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity 
*curr)
delta_fair = calc_delta_fair(delta_exec, lw);
delta_mine = calc_delta_mine(delta_exec, curr->load.weight, lw);
 
-   if (cfs_rq->sleeper_bonus > sysctl_sched_latency) {
+   if (cfs_rq->sleeper_bonus > sysctl_sched_min_granularity) {
delta = min((u64)delta_mine, cfs_rq->sleeper_bonus);
delta = min(delta, (unsigned long)(
(long)sysctl_sched_runtime_limit - curr->wait_runtime));
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[libata] Bump driver versions

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2a3103ce4357a09c2289405f969acec0edf4398f
Commit: 2a3103ce4357a09c2289405f969acec0edf4398f
Parent: 43a98f05d99205687ddf74089e79a8312c8c5f90
Author: Jeff Garzik <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 04:54:06 2007 -0400
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 04:54:06 2007 -0400

[libata] Bump driver versions

Bump the versions for drivers that were modified, but had not already
had a version number bump.

Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/ata_generic.c  |2 +-
 drivers/ata/ata_piix.c |2 +-
 drivers/ata/pata_ali.c |2 +-
 drivers/ata/pata_amd.c |2 +-
 drivers/ata/pata_atiixp.c  |2 +-
 drivers/ata/pata_cs5520.c  |2 +-
 drivers/ata/pata_cs5530.c  |2 +-
 drivers/ata/pata_isapnp.c  |2 +-
 drivers/ata/pata_it821x.c  |2 +-
 drivers/ata/pata_mpc52xx.c |2 +-
 drivers/ata/pata_pcmcia.c  |2 +-
 drivers/ata/pata_pdc2027x.c|2 +-
 drivers/ata/pata_platform.c|2 +-
 drivers/ata/pata_sc1200.c  |2 +-
 drivers/ata/pata_scc.c |2 +-
 drivers/ata/pata_serverworks.c |2 +-
 drivers/ata/pata_sil680.c  |2 +-
 drivers/ata/pata_sl82c105.c|2 +-
 drivers/ata/pdc_adma.c |2 +-
 drivers/ata/sata_inic162x.c|2 +-
 drivers/ata/sata_mv.c  |2 +-
 drivers/ata/sata_nv.c  |2 +-
 drivers/ata/sata_qstor.c   |2 +-
 drivers/ata/sata_sil.c |2 +-
 drivers/ata/sata_sil24.c   |2 +-
 drivers/ata/sata_sis.c |2 +-
 drivers/ata/sata_svw.c |2 +-
 drivers/ata/sata_sx4.c |2 +-
 drivers/ata/sata_uli.c |2 +-
 drivers/ata/sata_via.c |2 +-
 drivers/ata/sata_vsc.c |2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 430fcf4..9454669 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -26,7 +26,7 @@
 #include 
 
 #define DRV_NAME "ata_generic"
-#define DRV_VERSION "0.2.12"
+#define DRV_VERSION "0.2.13"
 
 /*
  * A generic parallel ATA driver using libata
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 0ff96a0..e40c94f 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -94,7 +94,7 @@
 #include 
 
 #define DRV_NAME   "ata_piix"
-#define DRV_VERSION"2.11"
+#define DRV_VERSION"2.12"
 
 enum {
PIIX_IOCFG  = 0x54, /* IDE I/O configuration register */
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index e8a28e9..94e5edc 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -34,7 +34,7 @@
 #include 
 
 #define DRV_NAME "pata_ali"
-#define DRV_VERSION "0.7.4"
+#define DRV_VERSION "0.7.5"
 
 /*
  * Cable special cases
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index b09faca..04048fc 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -25,7 +25,7 @@
 #include 
 
 #define DRV_NAME "pata_amd"
-#define DRV_VERSION "0.3.8"
+#define DRV_VERSION "0.3.9"
 
 /**
  * timing_setup-   shared timing computation and load
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 80509be..86f85a2 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -22,7 +22,7 @@
 #include 
 
 #define DRV_NAME "pata_atiixp"
-#define DRV_VERSION "0.4.5"
+#define DRV_VERSION "0.4.6"
 
 enum {
ATIIXP_IDE_PIO_TIMING   = 0x40,
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index 7dc76e7..e245908 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -41,7 +41,7 @@
 #include 
 
 #define DRV_NAME   "pata_cs5520"
-#define DRV_VERSION"0.6.5"
+#define DRV_VERSION"0.6.6"
 
 struct pio_clocks
 {
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index 68f150a..c6066aa 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -35,7 +35,7 @@
 #include 
 
 #define DRV_NAME   "pata_cs5530"
-#define DRV_VERSION"0.7.3"
+#define DRV_VERSION"0.7.4"
 
 static void __iomem *cs5530_port_base(struct ata_port *ap)
 {
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 91a396f..9e553c5 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -17,7 +17,7 @@
 #include 
 
 #define DRV_NAME "pata_isapnp"
-#define DRV_VERSION "0.2.1"
+#define DRV_VERSION "0.2.2"
 
 static struct scsi_host_template isapnp_sht = {
.module = THIS_MODULE,
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index 7225124..ed637ae 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -80,7 +80,7 @@
 
 
 #define DRV_NAME "pata_it821x"
-#define DRV_VERSION "0.3.7"
+#define DRV_VERSION "0.3.8"
 
 stru

sched: call update_curr() in task_tick_fair()

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7109c4429af3640f79a638f177fc5d05b9807149
Commit: 7109c4429af3640f79a638f177fc5d05b9807149
Parent: f6cf891c4d7128f9f91243fc0b9ce99e10fa1586
Author: Ting Yang <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 12:53:24 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 12:53:24 2007 +0200

sched: call update_curr() in task_tick_fair()

update the fair-clock before using it for the key value.

[ [EMAIL PROTECTED]: small cleanups. ]

Signed-off-by: Ting Yang <[EMAIL PROTECTED]>
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Mike Galbraith <[EMAIL PROTECTED]>
Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 721fe77..9f06094 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1094,10 +1094,11 @@ static void task_tick_fair(struct rq *rq, struct 
task_struct *curr)
 static void task_new_fair(struct rq *rq, struct task_struct *p)
 {
struct cfs_rq *cfs_rq = task_cfs_rq(p);
-   struct sched_entity *se = &p->se;
+   struct sched_entity *se = &p->se, *curr = cfs_rq_curr(cfs_rq);
 
sched_info_queued(p);
 
+   update_curr(cfs_rq);
update_stats_enqueue(cfs_rq, se);
/*
 * Child runs first: we let it run before the parent
@@ -1105,7 +1106,7 @@ static void task_new_fair(struct rq *rq, struct 
task_struct *p)
 * it will preempt the parent:
 */
p->se.fair_key = current->se.fair_key -
-   niced_granularity(&rq->curr->se, sched_granularity(cfs_rq)) - 1;
+   niced_granularity(curr, sched_granularity(cfs_rq)) - 1;
/*
 * The first wait is dominated by the child-runs-first logic,
 * so do not credit it with that waiting time yet:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sched: make the scheduler converge to the ideal latency

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f6cf891c4d7128f9f91243fc0b9ce99e10fa1586
Commit: f6cf891c4d7128f9f91243fc0b9ce99e10fa1586
Parent: 5f01d519e60a6ca1a7d9be9f2d73c5f521383992
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 12:53:24 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 12:53:24 2007 +0200

sched: make the scheduler converge to the ideal latency

de-HZ-ification of the granularity defaults unearthed a pre-existing
property of CFS: while it correctly converges to the granularity goal,
it does not prevent run-time fluctuations in the range of
[-gran ... 0 ... +gran].

With the increase of the granularity due to the removal of HZ
dependencies, this becomes visible in chew-max output (with 5 tasks
running):

 out:  28 . 27. 32 | flu:  0 .  0 | ran:9 .   13 | per:   37 .   40
 out:  27 . 27. 32 | flu:  0 .  0 | ran:   17 .   13 | per:   44 .   40
 out:  27 . 27. 32 | flu:  0 .  0 | ran:9 .   13 | per:   36 .   40
 out:  29 . 27. 32 | flu:  2 .  0 | ran:   17 .   13 | per:   46 .   40
 out:  28 . 27. 32 | flu:  0 .  0 | ran:9 .   13 | per:   37 .   40
 out:  29 . 27. 32 | flu:  0 .  0 | ran:   18 .   13 | per:   47 .   40
 out:  28 . 27. 32 | flu:  0 .  0 | ran:9 .   13 | per:   37 .   40

average slice is the ideal 13 msecs and the period is picture-perfect 40
msecs. But the 'ran' field fluctuates around 13.33 msecs and there's no
mechanism in CFS to keep that from happening: it's a perfectly valid
solution that CFS finds.

to fix this we add a granularity/preemption rule that knows about
the "target latency", which makes tasks that run longer than the ideal
latency run a bit less. The simplest approach is to simply decrease the
preemption granularity when a task overruns its ideal latency. For this
we have to track how much the task executed since its last preemption.

( this adds a new field to task_struct, but we can eliminate that
  overhead in 2.6.24 by putting all the scheduler timestamps into an
  anonymous union. )

with this change in place, chew-max output is fluctuation-less all
around:

 out:  28 . 27. 39 | flu:  0 .  2 | ran:   13 .   13 | per:   41 .   40
 out:  28 . 27. 39 | flu:  0 .  2 | ran:   13 .   13 | per:   41 .   40
 out:  28 . 27. 39 | flu:  0 .  2 | ran:   13 .   13 | per:   41 .   40
 out:  28 . 27. 39 | flu:  0 .  2 | ran:   13 .   13 | per:   41 .   40
 out:  28 . 27. 39 | flu:  0 .  1 | ran:   13 .   13 | per:   41 .   40
 out:  28 . 27. 39 | flu:  0 .  1 | ran:   13 .   13 | per:   41 .   40

this patch has no impact on any fastpath or on any globally observable
scheduling property. (unless you have sharp enough eyes to see
millisecond-level ruckles in glxgears smoothness :-)

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
Signed-off-by: Mike Galbraith <[EMAIL PROTECTED]>
---
 include/linux/sched.h |1 +
 kernel/sched.c|1 +
 kernel/sched_fair.c   |   26 ++
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index bd6a032..f4e324e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -904,6 +904,7 @@ struct sched_entity {
 
u64 exec_start;
u64 sum_exec_runtime;
+   u64 prev_sum_exec_runtime;
u64 wait_start_fair;
u64 sleep_start_fair;
 
diff --git a/kernel/sched.c b/kernel/sched.c
index 9fe473a..b533d6d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1587,6 +1587,7 @@ static void __sched_fork(struct task_struct *p)
p->se.wait_start_fair   = 0;
p->se.exec_start= 0;
p->se.sum_exec_runtime  = 0;
+   p->se.prev_sum_exec_runtime = 0;
p->se.delta_exec= 0;
p->se.delta_fair_run= 0;
p->se.delta_fair_sleep  = 0;
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 9f53d49..721fe77 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -668,7 +668,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity 
*se, int sleep)
 /*
  * Preempt the current task with a newly woken task if needed:
  */
-static void
+static int
 __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se,
  struct sched_entity *curr, unsigned long granularity)
 {
@@ -679,8 +679,11 @@ __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct 
sched_entity *se,
 * preempt the current task unless the best task has
 * a larger than sched_granularity fairness advantage:
 */
-   if (__delta >

sched: small schedstat fix

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=213c8af67f21c1dc0d50940b159d9521c95f3c89
Commit: 213c8af67f21c1dc0d50940b159d9521c95f3c89
Parent: b77d69db9f4ba03b2ed17e383c2d73ca89f5ab14
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 12:53:24 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 12:53:24 2007 +0200

sched: small schedstat fix

small schedstat fix: the cfs_rq->wait_runtime 'sum of all runtimes'
statistics counters missed newly forked tasks and thus had a constant
negative skew. Fix this.

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
Signed-off-by: Mike Galbraith <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 0c71885..75f025d 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1121,8 +1121,10 @@ static void task_new_fair(struct rq *rq, struct 
task_struct *p)
 * The statistical average of wait_runtime is about
 * -granularity/2, so initialize the task with that:
 */
-   if (sysctl_sched_features & SCHED_FEAT_START_DEBIT)
+   if (sysctl_sched_features & SCHED_FEAT_START_DEBIT) {
p->se.wait_runtime = -(sched_granularity(cfs_rq) / 2);
+   schedstat_add(cfs_rq, wait_runtime, se->wait_runtime);
+   }
 
__enqueue_entity(cfs_rq, se);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sched: fix wait_start_fair condition in update_stats_wait_end()

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b77d69db9f4ba03b2ed17e383c2d73ca89f5ab14
Commit: b77d69db9f4ba03b2ed17e383c2d73ca89f5ab14
Parent: 7109c4429af3640f79a638f177fc5d05b9807149
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 12:53:24 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 12:53:24 2007 +0200

sched: fix wait_start_fair condition in update_stats_wait_end()

Peter Zijlstra noticed the following bug in SCHED_FEAT_SKIP_INITIAL (which
is disabled by default at the moment): it relies on se.wait_start_fair
being 0 while update_stats_wait_end() did not recognize a 0 value,
so instead of 'skipping' the initial interval we gave the new child
a maximum boost of +runtime-limit ...

(No impact on the default kernel, but nice to fix for completeness.)

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
Signed-off-by: Mike Galbraith <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 9f06094..0c71885 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -489,6 +489,9 @@ update_stats_wait_end(struct cfs_rq *cfs_rq, struct 
sched_entity *se)
 {
unsigned long delta_fair;
 
+   if (unlikely(!se->wait_start_fair))
+   return;
+
delta_fair = (unsigned long)min((u64)(2*sysctl_sched_runtime_limit),
(u64)(cfs_rq->fair_clock - se->wait_start_fair));
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sched: clean up task_new_fair()

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f508f8258e18e9333f18daf1f0860df48d49ed2
Commit: 9f508f8258e18e9333f18daf1f0860df48d49ed2
Parent: 213c8af67f21c1dc0d50940b159d9521c95f3c89
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 12:53:24 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Tue Aug 28 12:53:24 2007 +0200

sched: clean up task_new_fair()

cleanup: we have the 'se' and 'curr' entity-pointers already,
no need to use p->se and current->se.

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
Signed-off-by: Mike Galbraith <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 75f025d..ce39282 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1108,21 +1108,21 @@ static void task_new_fair(struct rq *rq, struct 
task_struct *p)
 * until it reschedules once. We set up the key so that
 * it will preempt the parent:
 */
-   p->se.fair_key = current->se.fair_key -
+   se->fair_key = curr->fair_key -
niced_granularity(curr, sched_granularity(cfs_rq)) - 1;
/*
 * The first wait is dominated by the child-runs-first logic,
 * so do not credit it with that waiting time yet:
 */
if (sysctl_sched_features & SCHED_FEAT_SKIP_INITIAL)
-   p->se.wait_start_fair = 0;
+   se->wait_start_fair = 0;
 
/*
 * The statistical average of wait_runtime is about
 * -granularity/2, so initialize the task with that:
 */
if (sysctl_sched_features & SCHED_FEAT_START_DEBIT) {
-   p->se.wait_runtime = -(sched_granularity(cfs_rq) / 2);
+   se->wait_runtime = -(sched_granularity(cfs_rq) / 2);
schedstat_add(cfs_rq, wait_runtime, se->wait_runtime);
}
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


netxen: Avoid firmware load in PCI probe

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3e2d8874e8ba92bfefede645b8be2ec6c956933
Commit: b3e2d8874e8ba92bfefede645b8be2ec6c956933
Parent: 14cc0a2b733cc1129676d8e01558bab32b138d63
Author: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 17:23:25 2007 +0530
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:57 2007 -0400

netxen: Avoid firmware load in PCI probe

Loading firmware during PCI probe can lead to incorrect initialization,
rendering the card unusable until next reboot.  This was introduced a while
ago as a workaround for firmware bug, a better workaround was submitted for
this a while ago. So removing original hack that loads firmware during 
probe.

Signed-off by: Dhananjay Phadke <[EMAIL PROTECTED]>

Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/netxen/netxen_nic_main.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_main.c 
b/drivers/net/netxen/netxen_nic_main.c
index 08a62ac..ab85fb7 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -639,10 +639,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct 
pci_device_id *ent)
NETXEN_CRB_NORMALIZE(adapter,
NETXEN_ROMUSB_GLB_PEGTUNE_DONE));
/* Handshake with the card before we register the devices. */
-   writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
-   netxen_pinit_from_rom(adapter, 0);
-   msleep(1);
-   netxen_load_firmware(adapter);
netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
}
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PS3: fix the bug that 'ifconfig down' would hang

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=14cc0a2b733cc1129676d8e01558bab32b138d63
Commit: 14cc0a2b733cc1129676d8e01558bab32b138d63
Parent: 0491d1f3fd93f838d8bfb75b12acfba39d06a4da
Author: Masakazu Mokuno <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 13:18:15 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:57 2007 -0400

PS3: fix the bug that 'ifconfig down' would hang

Fix the bug that 'ifconfig eth0 down' would hang up, reported by Stefan
Assmann <[EMAIL PROTECTED]>.
As we removed netif_poll_enable() from dev->open(), we should not use
netif_poll_disable() in dev->stop().

Signed-off-by: Masakazu Mokuno <[EMAIL PROTECTED]>
CC: Geoff Levand <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/ps3_gelic_net.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 13d1c0a..e565039 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -556,7 +556,6 @@ static int gelic_net_stop(struct net_device *netdev)
 {
struct gelic_net_card *card = netdev_priv(netdev);
 
-   netif_poll_disable(netdev);
netif_stop_queue(netdev);
 
/* turn off DMA, force end */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


IOC3: Program UART predividers.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0491d1f3fd93f838d8bfb75b12acfba39d06a4da
Commit: 0491d1f3fd93f838d8bfb75b12acfba39d06a4da
Parent: 2d8348b429b4ae5cc47449c787881221fe43af4b
Author: Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Sun Aug 26 18:51:22 2007 +0100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:57 2007 -0400

IOC3: Program UART predividers.

The IOC3 driver's UART detection bits used to rely on the the firmware
setting the UART pre-divider in a way that's apropriate for the 8250
driver which doesn't currently program this register.  This happens
to work for the console but not rarely for additional ports.

While at it, also program the UART to RS-232 PIO mode; it the UART might
have been in mac-serial and/or DMA mode though that hasn't actually been
observed in practice.

Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/ioc3-eth.c |   80 
 1 files changed, 60 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 3ca1e8e..0834ef0 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -48,6 +48,7 @@
 #ifdef CONFIG_SERIAL_8250
 #include 
 #include 
+#include 
 #endif
 
 #include 
@@ -1151,13 +1152,41 @@ static int ioc3_is_menet(struct pci_dev *pdev)
  * Also look in ip27-pci.c:pci_fixup_ioc3() for some comments on working
  * around ioc3 oddities in this respect.
  *
- * The IOC3 serials use a 22MHz clock rate with an additional divider by 3.
+ * The IOC3 serials use a 22MHz clock rate with an additional divider which
+ * can be programmed in the SCR register if the DLAB bit is set.
+ *
+ * Register to interrupt zero because we share the interrupt with
+ * the serial driver which we don't properly support yet.
+ *
+ * Can't use UPF_IOREMAP as the whole of IOC3 resources have already been
+ * registered.
  */
+static void __devinit ioc3_8250_register(struct ioc3_uartregs __iomem *uart)
+{
+#define COSMISC_CONSTANT 6
+
+   struct uart_port port = {
+   .irq= 0,
+   .flags  = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
+   .iotype = UPIO_MEM,
+   .regshift   = 0,
+   .uartclk= (2200 << 1) / COSMISC_CONSTANT,
+
+   .membase= (unsigned char __iomem *) uart,
+   .mapbase= (unsigned long) uart,
+   };
+   unsigned char lcr;
+
+   lcr = uart->iu_lcr;
+   uart->iu_lcr = lcr | UART_LCR_DLAB;
+   uart->iu_scr = COSMISC_CONSTANT,
+   uart->iu_lcr = lcr;
+   uart->iu_lcr;
+   serial8250_register_port(&port);
+}
 
 static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 
*ioc3)
 {
-   struct uart_port port;
-
/*
 * We need to recognice and treat the fourth MENET serial as it
 * does not have an SuperIO chip attached to it, therefore attempting
@@ -1171,24 +1200,35 @@ static void __devinit ioc3_serial_probe(struct pci_dev 
*pdev, struct ioc3 *ioc3)
return;
 
/*
-* Register to interrupt zero because we share the interrupt with
-* the serial driver which we don't properly support yet.
-*
-* Can't use UPF_IOREMAP as the whole of IOC3 resources have already
-* been registered.
+* Switch IOC3 to PIO mode.  It probably already was but let's be
+* paranoid
 */
-   memset(&port, 0, sizeof(port));
-   port.irq  = 0;
-   port.flags= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
-   port.iotype   = UPIO_MEM;
-   port.regshift = 0;
-   port.uartclk  = 2200 / 3;
-
-   port.membase  = (unsigned char *) &ioc3->sregs.uarta;
-   serial8250_register_port(&port);
-
-   port.membase  = (unsigned char *) &ioc3->sregs.uartb;
-   serial8250_register_port(&port);
+   ioc3->gpcr_s = GPCR_UARTA_MODESEL | GPCR_UARTB_MODESEL;
+   ioc3->gpcr_s;
+   ioc3->gppr_6 = 0;
+   ioc3->gppr_6;
+   ioc3->gppr_7 = 0;
+   ioc3->gppr_7;
+   ioc3->sscr_a = ioc3->sscr_a & ~SSCR_DMA_EN;
+   ioc3->sscr_a;
+   ioc3->sscr_b = ioc3->sscr_b & ~SSCR_DMA_EN;
+   ioc3->sscr_b;
+   /* Disable all SA/B interrupts except for SA/B_INT in SIO_IEC. */
+   ioc3->sio_iec &= ~ (SIO_IR_SA_TX_MT | SIO_IR_SA_RX_FULL |
+   SIO_IR_SA_RX_HIGH | SIO_IR_SA_RX_TIMER |
+   SIO_IR_SA_DELTA_DCD | SIO_IR_SA_DELTA_CTS |
+   SIO_IR_SA_TX_EXPLICIT | SIO_IR_SA_MEMERR);
+   ioc3->sio_iec |= SIO_IR_SA_INT;
+   ioc3->sscr_a = 0;
+   ioc3->sio_iec &= ~ (SIO_IR_SB_TX_MT | SIO_IR_SB_RX_FULL |
+   SIO_IR_SB_RX_HIGH | SIO_IR_SB_RX_TIMER |
+   SIO_IR_SB_DELTA_DCD | SIO_IR_SB_

netxen: fix crashes during module unload

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3052246c815fe17ff3a9fcb5601c6688b523e5f5
Commit: 3052246c815fe17ff3a9fcb5601c6688b523e5f5
Parent: b3e2d8874e8ba92bfefede645b8be2ec6c956933
Author: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 17:23:26 2007 +0530
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:57 2007 -0400

netxen: fix crashes during module unload

This patch fixes two problems during driver unload. The pci_disable_device()
call is before firmware reload, causing reads and writes across PCI bus 
after
disabling device. Second problem is the register window was wrong during
firmware reload

Signed-off by: Dhananjay Phadke <[EMAIL PROTECTED]>

Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/netxen/netxen_nic_hdr.h  |6 --
 drivers/net/netxen/netxen_nic_hw.c   |8 
 drivers/net/netxen/netxen_nic_main.c |   15 +++
 3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_hdr.h 
b/drivers/net/netxen/netxen_nic_hdr.h
index 3276866..d72f8f8 100644
--- a/drivers/net/netxen/netxen_nic_hdr.h
+++ b/drivers/net/netxen/netxen_nic_hdr.h
@@ -649,9 +649,11 @@ enum {
 #define PCIX_INT_VECTOR(0x10100)
 #define PCIX_INT_MASK  (0x10104)
 
-#define PCIX_MN_WINDOW (0x10200)
+#define PCIX_MN_WINDOW_F0  (0x10200)
+#define PCIX_MN_WINDOW(_f) (PCIX_MN_WINDOW_F0 + (0x20 * (_f)))
 #define PCIX_MS_WINDOW (0x10204)
-#define PCIX_SN_WINDOW (0x10208)
+#define PCIX_SN_WINDOW_F0  (0x10208)
+#define PCIX_SN_WINDOW(_f) (PCIX_SN_WINDOW_F0 + (0x20 * (_f)))
 #define PCIX_CRB_WINDOW(0x10210)
 #define PCIX_CRB_WINDOW_F0 (0x10210)
 #define PCIX_CRB_WINDOW_F1 (0x10230)
diff --git a/drivers/net/netxen/netxen_nic_hw.c 
b/drivers/net/netxen/netxen_nic_hw.c
index aac1542..a7b8d7f 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -904,11 +904,11 @@ netxen_nic_pci_set_window(struct netxen_adapter *adapter,
ddr_mn_window = window;
writel(window, PCI_OFFSET_SECOND_RANGE(adapter,
   
NETXEN_PCIX_PH_REG
-  
(PCIX_MN_WINDOW)));
+  
(PCIX_MN_WINDOW(adapter->ahw.pci_func;
/* MUST make sure window is set before we forge on... */
readl(PCI_OFFSET_SECOND_RANGE(adapter,
  NETXEN_PCIX_PH_REG
- (PCIX_MN_WINDOW)));
+ 
(PCIX_MN_WINDOW(adapter->ahw.pci_func;
}
addr -= (window * NETXEN_WINDOW_ONE);
addr += NETXEN_PCI_DDR_NET;
@@ -929,11 +929,11 @@ netxen_nic_pci_set_window(struct netxen_adapter *adapter,
writel((window << 22),
   PCI_OFFSET_SECOND_RANGE(adapter,
   NETXEN_PCIX_PH_REG
-  (PCIX_SN_WINDOW)));
+  
(PCIX_SN_WINDOW(adapter->ahw.pci_func;
/* MUST make sure window is set before we forge on... */
readl(PCI_OFFSET_SECOND_RANGE(adapter,
  NETXEN_PCIX_PH_REG
- (PCIX_SN_WINDOW)));
+ 
(PCIX_SN_WINDOW(adapter->ahw.pci_func;
}
addr -= (window * 0x40);
addr += NETXEN_PCI_QDR_NET;
diff --git a/drivers/net/netxen/netxen_nic_main.c 
b/drivers/net/netxen/netxen_nic_main.c
index ab85fb7..3122d01 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -746,9 +746,6 @@ static void __devexit netxen_nic_remove(struct pci_dev 
*pdev)
 
netxen_nic_disable_int(adapter);
 
-   if (adapter->irq)
-   free_irq(adapter->irq, adapter);
-
if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
init_firmware_done++;
netxen_free_hw_resources(adapter);
@@ -772,13 +769,8 @@ static void __devexit netxen_nic_remove(struct pci_dev 
*pdev)
}
}
 
-   if (adapter->flags & NETXEN_NIC_MSI_ENABLED)
-   pci_disable_msi(pdev);
-
vfree(adapter->cmd_buf_arr);
 
-   pci_disable_device(pdev);
-
if (adapter->portnum == 0) {
if (init_firmware_done) {
i = 100;
@@ -829,12 +821,19 @@ static void __devexit netxen_nic_rem

qeth: ungrouping a device must not be interruptible

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0a34f98d1da66a5b4e02171854e6c04c9916016
Commit: d0a34f98d1da66a5b4e02171854e6c04c9916016
Parent: 3052246c815fe17ff3a9fcb5601c6688b523e5f5
Author: Ursula Braun <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:26:52 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:57 2007 -0400

qeth: ungrouping a device must not be interruptible

Problem:
A recovery thread must not be active when device is removed.
In qeth_remove_device() an interruptible wait operation is used
to wait until a qeth recovery thread is finished. If a user really
interrupts the ungroup operation of a qeth device while a recovery
is running, cio and qeth are out of sync (device already removed
from cio, but kept in qeth). A following module unload of qeth
results in a kernel OOPS here.

Solution:
Do not allow interruption of ungroup operation to guarantee
finishing of a potentially running qeth recovery thread.

Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/s390/net/qeth_main.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 57f6943..ba10d42 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -561,7 +561,7 @@ qeth_set_offline(struct ccwgroup_device *cgdev)
 }
 
 static int
-qeth_wait_for_threads(struct qeth_card *card, unsigned long threads);
+qeth_threads_running(struct qeth_card *card, unsigned long threads);
 
 
 static void
@@ -576,8 +576,7 @@ qeth_remove_device(struct ccwgroup_device *cgdev)
if (!card)
return;
 
-   if (qeth_wait_for_threads(card, 0x))
-   return;
+   wait_event(card->wait_q, qeth_threads_running(card, 0x) == 0);
 
if (cgdev->state == CCWGROUP_ONLINE){
card->use_hard_stop = 1;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


qeth: dont return the return values of void functions.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ecee51b755335d3ff254199fc1a2775ea451eecf
Commit: ecee51b755335d3ff254199fc1a2775ea451eecf
Parent: cde46035161d677617983177e877c87d89fbb5e1
Author: Heiko Carstens <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:26:54 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:58 2007 -0400

qeth: dont return the return values of void functions.

Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]>
Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/s390/net/qeth.h |4 ++--
 drivers/s390/net/qeth_sys.c |8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index ec18bae..6d49598 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -1178,9 +1178,9 @@ qeth_ipaddr_to_string(enum qeth_prot_versions proto, 
const __u8 *addr,
  char *buf)
 {
if (proto == QETH_PROT_IPV4)
-   return qeth_ipaddr4_to_string(addr, buf);
+   qeth_ipaddr4_to_string(addr, buf);
else if (proto == QETH_PROT_IPV6)
-   return qeth_ipaddr6_to_string(addr, buf);
+   qeth_ipaddr6_to_string(addr, buf);
 }
 
 static inline int
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c
index bb0287a..2cc3f3a 100644
--- a/drivers/s390/net/qeth_sys.c
+++ b/drivers/s390/net/qeth_sys.c
@@ -1760,10 +1760,10 @@ qeth_remove_device_attributes(struct device *dev)
 {
struct qeth_card *card = dev->driver_data;
 
-   if (card->info.type == QETH_CARD_TYPE_OSN)
-   return sysfs_remove_group(&dev->kobj,
- &qeth_osn_device_attr_group);
-
+   if (card->info.type == QETH_CARD_TYPE_OSN) {
+   sysfs_remove_group(&dev->kobj, &qeth_osn_device_attr_group);
+   return;
+   }
sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


qeth: enforce a rate limit for inbound scatter gather messages

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cde46035161d677617983177e877c87d89fbb5e1
Commit: cde46035161d677617983177e877c87d89fbb5e1
Parent: d0a34f98d1da66a5b4e02171854e6c04c9916016
Author: Frank Blaschka <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:26:53 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:57 2007 -0400

qeth: enforce a rate limit for inbound scatter gather messages

under memory pressure scatter gather mode switching messages must be
rate limited.

Signed-off-by: Frank Blaschka <[EMAIL PROTECTED]>
Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/s390/net/qeth_main.c |   13 -
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index ba10d42..610d27c 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -2803,13 +2803,16 @@ qeth_queue_input_buffer(struct qeth_card *card, int 
index)
if (newcount < count) {
/* we are in memory shortage so we switch back to
   traditional skb allocation and drop packages */
-   if (atomic_cmpxchg(&card->force_alloc_skb, 0, 1))
-   printk(KERN_WARNING
-   "qeth: switch to alloc skb\n");
+   if (!atomic_read(&card->force_alloc_skb) &&
+   net_ratelimit())
+   PRINT_WARN("Switch to alloc skb\n");
+   atomic_set(&card->force_alloc_skb, 3);
count = newcount;
} else {
-   if (atomic_cmpxchg(&card->force_alloc_skb, 1, 0))
-   printk(KERN_WARNING "qeth: switch to sg\n");
+   if ((atomic_read(&card->force_alloc_skb) == 1) &&
+   net_ratelimit())
+   PRINT_WARN("Switch to sg\n");
+   atomic_add_unless(&card->force_alloc_skb, -1, 0);
}
 
/*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


qeth: Announce tx checksumming for qeth devices in TSO/EDDP mode

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a4b61a95a9b742d8a966950d23f386c34a733f2
Commit: 5a4b61a95a9b742d8a966950d23f386c34a733f2
Parent: ecee51b755335d3ff254199fc1a2775ea451eecf
Author: Frank Blaschka <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:26:55 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:58 2007 -0400

qeth: Announce tx checksumming for qeth devices in TSO/EDDP mode

TSO requires tx checksumming. For non GSO frames in TSO/EDDP mode we
have to manually calculate the checksum.

Signed-off-by: Frank Blaschka <[EMAIL PROTECTED]>
Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/s390/net/qeth_main.c |   82 ++---
 1 files changed, 68 insertions(+), 14 deletions(-)

diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 610d27c..443cde1 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -4555,6 +4555,53 @@ qeth_get_elements_no(struct qeth_card *card, void *hdr,
 return elements_needed;
 }
 
+static void qeth_tx_csum(struct sk_buff *skb)
+{
+   int tlen;
+
+   if (skb->protocol == htons(ETH_P_IP)) {
+   tlen = ntohs(ip_hdr(skb)->tot_len) - (ip_hdr(skb)->ihl << 2);
+   switch (ip_hdr(skb)->protocol) {
+   case IPPROTO_TCP:
+   tcp_hdr(skb)->check = 0;
+   tcp_hdr(skb)->check = csum_tcpudp_magic(
+   ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
+   tlen, ip_hdr(skb)->protocol,
+   skb_checksum(skb, skb_transport_offset(skb),
+   tlen, 0));
+   break;
+   case IPPROTO_UDP:
+   udp_hdr(skb)->check = 0;
+   udp_hdr(skb)->check = csum_tcpudp_magic(
+   ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
+   tlen, ip_hdr(skb)->protocol,
+   skb_checksum(skb, skb_transport_offset(skb),
+   tlen, 0));
+   break;
+   }
+   } else if (skb->protocol == htons(ETH_P_IPV6)) {
+   switch (ipv6_hdr(skb)->nexthdr) {
+   case IPPROTO_TCP:
+   tcp_hdr(skb)->check = 0;
+   tcp_hdr(skb)->check = csum_ipv6_magic(
+   &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
+   ipv6_hdr(skb)->payload_len,
+   ipv6_hdr(skb)->nexthdr,
+   skb_checksum(skb, skb_transport_offset(skb),
+   ipv6_hdr(skb)->payload_len, 0));
+   break;
+   case IPPROTO_UDP:
+   udp_hdr(skb)->check = 0;
+   udp_hdr(skb)->check = csum_ipv6_magic(
+   &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
+   ipv6_hdr(skb)->payload_len,
+   ipv6_hdr(skb)->nexthdr,
+   skb_checksum(skb, skb_transport_offset(skb),
+   ipv6_hdr(skb)->payload_len, 0));
+   break;
+   }
+   }
+}
 
 static int
 qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
@@ -4640,6 +4687,10 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff 
*skb)
elements_needed += elems;
}
 
+   if ((large_send == QETH_LARGE_SEND_NO) &&
+   (skb->ip_summed == CHECKSUM_PARTIAL))
+   qeth_tx_csum(new_skb);
+
if (card->info.type != QETH_CARD_TYPE_IQD)
rc = qeth_do_send_packet(card, queue, new_skb, hdr,
 elements_needed, ctx);
@@ -6387,20 +6438,18 @@ qeth_deregister_addr_entry(struct qeth_card *card, 
struct qeth_ipaddr *addr)
 static u32
 qeth_ethtool_get_tx_csum(struct net_device *dev)
 {
-   /* We may need to say that we support tx csum offload if
-* we do EDDP or TSO. There are discussions going on to
-* enforce rules in the stack and in ethtool that make
-* SG and TSO depend on HW_CSUM. At the moment there are
-* no such rules
-* If we say yes here, we have to checksum outbound packets
-* any time. */
-   return 0;
+   return (dev->features & NETIF_F_HW_CSUM) != 0;
 }
 
 static int
 qeth_ethtool_set_tx_csum(struct net_device *dev, u32 data)
 {
-   return -EINVAL;
+   if (data)
+   dev->features |= NETIF_F_HW_CSUM;
+   else
+   dev->features &= ~NETIF_F_HW_CSUM;
+
+   return 0;
 }
 
 static u32
@@ -7414,7 +7463,8 @@ qeth_start_ipa_tso(struc

qeth: crash during reboot after failing online setting

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6d4f3d182b1c6074b84feaadd84a0957059a5940
Commit: 6d4f3d182b1c6074b84feaadd84a0957059a5940
Parent: 5a4b61a95a9b742d8a966950d23f386c34a733f2
Author: Ursula Braun <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:26:56 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:58 2007 -0400

qeth: crash during reboot after failing online setting

Online setting of a qeth device may fail for instance because of:
- out-of-memory condition when allocating qdio queues
- IDX ACTIVATE problem
- ...
Such a device is still returned in a driver_for_each_device loop
processed in qeth_reboot_event(), which calls
qeth_clear_qdio_buffers(). Make sure qeth_clear_output_buffer() is
called only, if the qdio queues have been successfully allocated
during initialization of a qeth device.

Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/s390/net/qeth_main.c |   20 +---
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 443cde1..45a8b9f 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -3356,10 +3356,12 @@ out_freeoutq:
while (i > 0)
kfree(card->qdio.out_qs[--i]);
kfree(card->qdio.out_qs);
+   card->qdio.out_qs = NULL;
 out_freepool:
qeth_free_buffer_pool(card);
 out_freeinq:
kfree(card->qdio.in_q);
+   card->qdio.in_q = NULL;
 out_nomem:
atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED);
return -ENOMEM;
@@ -3375,16 +3377,20 @@ qeth_free_qdio_buffers(struct qeth_card *card)
QETH_QDIO_UNINITIALIZED)
return;
kfree(card->qdio.in_q);
+   card->qdio.in_q = NULL;
/* inbound buffer pool */
qeth_free_buffer_pool(card);
/* free outbound qdio_qs */
-   for (i = 0; i < card->qdio.no_out_queues; ++i){
-   for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
-   qeth_clear_output_buffer(card->qdio.out_qs[i],
-   &card->qdio.out_qs[i]->bufs[j]);
-   kfree(card->qdio.out_qs[i]);
+   if (card->qdio.out_qs) {
+   for (i = 0; i < card->qdio.no_out_queues; ++i) {
+   for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
+   qeth_clear_output_buffer(card->qdio.out_qs[i],
+   &card->qdio.out_qs[i]->bufs[j]);
+   kfree(card->qdio.out_qs[i]);
+   }
+   kfree(card->qdio.out_qs);
+   card->qdio.out_qs = NULL;
}
-   kfree(card->qdio.out_qs);
 }
 
 static void
@@ -3395,7 +3401,7 @@ qeth_clear_qdio_buffers(struct qeth_card *card)
QETH_DBF_TEXT(trace, 2, "clearqdbf");
/* clear outbound buffers to free skbs */
for (i = 0; i < card->qdio.no_out_queues; ++i)
-   if (card->qdio.out_qs[i]){
+   if (card->qdio.out_qs && card->qdio.out_qs[i]) {
for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
qeth_clear_output_buffer(card->qdio.out_qs[i],
&card->qdio.out_qs[i]->bufs[j]);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


qeth: Drop ARP packages on HiperSockets interface with NOARP attribute.

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=54d0f56e63edb1aa3901ea6389bf7ea5d43d0c22
Commit: 54d0f56e63edb1aa3901ea6389bf7ea5d43d0c22
Parent: 6e55cab9f004e6e7a9ab5d7b27fb705ed0de838e
Author: Klaus D. Wacker <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:26:58 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:58 2007 -0400

qeth: Drop ARP packages on HiperSockets interface with NOARP attribute.

A network interface can get ARP packets even when the interface has
NOARP specified. In a HiperSockets environment this disturbs receiving
systems when packets are sent on the multicast queue. (E.g. TCP/IP on
z/VM issues messages reporting invalid data on the HiperSockets
interface.)
Qeth will no longer send ARP packets on HiperSockets interface when
interface has the NOARP attribute.

Signed-off-by: Klaus D. Wacker <[EMAIL PROTECTED]>
Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/s390/net/qeth_main.c |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 617fbfd..f3e6fbe 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -2505,7 +2505,7 @@ qeth_rebuild_skb_fake_ll_tr(struct qeth_card *card, 
struct sk_buff *skb,
struct iphdr *ip_hdr;
 
QETH_DBF_TEXT(trace,5,"skbfktr");
-   skb_set_mac_header(skb, -QETH_FAKE_LL_LEN_TR);
+   skb_set_mac_header(skb, (int)-QETH_FAKE_LL_LEN_TR);
/* this is a fake ethernet header */
fake_hdr = tr_hdr(skb);
 
@@ -4710,9 +4710,15 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff 
*skb)
if (card->info.type != QETH_CARD_TYPE_IQD)
rc = qeth_do_send_packet(card, queue, new_skb, hdr,
 elements_needed, ctx);
-   else
+   else {
+   if ((skb->protocol == htons(ETH_P_ARP)) &&
+   (card->dev->flags & IFF_NOARP)) {
+   __qeth_free_new_skb(skb, new_skb);
+   return -EPERM;
+   }
rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr,
  elements_needed, ctx);
+   }
if (!rc) {
card->stats.tx_packets++;
card->stats.tx_bytes += tx_bytes;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


qeth: provide specific message for OSA-adapters exclusively used

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6e55cab9f004e6e7a9ab5d7b27fb705ed0de838e
Commit: 6e55cab9f004e6e7a9ab5d7b27fb705ed0de838e
Parent: 6d4f3d182b1c6074b84feaadd84a0957059a5940
Author: Ursula Braun <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:26:57 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:58 2007 -0400

qeth: provide specific message for OSA-adapters exclusively used

Exclusive usage of OSA-cards has been introduced. Even though Linux
does not make use of it, qeth should be prepared to receive a bad RC
for some initialization steps. A meaningful message is now given,
if an OSA-device is set online, even though the OSA-adapter is already
exclusively used by another host.

Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/s390/net/qeth_main.c |   28 +++-
 drivers/s390/net/qeth_mpc.h  |1 +
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 45a8b9f..617fbfd 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1541,16 +1541,21 @@ qeth_idx_write_cb(struct qeth_channel *channel, struct 
qeth_cmd_buffer *iob)
card = CARD_FROM_CDEV(channel->ccwdev);
 
if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
-   PRINT_ERR("IDX_ACTIVATE on write channel device %s: negative "
- "reply\n", CARD_WDEV_ID(card));
+   if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
+   PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
+   "adapter exclusively used by another host\n",
+   CARD_WDEV_ID(card));
+   else
+   PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
+   "negative reply\n", CARD_WDEV_ID(card));
goto out;
}
memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
if ((temp & ~0x0100) != qeth_peer_func_level(card->info.func_level)) {
PRINT_WARN("IDX_ACTIVATE on write channel device %s: "
-  "function level mismatch "
-  "(sent: 0x%x, received: 0x%x)\n",
-  CARD_WDEV_ID(card), card->info.func_level, temp);
+   "function level mismatch "
+   "(sent: 0x%x, received: 0x%x)\n",
+   CARD_WDEV_ID(card), card->info.func_level, temp);
goto out;
}
channel->state = CH_STATE_UP;
@@ -1596,8 +1601,13 @@ qeth_idx_read_cb(struct qeth_channel *channel, struct 
qeth_cmd_buffer *iob)
goto out;
}
if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
-   PRINT_ERR("IDX_ACTIVATE on read channel device %s: negative "
- "reply\n", CARD_RDEV_ID(card));
+   if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
+   PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
+   "adapter exclusively used by another host\n",
+   CARD_RDEV_ID(card));
+   else
+   PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
+   "negative reply\n", CARD_RDEV_ID(card));
goto out;
}
 
@@ -1612,8 +1622,8 @@ qeth_idx_read_cb(struct qeth_channel *channel, struct 
qeth_cmd_buffer *iob)
memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
if (temp != qeth_peer_func_level(card->info.func_level)) {
PRINT_WARN("IDX_ACTIVATE on read channel device %s: function "
-  "level mismatch (sent: 0x%x, received: 0x%x)\n",
-  CARD_RDEV_ID(card), card->info.func_level, temp);
+   "level mismatch (sent: 0x%x, received: 0x%x)\n",
+   CARD_RDEV_ID(card), card->info.func_level, temp);
goto out;
}
memcpy(&card->token.issuer_rm_r,
diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h
index 1d8083c..6de2da5 100644
--- a/drivers/s390/net/qeth_mpc.h
+++ b/drivers/s390/net/qeth_mpc.h
@@ -565,6 +565,7 @@ extern unsigned char IDX_ACTIVATE_WRITE[];
 #define QETH_IDX_ACT_QDIO_DEV_REALADDR(buffer) (buffer+0x20)
 #define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08]&3)==2)
 #define QETH_IDX_REPLY_LEVEL(buffer) (buffer+0x12)
+#define QETH_IDX_ACT_CAUSE_CODE(buffer) (buffer)[0x09]
 
 #define PDU_ENCAPSULATION(buffer) \
(buffer + *(buffer + (*(buffer+0x0b)) + \
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


cxgb3 - Fix dev->priv usage

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5fbf816fe7d72bfdbf22bfec05b4ec3aa6849f72
Commit: 5fbf816fe7d72bfdbf22bfec05b4ec3aa6849f72
Parent: 54d0f56e63edb1aa3901ea6389bf7ea5d43d0c22
Author: Divy Le Ray <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 19:15:47 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 07:29:08 2007 -0400

cxgb3 - Fix dev->priv usage

cxgb3 used netdev_priv() and dev->priv for different purposes.
In 2.6.23, netdev_priv() == dev->priv, cxgb3 needs a fix.
This patch is a partial backport of Dave Miller's changes in the
net-2.6.24 git branch.

Without this fix, cxgb3 crashes on 2.6.23.

Signed-off-by: Divy Le Ray <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/cxgb3/cxio_hal.c |2 +-
 drivers/net/cxgb3/adapter.h|2 +
 drivers/net/cxgb3/cxgb3_main.c |  126 ++--
 drivers/net/cxgb3/cxgb3_offload.c  |   16 +++-
 drivers/net/cxgb3/cxgb3_offload.h  |2 +
 drivers/net/cxgb3/sge.c|   23 --
 drivers/net/cxgb3/t3cdev.h |3 -
 7 files changed, 105 insertions(+), 69 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c 
b/drivers/infiniband/hw/cxgb3/cxio_hal.c
index 1518b41..beb2a38 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
+++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
@@ -916,7 +916,7 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p)
PDBG("%s opening rnic dev %s\n", __FUNCTION__, rdev_p->dev_name);
memset(&rdev_p->ctrl_qp, 0, sizeof(rdev_p->ctrl_qp));
if (!rdev_p->t3cdev_p)
-   rdev_p->t3cdev_p = T3CDEV(netdev_p);
+   rdev_p->t3cdev_p = dev2t3cdev(netdev_p);
rdev_p->t3cdev_p->ulp = (void *) rdev_p;
err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_GET_PARAMS,
 &(rdev_p->rnic_info));
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h
index ab72563..20e887d 100644
--- a/drivers/net/cxgb3/adapter.h
+++ b/drivers/net/cxgb3/adapter.h
@@ -50,7 +50,9 @@ typedef irqreturn_t(*intr_handler_t) (int, void *);
 
 struct vlan_group;
 
+struct adapter;
 struct port_info {
+   struct adapter *adapter;
struct vlan_group *vlan_grp;
const struct port_type_info *port_type;
u8 port_id;
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index dc5d269..f3bf128 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -358,11 +358,14 @@ static int init_dummy_netdevs(struct adapter *adap)
 
for (j = 0; j < pi->nqsets - 1; j++) {
if (!adap->dummy_netdev[dummy_idx]) {
-   nd = alloc_netdev(0, "", ether_setup);
+   struct port_info *p;
+
+   nd = alloc_netdev(sizeof(*p), "", ether_setup);
if (!nd)
goto free_all;
 
-   nd->priv = adap;
+   p = netdev_priv(nd);
+   p->adapter = adap;
nd->weight = 64;
set_bit(__LINK_STATE_START, &nd->state);
adap->dummy_netdev[dummy_idx] = nd;
@@ -482,7 +485,8 @@ static ssize_t attr_store(struct device *d, struct 
device_attribute *attr,
 #define CXGB3_SHOW(name, val_expr) \
 static ssize_t format_##name(struct net_device *dev, char *buf) \
 { \
-   struct adapter *adap = dev->priv; \
+   struct port_info *pi = netdev_priv(dev); \
+   struct adapter *adap = pi->adapter; \
return sprintf(buf, "%u\n", val_expr); \
 } \
 static ssize_t show_##name(struct device *d, struct device_attribute *attr, \
@@ -493,7 +497,8 @@ static ssize_t show_##name(struct device *d, struct 
device_attribute *attr, \
 
 static ssize_t set_nfilters(struct net_device *dev, unsigned int val)
 {
-   struct adapter *adap = dev->priv;
+   struct port_info *pi = netdev_priv(dev);
+   struct adapter *adap = pi->adapter;
int min_tids = is_offload(adap) ? MC5_MIN_TIDS : 0;
 
if (adap->flags & FULL_INIT_DONE)
@@ -515,7 +520,8 @@ static ssize_t store_nfilters(struct device *d, struct 
device_attribute *attr,
 
 static ssize_t set_nservers(struct net_device *dev, unsigned int val)
 {
-   struct adapter *adap = dev->priv;
+   struct port_info *pi = netdev_priv(dev);
+   struct adapter *adap = pi->adapter;
 
if (adap->flags & FULL_INIT_DONE)
return -EBUSY;
@@ -556,9 +562,10 @@ static struct attribute_group cxgb3_attr_group = {.attrs = 
cxgb3_attrs };
 static ssize_t tm_attr_show(struct device *d, struct device_attribute *attr,
char *buf, int sched)
 {
-   ssize_t 

- cxgb3 engine microcode load

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=47330077650a25d417155848516b2cba97999602
Commit: 47330077650a25d417155848516b2cba97999602
Parent: 5fbf816fe7d72bfdbf22bfec05b4ec3aa6849f72
Author: Divy Le Ray <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 19:15:52 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 07:29:08 2007 -0400

- cxgb3 engine microcode load

Load the engine microcode when an interface
is brought up, instead of of doing it when the module
is loaded.
Loosen up tight binding between the driver and the
engine microcode version.
There is no need for microcode update with T3A boards.
Fix the file naming.
Do a better job at logging the loading activity.

Signed-off-by: Divy Le Ray <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/cxgb3/common.h |3 +-
 drivers/net/cxgb3/cxgb3_main.c |  126 +--
 drivers/net/cxgb3/t3_hw.c  |   46 +--
 3 files changed, 123 insertions(+), 52 deletions(-)

diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
index 1637800..2129210 100644
--- a/drivers/net/cxgb3/common.h
+++ b/drivers/net/cxgb3/common.h
@@ -679,7 +679,8 @@ const struct adapter_info *t3_get_adapter_info(unsigned int 
board_id);
 int t3_seeprom_read(struct adapter *adapter, u32 addr, u32 *data);
 int t3_seeprom_write(struct adapter *adapter, u32 addr, u32 data);
 int t3_seeprom_wp(struct adapter *adapter, int enable);
-int t3_check_tpsram_version(struct adapter *adapter);
+int t3_get_tp_version(struct adapter *adapter, u32 *vers);
+int t3_check_tpsram_version(struct adapter *adapter, int *must_load);
 int t3_check_tpsram(struct adapter *adapter, u8 *tp_ram, unsigned int size);
 int t3_set_proto_sram(struct adapter *adap, u8 *data);
 int t3_read_flash(struct adapter *adapter, unsigned int addr,
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index f3bf128..5ab319c 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -729,6 +729,7 @@ static void bind_qsets(struct adapter *adap)
 }
 
 #define FW_FNAME "t3fw-%d.%d.%d.bin"
+#define TPSRAM_NAME "t3%c_protocol_sram-%d.%d.%d.bin"
 
 static int upgrade_fw(struct adapter *adap)
 {
@@ -747,6 +748,71 @@ static int upgrade_fw(struct adapter *adap)
}
ret = t3_load_fw(adap, fw->data, fw->size);
release_firmware(fw);
+
+   if (ret == 0)
+   dev_info(dev, "successful upgrade to firmware %d.%d.%d\n",
+FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_MICRO);
+   else
+   dev_err(dev, "failed to upgrade to firmware %d.%d.%d\n",
+   FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_MICRO);
+   
+   return ret;
+}
+
+static inline char t3rev2char(struct adapter *adapter)
+{
+   char rev = 0;
+
+   switch(adapter->params.rev) {
+   case T3_REV_B:
+   case T3_REV_B2:
+   rev = 'b';
+   break;
+   }
+   return rev;
+}
+
+int update_tpsram(struct adapter *adap)
+{
+   const struct firmware *tpsram;
+   char buf[64];
+   struct device *dev = &adap->pdev->dev;
+   int ret;
+   char rev;
+   
+   rev = t3rev2char(adap);
+   if (!rev)
+   return 0;
+
+   snprintf(buf, sizeof(buf), TPSRAM_NAME, rev,
+TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO);
+
+   ret = request_firmware(&tpsram, buf, dev);
+   if (ret < 0) {
+   dev_err(dev, "could not load TP SRAM: unable to load %s\n",
+   buf);
+   return ret;
+   }
+   
+   ret = t3_check_tpsram(adap, tpsram->data, tpsram->size);
+   if (ret)
+   goto release_tpsram;
+
+   ret = t3_set_proto_sram(adap, tpsram->data);
+   if (ret == 0)
+   dev_info(dev,
+"successful update of protocol engine "
+"to %d.%d.%d\n",
+TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO);
+   else
+   dev_err(dev, "failed to update of protocol engine %d.%d.%d\n",
+   TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO);
+   if (ret)
+   dev_err(dev, "loading protocol SRAM failed\n");
+
+release_tpsram:
+   release_firmware(tpsram);
+   
return ret;
 }
 
@@ -763,6 +829,7 @@ static int upgrade_fw(struct adapter *adap)
 static int cxgb_up(struct adapter *adap)
 {
int err = 0;
+   int must_load;
 
if (!(adap->flags & FULL_INIT_DONE)) {
err = t3_check_fw_version(adap);
@@ -771,6 +838,13 @@ static int cxgb_up(struct adapter *adap)
if (err)
goto out;
 
+   err = t3_check_tpsram_version(adap, &must_load);
+   if (err

Do not use the ia64 clocksource on non-ia64 architectures

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b2b64fd311c92f2137eb7cee7025794cd854057
Commit: 3b2b64fd311c92f2137eb7cee7025794cd854057
Parent: 618a821dc24a4018b0c5c01785d052459a90edb4
Author: Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 20:13:57 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 20:14:22 2007 -0700

Do not use the ia64 clocksource on non-ia64 architectures

The HPET clocksource in drivers/char/hpet.c was written as generic code
for ia64, but it is not yet ready to replace the native HPET clocksource
implementations that the i386/x86-64 architectures use.

On x86[-64], trying to register this clocksource results in potentially
multiple hpet-based clocksources being registered, and if the ia64 one
is chosen on x86_64 some users have experienced hangs.

Eventually all three architectures may end up using the same code, but
that is not the case right now.

Cc: John Stultz <[EMAIL PROTECTED]>
Cc: Tony Luck <[EMAIL PROTECTED]>
Cc: Paolo Ornati <[EMAIL PROTECTED]>
Cc: Bob Picco <[EMAIL PROTECTED]>
Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Cc: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/hpet.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 77bf4aa..7ecffc9 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -909,6 +909,8 @@ int hpet_alloc(struct hpet_data *hdp)
 
hpetp->hp_delta = hpet_calibrate(hpetp);
 
+/* This clocksource driver currently only works on ia64 */
+#ifdef CONFIG_IA64
if (!hpet_clocksource) {
hpet_mctr = (void __iomem *)&hpetp->hp_hpet->hpet_mc;
CLKSRC_FSYS_MMIO_SET(clocksource_hpet.fsys_mmio, hpet_mctr);
@@ -918,6 +920,7 @@ int hpet_alloc(struct hpet_data *hdp)
hpetp->hp_clocksource = &clocksource_hpet;
hpet_clocksource = &clocksource_hpet;
}
+#endif
 
return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


x86: be even more careful about checking the stack frame on dumping

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36ad4885c47c2187822f2783fb46fde2d36bf200
Commit: 36ad4885c47c2187822f2783fb46fde2d36bf200
Parent: 3b2b64fd311c92f2137eb7cee7025794cd854057
Author: Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 20:18:51 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 20:18:51 2007 -0700

x86: be even more careful about checking the stack frame on dumping

lguest didn't initialize the kernel stack the way a real i386 kernel
does, and ended up triggering a corner-case in the stack frame checking
that doesn't happen on naive i386, and that the stack dumping didn't
handle quite right.

This makes the frame handling more correct, and tries to clarify the
code at the same time so that it's a bit more obvious what is going on.

Thanks to Rusty Russell for debugging the lguest failure-

Cc: Rusty Russell <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/i386/kernel/traps.c |   33 +
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index cfffe3d..47b0bef 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -100,36 +100,45 @@ asmlinkage void machine_check(void);
 int kstack_depth_to_print = 24;
 static unsigned int code_bytes = 64;
 
-static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
+static inline int valid_stack_ptr(struct thread_info *tinfo, void *p, unsigned 
size)
 {
return  p > (void *)tinfo &&
-   p < (void *)tinfo + THREAD_SIZE - 3;
+   p <= (void *)tinfo + THREAD_SIZE - size;
 }
 
+/* The form of the top of the frame on the stack */
+struct stack_frame {
+   struct stack_frame *next_frame;
+   unsigned long return_address;
+};
+
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
unsigned long *stack, unsigned long ebp,
struct stacktrace_ops *ops, void *data)
 {
-   unsigned long addr;
-
 #ifdef CONFIG_FRAME_POINTER
-   while (valid_stack_ptr(tinfo, (void *)ebp)) {
-   unsigned long new_ebp;
-   addr = *(unsigned long *)(ebp + 4);
+   struct stack_frame *frame = (struct stack_frame *)ebp;
+   while (valid_stack_ptr(tinfo, frame, sizeof(*frame))) {
+   struct stack_frame *next;
+   unsigned long addr;
+
+   addr = frame->return_address;
ops->address(data, addr);
/*
 * break out of recursive entries (such as
 * end_of_stack_stop_unwind_function). Also,
 * we can never allow a frame pointer to
 * move downwards!
-*/
-   new_ebp = *(unsigned long *)ebp;
-   if (new_ebp <= ebp)
+*/
+   next = frame->next_frame;
+   if (next <= frame)
break;
-   ebp = new_ebp;
+   frame = next;
}
 #else
-   while (valid_stack_ptr(tinfo, stack)) {
+   while (valid_stack_ptr(tinfo, stack, sizeof(*stack))) {
+   unsigned long addr;
+
addr = *stack++;
if (__kernel_text_address(addr))
ops->address(data, addr);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


NFS: Fix the mount regression

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e89a5a43b95cdc4305b7c8e8121a380f02476636
Commit: e89a5a43b95cdc4305b7c8e8121a380f02476636
Parent: 36ad4885c47c2187822f2783fb46fde2d36bf200
Author: Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 10:45:17 2007 -0400
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 20:26:45 2007 -0700

NFS: Fix the mount regression

This avoids the recent NFS mount regression (returning EBUSY when
mounting the same filesystem twice with different parameters).

The best I can do given the constraints appears to be to have the kernel
first look for a superblock that matches both the fsid and the
user-specified mount options, and then spawn off a new superblock if
that search fails.

Note that this is not the same as specifying nosharecache everywhere
since nosharecache will never attempt to match an existing superblock.

Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
Tested-by: Hua Zhong <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/nfs/super.c |  110 ---
 1 files changed, 64 insertions(+), 46 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index b2a851c..4613900 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1303,34 +1303,6 @@ static void nfs_clone_super(struct super_block *sb,
nfs_initialise_sb(sb);
 }
 
-static int nfs_set_super(struct super_block *s, void *_server)
-{
-   struct nfs_server *server = _server;
-   int ret;
-
-   s->s_fs_info = server;
-   ret = set_anon_super(s, server);
-   if (ret == 0)
-   server->s_dev = s->s_dev;
-   return ret;
-}
-
-static int nfs_compare_super(struct super_block *sb, void *data)
-{
-   struct nfs_server *server = data, *old = NFS_SB(sb);
-
-   if (memcmp(&old->nfs_client->cl_addr,
-   &server->nfs_client->cl_addr,
-   sizeof(old->nfs_client->cl_addr)) != 0)
-   return 0;
-   /* Note: NFS_MOUNT_UNSHARED == NFS4_MOUNT_UNSHARED */
-   if (old->flags & NFS_MOUNT_UNSHARED)
-   return 0;
-   if (memcmp(&old->fsid, &server->fsid, sizeof(old->fsid)) != 0)
-   return 0;
-   return 1;
-}
-
 #define NFS_MS_MASK (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_SYNCHRONOUS)
 
 static int nfs_compare_mount_options(const struct super_block *s, const struct 
nfs_server *b, int flags)
@@ -1359,9 +1331,46 @@ static int nfs_compare_mount_options(const struct 
super_block *s, const struct n
goto Ebusy;
if (clnt_a->cl_auth->au_flavor != clnt_b->cl_auth->au_flavor)
goto Ebusy;
-   return 0;
+   return 1;
 Ebusy:
-   return -EBUSY;
+   return 0;
+}
+
+struct nfs_sb_mountdata {
+   struct nfs_server *server;
+   int mntflags;
+};
+
+static int nfs_set_super(struct super_block *s, void *data)
+{
+   struct nfs_sb_mountdata *sb_mntdata = data;
+   struct nfs_server *server = sb_mntdata->server;
+   int ret;
+
+   s->s_flags = sb_mntdata->mntflags;
+   s->s_fs_info = server;
+   ret = set_anon_super(s, server);
+   if (ret == 0)
+   server->s_dev = s->s_dev;
+   return ret;
+}
+
+static int nfs_compare_super(struct super_block *sb, void *data)
+{
+   struct nfs_sb_mountdata *sb_mntdata = data;
+   struct nfs_server *server = sb_mntdata->server, *old = NFS_SB(sb);
+   int mntflags = sb_mntdata->mntflags;
+
+   if (memcmp(&old->nfs_client->cl_addr,
+   &server->nfs_client->cl_addr,
+   sizeof(old->nfs_client->cl_addr)) != 0)
+   return 0;
+   /* Note: NFS_MOUNT_UNSHARED == NFS4_MOUNT_UNSHARED */
+   if (old->flags & NFS_MOUNT_UNSHARED)
+   return 0;
+   if (memcmp(&old->fsid, &server->fsid, sizeof(old->fsid)) != 0)
+   return 0;
+   return nfs_compare_mount_options(sb, server, mntflags);
 }
 
 static int nfs_get_sb(struct file_system_type *fs_type,
@@ -1373,6 +1382,9 @@ static int nfs_get_sb(struct file_system_type *fs_type,
struct nfs_mount_data *data = raw_data;
struct dentry *mntroot;
int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
+   struct nfs_sb_mountdata sb_mntdata = {
+   .mntflags = flags,
+   };
int error;
 
/* Validate the mount data */
@@ -1386,28 +1398,25 @@ static int nfs_get_sb(struct file_system_type *fs_type,
error = PTR_ERR(server);
goto out;
}
+   sb_mntdata.server = server;
 
if (server->flags & NFS_MOUNT_UNSHARED)
compare_super = NULL;
 
/* Get a superblock - note that we may end up sharing one that already 
exists */
-   s = sget(fs_type, compare_sup

IB/ehca: Fix Small QP regressions

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fecea0ab3415bfab9a1964690e53b10c5d8f2e46
Commit: fecea0ab3415bfab9a1964690e53b10c5d8f2e46
Parent: 18115f45374d19ada218fc013aa5308baf5d283e
Author: Stefan Roscher <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 16:02:59 2007 +0200
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 13:56:42 2007 -0700

IB/ehca: Fix Small QP regressions

The new Small QP code had a few bugs that would also make it trigger
for non-Small QPs.  Fix them.

Signed-off-by: Joachim Fenkes <[EMAIL PROTECTED]>
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/ehca/ehca_qp.c   |   10 ++
 drivers/infiniband/hw/ehca/ipz_pt_fn.c |2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c 
b/drivers/infiniband/hw/ehca/ehca_qp.c
index b178cba..84d435a 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -600,10 +600,12 @@ static struct ehca_qp *internal_create_qp(
 
if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap)
&& !(context && udata)) { /* no small QP support in userspace ATM */
-   ehca_determine_small_queue(
-   &parms.squeue, max_send_sge, is_llqp);
-   ehca_determine_small_queue(
-   &parms.rqueue, max_recv_sge, is_llqp);
+   if (HAS_SQ(my_qp))
+   ehca_determine_small_queue(
+   &parms.squeue, max_send_sge, is_llqp);
+   if (HAS_RQ(my_qp))
+   ehca_determine_small_queue(
+   &parms.rqueue, max_recv_sge, is_llqp);
parms.qp_storage =
(parms.squeue.is_small || parms.rqueue.is_small);
}
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c 
b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
index a090c67..29bd476 100644
--- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c
+++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
@@ -172,7 +172,7 @@ static void free_small_queue_page(struct ipz_queue *queue, 
struct ehca_pd *pd)
unsigned long bit;
int free_page = 0;
 
-   bit = ((unsigned long)queue->queue_pages[0] & PAGE_MASK)
+   bit = ((unsigned long)queue->queue_pages[0] & ~PAGE_MASK)
>> (order + 9);
 
mutex_lock(&pd->lock);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


IB/ehca: SRQ fixes to enable IPoIB CM

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5ff70cac3e98af64f9a1eaec9e762ff4927c26d1
Commit: 5ff70cac3e98af64f9a1eaec9e762ff4927c26d1
Parent: fecea0ab3415bfab9a1964690e53b10c5d8f2e46
Author: Joachim Fenkes <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 16:03:37 2007 +0200
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 13:58:04 2007 -0700

IB/ehca: SRQ fixes to enable IPoIB CM

Fix ehca SRQ support so that IPoIB connected mode works:

 - Report max_srq > 0 if SRQ is supported
 - Report "last wqe reached" asynchronous event when base QP dies;
   this is required by the IB spec and IPoIB CM relies on receiving it
   when cleaning up.

Signed-off-by: Joachim Fenkes <[EMAIL PROTECTED]>
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/ehca/ehca_hca.c |   10 +--
 drivers/infiniband/hw/ehca/ehca_irq.c |   48 +---
 2 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c 
b/drivers/infiniband/hw/ehca/ehca_hca.c
index fc19ef9..cf22472 100644
--- a/drivers/infiniband/hw/ehca/ehca_hca.c
+++ b/drivers/infiniband/hw/ehca/ehca_hca.c
@@ -93,9 +93,13 @@ int ehca_query_device(struct ib_device *ibdev, struct 
ib_device_attr *props)
props->max_pd  = min_t(int, rblock->max_pd, INT_MAX);
props->max_ah  = min_t(int, rblock->max_ah, INT_MAX);
props->max_fmr = min_t(int, rblock->max_mr, INT_MAX);
-   props->max_srq = 0;
-   props->max_srq_wr  = 0;
-   props->max_srq_sge = 0;
+
+   if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) {
+   props->max_srq = props->max_qp;
+   props->max_srq_wr  = props->max_qp_wr;
+   props->max_srq_sge = 3;
+   }
+
props->max_pkeys   = 16;
props->local_ca_ack_delay
= rblock->local_ca_ack_delay;
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c 
b/drivers/infiniband/hw/ehca/ehca_irq.c
index ee06d8b..a925ea5 100644
--- a/drivers/infiniband/hw/ehca/ehca_irq.c
+++ b/drivers/infiniband/hw/ehca/ehca_irq.c
@@ -175,41 +175,55 @@ error_data1:
 
 }
 
-static void qp_event_callback(struct ehca_shca *shca, u64 eqe,
- enum ib_event_type event_type, int fatal)
+static void dispatch_qp_event(struct ehca_shca *shca, struct ehca_qp *qp,
+ enum ib_event_type event_type)
 {
struct ib_event event;
-   struct ehca_qp *qp;
-   u32 token = EHCA_BMASK_GET(EQE_QP_TOKEN, eqe);
-
-   read_lock(&ehca_qp_idr_lock);
-   qp = idr_find(&ehca_qp_idr, token);
-   read_unlock(&ehca_qp_idr_lock);
-
-
-   if (!qp)
-   return;
-
-   if (fatal)
-   ehca_error_data(shca, qp, qp->ipz_qp_handle.handle);
 
event.device = &shca->ib_device;
+   event.event = event_type;
 
if (qp->ext_type == EQPT_SRQ) {
if (!qp->ib_srq.event_handler)
return;
 
-   event.event = fatal ? IB_EVENT_SRQ_ERR : event_type;
event.element.srq = &qp->ib_srq;
qp->ib_srq.event_handler(&event, qp->ib_srq.srq_context);
} else {
if (!qp->ib_qp.event_handler)
return;
 
-   event.event = event_type;
event.element.qp = &qp->ib_qp;
qp->ib_qp.event_handler(&event, qp->ib_qp.qp_context);
}
+}
+
+static void qp_event_callback(struct ehca_shca *shca, u64 eqe,
+ enum ib_event_type event_type, int fatal)
+{
+   struct ehca_qp *qp;
+   u32 token = EHCA_BMASK_GET(EQE_QP_TOKEN, eqe);
+
+   read_lock(&ehca_qp_idr_lock);
+   qp = idr_find(&ehca_qp_idr, token);
+   read_unlock(&ehca_qp_idr_lock);
+
+   if (!qp)
+   return;
+
+   if (fatal)
+   ehca_error_data(shca, qp, qp->ipz_qp_handle.handle);
+
+   dispatch_qp_event(shca, qp, fatal && qp->ext_type == EQPT_SRQ ?
+ IB_EVENT_SRQ_ERR : event_type);
+
+   /*
+* eHCA only processes one WQE at a time for SRQ base QPs,
+* so the last WQE has been processed as soon as the QP enters
+* error state.
+*/
+   if (fatal && qp->ext_type == EQPT_SRQBASE)
+   dispatch_qp_event(shca, qp, IB_EVENT_QP_LAST_WQE_REACHED);
 
return;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[x86 setup] Don't rely on the VESA BIOS being register-clean

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4221d014ea04d439e6d1e65951c3b406e7c1b7ab
Commit: 4221d014ea04d439e6d1e65951c3b406e7c1b7ab
Parent: 3b42d28b2a04b3c9830eb865288239d45eccc402
Author: H. Peter Anvin <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 11:30:31 2007 -0700
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 11:52:35 2007 -0700

[x86 setup] Don't rely on the VESA BIOS being register-clean

The VESA BIOS is specified to be register-clean.  However, we have now
found at least one system which violates that.  Thus, be as paranoid
about VESA calls as about everything else.

Huge thanks to Will Simoneau for reporting, diagnosing, and testing
this out on Dell Inspiron 5150.

Cc: Will Simoneau <[EMAIL PROTECTED]>
Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 arch/i386/boot/video-vesa.c |   34 +-
 1 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/arch/i386/boot/video-vesa.c b/arch/i386/boot/video-vesa.c
index f1bc71e..1921907 100644
--- a/arch/i386/boot/video-vesa.c
+++ b/arch/i386/boot/video-vesa.c
@@ -29,7 +29,7 @@ static void vesa_store_mode_params_graphics(void);
 static int vesa_probe(void)
 {
 #if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID)
-   u16 ax;
+   u16 ax, cx, di;
u16 mode;
addr_t mode_ptr;
struct mode_info *mi;
@@ -39,9 +39,11 @@ static int vesa_probe(void)
 
vginfo.signature = VBE2_MAGIC;
 
-   /* Optimistically assume a VESA BIOS is register-clean... */
ax = 0x4f00;
-   asm("int $0x10" : "+a" (ax), "=m" (vginfo) : "D" (&vginfo));
+   di = (size_t)&vginfo;
+   asm(INT10
+   : "+a" (ax), "+D" (di), "=m" (vginfo)
+   : : "ebx", "ecx", "edx", "esi");
 
if (ax != 0x004f ||
vginfo.signature != VESA_MAGIC ||
@@ -64,9 +66,11 @@ static int vesa_probe(void)
memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
 
ax = 0x4f01;
-   asm("int $0x10"
-   : "+a" (ax), "=m" (vminfo)
-   : "c" (mode), "D" (&vminfo));
+   cx = mode;
+   di = (size_t)&vminfo;
+   asm(INT10
+   : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
+   : : "ebx", "edx", "esi");
 
if (ax != 0x004f)
continue;
@@ -102,16 +106,18 @@ static int vesa_probe(void)
 
 static int vesa_set_mode(struct mode_info *mode)
 {
-   u16 ax;
+   u16 ax, bx, cx, di;
int is_graphic;
u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA;
 
memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
 
ax = 0x4f01;
-   asm("int $0x10"
-   : "+a" (ax), "=m" (vminfo)
-   : "c" (vesa_mode), "D" (&vminfo));
+   cx = vesa_mode;
+   di = (size_t)&vminfo;
+   asm(INT10
+   : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
+   : : "ebx", "edx", "esi");
 
if (ax != 0x004f)
return -1;
@@ -129,9 +135,11 @@ static int vesa_set_mode(struct mode_info *mode)
 
 
ax = 0x4f02;
-   asm volatile("int $0x10"
-: "+a" (ax)
-: "b" (vesa_mode), "D" (0));
+   bx = vesa_mode;
+   di = 0;
+   asm volatile(INT10
+: "+a" (ax), "+b" (bx), "+D" (di)
+: : "ecx", "edx", "esi");
 
if (ax != 0x004f)
return -1;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Linux 2.6.23-rc5

2007-08-31 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=40ffbfad6bb79a99cc7627bdaca0ee22dec526f6
Commit: 40ffbfad6bb79a99cc7627bdaca0ee22dec526f6
Parent: 2f81eccbd7a5440b43ff874c8f02d6143f41ba4f
Author: Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 23:08:24 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 23:08:24 2007 -0700

Linux 2.6.23-rc5
---
 Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index eb28ccb..744bb0d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 23
-EXTRAVERSION =-rc4
+EXTRAVERSION =-rc5
 NAME = Pink Farting Weasel
 
 # *DOCUMENTATION*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html