All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC/PATCH] commit notes workflow
From: Johan Herland @ 2011-02-25 15:58 UTC (permalink / raw)
  To: Jeff King; +Cc: git
In-Reply-To: <20110225133056.GA1026@sigill.intra.peff.net>

On Friday 25 February 2011, Jeff King wrote:
> So my solution was that "git commit" should be able to embed and
> extract notes from the commit message itself. The patch below
> implements "git commit --notes", which does two things:
>
>   1. If we are amending, it populates the commit message not just
> with the existing message, but also with a "---" divider and any
> notes on the commit.
>
>   2. After editing the commit message, it looks for the "---" divider
>      and puts everything after it into a commit note (whether or not
> it put in a divider in step (1), so you can add new notes, too).
>
> So your commit template looks like:
>
>   subject
>
>   commit message body
>   ---
>   notes data
>
>   # usual template stuff
>
> I'm curious what people think. Do others find this useful? Does it
> seem harmful?

I _really_ like the idea. :)

> It's yet another magic format to worry about when writing a commit
> message. But you don't need to care unless you use "--notes" (and I
> would probably add a config option, since I would always want this on
> personally). And "---" is already something to be aware of, since
> "am" treats it specially (technically, I could just drop "notes"
> entirely and use "---" in my commit message; so perhaps this is just
> overengineering).

Maybe we should use a slightly more verbose separator (i.e. more 
unlikely to trigger false positives). As you say, we already have to 
watch out for "---" because of "am", but that only applies to projects 
that _use_ "am" (i.e. mailing-list-centric projects like git.git and 
the Linux kernel). Other projects (e.g. github-centric projects or most 
centralized "$dayjob-style" projects) seldom or never use "am" at all, 
so I wouldn't expect those developers think of "---" as "special" in 
any way.

What about using something like "--- Notes ---" instead?

> How should this interact with --cleanup? Right now it splits
> everything after the "---" into the notes part, including any "#"
> lines. Which should be fine, I think, because they get pulled out by
> stripspace in either case. If you were using --cleanup=verbatim, then
> you'd have gotten rid of them manually anyway. And if you really want
> a literal "---", you would use "git commit" (or "git commit
> --no-notes" once there is a config option). So I think the behavior
> in this patch is sane.

What if you combine --notes with --verbose (i.e. including the 
diff-to-be-committed in the commit message template)?

AFAICS, stripspace() doesn't know how to remove the diff (there's a 
separate section in cmd_commit() discarding everything 
following "\ndiff --git ").

> I only turn on --edit when we launch an editor. It seems somehow more
> confusing to me that "git commit -F file" should split notes out (or
> worse, "git commit -m"). If you are doing things non-interactively,
> it's probably not a big deal to just call "git notes add" separately.
> And I expect "-F" is used by porcelains, or people wanting to do
> verbatim stuff.

Agreed.

> How should this interact with the commit-msg hook? In my
> implementation, it sees the whole thing, message and notes. Should we
> be picking apart the two bits after the editor and rewriting the
> COMMIT_EDITMSG before the hook sees it?

I'm not sure about this, but I suspect we should follow the same 
behaviour as --verbose (i.e. does the commit-msg hook see the entire 
diff inline in the commit message?).

A short look at builtin/commit.c indicates that we should leave 
everything in there for the commit-msg hook (AFAICS, the commit-msg 
hook is invoked from prepare_to_commit(), which is invoked from 
cmd_commit() _before_ the verbose diff part is removed.)

> How should this interact with the post-rewrite hook? I obviously need
> to set that up for my workflow, too, but I haven't yet. This patch
> does nothing, but I'm pretty sure it should turn of "git commit
> --amend" calling the rewrite hook if we are using --notes (since the
> user has already seen and edited the notes, and we've written them
> out).

I don't see what this has to do with the post-rewrite hook. Currently, 
the post-rewrite documentation ("git help hooks") states that it is run 
_after_ the automatic notes copying. AFAICS, your --notes simply 
replaces the usual automatic notes copying with a 
semi-automatic "edit-and-copy" instead. But this all happens before the 
port-rewrite hook is called, and thus shouldn't affect it.

> @@ -730,6 +780,9 @@ static int prepare_to_commit(const char
> *index_file, const char *prefix, strbuf_release(&sob);
>  	}
>
> +	if (edit_notes && amend)
> +		add_notes_from_commit(&sb, "HEAD");

I haven't read the sources closely enough to figure out when/where the 
commit diff is added to the commit message (in case of --verbose), but 
I trust that it happens _after_ the above lines (so that the notes part 
doesn't end up after the diff)

Otherwise, this looks good to me from a precursory review.


...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

^ permalink raw reply

* [Cluster-devel] conga/luci/site/luci/Products/PloneHotfix20100612
From: rmccabe @ 2011-02-25 15:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2011-02-25 15:58:10

conga/luci/site/luci/Products/PloneHotfix20100612

Update of /cvs/cluster/conga/luci/site/luci/Products/PloneHotfix20100612
In directory sourceware.org:/tmp/cvs-serv21135/PloneHotfix20100612

Log Message:
Directory /cvs/cluster/conga/luci/site/luci/Products/PloneHotfix20100612 added to the repository
--> Using per-directory sticky tag `RHEL5'



^ permalink raw reply

* [Cluster-devel] conga/luci/site/luci/Products/PloneHotfix20110720
From: rmccabe @ 2011-02-25 15:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2011-02-25 15:58:10

conga/luci/site/luci/Products/PloneHotfix20110720

Update of /cvs/cluster/conga/luci/site/luci/Products/PloneHotfix20110720
In directory sourceware.org:/tmp/cvs-serv21135/PloneHotfix20110720

Log Message:
Directory /cvs/cluster/conga/luci/site/luci/Products/PloneHotfix20110720 added to the repository
--> Using per-directory sticky tag `RHEL5'



^ permalink raw reply

* Re: IB atomic operations
From: frank zago @ 2011-02-25 15:57 UTC (permalink / raw)
  To: Bharath Ramesh; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <00b701cbd4bd$e271fe20$a755fa60$@edu>

On 02/25/2011 01:30 AM, Bharath Ramesh wrote:
> Hi,
> 	I am trying to use IB atomic operations, specifically fetch and add.
> I tried a small example but I am unable to get it to work. The WC status is
> IBV_WC_REM_INV_REQ_ERR. My sample code is as follows:

Did you register your memory with IBV_ACCESS_REMOTE_ATOMIC ?

Frank.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: module loading with CAP_NET_ADMIN
From: Vasiliy Kulikov @ 2011-02-25 15:57 UTC (permalink / raw)
  To: Michael Tokarev
  Cc: Ben Hutchings, netdev, linux-kernel, Kees Cook, Eugene Teo,
	Dan Rosenberg, David S. Miller
In-Reply-To: <4D67CAD7.7060408@msgid.tls.msk.ru>

On Fri, Feb 25, 2011 at 18:29 +0300, Michael Tokarev wrote:
> 25.02.2011 15:30, Vasiliy Kulikov wrote:
> > On Thu, Feb 24, 2011 at 16:34 +0000, Ben Hutchings wrote:
> >> On Thu, 2011-02-24 at 18:12 +0300, Vasiliy Kulikov wrote:
> >>> My proposal is changing request_module("%s", name) to something like
> >>> request_module("netdev-%s", name) inside of dev_load() and adding
> >>> aliases to related drivers.
> 
> It is not the kernel patching which we should worry about, kernel
> part is trivial.
> 
> What is not trivial is to patch all the systems out there who
> autoloads network drivers based on /etc/modprobe.d/network-aliases.conf
> (some local file), ie, numerous working setups which already
> uses this mechanism since stone age.  And patching these is
> not trivial at all, unfortunately.
> 
> Somewhat weird setups (one can load the modules explicitly, and
> nowadays this all is handled by udev anyway), but this change
> will break some working systems.
> 
> Maybe the cost (some pain for some users) isn't large enough
> but the outcome is good, and I think it _is_ good, but it needs
> some wider discussion first, imho.
> 
> I can't think of a way to handle this without breaking stuff.

Currently Linux slowly moves in the direction of rootless systems.  This
definitely need proper restrictions of CAP_* power.  Network admin does
nothing with general modules.  It _has_ to break something one day
because old assumptions about permission stuff don't conform CAP_*
things: old assumptions are very closely connected with just everything.

I'm not sure how this particular CAP_NET_ADMIN misuse should be fixed,
maybe distributions should supply script to upgrade modprobe configs.
Also note that change s/CAP_SYS_MODULE/CAP_NET_ADMIN/ was made in
2.6.32, so there is a possibility that the set of affected distributions
(that doesn't use udev stuff) is very small.


Thanks for your input,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

^ permalink raw reply

* [PATCH 3/3] iwlwifi: ack,plcp check health changes
From: Stanislaw Gruszka @ 2011-02-25 15:57 UTC (permalink / raw)
  To: Wey-Yi Guy, Intel Linux Wireless; +Cc: linux-wireless, Stanislaw Gruszka
In-Reply-To: <1298649432-4416-1-git-send-email-sgruszka@redhat.com>

Add module ack_check, and plcp_check parameters, Ack_check is disabled
by default since is proved that check ack health can cause troubles.
Plcp_check is enabled by default.

Remove iwl_lib_ops methods, they are unneeded after iwlegacy driver
split. Merge check health code into to iwl-rx.c and make functions
static.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlwifi/iwl-1000.c    |    2 -
 drivers/net/wireless/iwlwifi/iwl-2000.c    |    2 -
 drivers/net/wireless/iwlwifi/iwl-5000.c    |    4 -
 drivers/net/wireless/iwlwifi/iwl-6000.c    |    4 -
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn-rx.c  |   87 ---------------
 drivers/net/wireless/iwlwifi/iwl-agn.c     |   73 ++-----------
 drivers/net/wireless/iwlwifi/iwl-agn.h     |    4 -
 drivers/net/wireless/iwlwifi/iwl-core.h    |    9 +-
 drivers/net/wireless/iwlwifi/iwl-rx.c      |  162 ++++++++++++++++++++++++++-
 10 files changed, 167 insertions(+), 181 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index ba78bc8..e8e1c2d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -232,8 +232,6 @@ static struct iwl_lib_ops iwl1000_lib = {
 		.bt_stats_read = iwl_ucode_bt_stats_read,
 		.reply_tx_error = iwl_reply_tx_error_read,
 	},
-	.check_plcp_health = iwl_good_plcp_health,
-	.check_ack_health = iwl_good_ack_health,
 	.txfifo_flush = iwlagn_txfifo_flush,
 	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 	.tt_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 30483e2..894cb24 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -315,8 +315,6 @@ static struct iwl_lib_ops iwl2000_lib = {
 		.bt_stats_read = iwl_ucode_bt_stats_read,
 		.reply_tx_error = iwl_reply_tx_error_read,
 	},
-	.check_plcp_health = iwl_good_plcp_health,
-	.check_ack_health = iwl_good_ack_health,
 	.txfifo_flush = iwlagn_txfifo_flush,
 	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 	.tt_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 79ab0a6..90e727b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -402,8 +402,6 @@ static struct iwl_lib_ops iwl5000_lib = {
 		.bt_stats_read = iwl_ucode_bt_stats_read,
 		.reply_tx_error = iwl_reply_tx_error_read,
 	},
-	.check_plcp_health = iwl_good_plcp_health,
-	.check_ack_health = iwl_good_ack_health,
 	.txfifo_flush = iwlagn_txfifo_flush,
 	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 	.tt_ops = {
@@ -471,8 +469,6 @@ static struct iwl_lib_ops iwl5150_lib = {
 		.bt_stats_read = iwl_ucode_bt_stats_read,
 		.reply_tx_error = iwl_reply_tx_error_read,
 	},
-	.check_plcp_health = iwl_good_plcp_health,
-	.check_ack_health = iwl_good_ack_health,
 	.txfifo_flush = iwlagn_txfifo_flush,
 	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 	.tt_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index f6493f7..a745b01 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -343,8 +343,6 @@ static struct iwl_lib_ops iwl6000_lib = {
 		.bt_stats_read = iwl_ucode_bt_stats_read,
 		.reply_tx_error = iwl_reply_tx_error_read,
 	},
-	.check_plcp_health = iwl_good_plcp_health,
-	.check_ack_health = iwl_good_ack_health,
 	.txfifo_flush = iwlagn_txfifo_flush,
 	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 	.tt_ops = {
@@ -415,8 +413,6 @@ static struct iwl_lib_ops iwl6030_lib = {
 		.bt_stats_read = iwl_ucode_bt_stats_read,
 		.reply_tx_error = iwl_reply_tx_error_read,
 	},
-	.check_plcp_health = iwl_good_plcp_health,
-	.check_ack_health = iwl_good_ack_health,
 	.txfifo_flush = iwlagn_txfifo_flush,
 	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 	.tt_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 0d0572c..693a1fa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -609,6 +609,7 @@ const u8 *iwlagn_eeprom_query_addr(const struct iwl_priv *priv,
 struct iwl_mod_params iwlagn_mod_params = {
 	.amsdu_size_8K = 1,
 	.restart_fw = 1,
+	.plcp_check = true,
 	/* the rest are 0 by default */
 };
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
index b192ca8..7a89a55 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
@@ -169,93 +169,6 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
 
 #define REG_RECALIB_PERIOD (60)
 
-/**
- * iwl_good_plcp_health - checks for plcp error.
- *
- * When the plcp error is exceeding the thresholds, reset the radio
- * to improve the throughput.
- */
-bool iwl_good_plcp_health(struct iwl_priv *priv,
-				struct iwl_rx_packet *pkt)
-{
-	bool rc = true;
-	int combined_plcp_delta;
-	unsigned int plcp_msec;
-	unsigned long plcp_received_jiffies;
-
-	if (priv->cfg->base_params->plcp_delta_threshold ==
-	    IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) {
-		IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n");
-		return rc;
-	}
-
-	/*
-	 * check for plcp_err and trigger radio reset if it exceeds
-	 * the plcp error threshold plcp_delta.
-	 */
-	plcp_received_jiffies = jiffies;
-	plcp_msec = jiffies_to_msecs((long) plcp_received_jiffies -
-					(long) priv->plcp_jiffies);
-	priv->plcp_jiffies = plcp_received_jiffies;
-	/*
-	 * check to make sure plcp_msec is not 0 to prevent division
-	 * by zero.
-	 */
-	if (plcp_msec) {
-		struct statistics_rx_phy *ofdm;
-		struct statistics_rx_ht_phy *ofdm_ht;
-
-		if (iwl_bt_statistics(priv)) {
-			ofdm = &pkt->u.stats_bt.rx.ofdm;
-			ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht;
-			combined_plcp_delta =
-			   (le32_to_cpu(ofdm->plcp_err) -
-			   le32_to_cpu(priv->_agn.statistics_bt.
-				       rx.ofdm.plcp_err)) +
-			   (le32_to_cpu(ofdm_ht->plcp_err) -
-			   le32_to_cpu(priv->_agn.statistics_bt.
-				       rx.ofdm_ht.plcp_err));
-		} else {
-			ofdm = &pkt->u.stats.rx.ofdm;
-			ofdm_ht = &pkt->u.stats.rx.ofdm_ht;
-			combined_plcp_delta =
-			    (le32_to_cpu(ofdm->plcp_err) -
-			    le32_to_cpu(priv->_agn.statistics.
-					rx.ofdm.plcp_err)) +
-			    (le32_to_cpu(ofdm_ht->plcp_err) -
-			    le32_to_cpu(priv->_agn.statistics.
-					rx.ofdm_ht.plcp_err));
-		}
-
-		if ((combined_plcp_delta > 0) &&
-		    ((combined_plcp_delta * 100) / plcp_msec) >
-			priv->cfg->base_params->plcp_delta_threshold) {
-			/*
-			 * if plcp_err exceed the threshold,
-			 * the following data is printed in csv format:
-			 *    Text: plcp_err exceeded %d,
-			 *    Received ofdm.plcp_err,
-			 *    Current ofdm.plcp_err,
-			 *    Received ofdm_ht.plcp_err,
-			 *    Current ofdm_ht.plcp_err,
-			 *    combined_plcp_delta,
-			 *    plcp_msec
-			 */
-			IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, "
-				"%u, %u, %u, %u, %d, %u mSecs\n",
-				priv->cfg->base_params->plcp_delta_threshold,
-				le32_to_cpu(ofdm->plcp_err),
-				le32_to_cpu(ofdm->plcp_err),
-				le32_to_cpu(ofdm_ht->plcp_err),
-				le32_to_cpu(ofdm_ht->plcp_err),
-				combined_plcp_delta, plcp_msec);
-
-			rc = false;
-		}
-	}
-	return rc;
-}
-
 void iwl_rx_statistics(struct iwl_priv *priv,
 			      struct iwl_rx_mem_buffer *rxb)
 {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index d08fa93..31d2190 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1413,72 +1413,6 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
 		iwl_enable_rfkill_int(priv);
 }
 
-/* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */
-#define ACK_CNT_RATIO (50)
-#define BA_TIMEOUT_CNT (5)
-#define BA_TIMEOUT_MAX (16)
-
-/**
- * iwl_good_ack_health - checks for ACK count ratios, BA timeout retries.
- *
- * When the ACK count ratio is low and aggregated BA timeout retries exceeding
- * the BA_TIMEOUT_MAX, reload firmware and bring system back to normal
- * operation state.
- */
-bool iwl_good_ack_health(struct iwl_priv *priv, struct iwl_rx_packet *pkt)
-{
-	int actual_delta, expected_delta, ba_timeout_delta;
-	struct statistics_tx *cur, *old;
-
-	if (priv->_agn.agg_tids_count)
-		return true;
-
-	if (iwl_bt_statistics(priv)) {
-		cur = &pkt->u.stats_bt.tx;
-		old = &priv->_agn.statistics_bt.tx;
-	} else {
-		cur = &pkt->u.stats.tx;
-		old = &priv->_agn.statistics.tx;
-	}
-
-	actual_delta = le32_to_cpu(cur->actual_ack_cnt) -
-		       le32_to_cpu(old->actual_ack_cnt);
-	expected_delta = le32_to_cpu(cur->expected_ack_cnt) -
-			 le32_to_cpu(old->expected_ack_cnt);
-
-	/* Values should not be negative, but we do not trust the firmware */
-	if (actual_delta <= 0 || expected_delta <= 0)
-		return true;
-
-	ba_timeout_delta = le32_to_cpu(cur->agg.ba_timeout) -
-			   le32_to_cpu(old->agg.ba_timeout);
-
-	if ((actual_delta * 100 / expected_delta) < ACK_CNT_RATIO &&
-	    ba_timeout_delta > BA_TIMEOUT_CNT) {
-		IWL_DEBUG_RADIO(priv, "deltas: actual %d expected %d ba_timeout %d\n",
-				actual_delta, expected_delta, ba_timeout_delta);
-
-#ifdef CONFIG_IWLWIFI_DEBUGFS
-		/*
-		 * This is ifdef'ed on DEBUGFS because otherwise the
-		 * statistics aren't available. If DEBUGFS is set but
-		 * DEBUG is not, these will just compile out.
-		 */
-		IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta %d\n",
-				priv->_agn.delta_statistics.tx.rx_detected_cnt);
-		IWL_DEBUG_RADIO(priv,
-				"ack_or_ba_timeout_collision delta %d\n",
-				priv->_agn.delta_statistics.tx.ack_or_ba_timeout_collision);
-#endif
-
-		if (ba_timeout_delta >= BA_TIMEOUT_MAX)
-			return false;
-	}
-
-	return true;
-}
-
-
 /*****************************************************************************
  *
  * sysfs attributes
@@ -4786,3 +4720,10 @@ MODULE_PARM_DESC(antenna_coupling,
 module_param_named(bt_ch_inhibition, iwlagn_bt_ch_announce, bool, S_IRUGO);
 MODULE_PARM_DESC(bt_ch_inhibition,
 		 "Disable BT channel inhibition (default: enable)");
+
+module_param_named(plcp_check, iwlagn_mod_params.plcp_check, bool, S_IRUGO);
+MODULE_PARM_DESC(plcp_check, "Check plcp health (default: 1 [enabled])");
+
+module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO);
+MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])");
+
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index d00e1ea..96d98fa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -121,8 +121,6 @@ void iwl_disable_ict(struct iwl_priv *priv);
 int iwl_alloc_isr_ict(struct iwl_priv *priv);
 void iwl_free_isr_ict(struct iwl_priv *priv);
 irqreturn_t iwl_isr_ict(int irq, void *data);
-bool iwl_good_ack_health(struct iwl_priv *priv,
-			 struct iwl_rx_packet *pkt);
 
 /* tx queue */
 void iwlagn_set_wr_ptrs(struct iwl_priv *priv,
@@ -248,8 +246,6 @@ u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant_idx, u8 valid);
 /* rx */
 void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
 				struct iwl_rx_mem_buffer *rxb);
-bool iwl_good_plcp_health(struct iwl_priv *priv,
-			  struct iwl_rx_packet *pkt);
 void iwl_rx_statistics(struct iwl_priv *priv,
 		       struct iwl_rx_mem_buffer *rxb);
 void iwl_reply_statistics(struct iwl_priv *priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index ed701f9..22dc435 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -210,12 +210,7 @@ struct iwl_lib_ops {
 
 	/* temperature */
 	struct iwl_temp_ops temp_ops;
-	/* check for plcp health */
-	bool (*check_plcp_health)(struct iwl_priv *priv,
-					struct iwl_rx_packet *pkt);
-	/* check for ack health */
-	bool (*check_ack_health)(struct iwl_priv *priv,
-					struct iwl_rx_packet *pkt);
+
 	int (*txfifo_flush)(struct iwl_priv *priv, u16 flush_control);
 	void (*dev_txfifo_flush)(struct iwl_priv *priv, u16 flush_control);
 
@@ -261,6 +256,8 @@ struct iwl_mod_params {
 	int amsdu_size_8K;	/* def: 1 = enable 8K amsdu size */
 	int antenna;  		/* def: 0 = both antennas (use diversity) */
 	int restart_fw;		/* def: 1 = restart firmware */
+	bool plcp_check;	/* def: true = enable plcp health check */
+	bool ack_check;		/* def: false = disable ack health check */
 };
 
 /*
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index a21f6fe..feee761 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -227,22 +227,172 @@ void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
 	priv->measurement_status |= MEASUREMENT_READY;
 }
 
-void iwl_recover_from_statistics(struct iwl_priv *priv,
-				struct iwl_rx_packet *pkt)
+/* the threshold ratio of actual_ack_cnt to expected_ack_cnt in percent */
+#define ACK_CNT_RATIO (50)
+#define BA_TIMEOUT_CNT (5)
+#define BA_TIMEOUT_MAX (16)
+
+/**
+ * iwl_good_ack_health - checks for ACK count ratios, BA timeout retries.
+ *
+ * When the ACK count ratio is low and aggregated BA timeout retries exceeding
+ * the BA_TIMEOUT_MAX, reload firmware and bring system back to normal
+ * operation state.
+ */
+static bool iwl_good_ack_health(struct iwl_priv *priv, struct iwl_rx_packet *pkt)
+{
+	int actual_delta, expected_delta, ba_timeout_delta;
+	struct statistics_tx *cur, *old;
+
+	if (priv->_agn.agg_tids_count)
+		return true;
+
+	if (iwl_bt_statistics(priv)) {
+		cur = &pkt->u.stats_bt.tx;
+		old = &priv->_agn.statistics_bt.tx;
+	} else {
+		cur = &pkt->u.stats.tx;
+		old = &priv->_agn.statistics.tx;
+	}
+
+	actual_delta = le32_to_cpu(cur->actual_ack_cnt) -
+		       le32_to_cpu(old->actual_ack_cnt);
+	expected_delta = le32_to_cpu(cur->expected_ack_cnt) -
+			 le32_to_cpu(old->expected_ack_cnt);
+
+	/* Values should not be negative, but we do not trust the firmware */
+	if (actual_delta <= 0 || expected_delta <= 0)
+		return true;
+
+	ba_timeout_delta = le32_to_cpu(cur->agg.ba_timeout) -
+			   le32_to_cpu(old->agg.ba_timeout);
+
+	if ((actual_delta * 100 / expected_delta) < ACK_CNT_RATIO &&
+	    ba_timeout_delta > BA_TIMEOUT_CNT) {
+		IWL_DEBUG_RADIO(priv, "deltas: actual %d expected %d ba_timeout %d\n",
+				actual_delta, expected_delta, ba_timeout_delta);
+
+#ifdef CONFIG_IWLWIFI_DEBUGFS
+		/*
+		 * This is ifdef'ed on DEBUGFS because otherwise the
+		 * statistics aren't available. If DEBUGFS is set but
+		 * DEBUG is not, these will just compile out.
+		 */
+		IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta %d\n",
+				priv->_agn.delta_statistics.tx.rx_detected_cnt);
+		IWL_DEBUG_RADIO(priv,
+				"ack_or_ba_timeout_collision delta %d\n",
+				priv->_agn.delta_statistics.tx.ack_or_ba_timeout_collision);
+#endif
+
+		if (ba_timeout_delta >= BA_TIMEOUT_MAX)
+			return false;
+	}
+
+	return true;
+}
+
+/**
+ * iwl_good_plcp_health - checks for plcp error.
+ *
+ * When the plcp error is exceeding the thresholds, reset the radio
+ * to improve the throughput.
+ */
+static bool iwl_good_plcp_health(struct iwl_priv *priv, struct iwl_rx_packet *pkt)
+{
+	bool rc = true;
+	int combined_plcp_delta;
+	unsigned int plcp_msec;
+	unsigned long plcp_received_jiffies;
+
+	if (priv->cfg->base_params->plcp_delta_threshold ==
+	    IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) {
+		IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n");
+		return rc;
+	}
+
+	/*
+	 * check for plcp_err and trigger radio reset if it exceeds
+	 * the plcp error threshold plcp_delta.
+	 */
+	plcp_received_jiffies = jiffies;
+	plcp_msec = jiffies_to_msecs((long) plcp_received_jiffies -
+					(long) priv->plcp_jiffies);
+	priv->plcp_jiffies = plcp_received_jiffies;
+	/*
+	 * check to make sure plcp_msec is not 0 to prevent division
+	 * by zero.
+	 */
+	if (plcp_msec) {
+		struct statistics_rx_phy *ofdm;
+		struct statistics_rx_ht_phy *ofdm_ht;
+
+		if (iwl_bt_statistics(priv)) {
+			ofdm = &pkt->u.stats_bt.rx.ofdm;
+			ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht;
+			combined_plcp_delta =
+			   (le32_to_cpu(ofdm->plcp_err) -
+			   le32_to_cpu(priv->_agn.statistics_bt.
+				       rx.ofdm.plcp_err)) +
+			   (le32_to_cpu(ofdm_ht->plcp_err) -
+			   le32_to_cpu(priv->_agn.statistics_bt.
+				       rx.ofdm_ht.plcp_err));
+		} else {
+			ofdm = &pkt->u.stats.rx.ofdm;
+			ofdm_ht = &pkt->u.stats.rx.ofdm_ht;
+			combined_plcp_delta =
+			    (le32_to_cpu(ofdm->plcp_err) -
+			    le32_to_cpu(priv->_agn.statistics.
+					rx.ofdm.plcp_err)) +
+			    (le32_to_cpu(ofdm_ht->plcp_err) -
+			    le32_to_cpu(priv->_agn.statistics.
+					rx.ofdm_ht.plcp_err));
+		}
+
+		if ((combined_plcp_delta > 0) &&
+		    ((combined_plcp_delta * 100) / plcp_msec) >
+			priv->cfg->base_params->plcp_delta_threshold) {
+			/*
+			 * if plcp_err exceed the threshold,
+			 * the following data is printed in csv format:
+			 *    Text: plcp_err exceeded %d,
+			 *    Received ofdm.plcp_err,
+			 *    Current ofdm.plcp_err,
+			 *    Received ofdm_ht.plcp_err,
+			 *    Current ofdm_ht.plcp_err,
+			 *    combined_plcp_delta,
+			 *    plcp_msec
+			 */
+			IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, "
+				"%u, %u, %u, %u, %d, %u mSecs\n",
+				priv->cfg->base_params->plcp_delta_threshold,
+				le32_to_cpu(ofdm->plcp_err),
+				le32_to_cpu(ofdm->plcp_err),
+				le32_to_cpu(ofdm_ht->plcp_err),
+				le32_to_cpu(ofdm_ht->plcp_err),
+				combined_plcp_delta, plcp_msec);
+
+			rc = false;
+		}
+	}
+	return rc;
+}
+
+void iwl_recover_from_statistics(struct iwl_priv *priv, struct iwl_rx_packet *pkt)
 {
+	const struct iwl_mod_params *mod_params = priv->cfg->mod_params;
+
 	if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
 	    !iwl_is_any_associated(priv))
 		return;
 
-	if (priv->cfg->ops->lib->check_ack_health &&
-	    !priv->cfg->ops->lib->check_ack_health(priv, pkt)) {
+	if (mod_params->ack_check && !iwl_good_ack_health(priv, pkt)) {
 		IWL_ERR(priv, "low ack count detected, restart firmware\n");
 		if (!iwl_force_reset(priv, IWL_FW_RESET, false))
 			return;
 	}
 
-	if (priv->cfg->ops->lib->check_plcp_health &&
-	    !priv->cfg->ops->lib->check_plcp_health(priv, pkt))
+	if (mod_params->plcp_check && !iwl_good_plcp_health(priv, pkt))
 		iwl_force_reset(priv, IWL_RF_RESET, false);
 }
 
-- 
1.7.1


^ permalink raw reply related

* [PATCH 2/3] iwlegacy: fix dma mappings and skbs leak
From: Stanislaw Gruszka @ 2011-02-25 15:57 UTC (permalink / raw)
  To: Wey-Yi Guy, Intel Linux Wireless; +Cc: linux-wireless, Stanislaw Gruszka
In-Reply-To: <1298649432-4416-1-git-send-email-sgruszka@redhat.com>

Fix possible dma mappings and skbs introduced by commit
470058e0ad82fcfaaffd57307d8bf8c094e8e9d7 "iwlwifi: avoid Tx queue
memory allocation in interface down".

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlegacy/iwl-4965-tx.c |   12 ++++-
 drivers/net/wireless/iwlegacy/iwl-core.h    |    2 +
 drivers/net/wireless/iwlegacy/iwl-tx.c      |   75 +++++++++++++++++---------
 3 files changed, 62 insertions(+), 27 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
index 2e0f0db..eff3743 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
@@ -698,7 +698,7 @@ void iwl4965_txq_ctx_reset(struct iwl_priv *priv)
  */
 void iwl4965_txq_ctx_stop(struct iwl_priv *priv)
 {
-	int ch;
+	int ch, txq_id;
 	unsigned long flags;
 
 	/* Turn off all Tx DMA fifos */
@@ -719,6 +719,16 @@ void iwl4965_txq_ctx_stop(struct iwl_priv *priv)
 					FH_TSSR_TX_STATUS_REG));
 	}
 	spin_unlock_irqrestore(&priv->lock, flags);
+
+	if (!priv->txq)
+		return;
+
+	/* Unmap DMA from host system and free skb's */
+	for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++)
+		if (txq_id == priv->cmd_queue)
+			iwl_legacy_cmd_queue_unmap(priv);
+		else
+			iwl_legacy_tx_queue_unmap(priv, txq_id);
 }
 
 /*
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.h b/drivers/net/wireless/iwlegacy/iwl-core.h
index 1159b0d..c7d2310 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.h
+++ b/drivers/net/wireless/iwlegacy/iwl-core.h
@@ -388,6 +388,7 @@ void iwl_legacy_rx_reply_error(struct iwl_priv *priv,
 /*****************************************************
 * RX
 ******************************************************/
+void iwl_legacy_cmd_queue_unmap(struct iwl_priv *priv);
 void iwl_legacy_cmd_queue_free(struct iwl_priv *priv);
 int iwl_legacy_rx_queue_alloc(struct iwl_priv *priv);
 void iwl_legacy_rx_queue_update_write_ptr(struct iwl_priv *priv,
@@ -415,6 +416,7 @@ int iwl_legacy_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
 void iwl_legacy_tx_queue_reset(struct iwl_priv *priv,
 			struct iwl_tx_queue *txq,
 			int slots_num, u32 txq_id);
+void iwl_legacy_tx_queue_unmap(struct iwl_priv *priv, int txq_id);
 void iwl_legacy_tx_queue_free(struct iwl_priv *priv, int txq_id);
 void iwl_legacy_setup_watchdog(struct iwl_priv *priv);
 /*****************************************************
diff --git a/drivers/net/wireless/iwlegacy/iwl-tx.c b/drivers/net/wireless/iwlegacy/iwl-tx.c
index 7db8340..a227773 100644
--- a/drivers/net/wireless/iwlegacy/iwl-tx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-tx.c
@@ -82,6 +82,24 @@ iwl_legacy_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
 EXPORT_SYMBOL(iwl_legacy_txq_update_write_ptr);
 
 /**
+ * iwl_legacy_tx_queue_unmap -  Unmap any remaining DMA mappings and free skb's
+ */
+void iwl_legacy_tx_queue_unmap(struct iwl_priv *priv, int txq_id)
+{
+	struct iwl_tx_queue *txq = &priv->txq[txq_id];
+	struct iwl_queue *q = &txq->q;
+
+	if (q->n_bd == 0)
+		return;
+
+	while (q->write_ptr != q->read_ptr) {
+		priv->cfg->ops->lib->txq_free_tfd(priv, txq);
+		q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd);
+	}
+}
+EXPORT_SYMBOL(iwl_legacy_tx_queue_unmap);
+
+/**
  * iwl_legacy_tx_queue_free - Deallocate DMA queue.
  * @txq: Transmit queue to deallocate.
  *
@@ -92,17 +110,10 @@ EXPORT_SYMBOL(iwl_legacy_txq_update_write_ptr);
 void iwl_legacy_tx_queue_free(struct iwl_priv *priv, int txq_id)
 {
 	struct iwl_tx_queue *txq = &priv->txq[txq_id];
-	struct iwl_queue *q = &txq->q;
 	struct device *dev = &priv->pci_dev->dev;
 	int i;
 
-	if (q->n_bd == 0)
-		return;
-
-	/* first, empty all BD's */
-	for (; q->write_ptr != q->read_ptr;
-	     q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd))
-		priv->cfg->ops->lib->txq_free_tfd(priv, txq);
+	iwl_legacy_tx_queue_unmap(priv, txq_id);
 
 	/* De-alloc array of command/tx buffers */
 	for (i = 0; i < TFD_TX_CMD_SLOTS; i++)
@@ -129,39 +140,33 @@ void iwl_legacy_tx_queue_free(struct iwl_priv *priv, int txq_id)
 EXPORT_SYMBOL(iwl_legacy_tx_queue_free);
 
 /**
- * iwl_legacy_cmd_queue_free - Deallocate DMA queue.
- * @txq: Transmit queue to deallocate.
- *
- * Empty queue by removing and destroying all BD's.
- * Free all buffers.
- * 0-fill, but do not free "txq" descriptor structure.
+ * iwl_cmd_queue_unmap - Unmap any remaining DMA mappings from command queue
  */
-void iwl_legacy_cmd_queue_free(struct iwl_priv *priv)
+void iwl_legacy_cmd_queue_unmap(struct iwl_priv *priv)
 {
 	struct iwl_tx_queue *txq = &priv->txq[priv->cmd_queue];
 	struct iwl_queue *q = &txq->q;
-	struct device *dev = &priv->pci_dev->dev;
-	int i;
 	bool huge = false;
+	int i;
 
 	if (q->n_bd == 0)
 		return;
 
-	for (; q->read_ptr != q->write_ptr;
-	     q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd)) {
+	while (q->read_ptr != q->write_ptr) {
 		/* we have no way to tell if it is a huge cmd ATM */
 		i = iwl_legacy_get_cmd_index(q, q->read_ptr, 0);
 
-		if (txq->meta[i].flags & CMD_SIZE_HUGE) {
+		if (txq->meta[i].flags & CMD_SIZE_HUGE)
 			huge = true;
-			continue;
-		}
+		else
+			pci_unmap_single(priv->pci_dev,
+					 dma_unmap_addr(&txq->meta[i], mapping),
+					 dma_unmap_len(&txq->meta[i], len),
+					 PCI_DMA_BIDIRECTIONAL);
 
-		pci_unmap_single(priv->pci_dev,
-				 dma_unmap_addr(&txq->meta[i], mapping),
-				 dma_unmap_len(&txq->meta[i], len),
-				 PCI_DMA_BIDIRECTIONAL);
+		q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd);
 	}
+
 	if (huge) {
 		i = q->n_window;
 		pci_unmap_single(priv->pci_dev,
@@ -169,6 +174,24 @@ void iwl_legacy_cmd_queue_free(struct iwl_priv *priv)
 				 dma_unmap_len(&txq->meta[i], len),
 				 PCI_DMA_BIDIRECTIONAL);
 	}
+}
+EXPORT_SYMBOL(iwl_legacy_cmd_queue_unmap);
+
+/**
+ * iwl_legacy_cmd_queue_free - Deallocate DMA queue.
+ * @txq: Transmit queue to deallocate.
+ *
+ * Empty queue by removing and destroying all BD's.
+ * Free all buffers.
+ * 0-fill, but do not free "txq" descriptor structure.
+ */
+void iwl_legacy_cmd_queue_free(struct iwl_priv *priv)
+{
+	struct iwl_tx_queue *txq = &priv->txq[priv->cmd_queue];
+	struct device *dev = &priv->pci_dev->dev;
+	int i;
+
+	iwl_legacy_cmd_queue_unmap(priv);
 
 	/* De-alloc array of command/tx buffers */
 	for (i = 0; i <= TFD_CMD_SLOTS; i++)
-- 
1.7.1


^ permalink raw reply related

* Re: [PATCH] Move index to common header in management interface
From: Johan Hedberg @ 2011-02-25 15:57 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth, par-gunnar.p.hjalmdahl, henrik.possung
In-Reply-To: <1298554607-2527-1-git-send-email-szymon.janc@tieto.com>

Hi Szymon,

On Thu, Feb 24, 2011, Szymon Janc wrote:
> Match changes introduced in mgmt interface after moving controller
> index to common header.
> ---
>  lib/mgmt.h        |   43 +---------
>  plugins/mgmtops.c |  243 +++++++++++++++++++----------------------------------
>  2 files changed, 90 insertions(+), 196 deletions(-)

Pushed upstream. Thanks.

Now let's try to get the kernel patches to bluetooth-next-2.6 asap. I'll
base all my future work on top of them.

Johan

^ permalink raw reply

* [PATCH v2 1/3] iwlwifi: fix dma mappings and skbs leak
From: Stanislaw Gruszka @ 2011-02-25 15:57 UTC (permalink / raw)
  To: Wey-Yi Guy, Intel Linux Wireless; +Cc: linux-wireless, Stanislaw Gruszka

Since commit commit 470058e0ad82fcfaaffd57307d8bf8c094e8e9d7
"iwlwifi: avoid Tx queue memory allocation in interface down" we do
not unmap dma and free skbs when down device and there is pending
transfer. What in consequence may cause that system hung (waiting
for free skb's) when performing shutdown at iptables module unload.

DMA leak manifest itself following warning:

WARNING: at lib/dma-debug.c:689 dma_debug_device_change+0x15a/0x1b0()
Hardware name: HP xw8600 Workstation
pci 0000:80:00.0: DMA-API: device driver has pending DMA allocations while released from device [count=240]
Modules linked in: iwlagn(-) aes_x86_64 aes_generic fuse cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput hp_wmi sparse_keymap sg wmi microcode serio_raw tg3 arc4 ecb shpchp mac80211 cfg80211 rfkill ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas mptscsih mptbase scsi_transport_sas pata_acpi ata_generic ata_piix ahci libahci floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: iwlagn]
Pid: 9131, comm: rmmod Tainted: G        W   2.6.38-rc6-wl+ #33
Call Trace:
 [<ffffffff810649ef>] ? warn_slowpath_common+0x7f/0xc0
 [<ffffffff81064ae6>] ? warn_slowpath_fmt+0x46/0x50
 [<ffffffff812320ab>] ? dma_debug_device_change+0xdb/0x1b0
 [<ffffffff8123212a>] ? dma_debug_device_change+0x15a/0x1b0
 [<ffffffff8149dc18>] ? notifier_call_chain+0x58/0xb0
 [<ffffffff8108e370>] ? __blocking_notifier_call_chain+0x60/0x90
 [<ffffffff8108e3b6>] ? blocking_notifier_call_chain+0x16/0x20
 [<ffffffff812f570c>] ? __device_release_driver+0xbc/0xe0
 [<ffffffff812f5808>] ? driver_detach+0xd8/0xe0
 [<ffffffff812f45d1>] ? bus_remove_driver+0x91/0x100
 [<ffffffff812f6022>] ? driver_unregister+0x62/0xa0
 [<ffffffff8123d5d4>] ? pci_unregister_driver+0x44/0xa0
 [<ffffffffa05632d1>] ? iwl_exit+0x15/0x1c [iwlagn]
 [<ffffffff810ab492>] ? sys_delete_module+0x1a2/0x270
 [<ffffffff81498da9>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff8100bf42>] ? system_call_fastpath+0x16/0x1b

I still can observe above warning after apply patch, but it is very
hard to reproduce it, and have count=1. Whereas that one is easy to
reproduce using debugfs force_reset while transmitting data, and have
very big counts eg. 240, like quoted here. So count=1 WARNING seems
to be different issue that need to be resolved separately.

v1 -> v2: fix infinity loop bug I made during "for" to "while" loop transition.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c |   12 ++++-
 drivers/net/wireless/iwlwifi/iwl-core.h   |    2 +
 drivers/net/wireless/iwlwifi/iwl-tx.c     |   73 +++++++++++++++++++----------
 3 files changed, 61 insertions(+), 26 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 266490d..a709d05 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -947,7 +947,7 @@ void iwlagn_txq_ctx_reset(struct iwl_priv *priv)
  */
 void iwlagn_txq_ctx_stop(struct iwl_priv *priv)
 {
-	int ch;
+	int ch, txq_id;
 	unsigned long flags;
 
 	/* Turn off all Tx DMA fifos */
@@ -966,6 +966,16 @@ void iwlagn_txq_ctx_stop(struct iwl_priv *priv)
 			    iwl_read_direct32(priv, FH_TSSR_TX_STATUS_REG));
 	}
 	spin_unlock_irqrestore(&priv->lock, flags);
+
+	if (!priv->txq)
+		return;
+
+	/* Unmap DMA from host system and free skb's */
+	for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++)
+		if (txq_id == priv->cmd_queue)
+			iwl_cmd_queue_unmap(priv);
+		else
+			iwl_tx_queue_unmap(priv, txq_id);
 }
 
 /*
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index e0ec170..ed701f9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -509,6 +509,7 @@ void iwl_rx_reply_error(struct iwl_priv *priv,
 * RX
 ******************************************************/
 void iwl_cmd_queue_free(struct iwl_priv *priv);
+void iwl_cmd_queue_unmap(struct iwl_priv *priv);
 int iwl_rx_queue_alloc(struct iwl_priv *priv);
 void iwl_rx_queue_update_write_ptr(struct iwl_priv *priv,
 				  struct iwl_rx_queue *q);
@@ -533,6 +534,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
 void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq,
 			int slots_num, u32 txq_id);
 void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id);
+void iwl_tx_queue_unmap(struct iwl_priv *priv, int txq_id);
 void iwl_setup_watchdog(struct iwl_priv *priv);
 /*****************************************************
  * TX power
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 7e607d3..a91b43f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -86,6 +86,24 @@ void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
 }
 
 /**
+ * iwl_tx_queue_unmap -  Unmap any remaining DMA mappings and free skb's
+ */
+void iwl_tx_queue_unmap(struct iwl_priv *priv, int txq_id)
+{
+	struct iwl_tx_queue *txq = &priv->txq[txq_id];
+	struct iwl_queue *q = &txq->q;
+
+	if (q->n_bd == 0)
+		return;
+
+	 while (q->write_ptr != q->read_ptr) {
+		priv->cfg->ops->lib->txq_free_tfd(priv, txq);
+		q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd);
+	}
+}
+EXPORT_SYMBOL(iwl_tx_queue_unmap);
+
+/**
  * iwl_tx_queue_free - Deallocate DMA queue.
  * @txq: Transmit queue to deallocate.
  *
@@ -96,17 +114,10 @@ void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
 void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id)
 {
 	struct iwl_tx_queue *txq = &priv->txq[txq_id];
-	struct iwl_queue *q = &txq->q;
 	struct device *dev = &priv->pci_dev->dev;
 	int i;
 
-	if (q->n_bd == 0)
-		return;
-
-	/* first, empty all BD's */
-	for (; q->write_ptr != q->read_ptr;
-	     q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd))
-		priv->cfg->ops->lib->txq_free_tfd(priv, txq);
+	iwl_tx_queue_unmap(priv, txq_id);
 
 	/* De-alloc array of command/tx buffers */
 	for (i = 0; i < TFD_TX_CMD_SLOTS; i++)
@@ -132,39 +143,33 @@ void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id)
 }
 
 /**
- * iwl_cmd_queue_free - Deallocate DMA queue.
- * @txq: Transmit queue to deallocate.
- *
- * Empty queue by removing and destroying all BD's.
- * Free all buffers.
- * 0-fill, but do not free "txq" descriptor structure.
+ * iwl_cmd_queue_unmap - Unmap any remaining DMA mappings from command queue
  */
-void iwl_cmd_queue_free(struct iwl_priv *priv)
+void iwl_cmd_queue_unmap(struct iwl_priv *priv)
 {
 	struct iwl_tx_queue *txq = &priv->txq[priv->cmd_queue];
 	struct iwl_queue *q = &txq->q;
-	struct device *dev = &priv->pci_dev->dev;
 	int i;
 	bool huge = false;
 
 	if (q->n_bd == 0)
 		return;
 
-	for (; q->read_ptr != q->write_ptr;
-	     q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {
+	while (q->read_ptr != q->write_ptr) {
 		/* we have no way to tell if it is a huge cmd ATM */
 		i = get_cmd_index(q, q->read_ptr, 0);
 
-		if (txq->meta[i].flags & CMD_SIZE_HUGE) {
+		if (txq->meta[i].flags & CMD_SIZE_HUGE)
 			huge = true;
-			continue;
-		}
+		else
+			pci_unmap_single(priv->pci_dev,
+					 dma_unmap_addr(&txq->meta[i], mapping),
+					 dma_unmap_len(&txq->meta[i], len),
+					 PCI_DMA_BIDIRECTIONAL);
 
-		pci_unmap_single(priv->pci_dev,
-				 dma_unmap_addr(&txq->meta[i], mapping),
-				 dma_unmap_len(&txq->meta[i], len),
-				 PCI_DMA_BIDIRECTIONAL);
+	     q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd);
 	}
+
 	if (huge) {
 		i = q->n_window;
 		pci_unmap_single(priv->pci_dev,
@@ -172,6 +177,24 @@ void iwl_cmd_queue_free(struct iwl_priv *priv)
 				 dma_unmap_len(&txq->meta[i], len),
 				 PCI_DMA_BIDIRECTIONAL);
 	}
+}
+EXPORT_SYMBOL(iwl_cmd_queue_unmap);
+
+/**
+ * iwl_cmd_queue_free - Deallocate DMA queue.
+ * @txq: Transmit queue to deallocate.
+ *
+ * Empty queue by removing and destroying all BD's.
+ * Free all buffers.
+ * 0-fill, but do not free "txq" descriptor structure.
+ */
+void iwl_cmd_queue_free(struct iwl_priv *priv)
+{
+	struct iwl_tx_queue *txq = &priv->txq[priv->cmd_queue];
+	struct device *dev = &priv->pci_dev->dev;
+	int i;
+
+	iwl_cmd_queue_unmap(priv);
 
 	/* De-alloc array of command/tx buffers */
 	for (i = 0; i <= TFD_CMD_SLOTS; i++)
-- 
1.7.1


^ permalink raw reply related

* Re: ASoC updates for 2.6.39
From: Takashi Iwai @ 2011-02-25 15:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Liam Girdwood
In-Reply-To: <20110225124823.GF28980@opensource.wolfsonmicro.com>

At Fri, 25 Feb 2011 12:48:23 +0000,
Mark Brown wrote:
> 
> The following changes since commit fadddc8753ccfab26ee57f3205d6926fe4be1350:
> 
>   ASoC: Add kerneldoc for jack_status_check callback (2011-02-18 09:14:24 -0800)
> 
> are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git for-2.6.39

Pulled now.  Thanks.


Takashi


> Dimitris Papastamos (1):
>       ASoC: soc-dapm: Include quotes around contents in debugfs entries
> 
> Dmitry Eremin-Solenikov (1):
>       ASoC: correct pxa AC97 DAI names
> 
> Justin P. Mattock (1):
>       ASoC: remove one to many l's in the word
> 
> Mark Brown (15):
>       ASoC: Mark WM8958 microphone detection registers readable
>       ASoC: Hook wm_hubs micbiases up to CLK_SYS
>       ASoC: Fix WM8958 default microphone detection argument ordering
>       ASoC: Correct definition of WM8903_VMID_RES_5K
>       ASoC: Hook wm_hubs micbiases up to CLK_SYS
>       Merge branch 'for-2.6.38' into for-2.6.39
>       ASoC: Remove card from snd_soc_dapm_set_bias_level()
>       ASoC: Run bias level changes for all DAPM contexts in parallel
>       ASoC: Mark WM8958 microphone bias registers as readable
>       ASoC: Support WM8958 direct microphone detection IRQ
>       ASoC: Support configuration of WM8958 microphone bias analogue parameters
>       ASoC: Simplify default WM8958 jack detection code
>       ASoC: Pass the jack to jack notifiers
>       ASoC: Remove -codec suffix from WM9081 driver
>       Merge branch 'for-2.6.38' into for-2.6.39
> 
> Stephen Warren (1):
>       ASoC: Tegra: Move utilities to separate module
> 
> Zeng Zhaoming (1):
>       ASoC: Add Freescale SGTL5000 codec support
> 
>  include/linux/mfd/wm8994/pdata.h     |   12 +-
>  include/linux/mfd/wm8994/registers.h |    2 +
>  sound/soc/codecs/Kconfig             |    5 +
>  sound/soc/codecs/Makefile            |    2 +
>  sound/soc/codecs/sgtl5000.c          | 1512 ++++++++++++++++++++++++++++++++++
>  sound/soc/codecs/sgtl5000.h          |  402 +++++++++
>  sound/soc/codecs/wm8903.h            |    2 +-
>  sound/soc/codecs/wm8994-tables.c     |   10 +-
>  sound/soc/codecs/wm8994.c            |  105 ++--
>  sound/soc/codecs/wm9081.c            |    2 +-
>  sound/soc/codecs/wm_hubs.c           |    3 +
>  sound/soc/pxa/e740_wm9705.c          |    4 +-
>  sound/soc/pxa/e750_wm9705.c          |    4 +-
>  sound/soc/pxa/e800_wm9712.c          |    4 +-
>  sound/soc/pxa/em-x270.c              |    4 +-
>  sound/soc/pxa/mioa701_wm9713.c       |    4 +-
>  sound/soc/pxa/palm27x.c              |    4 +-
>  sound/soc/pxa/tosa.c                 |    4 +-
>  sound/soc/pxa/zylonite.c             |    4 +-
>  sound/soc/samsung/dma.c              |    2 +-
>  sound/soc/soc-dapm.c                 |  134 ++--
>  sound/soc/soc-jack.c                 |    2 +-
>  sound/soc/tegra/Makefile             |    3 +-
>  sound/soc/tegra/tegra_asoc_utils.c   |    6 +
>  24 files changed, 2091 insertions(+), 145 deletions(-)
>  create mode 100644 sound/soc/codecs/sgtl5000.c
>  create mode 100644 sound/soc/codecs/sgtl5000.h
> 

^ permalink raw reply

* [PATCH] OMAP: McSPI: catch xfers of non-multiple SPI word size
From: Michael Jones @ 2011-02-25 15:55 UTC (permalink / raw)
  To: linux-omap, spi-devel-general

If an SPI access was not a multiple of the SPI word size,
the while() loop would spin and the rx/tx ptrs would be incremented
indefinitely.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
---
 drivers/spi/omap2_mcspi.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index abb1ffb..9e439be 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -487,6 +487,9 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 	rx_reg		= base + OMAP2_MCSPI_RX0;
 	chstat_reg	= base + OMAP2_MCSPI_CHSTAT0;
 
+	if (c < (word_len>>3))
+		return 0;
+
 	if (word_len <= 8) {
 		u8		*rx;
 		const u8	*tx;
@@ -534,7 +537,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 				dev_vdbg(&spi->dev, "read-%d %02x\n",
 						word_len, *(rx - 1));
 			}
-		} while (c);
+		} while (c > (word_len>>3));
 	} else if (word_len <= 16) {
 		u16		*rx;
 		const u16	*tx;
@@ -581,7 +584,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 				dev_vdbg(&spi->dev, "read-%d %04x\n",
 						word_len, *(rx - 1));
 			}
-		} while (c);
+		} while (c > (word_len>>3));
 	} else if (word_len <= 32) {
 		u32		*rx;
 		const u32	*tx;
@@ -628,7 +631,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 				dev_vdbg(&spi->dev, "read-%d %08x\n",
 						word_len, *(rx - 1));
 			}
-		} while (c);
+		} while (c > (word_len>>3));
 	}
 
 	/* for TX_ONLY mode, be sure all words have shifted out */
-- 
1.7.4.1


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

^ permalink raw reply related

* [PATCH] udev-watch: try inotify_init if inotify_init1 is not available
From: Steffen Sledz @ 2011-02-25 15:55 UTC (permalink / raw)
  To: linux-hotplug

inotify_init1 first appeared in Linux 2.6.27

Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
 udev/udev-watch.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/udev/udev-watch.c b/udev/udev-watch.c
index f51a10d..ac679ec 100644
--- a/udev/udev-watch.c
+++ b/udev/udev-watch.c
@@ -39,6 +39,8 @@ static int inotify_fd = -1;
 int udev_watch_init(struct udev *udev)
 {
 	inotify_fd = inotify_init1(IN_CLOEXEC);
+	if (inotify_fd = -1 && errno = ENOSYS)
+		inotify_fd = inotify_init();
 	if (inotify_fd < 0)
 		err(udev, "inotify_init failed: %m\n");
 	return inotify_fd;
-- 
1.7.1


^ permalink raw reply related

* Re: [PATCH 1/2] acore: deprecated function in wrappers.c
From: Takashi Iwai @ 2011-02-25 15:55 UTC (permalink / raw)
  To: Grzegorz Daniluk; +Cc: alsa-devel
In-Reply-To: <4D67D019.80807@elproma.com.pl>

At Fri, 25 Feb 2011 16:51:53 +0100,
Grzegorz Daniluk wrote:
> 
> Takashi Iwai wrote:
> >
> > Erm... this code is defined _only_ for very old kernels just for
> > compatible wrapper, so following the rule for new kernels doesn't make
> > sense.
> >
> >
> >   
> Then something else is wrong, since this code caused the compilation 
> error(attached below) when I was doing the cross-compilation for the 
> system without PCI for the 2.6.35 kernel (the kernel version was 
> correctly recognized during ./configure):
> 
> /root/alsa-driver-1.0.24/acore/wrappers.c: In function 
> 'snd_pci_dev_present':
> /root/alsa-driver-1.0.24/acore/wrappers.c:200: error: implicit 
> declaration of function 'pci_find_device'
> make[3]: *** [/root/alsa-driver-1.0.24/acore/wrappers.o] Error 1

Then configure script didn't detect the condition properly.
Check CONFIG_HAVE_PCI_DEV_PRESENT in you config.log.  Most likely
a wrong gcc option or path is given, and the check is screwed up.


Takashi



> 
> Greg
> 
> >> Signed-off-by: Grzegorz Daniluk <g.daniluk@elproma.com.pl>
> >> ---
> >>
> >> diff -uprN a/acore/wrappers.c b/acore/wrappers.c
> >> --- a/acore/wrappers.c    2011-01-27 12:09:20.000000000 +0000
> >> +++ b/acore/wrappers.c    2011-02-25 13:41:46.000000000 +0000
> >> @@ -197,7 +197,7 @@ EXPORT_SYMBOL(snd_compat_devfs_mk_cdev);
> >>  int snd_pci_dev_present(const struct pci_device_id *ids)
> >>  {
> >>      while (ids->vendor || ids->subvendor) {
> >> -        if (pci_find_device(ids->vendor, ids->subvendor, NULL))
> >> +        if (pci_get_device(ids->vendor, ids->subvendor, NULL))
> >>              return 1;
> >>          ids++;
> >>      }
> >> _______________________________________________
> >> Alsa-devel mailing list
> >> Alsa-devel@alsa-project.org
> >> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >>
> >>     
> >
> >   
> 

^ permalink raw reply

* RE: [PATCH 0/3] Continue expansion after reboot
From: Kwolek, Adam @ 2011-02-25 15:55 UTC (permalink / raw)
  To: Kwolek, Adam, NeilBrown
  Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
	Neubauer, Wojciech
In-Reply-To: <20110223143756.41139e11@notabene.brown>



> -----Original Message-----
> From: Kwolek, Adam
> Sent: Wednesday, February 23, 2011 10:02 AM
> To: 'NeilBrown'
> Cc: linux-raid@vger.kernel.org; Williams, Dan J; Ciechanowski, Ed;
> Neubauer, Wojciech
> Subject: RE: [PATCH 0/3] Continue expansion after reboot
> 
> 
> 
> > -----Original Message-----
> > From: NeilBrown [mailto:neilb@suse.de]
> > Sent: Wednesday, February 23, 2011 4:38 AM
> > To: Kwolek, Adam
> > Cc: linux-raid@vger.kernel.org; Williams, Dan J; Ciechanowski, Ed;
> > Neubauer, Wojciech
> > Subject: Re: [PATCH 0/3] Continue expansion after reboot
> >
> > On Tue, 22 Feb 2011 15:13:15 +0100 Adam Kwolek <adam.kwolek@intel.com>
> > wrote:
> >
> > > Currently reshaped/expanded array is assembled but it stays in
> > inactive state.
> > > This patches allows for array assembly when array is under
> expansion.
> > > Array with reshape/expansion information in metadata is assembled
> > > and reshape process continues automatically.
> > >
> > > Next step:
> > > Problem is how to address container operation during assembly.
> > > 1. After first array being reshaped, assebly process looks if mdmon
> > >    sets migration for other array in container. If yes it continues
> > work
> > >    for next array.
> > >
> > > 2. Assembly process performs reshape of currently reshaped array
> only.
> > >    Mdmon sets next array for reshape and user triggers manually
> mdadm
> > >    to finish container operation with just the same parameters set.
> > >
> > > Reshape finish can be executed for container operation by container
> > re-assembly
> > > also (this works in current code).
> > >
> >
> > Yes, this is an awkward problem.
> >
> > Just to be sure we are thinking about the same thing:
> >   When restarting an array in which migration is already underway
> mdadm
> > simply
> >   forks and continues monitoring that migration.
> >   However if it is an array-wide migration, then when the migration of
> > the
> >   first array completes, mdmon will update the metadata on the second
> > array,
> >   but it isn't clear how mdadm can be told to start monitoring that
> > array.
> >
> > How about this:
> >   the imsm metadata handler should report that an array is 'undergoing
> >   migration if it is, or if an earlier array in the container is
> > undergoing a
> >   migration which will cause 'this' array to subsequently be migrated
> > too.
> >
> >   So if the first array is in the middle of a 4drive->5drive
> conversion
> > and
> >   the second array is simply at '4 drives', then imsm reported (to
> >   container_content) that the second drive is actually undergoing a
> > migration
> >   from 4 to 5 drives, and is at the very beginning.
> >
> >   When mdadm assembles that second array it will fork a child to
> monitor
> > it.
> >   It will need to somehow wait for mdmon to really update the metadata
> > before
> >   it starts.  This can probably be handled in the ->manage_reshape
> > function.
> >
> > Something along those line would be the right way to go I think.  It
> > avoid
> > any races between arrays being assembled at different times.
> 
> 
> This looks fine for me.
> 
> >
> >
> > > Adam Kwolek (3):
> > >       FIX: Assemble device in reshape state with new disks number
> >
> > I don't think this patch is correct.  We need to configure the array
> > with the
> > 'old' number of devices first, then 'reshape_array' will also set the
> > 'new'
> > number of devices.
> > What exactly what the problem you were  trying to fix?
> 
> When array is being assembled with old raid disk number assembly cannot
> set readOnly array state
> (error on sysfs state writing). Array stays in inactive state, so
> nothing (reshape) happened later.
> 
> I think that array cannot be assembled with old disks number (added new
> disks are present as spares)
> because begin of array uses new disks already. This means we are
> assembling array with not complete disk set.
> Stripes on begin can be corrupted (not all disks present in array). At
> this point inactive array state is ok to keep safe user data.
> 
> 
> I'll test is setting old disk number and later configuration change in
> disks number and array state resolves problem.
> I'll let you know results.

I've made some investigations. I've tried assemble algorithm (as you suggested):
Conditions:
 reshape 3 disk raid5 array to 4 disks raid5 array
   is interrupted. Restart is invoked by command 'mdadm -As'

1. Assemble() builds container with new disks number
2. Assemble() builds container content (array with /old/ 3 disks)
3. array is set to frozen to block monitor
4. sync_max in sysfs is set to 0, to block md until reshape monitoring takes carry about reshape process
5. Continue_reshape() starts reshape process
6. Continue_reshape() continues reshape process

Problems I've met:
1. not all disks in Assembly() are added to array (old disks number limitation)
2. setting reshape_position invokes automatically reshape start in md on array run
3. setting of reshape position clears delta_disks in md (and other parameters, for now not important)
4. Assembly() closes handle to array (it has to be not closed and used in reshape continuation)
5. reshape continuation can require backup file. It depends where it was interrupted during expansion,
   Other reshapes can always require backup file 
6. to run reshape, 'reshape' has to be written to sync_action.
    Raid5_start_reshape() is not prepared for reshape restart (i.e reshape position can be 0 or max array value
    - it depends on operation grow/shrink)
7. After array start flag MD_RECOVERY_NEEDED is set, so reshape cannot be started from mdadm
    As array is started with not all disks (old raid disks), we cannot allow for such check (???)
    I've made workaround (setting reshape position clears this flag for external meta)

I've started reshape again on /all/ new disks number, but it still starts from array begin. This is a matter of search where checkpoint is lost.

I've tested my first idea also.
To do as much as we can, as for native meta (reshape is started by array run).
Some problems are similar as before (p.4, p.5)
The only serious problem, that I've got with this is how to let to know md about delta_disks.
I've resolved it by adding special case in raid_disks_store(), 
similar to native metadata when old_disks number is guessed.
For external metadata, I am storing old and then new disks numbers, md calculates delta disks from this raid disks numbers sequence. 
(as I remember you do not want to expose delta disks in sysfs). 

Other issue that I'm observing in both methods is sync_action sysfs entry behavior. It reports reshape->idle->reshape...
This 'idle' for a very short time causes migration cancelation. I've made workaround in mdmon for a now.

Both methods are not fully workable yet, but I think this will change on Monday.

Considering above, I still like more method when we construct array with new disks number.
Begin of array /already reshaped/ has all disks present. In the same way md works for native arrays.

I'm waiting for your comments/questions/ideas.

BR
Adam

> 
> BR
> Adam
> 
> >
> >
> > >       imsm: FIX: Report correct array size during reshape
> > >       imsm: FIX: initalize reshape progress as it is stored in
> > metatdata
> > >
> > These both look good - I have applied them.  Thanks.
> >
> > NeilBrown
> >


^ permalink raw reply

* Re: [PATCH v4 6/7] arm/dt: Basic tegra devicetree support
From: Grant Likely @ 2011-02-25 15:54 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-kernel, linux-arm-kernel, Nicolas Pitre, Russell King
In-Reply-To: <4D67AEEE.30000@ru.mvista.com>

On Fri, Feb 25, 2011 at 6:30 AM, Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> On 24-02-2011 0:36, Grant Likely wrote:
>>>> v2: Fixed cut-and-paste error in commit text
>
>>>    Shouldn't this sentence follow the --- tearline?
>
>> Nope!  It is actually quite useful for the version information to show
>> up in the commit text.  That way you know *exactly* which version got
>> merged.  dwmw2 pointed that out to me a few months back.
>
>   Well, I think that depends on the patch. If you have say 9 revisions with
> significant changes (that's what I actually had) and the revision history
> far exceeds the original patch description, then this will just become too
> ugly I think...

Meh.  commit text is cheap and useful.

g.

^ permalink raw reply

* [Cluster-devel] conga/luci cluster/cluster_svc-macros cluster/ ...
From: rmccabe @ 2011-02-25 15:54 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2011-02-25 15:54:34

Modified files:
	luci/cluster   : cluster_svc-macros fence-macros 
	                 resource-form-macros resource_form_handlers.js 
	                 validate_fence.js 
	luci/site/luci/Extensions: FenceHandler.py LuciClusterInfo.py 
	                           ResourceHandler.py 
	luci/site/luci/Extensions/ClusterModel: FenceDeviceAttr.py 
	                                        ModelBuilder.py 
Added files:
	luci/site/luci/Extensions/ClusterModel: OracleInstance.py 
	                                        OracleListener.py 

Log message:
	Sync up with upstream

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_svc-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.12&r2=1.3.2.13
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.18&r2=1.2.2.19
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.18&r2=1.21.2.19
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.20.2.19&r2=1.20.2.20
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.14&r2=1.1.2.15
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.23&r2=1.4.2.24
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterInfo.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.20&r2=1.1.4.21
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ResourceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.10&r2=1.1.4.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/OracleInstance.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/OracleListener.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.5&r2=1.5.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.16&r2=1.1.4.17

--- conga/luci/cluster/cluster_svc-macros	2009/05/21 13:32:04	1.3.2.12
+++ conga/luci/cluster/cluster_svc-macros	2011/02/25 15:54:33	1.3.2.13
@@ -554,6 +554,12 @@
 	<tal:block tal:condition="python: type == 'oracledb'">
 		<div metal:use-macro="here/resource-form-macros/macros/oracledb_macro" />
 	</tal:block>
+	<tal:block tal:condition="python: type == 'oralistener'">
+		<div metal:use-macro="here/resource-form-macros/macros/oralistener_macro" />
+	</tal:block>
+	<tal:block tal:condition="python: type == 'orainstance'">
+		<div metal:use-macro="here/resource-form-macros/macros/orainstance_macro" />
+	</tal:block>
 </div>
 
 <div metal:define-macro="failover-prefs-macro" tal:omit-tag="">
--- conga/luci/cluster/fence-macros	2010/09/29 17:08:24	1.2.2.18
+++ conga/luci/cluster/fence-macros	2011/02/25 15:54:33	1.2.2.19
@@ -266,8 +266,12 @@
 		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ifmib" />
 	</tal:block>
 
-	<tal:block tal:condition="python: cur_fence_type == 'fence_ucs'">
-		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ucs" />
+	<tal:block tal:condition="python: cur_fence_type == 'fence_cisco_ucs'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-cisco_ucs" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_rhevm'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-rhevm" />
 	</tal:block>
 
 	<tal:block tal:condition="python: cur_fence_type == 'fence_manual'">
@@ -356,7 +360,8 @@
 	<option name="fence_vmware" value="fence_vmware">VMware Fencing</option>
 	<option name="fence_lpar" value="fence_lpar">LPAR Fencing</option>
 	<option name="fence_cisco_mds" value="fence_cisco_mds">Cisco MDS</option>
-	<option name="fence_ucs" value="fence_ucs">Cisco UCS</option>
+	<option name="fence_cisco_ucs" value="fence_cisco_ucs">Cisco UCS</option>
+	<option name="fence_rhevm" value="fence_rhevm">RHEV-M Fencing</option>
 	<option name="fence_ifmib" value="fence_ifmib">IF MIB</option>
 </div>
 
@@ -384,7 +389,8 @@
 	<option name="fence_vmware" value="fence_vmware">VMware Fencing</option>
 	<option name="fence_lpar" value="fence_lpar">LPAR Fencing</option>
 	<option name="fence_cisco_mds" value="fence_cisco_mds">Cisco MDS</option>
-	<option name="fence_ucs" value="fence_ucs">Cisco UCS</option>
+	<option name="fence_cisco_ucs" value="fence_cisco_ucs">Cisco UCS</option>
+	<option name="fence_rhevm" value="fence_rhevm">RHEV-M Fencing</option>
 	<option name="fence_ifmib" value="fence_ifmib">IF MIB</option>
 	<option name="fence_manual" value="fence_manual">Manual Fencing</option>
 </div>
@@ -1844,10 +1850,98 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-ucs"
+<div metal:define-macro="fence-form-rhevm"
 	tal:attributes="id cur_fencedev/name | nothing">
 
-	<div id="fence_ucs" class="fencedev">
+	<div id="fence_rhevm" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>RHEV-M</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP port (optional)</td>
+				<td>
+					<input name="ipport" type="text" class="text"
+						tal:attributes="value cur_fencedev/ipport | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						tal:attributes="value cur_fencedev/login | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="passwd" type="password" autocomplete="off"
+						tal:attributes="value cur_fencedev/passwd | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Use SSL connections</td>
+				<td>
+					<input tal:condition="exists:cur_fencedev"
+						type="checkbox" name="ssl"
+						tal:attributes="
+							checked python:(cur_fencedev and cur_fencedev.has_key('ssl') and (cur_fencedev['ssl'] == '1' or cur_fencedev['ssl'].lower() == 'true')) and 'checked' or ''" />
+					<input tal:condition="not:exists:cur_fencedev"
+						type="checkbox" name="ssl" />
+				</td>
+			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="fence_type" value="fence_rhevm" />
+		<input type="hidden" name="sharable" value="1" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-cisco_ucs"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_cisco_ucs" class="fencedev">
 		<table>
 			<tr>
 				<td><strong class="cluster">Fence Type</strong></td>
@@ -1927,7 +2021,7 @@
 				tal:attributes="value cur_fencedev/name | nothing" />
 		</tal:block>
 
-		<input type="hidden" name="fence_type" value="fence_ucs" />
+		<input type="hidden" name="fence_type" value="fence_cisco_ucs" />
 		<input type="hidden" name="sharable" value="1" />
 	</div>
 </div>
@@ -2362,7 +2456,8 @@
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-vmware" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ifmib" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-cisco_mds" />
-	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ucs" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-cisco_ucs" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-rhevm" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-manual" />
 </div>
 
@@ -2383,7 +2478,8 @@
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-vmware" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ifmib" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-cisco_mds" />
-	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ucs" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-cisco_ucs" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-rhevm" />
 </div>
 
 <div metal:define-macro="shared-fence-device-list">
@@ -2995,9 +3091,47 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-ucs"
+<div metal:define-macro="fence-instance-form-rhevm"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_rhevm_instance" name="fence_rhevm" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value cur_instance/port | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_rhevm" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-cisco_ucs"
 	tal:omit-tag="exists: cur_fence_dev_id">
-	<div id="fence_ucs_instance" name="fence_ucs" class="fencedev_instance"
+	<div id="fence_cisco_ucs_instance" name="fence_cisco_ucs" class="fencedev_instance"
 		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
@@ -3024,7 +3158,7 @@
 
 		<input type="hidden" name="option" tal:condition="exists:cur_instance"
 			tal:attributes="value cur_instance/option |nothing" />
-		<input type="hidden" name="fence_type" value="fence_ucs" />
+		<input type="hidden" name="fence_type" value="fence_cisco_ucs" />
 		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
@@ -3144,7 +3278,9 @@
 		metal:use-macro="here/fence-macros/macros/fence-instance-form-ifmib" />
 
 	<tal:block
-		metal:use-macro="here/fence-macros/macros/fence-instance-form-ucs" />
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-cisco_ucs" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-rhevm" />
 </div>
 
 <div metal:define-macro="fencedev-instance-cond-ladder"
@@ -3230,9 +3366,14 @@
 			metal:use-macro="here/fence-macros/macros/fence-instance-form-ifmib" />
 	</tal:block>
 
-	<tal:block tal:condition="python: cur_fence_type == 'fence_ucs'">
+	<tal:block tal:condition="python: cur_fence_type == 'fence_cisco_ucs'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-cisco_ucs" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_rhevm'">
 		<tal:block
-			metal:use-macro="here/fence-macros/macros/fence-instance-form-ucs" />
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-rhevm" />
 	</tal:block>
 </div>
 
--- conga/luci/cluster/resource-form-macros	2010/09/29 17:08:24	1.21.2.18
+++ conga/luci/cluster/resource-form-macros	2011/02/25 15:54:33	1.21.2.19
@@ -173,6 +173,10 @@
 				<option name="ASEHAagent" value="ASEHAagent">Sybase ASE Failover Instance</option>
 			</tal:block>
 			<option name="oracledb" value="oracledb">Oracle 10g Failover Instance</option>
+			<tal:block tal:condition="python:clusterinfo and clusterinfo.get('has_split_oracle_agents') == True">
+				<option name="orainstance" value="orainstance">Oracle DB Agent</option>
+				<option name="oralistener" value="oralistener">Oracle Listener Agent</option>
+			</tal:block>
 		</select>
 	</form>
 
@@ -196,6 +200,8 @@
 		<div metal:use-macro="here/resource-form-macros/macros/SAPDatabase_macro" />
 		<div metal:use-macro="here/resource-form-macros/macros/ASEHAagent_macro" />
 		<div metal:use-macro="here/resource-form-macros/macros/oracledb_macro" />
+		<div metal:use-macro="here/resource-form-macros/macros/orainstance_macro" />
+		<div metal:use-macro="here/resource-form-macros/macros/oralistener_macro" />
 	</div>
 </div>
 
@@ -230,6 +236,10 @@
 			</tal:block>
 
 			<option name="oracledb" value="oracledb">Oracle 10g Failover Instance</option>
+			<tal:block tal:condition="python:clusterinfo and clusterinfo.get('has_split_oracle_agents') == True">
+				<option name="orainstance" value="orainstance">Oracle DB Agent</option>
+				<option name="oralistener" value="oralistener">Oracle Listener Agent</option>
+			</tal:block>
 		</select>
 	</form>
 
@@ -277,6 +287,8 @@
 		<div metal:use-macro="here/resource-form-macros/macros/SAPDatabase_macro" />
 		<div metal:use-macro="here/resource-form-macros/macros/ASEHAagent_macro" />
 		<div metal:use-macro="here/resource-form-macros/macros/oracledb_macro" />
+		<div metal:use-macro="here/resource-form-macros/macros/orainstance_macro" />
+		<div metal:use-macro="here/resource-form-macros/macros/oralistener_macro" />
 	</div>
 </div>
 
@@ -1559,6 +1571,168 @@
 	</form>
 </div>
 
+<div class="rescfg" name="orainstance"
+	tal:attributes="id res/name | nothing" metal:define-macro="orainstance_macro">
+	<p class="reshdr">Oracle 10g Failover Instance</p>
+
+	<form method="post"
+		tal:attributes="name res/parent_uuid | nothing"
+		tal:define="editDisabled resourceIsRef | nothing">
+
+	<input name="immutable" type="hidden" value="true"
+		tal:condition="editDisabled" />
+
+	<input name="edit" type="hidden" value="true"
+		tal:condition="python: ptype == '33' and True or False" />
+
+	<input name="pagetype" type="hidden"
+		tal:attributes="value python: ptype" />
+
+	<input name="global" type="hidden"
+		tal:attributes="value resourceIsRef | nothing" />
+
+	<input name="parent_uuid" type="hidden"
+		tal:attributes="value res/parent_uuid | nothing" />
+
+	<input name="uuid" type="hidden"
+		tal:attributes="value res/uuid | nothing" />
+
+	<input name="tree_level" type="hidden"
+		tal:attributes="value res/indent_ctr | string:0" />
+
+	<input name="clustername" type="hidden"
+		tal:attributes="
+			value request/clustername | request/form/clustername | nothing" />
+
+	<input name="oldname" type="hidden"
+		tal:attributes="value res/name | nothing" />
+
+	<input name="type" type="hidden" value="orainstance" />
+
+	<table class="systemsTable">
+		<tr class="systemsTable">
+			<td class="systemsTable">Instance name (SID) of Oracle instance</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="resourcename"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/name | nothing" />
+			</td>
+		</tr>
+		<tr class="systemsTable">
+			<td class="systemsTable">Oracle user name</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="user"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/user | nothing" />
+			</td>
+		</tr>
+		<tr class="systemsTable">
+			<td class="systemsTable">Oracle application home directory</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="home"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/home | nothing" />
+			</td>
+		</tr>
+		<tr class="systemsTable">
+			<td class="systemsTable">List of Oracle listeners (optional, separated by spaces)</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="listeners"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/listeners | nothing" />
+			</td>
+		</tr>
+		<tr class="systemsTable">
+			<td class="systemsTable">Path to lock file (optional)</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="lockfile"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/lockfile | nothing" />
+			</td>
+		</tr>
+	</table>
+	
+	<div metal:use-macro="here/resource-form-macros/macros/res_form_footer" />
+	</form>
+</div>
+
+<div class="rescfg" name="oralistener"
+	tal:attributes="id res/name | nothing" metal:define-macro="oralistener_macro">
+	<p class="reshdr">Oracle 10g Listener Instance</p>
+
+	<form method="post"
+		tal:attributes="name res/parent_uuid | nothing"
+		tal:define="editDisabled resourceIsRef | nothing">
+
+	<input name="immutable" type="hidden" value="true"
+		tal:condition="editDisabled" />
+
+	<input name="edit" type="hidden" value="true"
+		tal:condition="python: ptype == '33' and True or False" />
+
+	<input name="pagetype" type="hidden"
+		tal:attributes="value python: ptype" />
+
+	<input name="global" type="hidden"
+		tal:attributes="value resourceIsRef | nothing" />
+
+	<input name="parent_uuid" type="hidden"
+		tal:attributes="value res/parent_uuid | nothing" />
+
+	<input name="uuid" type="hidden"
+		tal:attributes="value res/uuid | nothing" />
+
+	<input name="tree_level" type="hidden"
+		tal:attributes="value res/indent_ctr | string:0" />
+
+	<input name="clustername" type="hidden"
+		tal:attributes="
+			value request/clustername | request/form/clustername | nothing" />
+
+	<input name="oldname" type="hidden"
+		tal:attributes="value res/name | nothing" />
+
+	<input name="type" type="hidden" value="oralistener" />
+
+	<table class="systemsTable">
+		<tr class="systemsTable">
+			<td class="systemsTable">Listener Name</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="resourcename"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/name | nothing" />
+			</td>
+		</tr>
+		<tr class="systemsTable">
+			<td class="systemsTable">Oracle user name</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="user"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/user | nothing" />
+			</td>
+		</tr>
+		<tr class="systemsTable">
+			<td class="systemsTable">Oracle application home directory</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="home"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/home | nothing" />
+			</td>
+		</tr>
+	</table>
+	
+	<div metal:use-macro="here/resource-form-macros/macros/res_form_footer" />
+	</form>
+</div>
+
 <div class="rescfg" name="ASEHAagent"
 	tal:attributes="id res/name | nothing" metal:define-macro="ASEHAagent_macro">
 	<p class="reshdr">Sybase ASE Failover Instance Configuration</p>
--- conga/luci/cluster/resource_form_handlers.js	2010/08/07 02:39:59	1.20.2.19
+++ conga/luci/cluster/resource_form_handlers.js	2011/02/25 15:54:33	1.20.2.20
@@ -307,6 +307,8 @@
 form_validators['SAPDatabase'] = validate_sapdatabase;
 form_validators['ASEHAagent'] = validate_sybase;
 form_validators['oracledb'] = validate_oracle;
+form_validators['orainstance'] = validate_oracle;
+form_validators['oralistener'] = validate_oracle;
 
 function check_form(form) {
 	var valfn = form_validators[form.type.value];
--- conga/luci/cluster/validate_fence.js	2010/09/29 17:08:24	1.1.2.14
+++ conga/luci/cluster/validate_fence.js	2011/02/25 15:54:33	1.1.2.15
@@ -24,7 +24,8 @@
 fence_inst_validator['vmware'] = [ 'port' ];
 fence_inst_validator['cisco_mds'] = [ 'port' ];
 fence_inst_validator['ifmib'] = [ 'port' ];
-fence_inst_validator['ucs'] = [ 'port' ];
+fence_inst_validator['cisco_ucs'] = [ 'port' ];
+fence_inst_validator['rhevm'] = [ 'port' ];
 
 var fence_validator = [];
 fence_validator['apc'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
@@ -50,7 +51,8 @@
 fence_validator['lpar'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
 fence_validator['cisco_mds'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
 fence_validator['ifmib'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
-fence_validator['ucs'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
+fence_validator['cisco_ucs'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
+fence_validator['rhevm'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
 fence_validator['vmware'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script', 'vmlogin' ];
 fence_validator['xvm'] = [];
 
--- conga/luci/site/luci/Extensions/FenceHandler.py	2010/09/29 17:08:25	1.4.2.23
+++ conga/luci/site/luci/Extensions/FenceHandler.py	2011/02/25 15:54:33	1.4.2.24
@@ -776,7 +776,98 @@
 
 	return errors
 
-def val_ucs_fd(form, fencedev):
+def val_cisco_ucs_fd(form, fencedev):
+	errors = list()
+
+	try:
+		ip = form['ipaddr'].strip()
+		if not ip:
+			raise Exception, 'blank'
+		fencedev.addAttribute('ipaddr', ip)
+	except Exception, e:
+		errors.append(FD_PROVIDE_IP)
+
+	try:
+		log = form['login'].strip()
+		if not log:
+			raise Exception, 'blank'
+		fencedev.addAttribute('login', log)
+	except Exception, e:
+		errors.append(FD_PROVIDE_LOGIN)
+
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
+	try:
+		ipport = form['ipport'].strip()
+		if ipport:
+			ipport = int(ipport)
+			if ipport < 1 or ipport & 0xffff != ipport:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		ipport = None
+	except Exception, e:
+		ipport = None
+		errors.append('An invalid value for ipport was given: "%s"' % form['ipport'])
+	if ipport:
+		fencedev.addAttribute('ipport', str(ipport))
+	else:
+		fencedev.removeAttribute('ipport')
+
+	use_ssl = form.has_key('ssl') and form['ssl'].lower() in ('1', 'on', 'true')
+	if use_ssl:
+		fencedev.addAttribute('ssl', '1')
+	else:
+		fencedev.removeAttribute('ssl')
+
+	has_passwd = False
+	try:
+		pwd = form['passwd'].strip()
+		if not pwd:
+			# Allow passwords that consist of only spaces.
+			if not form.has_key('passwd') or form['passwd'] == '':
+				raise Exception, 'blank'
+			else:
+				pwd = form['passwd']
+		fencedev.addAttribute('passwd', pwd)
+		has_passwd = True
+	except Exception, e:
+		try:
+			fencedev.removeAttribute('passwd')
+		except:
+			pass
+
+	try:
+		pwd_script = form['passwd_script'].strip()
+		if not pwd_script:
+			raise Exception, 'blank'
+		fencedev.addAttribute('passwd_script', pwd_script)
+		has_passwd = True
+	except Exception, e:
+		try:
+			fencedev.removeAttribute('passwd_script')
+		except:
+			pass
+
+	if not has_passwd:
+		errors.append(FD_PROVIDE_PASSWD)
+
+	return errors
+
+def val_rhevm_fd(form, fencedev):
 	errors = list()
 
 	try:
@@ -1476,7 +1567,8 @@
 	'fence_egenera':		val_egenera_fd,
 	'fence_bullpap':		val_bullpap_fd,
 	'fence_lpar':			val_lpar_fd,
-	'fence_ucs':			val_ucs_fd,
+	'fence_rhevm':			val_rhevm_fd,
+	'fence_cisco_ucs':		val_cisco_ucs_fd,
 	'fence_cisco_mds':		val_cisco_mds_fd,
 	'fence_ifmib':			val_cisco_mds_fd,
 	'fence_vmware':			val_vmware_fd,
@@ -1795,7 +1887,20 @@
 
 	return errors
 
-def val_ucs_fi(form, fenceinst):
+def val_cisco_ucs_fi(form, fenceinst):
+	errors = list()
+
+	try:
+		port = form['port'].strip()
+		if not port:
+			raise Exception, 'blank'
+		fenceinst.addAttribute('port', port)
+	except Exception, e:
+		errors.append(FI_PROVIDE_PORT)
+
+	return errors
+
+def val_rhevm_fi(form, fenceinst):
 	errors = list()
 
 	try:
@@ -1832,7 +1937,8 @@
 	'fence_xvm':			val_xvm_fi,
 	'fence_scsi':			val_scsi_fi,
 	'fence_lpar':			val_lpar_fi,
-	'fence_ucs':			val_ucs_fi,
+	'fence_rhevm':			val_rhevm_fi,
+	'fence_cisco_ucs':		val_cisco_ucs_fi,
 	'fence_cisco_mds':		val_cisco_mds_fi,
 	'fence_ifmib':			val_cisco_mds_fi,
 	'fence_vmware':			val_vmware_fi,
--- conga/luci/site/luci/Extensions/LuciClusterInfo.py	2010/09/29 17:08:25	1.1.4.20
+++ conga/luci/site/luci/Extensions/LuciClusterInfo.py	2011/02/25 15:54:33	1.1.4.21
@@ -606,6 +606,7 @@
 	clumap['sap_agent_v19'] = False
 	clumap['has_qemu'] = False
 	clumap['has_sybase_agent'] = False
+	clumap['has_split_oracle_agents'] = False
 	try:
 		cluster_os = model.getClusterOS()
 		if cluster_os.find('Tikanga') != -1:
@@ -622,6 +623,8 @@
 			if os_minor > 3:
 				clumap['sap_agent_v19'] = True
 				clumap['has_qemu'] = True
+			if os_minor > 5:
+				clumap['has_split_oracle_agents'] = True
 		elif cluster_os.find('Nahant') != -1:
 			clumap['os_major'] = 4
 			os_minor = int(cluster_os[cluster_os.find('Update ') + 7])
--- conga/luci/site/luci/Extensions/ResourceHandler.py	2010/08/07 03:16:02	1.1.4.10
+++ conga/luci/site/luci/Extensions/ResourceHandler.py	2011/02/25 15:54:33	1.1.4.11
@@ -22,6 +22,8 @@
 from ClusterModel.SAPDatabase import SAPDatabase
 from ClusterModel.SAPInstance import SAPInstance
 from ClusterModel.OracleDB import OracleDB
+from ClusterModel.OracleInstance import OracleInstance
+from ClusterModel.OracleListener import OracleListener
 from ClusterModel.SybaseASE import SybaseASE
 
 from LuciZope import GetFormVars
@@ -817,25 +819,45 @@
 			res.addAttribute('type', dbtype)
 	return errors
 
+def addOracleInstance(res, rname, form, model):
+	params = (
+		('user', 'Oracle User Name', True, None),
+		('home', 'Oracle Home Directory', True, None),
+		('listeners', 'Oracle listeners', False, None),
+		('lockfile', 'Path to lock file', False, None),
+	)
+	errors = config_resource(params, res, rname, form)
+	return errors
+
+def addOracleListener(res, rname, form, model):
+	params = (
+		('user', 'Oracle User Name', True, None),
+		('home', 'Oracle Home Directory', True, None),
+	)
+	errors = config_resource(params, res, rname, form)
+	return errors
+
 resource_table = {
-	'ip':			( addIp,			Ip			),
-	'fs':			( addFs,			Fs			),
-	'gfs':			( addClusterfs,		Clusterfs	),
-	'nfsm':			( addNetfs,			Netfs		),
-	'nfsx':			( addNFSExport,		NFSExport	),
-	'nfsc':			( addNFSClient,		NFSClient	),
-	'scr':			( addScript,		Script		),
-	'smb':			( addSamba,			Samba		),
-	'tomcat-5':		( addTomcat5,		Tomcat5		),
-	'postgres-8':	( addPostgres8,		Postgres8	),
-	'apache':		( addApache,		Apache		),
-	'openldap':		( addOpenLDAP,		OpenLDAP	),
-	'lvm':			( addLVM,			LVM			),
-	'mysql':		( addMySQL,			MySQL		),
-	'SAPDatabase':	( addSAPDatabase,	SAPDatabase	),
-	'SAPInstance':	( addSAPInstance,	SAPInstance	),
-	'oracledb':		( addOracleDB,		OracleDB	),
-	'ASEHAagent':	( addSybaseASE,		SybaseASE	)
+	'ip':			( addIp,				Ip				),
+	'fs':			( addFs,				Fs				),
+	'gfs':			( addClusterfs,			Clusterfs		),
+	'nfsm':			( addNetfs,				Netfs			),
+	'nfsx':			( addNFSExport,			NFSExport		),
+	'nfsc':			( addNFSClient,			NFSClient		),
+	'scr':			( addScript,			Script			),
+	'smb':			( addSamba,				Samba			),
+	'tomcat-5':		( addTomcat5,			Tomcat5			),
+	'postgres-8':	( addPostgres8,			Postgres8		),
+	'apache':		( addApache,			Apache			),
+	'openldap':		( addOpenLDAP,			OpenLDAP		),
+	'lvm':			( addLVM,				LVM				),
+	'mysql':		( addMySQL,				MySQL			),
+	'SAPDatabase':	( addSAPDatabase,		SAPDatabase		),
+	'SAPInstance':	( addSAPInstance,		SAPInstance		),
+	'oracledb':		( addOracleDB,			OracleDB		),
+	'orainstance':	( addOracleInstance,	OracleInstance	),
+	'oralistener':	( addOracleListener,	OracleListener	),
+	'ASEHAagent':	( addSybaseASE,			SybaseASE		)
 }
 
 def create_resource(res_type, form, model):
--- conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py	2010/09/29 17:08:25	1.5.2.5
+++ conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py	2011/02/25 15:54:33	1.5.2.6
@@ -32,8 +32,9 @@
 	'fence_rps10':			'RPS10 Serial Switch',
 	'fence_lpar':			'LPAR Fencing',
 	'fence_vmware':			'VMware Fencing',
+	'fence_rhevm':			'RHEV-M Fencing',
 	'fence_cisco_mds':		'Cisco MDS',
-	'fence_ucs':			'Cisco UCS',
+	'fence_cisco_ucs':		'Cisco UCS',
 	'fence_ifmib':			'IF MIB',
 	'fence_manual':			'Manual Fencing'
 }
@@ -53,8 +54,9 @@
 	'fence_scsi':			True,
 	'fence_lpar':			True,
 	'fence_vmware':			True,
+	'fence_rhevm':			True,
 	'fence_cisco_mds':		True,
-	'fence_ucs':			True,
+	'fence_cisco_ucs':		True,
 	'fence_ifmib':			True,
 	'fence_ilo':			False,
 	'fence_ilo_mp':			False,
@@ -100,8 +102,9 @@
 	'fence_scsi':			( 'node' ),
 	'fence_lpar':			( 'partition' ),
 	'fence_vmware':			( 'port' ),
+	'fence_rhevm':			( 'port' ),
 	'fence_cisco_mds':		( 'port' ),
-	'fence_ucs':			( 'port' ),
+	'fence_cisco_ucs':		( 'port' ),
 	'fence_ifmib':			( 'port' ),
 	'fence_ilo':			( ),
 	'fence_ipmilan':		( ),
@@ -138,9 +141,11 @@
 		( 'name', 'ipaddr', 'login', 'passwd' ),
 	'fence_vmware':
 		( 'name', 'ipaddr', 'login', 'passwd', 'vmlogin', 'vmpasswd' ),
+	'fence_rhevm':
+		( 'name', 'ipaddr', 'login', 'passwd' ),
 	'fence_cisco_mds':
 		( 'name', 'ipaddr', 'login', 'passwd' ),
-	'fence_ucs':
+	'fence_cisco_ucs':
 		( 'name', 'ipaddr', 'login', 'passwd' ),
 	'fence_ifmib':
 		( 'name', 'ipaddr', 'login', 'passwd' ),
--- conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py	2010/09/29 17:08:25	1.1.4.16
+++ conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py	2011/02/25 15:54:33	1.1.4.17
@@ -35,6 +35,8 @@
 from SAPInstance import SAPInstance
 from SybaseASE import SybaseASE 
 from OracleDB import OracleDB
+from OracleInstance import OracleInstance
+from OracleListener import OracleListener
 from Multicast import Multicast
 from FenceDaemon import FenceDaemon
 from FenceXVMd import FenceXVMd
@@ -97,6 +99,8 @@
              'SAPInstance': SAPInstance,
              'ASEHAagent': SybaseASE,
              'oracledb': OracleDB,
+             'orainstance': OracleInstance,
+             'oralistener': OracleListener,			
              'device': Device }
 
 



^ permalink raw reply

* [PATCH v4 6/7] arm/dt: Basic tegra devicetree support
From: Grant Likely @ 2011-02-25 15:54 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <4D67AEEE.30000@ru.mvista.com>

On Fri, Feb 25, 2011 at 6:30 AM, Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> On 24-02-2011 0:36, Grant Likely wrote:
>>>> v2: Fixed cut-and-paste error in commit text
>
>>> ? ?Shouldn't this sentence follow the --- tearline?
>
>> Nope! ?It is actually quite useful for the version information to show
>> up in the commit text. ?That way you know *exactly* which version got
>> merged. ?dwmw2 pointed that out to me a few months back.
>
> ? Well, I think that depends on the patch. If you have say 9 revisions with
> significant changes (that's what I actually had) and the revision history
> far exceeds the original patch description, then this will just become too
> ugly I think...

Meh.  commit text is cheap and useful.

g.

^ permalink raw reply

* Re: [PATCH] Update mgmt-api.txt with controller index moved to mgmt packet header
From: Johan Hedberg @ 2011-02-25 15:53 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth, par-gunnar.p.hjalmdahl, henrik.possung
In-Reply-To: <1298482761-19986-1-git-send-email-szymon.janc@tieto.com>

Hi Szymon,

On Wed, Feb 23, 2011, Szymon Janc wrote:
> ---
>  doc/mgmt-api.txt |  214 ++++++++++++++++++++++++++++--------------------------
>  1 files changed, 110 insertions(+), 104 deletions(-)

Pushed upstream. Thanks.

Johan

^ permalink raw reply

* [PATCH 4/7] ipv6: hash is calculated but not used afterwards
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw
In-Reply-To: <1298648721-3026-1-git-send-email-hagen@jauu.net>

hash is declared and assigned but not used anymore. ipv6_addr_hash()
exhibit no side-effects.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/addrconf.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index fd6782e..3daaf3c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -718,12 +718,9 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
 	struct inet6_ifaddr *ifa, *ifn;
 	struct inet6_dev *idev = ifp->idev;
 	int state;
-	int hash;
 	int deleted = 0, onlink = 0;
 	unsigned long expires = jiffies;
 
-	hash = ipv6_addr_hash(&ifp->addr);
-
 	spin_lock_bh(&ifp->state_lock);
 	state = ifp->state;
 	ifp->state = INET6_IFADDR_STATE_DEAD;
-- 
1.7.2.3


^ permalink raw reply related

* [PATCH 7/7] sched: protocol only needed when CONFIG_NET_CLS_ACT is enabled
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw
In-Reply-To: <1298648721-3026-1-git-send-email-hagen@jauu.net>

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/sched/sch_api.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 1507415..7490f3f 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1672,12 +1672,12 @@ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
 		struct tcf_result *res)
 {
 	int err = 0;
-	__be16 protocol;
 #ifdef CONFIG_NET_CLS_ACT
+	__be16 protocol;
 	struct tcf_proto *otp = tp;
 reclassify:
-#endif
 	protocol = skb->protocol;
+#endif
 
 	err = tc_classify_compat(skb, tp, res);
 #ifdef CONFIG_NET_CLS_ACT
-- 
1.7.2.3


^ permalink raw reply related

* [PATCH 3/7] ipv6: totlen is declared and assigned but not used
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw
In-Reply-To: <1298648721-3026-1-git-send-email-hagen@jauu.net>

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/ip6_output.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 2600e22..25a2647 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -274,13 +274,10 @@ int ip6_nd_hdr(struct sock *sk, struct sk_buff *skb, struct net_device *dev,
 {
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct ipv6hdr *hdr;
-	int totlen;
 
 	skb->protocol = htons(ETH_P_IPV6);
 	skb->dev = dev;
 
-	totlen = len + sizeof(struct ipv6hdr);
-
 	skb_reset_network_header(skb);
 	skb_put(skb, sizeof(struct ipv6hdr));
 	hdr = ipv6_hdr(skb);
-- 
1.7.2.3


^ permalink raw reply related

* [PATCH 6/7] ipv6: ignore rtnl_unicast() return code
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw
In-Reply-To: <1298648721-3026-1-git-send-email-hagen@jauu.net>

rtnl_unicast() return value is not of interest, we can silently ignore
it, save some instructions and four byte on the stack.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/ip6mr.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 0e1d53b..618f67cc 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1039,7 +1039,6 @@ static void ip6mr_cache_resolve(struct net *net, struct mr6_table *mrt,
 
 	while((skb = __skb_dequeue(&uc->mfc_un.unres.unresolved))) {
 		if (ipv6_hdr(skb)->version == 0) {
-			int err;
 			struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr));
 
 			if (__ip6mr_fill_mroute(mrt, skb, c, NLMSG_DATA(nlh)) > 0) {
@@ -1050,7 +1049,7 @@ static void ip6mr_cache_resolve(struct net *net, struct mr6_table *mrt,
 				skb_trim(skb, nlh->nlmsg_len);
 				((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -EMSGSIZE;
 			}
-			err = rtnl_unicast(skb, net, NETLINK_CB(skb).pid);
+			rtnl_unicast(skb, net, NETLINK_CB(skb).pid);
 		} else
 			ip6_mr_forward(net, mrt, skb, c);
 	}
-- 
1.7.2.3


^ permalink raw reply related

* [PATCH 2/7] dccp: newdp is declared/assigned but never be used
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw
In-Reply-To: <1298648721-3026-1-git-send-email-hagen@jauu.net>

Declaration and assignment of newdp is removed. Usage of dccp_sk()
exhibit no side effects.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/dccp/ipv6.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index dca711d..460d545 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -484,7 +484,6 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
 	struct inet6_request_sock *ireq6 = inet6_rsk(req);
 	struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
 	struct inet_sock *newinet;
-	struct dccp_sock *newdp;
 	struct dccp6_sock *newdp6;
 	struct sock *newsk;
 	struct ipv6_txoptions *opt;
@@ -498,7 +497,6 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
 			return NULL;
 
 		newdp6 = (struct dccp6_sock *)newsk;
-		newdp = dccp_sk(newsk);
 		newinet = inet_sk(newsk);
 		newinet->pinet6 = &newdp6->inet6;
 		newnp = inet6_sk(newsk);
@@ -578,7 +576,6 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
 	newdp6 = (struct dccp6_sock *)newsk;
 	newinet = inet_sk(newsk);
 	newinet->pinet6 = &newdp6->inet6;
-	newdp = dccp_sk(newsk);
 	newnp = inet6_sk(newsk);
 
 	memcpy(newnp, np, sizeof(struct ipv6_pinfo));
-- 
1.7.2.3


^ permalink raw reply related

* [PATCH 5/7] ipv6: variable next is never used in this function
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw
In-Reply-To: <1298648721-3026-1-git-send-email-hagen@jauu.net>

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/route.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f786aed..7e9443f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1075,11 +1075,9 @@ out:
 
 int icmp6_dst_gc(void)
 {
-	struct dst_entry *dst, *next, **pprev;
+	struct dst_entry *dst, **pprev;
 	int more = 0;
 
-	next = NULL;
-
 	spin_lock_bh(&icmp6_dst_lock);
 	pprev = &icmp6_dst_gc_list;
 
-- 
1.7.2.3


^ permalink raw reply related

* [PATCH 1/7] net: handle addr_type of 0 properly
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw

addr_type of 0 means that the type should be adopted from from_dev and
not from __hw_addr_del_multiple(). Unfortunately it isn't so and
addr_type will always be considered. Fix this by implementing the
considered and documented behavior.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/core/dev_addr_lists.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c
index 508f9c1..133fd22 100644
--- a/net/core/dev_addr_lists.c
+++ b/net/core/dev_addr_lists.c
@@ -144,7 +144,7 @@ void __hw_addr_del_multiple(struct netdev_hw_addr_list *to_list,
 
 	list_for_each_entry(ha, &from_list->list, list) {
 		type = addr_type ? addr_type : ha->type;
-		__hw_addr_del(to_list, ha->addr, addr_len, addr_type);
+		__hw_addr_del(to_list, ha->addr, addr_len, type);
 	}
 }
 EXPORT_SYMBOL(__hw_addr_del_multiple);
-- 
1.7.2.3


^ permalink raw reply related


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.