Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] can: Add driver for SJA1000 based PCI CAN interface cards by esd
From: Matthias Fuchs @ 2010-03-31 14:17 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4BB34F92.5010308-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>

Hi Wolfgang,

I am aware of the PCI PLX driver. It should be possible to
adapt that one. It lacks PLX9056 support so it's not done by just
adding some PCI device IDs.

But if that's how it should be done I will do so.

Matthias

On Wednesday 31 March 2010 15:35, Wolfgang Grandegger wrote:
> Hi Matthias,
> 
> Matthias Fuchs wrote:
> > This patch adds support for SJA1000 based PCI CAN interface cards
> > from electronic system design gmbh.
> > 
> > These boards are supported:
> > 
> >         CAN-PCI/200 (PCI)
> >         CAN-PCI/266 (PCI)
> >         CAN-PMC266 (PMC module)
> >         CAN-PCIe/2000 (PCI Express)
> >         CAN-CPCI/200 (Compact PCI, 3U)
> >         CAN-PCI104 (PCI104)
> > 
> > This driver is part of the SocketCAN SVN repository since
> > April 2009.
> > 
> > Signed-off-by: Matthias Fuchs <matthias.fuchs-iOnpLzIbIdM@public.gmane.org>
> 
> Since a while we have a generic PCI PLX driver in the mainline kernel,
> which could support the esd cards as well, I believe.
> 
> Wolfgang.
> 
> 

-- 

^ permalink raw reply

* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 14:24 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331141525.GA14331@gondor.apana.org.au>

On Wed, 2010-03-31 at 22:15 +0800, Herbert Xu wrote:

> 
> OK I give up.
> 
> Dave can keep or revert this as he likes.

Ok - I will await to see what Dave thinks before i bother doing whatever
setup. What we have here is a philosophical difference.
Herbert note: i realize this is unfair for me to say given you were
likely very busy: I respect your opinion and knowledge and did CC you on
all the many mails when i was RFCing this and when i sent the patches. 

cheers,
jamal


^ permalink raw reply

* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Herbert Xu @ 2010-03-31 14:29 UTC (permalink / raw)
  To: jamal; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <1270045478.26743.71.camel@bigi>

On Wed, Mar 31, 2010 at 10:24:38AM -0400, jamal wrote:
> On Wed, 2010-03-31 at 22:15 +0800, Herbert Xu wrote:
> 
> > 
> > OK I give up.
> > 
> > Dave can keep or revert this as he likes.
> 
> Ok - I will await to see what Dave thinks before i bother doing whatever
> setup. What we have here is a philosophical difference.
> Herbert note: i realize this is unfair for me to say given you were
> likely very busy: I respect your opinion and knowledge and did CC you on
> all the many mails when i was RFCing this and when i sent the patches. 

Yes you did cc me.  Unfortunately I was rather busy with some other
stuff at the time.  Had I read your patch back then I would've said
something :)

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 14:38 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331142915.GA14557@gondor.apana.org.au>

On Wed, 2010-03-31 at 22:29 +0800, Herbert Xu wrote:

> Yes you did cc me.  Unfortunately I was rather busy with some other
> stuff at the time.  Had I read your patch back then I would've said
> something :)

makes sense ;-> And it wouldnt have been like the first (or the last)
time you and i have had this heated discussions;->
Lets just wait to hear what Dave says - I dont want make his life more
difficult than it is; so no hard feeling if he decides to revert.


cheers,
jamal

PS:- since you woke me up and i know you are awake, 
i am going to get rid of a jetlag by sending
probably another controversial patch. Hmmm.. where to start.


^ permalink raw reply

* Re: [net-2.6 PATCH] bonding: fix broken multicast with round-robin mode
From: Andy Gospodarek @ 2010-03-31 14:49 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, lhh, fubar, bonding-devel
In-Reply-To: <1270026517.2103.9.camel@edumazet-laptop>

On Wed, Mar 31, 2010 at 5:08 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 25 mars 2010 à 17:40 -0400, Andy Gospodarek a écrit :
>> Round-robin (mode 0) does nothing to ensure that any multicast traffic
>> originally destined for the host will continue to arrive at the host when
>> the link that sent the IGMP join or membership report goes down.  One of
>> the benefits of absolute round-robin transmit.
>>
>> Keeping track of subscribed multicast groups for each slave did not seem
>> like a good use of resources, so I decided to simply send on the
>> curr_active slave of the bond (typically the first enslaved device that
>> is up).  This makes failover management simple as IGMP membership
>> reports only need to be sent when the curr_active_slave changes.  I
>> tested this patch and it appears to work as expected.
>>
>> Originally reported by Lon Hohberger <lhh@redhat.com>.
>>
>> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
>> CC: Lon Hohberger <lhh@redhat.com>
>> CC: Jay Vosburgh <fubar@us.ibm.com>
>>
>> ---
>>  drivers/net/bonding/bond_main.c |   34 ++++++++++++++++++++++++++--------
>>  1 files changed, 26 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>> index 430c022..0b38455 100644
>> --- a/drivers/net/bonding/bond_main.c
>> +++ b/drivers/net/bonding/bond_main.c
>> @@ -1235,6 +1235,11 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
>>                       write_lock_bh(&bond->curr_slave_lock);
>>               }
>>       }
>> +
>> +     /* resend IGMP joins since all were sent on curr_active_slave */
>> +     if (bond->params.mode == BOND_MODE_ROUNDROBIN) {
>> +             bond_resend_igmp_join_requests(bond);
>> +     }
>>  }
>>
>>  /**
>> @@ -4138,22 +4143,35 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev
>>       struct bonding *bond = netdev_priv(bond_dev);
>>       struct slave *slave, *start_at;
>>       int i, slave_no, res = 1;
>> +     struct iphdr *iph = ip_hdr(skb);
>>
>>       read_lock(&bond->lock);
>>
>>       if (!BOND_IS_OK(bond))
>>               goto out;
>> -
>>       /*
>> -      * Concurrent TX may collide on rr_tx_counter; we accept that
>> -      * as being rare enough not to justify using an atomic op here
>> +      * Start with the curr_active_slave that joined the bond as the
>> +      * default for sending IGMP traffic.  For failover purposes one
>> +      * needs to maintain some consistency for the interface that will
>> +      * send the join/membership reports.  The curr_active_slave found
>> +      * will send all of this type of traffic.
>>        */
>> -     slave_no = bond->rr_tx_counter++ % bond->slave_cnt;
>> +     if ((skb->protocol == htons(ETH_P_IP)) &&
>> +         (iph->protocol == htons(IPPROTO_IGMP))) {
>
> Hmm...
>
> iph->protocol is a u8, how can htons(IPPROTO_IGMP) be equal to
> iph->protocol ?

Heh, this isn't needed for a single-byte check.  Thanks for catching that.

> [PATCH] bonding: bond_xmit_roundrobin() fix
>
> Commit a2fd940f (bonding: fix broken multicast with round-robin mode)
> added a problem on litle endian machines.
>
> drivers/net/bonding/bond_main.c:4159: warning: comparison is always
> false due to limited range of data type

Curious what version of GCC are you using?  Before applying your patch
it compiles without warning on my x86_64 F11-ish system with:

gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)

> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 5b92fbf..5972a52 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -4156,7 +4156,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev
>         * send the join/membership reports.  The curr_active_slave found
>         * will send all of this type of traffic.
>         */
> -       if ((iph->protocol == htons(IPPROTO_IGMP)) &&
> +       if ((iph->protocol == IPPROTO_IGMP) &&
>            (skb->protocol == htons(ETH_P_IP))) {
>
>                read_lock(&bond->curr_slave_lock);
>
>
>
>

^ permalink raw reply

* pull request: wireless-2.6 2010-03-31
From: John W. Linville @ 2010-03-31 14:46 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev, linux-kernel

Dave,

Here is a batch of fixes intended for 2.6.34.  Included are a few
device IDs, along with several almost-one-liners to fix a variety of
issues, including a NULL deref, a potential overflow, a misues of the
USB API, a regulatory error for iwlwifi, a race condition in mac80211,
and some other more minor fixes.

I saw your note about only "eats someones disk" bugs.  I'm not
sure all of these meet that test, but I hope you will take them.
I've been sitting on them a while and letting them cook in linux-next,
mostly to test one particular patch (which I backed-out yesterday).
I promise I'll tighten-up after this batch! :-)

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit ce6fbdefb68d46db88170494b277551f955b48e2:
  Julia Lawall (1):
        drivers/net: Add missing unlock

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master

Ben Konrath (1):
      ar9170: add support for NEC WL300NU-G USB dongle

Benjamin Larsson (1):
      Add a pci-id to the mwl8k driver

Dan Carpenter (1):
      iwlwifi: range checking issue

Daniel Mack (1):
      net/wireless/libertas: do not call wiphy_unregister() w/o wiphy_register()

Gertjan van Wingerde (2):
      rt2x00: Fix typo in RF register programming of rt2800.
      rt2x00: Disable powersaving by default in rt2500usb.

Hans de Goede (1):
      Add USB ID for Thomson SpeedTouch 120g to p54usb id table

Johannes Berg (1):
      mac80211: move netdev queue enabling to correct spot

John W. Linville (2):
      wireless: convert reg_regdb_search_lock to mutex
      mac80211: correct typos in "unavailable upon resume" warning

Porsch, Marco (1):
      mac80211: fix PREQ processing and one small bug

Reinette Chatre (1):
      iwlwifi: fix regulatory

Shanyu Zhao (1):
      iwlwifi: clear unattended interrupts in tasklet

Valentin Longchamp (1):
      setup correct int pipe type in ar9170_usb_exec_cmd

Wey-Yi Guy (1):
      iwlwifi: counting number of tfds can be free for 4965

 drivers/net/wireless/ath/ar9170/usb.c       |    4 +++-
 drivers/net/wireless/iwlwifi/iwl-4965.c     |    6 ++----
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   12 ++++++++++--
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    4 ++--
 drivers/net/wireless/libertas/cfg.c         |    8 ++++++--
 drivers/net/wireless/libertas/dev.h         |    1 +
 drivers/net/wireless/mwl8k.c                |    1 +
 drivers/net/wireless/p54/p54usb.c           |    1 +
 drivers/net/wireless/rt2x00/rt2500usb.c     |    5 +++++
 drivers/net/wireless/rt2x00/rt2800lib.c     |    4 ++--
 net/mac80211/mesh_hwmp.c                    |    4 ++--
 net/mac80211/tx.c                           |    6 ++++++
 net/mac80211/util.c                         |   18 +++++++++---------
 net/wireless/reg.c                          |   12 +++++-------
 14 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c
index 4e30197..6b1cb70 100644
--- a/drivers/net/wireless/ath/ar9170/usb.c
+++ b/drivers/net/wireless/ath/ar9170/usb.c
@@ -94,6 +94,8 @@ static struct usb_device_id ar9170_usb_ids[] = {
 	{ USB_DEVICE(0x04bb, 0x093f) },
 	/* AVM FRITZ!WLAN USB Stick N */
 	{ USB_DEVICE(0x057C, 0x8401) },
+	/* NEC WL300NU-G */
+	{ USB_DEVICE(0x0409, 0x0249) },
 	/* AVM FRITZ!WLAN USB Stick N 2.4 */
 	{ USB_DEVICE(0x057C, 0x8402), .driver_info = AR9170_REQ_FW1_ONLY },
 
@@ -416,7 +418,7 @@ static int ar9170_usb_exec_cmd(struct ar9170 *ar, enum ar9170_cmd cmd,
 	spin_unlock_irqrestore(&aru->common.cmdlock, flags);
 
 	usb_fill_int_urb(urb, aru->udev,
-			 usb_sndbulkpipe(aru->udev, AR9170_EP_CMD),
+			 usb_sndintpipe(aru->udev, AR9170_EP_CMD),
 			 aru->common.cmdbuf, plen + 4,
 			 ar9170_usb_tx_urb_complete, NULL, 1);
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 1bd2cd8..83c52a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2041,16 +2041,14 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
 				   tx_resp->failure_frame);
 
 		freed = iwl_tx_queue_reclaim(priv, txq_id, index);
-		if (qc && likely(sta_id != IWL_INVALID_STATION))
-			priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
+		iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
 
 		if (priv->mac80211_registered &&
 		    (iwl_queue_space(&txq->q) > txq->q.low_mark))
 			iwl_wake_queue(priv, txq_id);
 	}
 
-	if (qc && likely(sta_id != IWL_INVALID_STATION))
-		iwl_txq_check_empty(priv, sta_id, tid, txq_id);
+	iwl_txq_check_empty(priv, sta_id, tid, txq_id);
 
 	if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
 		IWL_ERR(priv, "TODO:  Implement Tx ABORT REQUIRED!!!\n");
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 818367b..e4c2e1e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1258,7 +1258,15 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
 	/* Ack/clear/reset pending uCode interrupts.
 	 * Note:  Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS,
 	 */
-	iwl_write32(priv, CSR_INT, priv->inta);
+	/* There is a hardware bug in the interrupt mask function that some
+	 * interrupts (i.e. CSR_INT_BIT_SCD) can still be generated even if
+	 * they are disabled in the CSR_INT_MASK register. Furthermore the
+	 * ICT interrupt handling mechanism has another bug that might cause
+	 * these unmasked interrupts fail to be detected. We workaround the
+	 * hardware bugs here by ACKing all the possible interrupts so that
+	 * interrupt coalescing can still be achieved.
+	 */
+	iwl_write32(priv, CSR_INT, priv->inta | ~priv->inta_mask);
 
 	inta = priv->inta;
 
@@ -2644,7 +2652,7 @@ static int iwl_mac_setup_register(struct iwl_priv *priv)
 		BIT(NL80211_IFTYPE_STATION) |
 		BIT(NL80211_IFTYPE_ADHOC);
 
-	hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY |
+	hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
 			    WIPHY_FLAG_DISABLE_BEACON_HINTS;
 
 	/*
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 54daa38..e276f2a 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1955,7 +1955,7 @@ static void iwl3945_init_hw_rates(struct iwl_priv *priv,
 {
 	int i;
 
-	for (i = 0; i < IWL_RATE_COUNT; i++) {
+	for (i = 0; i < IWL_RATE_COUNT_LEGACY; i++) {
 		rates[i].bitrate = iwl3945_rates[i].ieee * 5;
 		rates[i].hw_value = i; /* Rate scaling will work on indexes */
 		rates[i].hw_value_short = i;
@@ -3921,7 +3921,7 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)
 		BIT(NL80211_IFTYPE_STATION) |
 		BIT(NL80211_IFTYPE_ADHOC);
 
-	hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY |
+	hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
 			    WIPHY_FLAG_DISABLE_BEACON_HINTS;
 
 	hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945;
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 4396dcc..82ebe14 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -172,6 +172,8 @@ int lbs_cfg_register(struct lbs_private *priv)
 	if (ret < 0)
 		lbs_pr_err("cannot register wiphy device\n");
 
+	priv->wiphy_registered = true;
+
 	ret = register_netdev(priv->dev);
 	if (ret)
 		lbs_pr_err("cannot register network device\n");
@@ -190,9 +192,11 @@ void lbs_cfg_free(struct lbs_private *priv)
 	if (!wdev)
 		return;
 
-	if (wdev->wiphy) {
+	if (priv->wiphy_registered)
 		wiphy_unregister(wdev->wiphy);
+
+	if (wdev->wiphy)
 		wiphy_free(wdev->wiphy);
-	}
+
 	kfree(wdev);
 }
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 6977ee8..6875e14 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -36,6 +36,7 @@ struct lbs_private {
 
 	/* CFG80211 */
 	struct wireless_dev *wdev;
+	bool wiphy_registered;
 
 	/* Mesh */
 	struct net_device *mesh_dev; /* Virtual device */
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index ac65e13..4e58ebe 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -3851,6 +3851,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
 MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
 
 static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
+	{ PCI_VDEVICE(MARVELL, 0x2a0a), .driver_data = MWL8363, },
 	{ PCI_VDEVICE(MARVELL, 0x2a0c), .driver_data = MWL8363, },
 	{ PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, },
 	{ PCI_VDEVICE(MARVELL, 0x2a2b), .driver_data = MWL8687, },
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index b3c4fbd..e3cfc00 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -35,6 +35,7 @@ MODULE_FIRMWARE("isl3887usb");
 static struct usb_device_id p54u_table[] __devinitdata = {
 	/* Version 1 devices (pci chip + net2280) */
 	{USB_DEVICE(0x0506, 0x0a11)},	/* 3COM 3CRWE254G72 */
+	{USB_DEVICE(0x06b9, 0x0120)},	/* Thomson SpeedTouch 120g */
 	{USB_DEVICE(0x0707, 0xee06)},	/* SMC 2862W-G */
 	{USB_DEVICE(0x07aa, 0x001c)},	/* Corega CG-WLUSB2GT */
 	{USB_DEVICE(0x083a, 0x4501)},	/* Accton 802.11g WN4501 USB */
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index ee34c13..dbaa781 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1643,6 +1643,11 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	unsigned int i;
 
 	/*
+	 * Disable powersaving as default.
+	 */
+	rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
+
+	/*
 	 * Initialize all hw fields.
 	 */
 	rt2x00dev->hw->flags =
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 18d4d8e..326fce7 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -812,9 +812,9 @@ static void rt2800_config_channel_rt3x(struct rt2x00_dev *rt2x00dev,
 	rt2800_rfcsr_write(rt2x00dev, 24,
 			      rt2x00dev->calibration[conf_is_ht40(conf)]);
 
-	rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
+	rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr);
 	rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
-	rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);
+	rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
 }
 
 static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index ce84237..ccff613 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
 				if (SN_GT(mpath->sn, orig_sn) ||
 				    (mpath->sn == orig_sn &&
 				     action == MPATH_PREQ &&
-				     new_metric > mpath->metric)) {
+				     new_metric >= mpath->metric)) {
 					process = false;
 					fresh_info = false;
 				}
@@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata,
 
 	mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr,
 		cpu_to_le32(orig_sn), 0, target_addr,
-		cpu_to_le32(target_sn), mpath->next_hop->sta.addr, hopcount,
+		cpu_to_le32(target_sn), next_hop, hopcount,
 		ttl, cpu_to_le32(lifetime), cpu_to_le32(metric),
 		0, sdata);
 	rcu_read_unlock();
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index cbe53ed..cfc473e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1991,6 +1991,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 void ieee80211_tx_pending(unsigned long data)
 {
 	struct ieee80211_local *local = (struct ieee80211_local *)data;
+	struct ieee80211_sub_if_data *sdata;
 	unsigned long flags;
 	int i;
 	bool txok;
@@ -2029,6 +2030,11 @@ void ieee80211_tx_pending(unsigned long data)
 			if (!txok)
 				break;
 		}
+
+		if (skb_queue_empty(&local->pending[i]))
+			list_for_each_entry_rcu(sdata, &local->interfaces, list)
+				netif_tx_wake_queue(
+					netdev_get_tx_queue(sdata->dev, i));
 	}
 	spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index c453226..53af570 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -279,13 +279,13 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
 		/* someone still has this queue stopped */
 		return;
 
-	if (!skb_queue_empty(&local->pending[queue]))
+	if (skb_queue_empty(&local->pending[queue])) {
+		rcu_read_lock();
+		list_for_each_entry_rcu(sdata, &local->interfaces, list)
+			netif_tx_wake_queue(netdev_get_tx_queue(sdata->dev, queue));
+		rcu_read_unlock();
+	} else
 		tasklet_schedule(&local->tx_pending_tasklet);
-
-	rcu_read_lock();
-	list_for_each_entry_rcu(sdata, &local->interfaces, list)
-		netif_tx_wake_queue(netdev_get_tx_queue(sdata->dev, queue));
-	rcu_read_unlock();
 }
 
 void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
@@ -1097,9 +1097,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 		 */
 		res = drv_start(local);
 		if (res) {
-			WARN(local->suspended, "Harware became unavailable "
-			     "upon resume. This is could be a software issue"
-			     "prior to suspend or a hardware issue\n");
+			WARN(local->suspended, "Hardware became unavailable "
+			     "upon resume. This could be a software issue "
+			     "prior to suspend or a hardware issue.\n");
 			return res;
 		}
 
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ed89c59..81fcafc 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -324,7 +324,7 @@ struct reg_regdb_search_request {
 };
 
 static LIST_HEAD(reg_regdb_search_list);
-static DEFINE_SPINLOCK(reg_regdb_search_lock);
+static DEFINE_MUTEX(reg_regdb_search_mutex);
 
 static void reg_regdb_search(struct work_struct *work)
 {
@@ -332,7 +332,7 @@ static void reg_regdb_search(struct work_struct *work)
 	const struct ieee80211_regdomain *curdom, *regdom;
 	int i, r;
 
-	spin_lock(&reg_regdb_search_lock);
+	mutex_lock(&reg_regdb_search_mutex);
 	while (!list_empty(&reg_regdb_search_list)) {
 		request = list_first_entry(&reg_regdb_search_list,
 					   struct reg_regdb_search_request,
@@ -346,18 +346,16 @@ static void reg_regdb_search(struct work_struct *work)
 				r = reg_copy_regd(&regdom, curdom);
 				if (r)
 					break;
-				spin_unlock(&reg_regdb_search_lock);
 				mutex_lock(&cfg80211_mutex);
 				set_regdom(regdom);
 				mutex_unlock(&cfg80211_mutex);
-				spin_lock(&reg_regdb_search_lock);
 				break;
 			}
 		}
 
 		kfree(request);
 	}
-	spin_unlock(&reg_regdb_search_lock);
+	mutex_unlock(&reg_regdb_search_mutex);
 }
 
 static DECLARE_WORK(reg_regdb_work, reg_regdb_search);
@@ -375,9 +373,9 @@ static void reg_regdb_query(const char *alpha2)
 
 	memcpy(request->alpha2, alpha2, 2);
 
-	spin_lock(&reg_regdb_search_lock);
+	mutex_lock(&reg_regdb_search_mutex);
 	list_add_tail(&request->list, &reg_regdb_search_list);
-	spin_unlock(&reg_regdb_search_lock);
+	mutex_unlock(&reg_regdb_search_mutex);
 
 	schedule_work(&reg_regdb_work);
 }
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply related

* [net-next-2.6 PATCH] netfilter: ctnetlink: compute message size properly
From: Jiri Pirko @ 2010-03-31 15:11 UTC (permalink / raw)
  To: netdev; +Cc: netfilter-devel, kaber, netfilter, davem

Message size should be dependent on net->ct.sysctl_acct, not on
CONFIG_NF_CT_ACCT definition.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>

diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 569410a..2b0cfa4 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -426,6 +426,19 @@ ctnetlink_proto_size(const struct nf_conn *ct)
 }
 
 static inline size_t
+ctnetlink_counters_size(const struct nf_conn *ct)
+{
+	struct net *net = nf_ct_net(ct);
+
+	if (!net->ct.sysctl_acct)
+		return 0;
+	return 2 * nla_total_size(0) /* CTA_COUNTERS_ORIG|REPL */
+	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_PACKETS */
+	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_BYTES */
+	       ;
+}
+
+static inline size_t
 ctnetlink_nlmsg_size(const struct nf_conn *ct)
 {
 	return NLMSG_ALIGN(sizeof(struct nfgenmsg))
@@ -435,11 +448,7 @@ ctnetlink_nlmsg_size(const struct nf_conn *ct)
 	       + 3 * nla_total_size(sizeof(u_int8_t)) /* CTA_PROTO_NUM */
 	       + nla_total_size(sizeof(u_int32_t)) /* CTA_ID */
 	       + nla_total_size(sizeof(u_int32_t)) /* CTA_STATUS */
-#ifdef CONFIG_NF_CT_ACCT
-	       + 2 * nla_total_size(0) /* CTA_COUNTERS_ORIG|REPL */
-	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_PACKETS */
-	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_BYTES */
-#endif
+	       + ctnetlink_counters_size(ct)
 	       + nla_total_size(sizeof(u_int32_t)) /* CTA_TIMEOUT */
 	       + nla_total_size(0) /* CTA_PROTOINFO */
 	       + nla_total_size(0) /* CTA_HELP */


^ permalink raw reply related

* Re: [net-2.6 PATCH] bonding: fix broken multicast with round-robin mode
From: Eric Dumazet @ 2010-03-31 15:14 UTC (permalink / raw)
  To: Andy Gospodarek; +Cc: David Miller, netdev, lhh, fubar, bonding-devel
In-Reply-To: <m2x7b667921003310749v5c8b6e62g7339eff24a51e6d8@mail.gmail.com>

Le mercredi 31 mars 2010 à 10:49 -0400, Andy Gospodarek a écrit :

> Curious what version of GCC are you using?  Before applying your patch
> it compiles without warning on my x86_64 F11-ish system with:
> 
> gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)
> 

ARCH=x86_64 CROSS_COMPILE=x86_64-unknown-linux- make vmlinux

so, it was a cross compiler :

/data/x86-64/bin/x86_64-unknown-linux-gcc-4.1.2 -v
Using built-in specs.
Target: x86_64-unknown-linux
Configured with: ../gcc-4.1.2/configure --prefix=/data/x86-64
--target=x86_64-unknown-linux --enable-languages=c --disable-shared
--disable-multilib --disable-threads --disable-libssp --without-headers
--disable-libmudflap
Thread model: single
gcc version 4.1.2





^ permalink raw reply

* Re: [RFC v3] net: add PCINet driver
From: Ira W. Snyder @ 2010-03-31 15:25 UTC (permalink / raw)
  To: Kumar Gala
  Cc: linux-kernel, linuxppc-dev, netdev, Stephen Hemminger,
	Arnd Bergmann, Jan-Bernd Themann
In-Reply-To: <E924DFE1-9569-4805-9269-480F2D128636@kernel.crashing.org>

On Tue, Mar 30, 2010 at 11:46:29PM -0500, Kumar Gala wrote:
> 
> On Nov 5, 2008, at 3:22 PM, Ira Snyder wrote:
> 
> > This adds support to Linux for a virtual ethernet interface which uses the
> > PCI bus as its transport mechanism. It creates a simple, familiar, and fast
> > method of communication for two devices connected by a PCI interface.
> > 
> > I have implemented client support for the Freescale MPC8349EMDS board,
> > which is capable of running in PCI Agent mode (It acts like a PCI card, but
> > is a complete PowerPC computer, running Linux). It is almost certainly
> > trivially ported to any MPC83xx system.
> > 
> > It was developed to work in a CompactPCI crate of computers, one of which
> > is a relatively standard x86 system (acting as the host) and many PowerPC
> > systems (acting as clients).
> > 
> > RFC v2 -> RFC v3:
> >  * use inline functions for accessing struct circ_buf_desc
> >  * use pointer dereferencing on PowerPC local memory instead of ioread32()
> >  * move IMMR and buffer descriptor accessors inside drivers
> >  * update for dma_mapping_error() API changes
> >  * use minimal locking primitives (i.e. spin_lock() instead of _irqsave())
> >  * always disable checksumming, PCI is reliable
> >  * replace typedef cbd_t with struct circ_buf_desc
> >  * use get_immrbase() to get IMMR register offsets
> > 
> > RFC v1 -> RFC v2:
> >  * remove vim modelines
> >  * use net_device->name in request_irq(), for irqbalance
> >  * remove unneccesary wqt_get_stats(), use default get_stats() instead
> >  * use dev_printk() and friends
> >  * add message unit to MPC8349EMDS dts file
> > 
> > Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
> > ---
> > This is the third RFC posting of this driver. I got some feedback, and have
> > corrected the problems. Thanks to everyone who has done review! I have
> > gotten off-list feedback from several potential users, so there are
> > definitely many potential users.
> > 
> > I'll post up a revised version about once a week as long as the changes are
> > minor. If they are more substantial, I'll post them as needed.
> > 
> > The remaining issues I see in this driver:
> > 1) ==== Naming ====
> >   The name wqt originally stood for "workqueue-test" and somewhat evolved
> >   over time into the current driver. I'm looking for suggestions for a
> >   better name. It should be the same between the host and client drivers,
> >   to make porting the code between them easier. The drivers are /very/
> >   similar other than the setup code.
> > 2) ==== IMMR Usage ====
> >   In the Freescale client driver, I use the whole set of board control
> >   registers (AKA IMMR registers). I only need a very small subset of them,
> >   during startup to set up the DMA window. I used the full set of
> >   registers so that I could share the register offsets between the drivers
> >   (in pcinet_hw.h)
> > 3) ==== Hardcoded DMA Window Address ====
> >   In the Freescale client driver, I just hardcoded the address of the
> >   outbound PCI window into the DMA transfer code. It is 0x80000000.
> >   Suggestions on how to get this value at runtime are welcome.
> > 
> > 
> > Rationale behind some decisions:
> > 1) ==== Usage of the PCINET_NET_REGISTERS_VALID bit ====
> >   I want to be able to use this driver from U-Boot to tftp a kernel over
> >   the PCI backplane, and then boot up the board. This means that the
> >   device descriptor memory, which lives in the client RAM, becomes invalid
> >   during boot.
> > 2) ==== Buffer Descriptors in client memory ====
> >   I chose to put the buffer descriptors in client memory rather than host
> >   memory. It seemed more logical to me at the time. In my application,
> >   I'll have 19 boards + 1 host per cPCI chassis. The client -> host
> >   direction will see most of the traffic, and so I thought I would cut
> >   down on the number of PCI accesses needed. I'm willing to change this.
> > 3) ==== Usage of client DMA controller for all data transfer ====
> >   This was done purely for speed. I tried using the CPU to transfer all
> >   data, and it is very slow: ~3MB/sec. Using the DMA controller gets me to
> >   ~40MB/sec (as tested with netperf).
> > 4) ==== Static 1GB DMA window ====
> >   Maintaining a window while DMA's in flight, and then changing it seemed
> >   too complicated. Also, testing showed that using a static window gave me
> >   a ~10MB/sec speedup compared to moving the window for each skb.
> > 5) ==== The serial driver ====
> >   Yes, there are two essentially separate drivers here. I needed a method
> >   to communicate with the U-Boot bootloader on these boards without
> >   plugging in a serial cable. With 19 clients + 1 host per chassis, the
> >   cable clutter is worth avoiding. Since everything is connected via the
> >   PCI bus anyway, I used that. A virtual serial port was simple to
> >   implement using the messaging unit hardware that I used for the network
> >   driver.
> > 
> > I'll post both U-Boot drivers to their mailing list once this driver is
> > finalized.
> > 
> > Thanks,
> > Ira
> > 
> > arch/powerpc/boot/dts/mpc834x_mds.dts |    7 +
> > drivers/net/Kconfig                   |   29 +
> > drivers/net/Makefile                  |    3 +
> > drivers/net/pcinet.h                  |   60 ++
> > drivers/net/pcinet_fsl.c              | 1358 ++++++++++++++++++++++++++++++++
> > drivers/net/pcinet_host.c             | 1388 +++++++++++++++++++++++++++++++++
> > drivers/net/pcinet_hw.h               |   77 ++
> > 7 files changed, 2922 insertions(+), 0 deletions(-)
> > create mode 100644 drivers/net/pcinet.h
> > create mode 100644 drivers/net/pcinet_fsl.c
> > create mode 100644 drivers/net/pcinet_host.c
> > create mode 100644 drivers/net/pcinet_hw.h
> 
> What ever happened to this?
> 

Basically, David Miller NAK'd it, and told me to use virtio instead. I
went through the trouble of implementing that, and it was NAK'd too,
since I connected two virtio-net drivers together, rather than writing a
backend (similar to qemu, kvm, lguest, etc.). Now that a year has
passed, there is an in-kernel backend (vhost-net), but the developers
pretty much ignored my use case, and I don't think it can work. I must
use DMA when copying data across PCI (to get bursts on the bus) for
speed.

I still get email from people interested in this kind of technology,
about once a month. I myself would love to have a PCI-to-PCI network
driver. Linux is majorly lacking in this area.

In the end, I used a derivative of the above driver. It is not
especially fast, but it works. I would be very happy to throw it away
and use a mainline Linux solution based on virtio. In my initial tests,
a virtio-based driver was 6x faster.

I still have my virtio code available on the web, URL below. I tried to
write a userspace backend at the time, but didn't get far. I couldn't
find any explanation of how TUN/TAP works. The kernel portion itself is
based on lguest, and works pretty well.
http://www.mmarray.org/~iws/virtio-phys/

I also spoke with Greg Haskins, and started work on a PCI-to-PCI backend
for vbus. If you've seen the anti-vbus flamewars that went on late last
year, you'll know why I gave up. That work is here:
http://www.mmarray.org/~iws/vbus/

I'm happy to provide you with my latest PCINet driver and U-Boot patches
if you want them. It has been running in production for a few months,
and is quite stable.

If you'd like to see the virtio driver continued and want to help me
interface with the virtualization folks, that would be wonderful.
They've completely ignored every post I've made to their mailing list so
far. :)

Thanks,
Ira

^ permalink raw reply

* [PATCH] can: Add esd board support to plx_pci CAN driver
From: Matthias Fuchs @ 2010-03-31 15:32 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA; +Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w

This patch adds support for SJA1000 based PCI CAN interface cards
from electronic system design gmbh.

Two changes have been done on the common code:
 - esd boards must not have the 2nd local interupt enabled (PLX9030/9050)
 - a new path for PLX9056/PEX8311 chips has been added

In detail the following additional boards are now supported:

        CAN-PCI/200 (PCI)
        CAN-PCI/266 (PCI)
        CAN-PMC266 (PMC module)
        CAN-PCIe/2000 (PCI Express)
        CAN-CPCI/200 (Compact PCI, 3U)
        CAN-PCI104 (PCI104)

Signed-off-by: Matthias Fuchs <matthias.fuchs-iOnpLzIbIdM@public.gmane.org>
---
 drivers/net/can/sja1000/plx_pci.c |  110 ++++++++++++++++++++++++++++++++++---
 1 files changed, 101 insertions(+), 9 deletions(-)

diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
index 6b46a63..42602e9 100644
--- a/drivers/net/can/sja1000/plx_pci.c
+++ b/drivers/net/can/sja1000/plx_pci.c
@@ -40,7 +40,10 @@ MODULE_DESCRIPTION("Socket-CAN driver for PLX90xx PCI-bridge cards with "
 MODULE_SUPPORTED_DEVICE("Adlink PCI-7841/cPCI-7841, "
 			"Adlink PCI-7841/cPCI-7841 SE, "
 			"Marathon CAN-bus-PCI, "
-			"TEWS TECHNOLOGIES TPMC810");
+			"TEWS TECHNOLOGIES TPMC810, "
+			"esd CAN-PCI/CPCI/PCI104/200, "
+			"esd CAN-PCI/PMC/266, "
+			"esd CAN-PCIe/2000")
 MODULE_LICENSE("GPL v2");
 
 #define PLX_PCI_MAX_CHAN 2
@@ -53,7 +56,7 @@ struct plx_pci_card {
 
 #define PLX_PCI_CAN_CLOCK (16000000 / 2)
 
-/* PLX90xx registers */
+/* PLX9030/9050/9052 registers */
 #define PLX_INTCSR	0x4c		/* Interrupt Control/Status */
 #define PLX_CNTRL	0x50		/* User I/O, Direct Slave Response,
 					 * Serial EEPROM, and Initialization
@@ -65,6 +68,12 @@ struct plx_pci_card {
 #define PLX_PCI_INT_EN	(1 << 6)	/* PCI Interrupt Enable */
 #define PLX_PCI_RESET	(1 << 30)	/* PCI Adapter Software Reset */
 
+/* PLX9056 registers */
+#define PLX9056_INTCSR	0x68		/* Interrupt Control/Status */
+
+#define PLX9056_LINTI	(1 << 11)
+#define PLX9056_PCI_INT_EN (1 << 8)
+
 /*
  * The board configuration is probably following:
  * RX1 is connected to ground.
@@ -100,6 +109,13 @@ struct plx_pci_card {
 #define ADLINK_PCI_VENDOR_ID		0x144A
 #define ADLINK_PCI_DEVICE_ID		0x7841
 
+#define ESD_PCI_SUB_SYS_ID_PCI200	0x0004
+#define ESD_PCI_SUB_SYS_ID_PCI266	0x0009
+#define ESD_PCI_SUB_SYS_ID_PMC266	0x000e
+#define ESD_PCI_SUB_SYS_ID_CPCI200	0x010b
+#define ESD_PCI_SUB_SYS_ID_PCIE2000	0x0200
+#define ESD_PCI_SUB_SYS_ID_PCI104200	0x0501
+
 #define MARATHON_PCI_DEVICE_ID		0x2715
 
 #define TEWS_PCI_VENDOR_ID		0x1498
@@ -147,6 +163,30 @@ static struct plx_pci_card_info plx_pci_card_info_adlink_se __devinitdata = {
 	/* based on PLX9052 */
 };
 
+static struct plx_pci_card_info plx_pci_card_info_esd200 __devinitdata = {
+	"esd CAN-PCI/CPCI/PCI104/200", 2,
+	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
+	{0, 0x00, 0x00}, { {2, 0x00, 0x80}, {2, 0x100, 0x80} },
+	&plx_pci_reset_common
+	/* based on PLX9030/9050 */
+};
+
+static struct plx_pci_card_info plx_pci_card_info_esd266 __devinitdata = {
+	"esd CAN-PCI/PMC/266", 2,
+	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
+	{0, 0x00, 0x00}, { {2, 0x00, 0x80}, {2, 0x100, 0x80} },
+	&plx_pci_reset_common
+	/* based on PLX9056 */
+};
+
+static struct plx_pci_card_info plx_pci_card_info_esd2000 __devinitdata = {
+	"esd CAN-PCIe/2000", 2,
+	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
+	{0, 0x00, 0x00}, { {2, 0x00, 0x80}, {2, 0x100, 0x80} },
+	&plx_pci_reset_common
+	/* based on PEX8311 */
+};
+
 static struct plx_pci_card_info plx_pci_card_info_marathon __devinitdata = {
 	"Marathon CAN-bus-PCI", 2,
 	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
@@ -179,6 +219,48 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
 		(kernel_ulong_t)&plx_pci_card_info_adlink_se
 	},
 	{
+		/* esd CAN-PCI/200 */
+		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
+		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PCI200,
+		0, 0,
+		(kernel_ulong_t)&plx_pci_card_info_esd200
+	},
+	{
+		/* esd CAN-CPCI/200 */
+		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
+		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_CPCI200,
+		0, 0,
+		(kernel_ulong_t)&plx_pci_card_info_esd200
+	},
+	{
+		/* esd CAN-PCI104/200 */
+		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
+		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PCI104200,
+		0, 0,
+		(kernel_ulong_t)&plx_pci_card_info_esd200
+	},
+	{
+		/* esd CAN-PCI/266 */
+		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9056,
+		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PCI266,
+		0, 0,
+		(kernel_ulong_t)&plx_pci_card_info_esd266
+	},
+	{
+		/* esd CAN-PMC/266 */
+		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9056,
+		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PMC266,
+		0, 0,
+		(kernel_ulong_t)&plx_pci_card_info_esd266
+	},
+	{
+		/* esd CAN-PCIE/2000 */
+		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9056,
+		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PCIE2000,
+		0, 0,
+		(kernel_ulong_t)&plx_pci_card_info_esd2000
+	},
+	{
 		/* Marathon CAN-bus-PCI card */
 		PCI_VENDOR_ID_PLX, MARATHON_PCI_DEVICE_ID,
 		PCI_ANY_ID, PCI_ANY_ID,
@@ -304,10 +386,13 @@ static void plx_pci_del_card(struct pci_dev *pdev)
 	plx_pci_reset_common(pdev);
 
 	/*
-	 * Disable interrupts from PCI-card (PLX90xx) and disable Local_1,
-	 * Local_2 interrupts
+	 * Disable interrupts from PCI-card and disable local
+	 * interrupts
 	 */
-	iowrite32(0x0, card->conf_addr + PLX_INTCSR);
+	if (pdev->device != PCI_DEVICE_ID_PLX_9056)
+		iowrite32(0x0, card->conf_addr + PLX_INTCSR);
+	else
+		iowrite32(0x0, card->conf_addr + PLX9056_INTCSR);
 
 	if (card->conf_addr)
 		pci_iounmap(pdev, card->conf_addr);
@@ -437,10 +522,17 @@ static int __devinit plx_pci_add_card(struct pci_dev *pdev,
 	 * Enable interrupts from PCI-card (PLX90xx) and enable Local_1,
 	 * Local_2 interrupts from the SJA1000 chips
 	 */
-	val = ioread32(card->conf_addr + PLX_INTCSR);
-	val |= PLX_LINT1_EN | PLX_LINT2_EN | PLX_PCI_INT_EN;
-	iowrite32(val, card->conf_addr + PLX_INTCSR);
-
+	if (pdev->device != PCI_DEVICE_ID_PLX_9056) {
+		val = ioread32(card->conf_addr + PLX_INTCSR);
+		if (pdev->subsystem_vendor == PCI_VENDOR_ID_ESDGMBH)
+			val |= PLX_LINT1_EN | PLX_PCI_INT_EN;
+		else
+			val |= PLX_LINT1_EN | PLX_LINT2_EN | PLX_PCI_INT_EN;
+		iowrite32(val, card->conf_addr + PLX_INTCSR);
+	} else {
+		iowrite32(PLX9056_LINTI | PLX9056_PCI_INT_EN,
+			  card->conf_addr + PLX9056_INTCSR);
+	}
 	return 0;
 
 failure_cleanup:
-- 
1.6.1

^ permalink raw reply related

* Re: Severe regression in bnx2 driver with bonding in post 2.6.30 kernels
From: Michael Chan @ 2010-03-31 16:01 UTC (permalink / raw)
  To: 'Stuart Shelton', netdev@vger.kernel.org
In-Reply-To: <4BB3463A.2000801@openobjects.com>

Stuart Shelton wrote:

> The Broadcom NetXtreme II driver appears to have a severe
> regression in
> all kernels post 2.6.30 - I've observed problems with 2.6.31, 2.6.32.
> and 2.6.33.
>
> The hardware impacted is an IBM Bladecenter LS21 Blade, model
> 7971.  We
> have a large number of these, and all are affected.
>

Can you provide me ethtool -i eth0 to see what the NVRAM-based
firmware version is?  Thanks.


^ permalink raw reply

* [RFC] SPD basic actions per netdev
From: jamal @ 2010-03-31 16:37 UTC (permalink / raw)
  To: Herbert Xu, Timo Teras, David S. Miller, Patrick McHardy; +Cc: netdev


This may be oversight in current implementation and possibly
nobody has needed it before - hence it is not functional.

I want to have a drop-all policy on a per-interface level
for incoming packets and add exceptions as i need them.
[using the flow table is cheap if you have xfrm built in].
i.e something along the lines of:

#eth0, wild-card drop all
ip xfrm policy add src 0.0.0.0/0 dst 0.0.0.0/0 dev eth0 \
       dir in ptype main action block priority $SOME-HIGH-value
#eth0, exception
ip xfrm policy add blah blah dev eth0 \
dir in ptype main action allow priority $SOME-small-value
#eth1, wild-card drop all
ip xfrm policy add src 0.0.0.0/0 dst 0.0.0.0/0 dev eth1 \
       dir in ptype main action block priority $SOME-HIGH-value
#eth1 exception ...

The problem is this works as long as i dont specify an interface.
i.e, this would work in the in-direction:

ip xfrm policy add src 0.0.0.0/0 dst 0.0.0.0/0 \
        dir in ptype main action block priority $SOME-HIGH-value

This would not work:
ip xfrm policy add src 0.0.0.0/0 dst 0.0.0.0/0 dev eth0 \
       dir in ptype main action block priority $SOME-HIGH-value


The checks in the selector matching is the culprit, example for v4:

__xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl)
{
        return  .... &&
                .... &&
                (fl->oif == sel->ifindex || !sel->ifindex);
}

i.e in the second case i have a non-zero sel->ifindex but
a zero fl->oif; so it wont match.

One approach to fix this is to pass the direction then i can do
in the function call, then i can do something along the lines of
matching if:
(fl_dir == FLOW_DIR_IN && (fl->iif == sel->ifindex || !sel->ifindex) ||
(fl->oif == sel->ifindex || !sel->ifindex);

Is there any reason the selector matching only assumes fl->oif?
Are there any unforeseen issues/breakages if i added a check for the
above.

cheers,
jamal


^ permalink raw reply

* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: Patrick McHardy @ 2010-03-31 16:41 UTC (permalink / raw)
  To: Herbert Xu; +Cc: jamal, Timo Teras, netdev, David S. Miller
In-Reply-To: <20100331135331.GB14082@gondor.apana.org.au>

Herbert Xu wrote:
> On Wed, Mar 31, 2010 at 09:28:12AM -0400, jamal wrote:
>> -sudo ip route add 192.168.11.100 dev eth0 table 15
>> generates an event
>> -sudo ip route flush table 15
>> generates an event
>> -sudo ip route flush table 15
>> No event
> 
> That's completely different.  We don't have a route flush event,
> instead we're sending route delete events.  That's why when the
> table is empty you get no events.
> 
> If we had a route flush event then it would behave exactly the
> same.

I was just about to say the exact same thing when I noticed your
email. I agree with Herbert, the flush notification indicates that
the table is now empty, independant of its previous state.

^ permalink raw reply

* Re: [PATCH] can: Add driver for SJA1000 based PCI CAN interface cards by esd
From: Wolfgang Grandegger @ 2010-03-31 17:05 UTC (permalink / raw)
  To: Matthias Fuchs
  Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <201003311617.50061.matthias.fuchs-iOnpLzIbIdM@public.gmane.org>

Matthias Fuchs wrote:
> Hi Wolfgang,
> 
> I am aware of the PCI PLX driver. It should be possible to
> adapt that one. It lacks PLX9056 support so it's not done by just
> adding some PCI device IDs.
> 
> But if that's how it should be done I will do so.

>From the maintenance point of view, that's the preferred solution.
Thanks for your effort.

Wolfgang.

^ permalink raw reply

* [PATCH net-next-2.6] gen_estimator: deadlock fix
From: Eric Dumazet @ 2010-03-31 17:06 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

David, feel free to apply following to net-next, as I believe
probability to get this deadlock is close to 0.

Deadlock occurred once with a test machine running latest net-next-2.6,
I was not able to reproduce it a second time, so cannot confirm this fix
is correct.

Thanks

[PATCH] gen_estimator: deadlock fix

One of my test machine got a deadlock during "tc" sessions,
adding/deleting classes & filters, using traffic estimators.

After some analysis, I believe we have a potential use after free case
in est_timer() :

spin_lock(e->stats_lock); << HERE >>
read_lock(&est_lock);
if (e->bstats == NULL)   << TEST >>
	goto skip;

Test is done a bit late, because after estimator is killed, and before
rcu grace period elapsed, we might already have freed/reuse memory where
e->stats_locks points to (some qdisc->q.lock)

A possible fix is to respect a rcu grace period at Qdisc dismantle time.

On 64bit, sizeof(struct Qdisc) is exactly 192 bytes. Adding 16 bytes to
it (for struct rcu_head) is a problem because it might change
performance, given QDISC_ALIGNTO is 32 bytes. 

This is why I also change QDISC_ALIGNTO to 64 bytes, to satisfy most
current alignment requirements.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 include/net/pkt_sched.h   |    2 +-
 include/net/sch_generic.h |    1 +
 net/sched/sch_generic.c   |   15 +++++++++++++--
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index b6cdc33..9d4d87c 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -12,7 +12,7 @@ struct qdisc_walker {
 	int	(*fn)(struct Qdisc *, unsigned long cl, struct qdisc_walker *);
 };
 
-#define QDISC_ALIGNTO		32
+#define QDISC_ALIGNTO		64
 #define QDISC_ALIGN(len)	(((len) + QDISC_ALIGNTO-1) & ~(QDISC_ALIGNTO-1))
 
 static inline void *qdisc_priv(struct Qdisc *q)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 67dc08e..03ca5d8 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -73,6 +73,7 @@ struct Qdisc {
 	struct sk_buff_head	q;
 	struct gnet_stats_basic_packed bstats;
 	struct gnet_stats_queue	qstats;
+	struct rcu_head     rcu_head;
 };
 
 struct Qdisc_class_ops {
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 5173c1e..1751325 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -528,7 +528,7 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
 	unsigned int size;
 	int err = -ENOBUFS;
 
-	/* ensure that the Qdisc and the private data are 32-byte aligned */
+	/* ensure that the Qdisc and the private data are 64-byte aligned */
 	size = QDISC_ALIGN(sizeof(*sch));
 	size += ops->priv_size + (QDISC_ALIGNTO - 1);
 
@@ -590,6 +590,13 @@ void qdisc_reset(struct Qdisc *qdisc)
 }
 EXPORT_SYMBOL(qdisc_reset);
 
+static void qdisc_rcu_free(struct rcu_head *head)
+{
+	struct Qdisc *qdisc = container_of(head, struct Qdisc, rcu_head);
+
+	kfree((char *) qdisc - qdisc->padded);
+}
+
 void qdisc_destroy(struct Qdisc *qdisc)
 {
 	const struct Qdisc_ops  *ops = qdisc->ops;
@@ -613,7 +620,11 @@ void qdisc_destroy(struct Qdisc *qdisc)
 	dev_put(qdisc_dev(qdisc));
 
 	kfree_skb(qdisc->gso_skb);
-	kfree((char *) qdisc - qdisc->padded);
+	/*
+	 * gen_estimator est_timer() might access qdisc->q.lock,
+	 * wait a RCU grace period before freeing qdisc.
+	 */
+	call_rcu(&qdisc->rcu_head, qdisc_rcu_free);
 }
 EXPORT_SYMBOL(qdisc_destroy);
 



^ permalink raw reply related

* Re: [PATCH 0/6] tagged sysfs support
From: Serge E. Hallyn @ 2010-03-31 17:21 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Greg Kroah-Hartman, Kay Sievers, Greg KH, linux-kernel, Tejun Heo,
	Cornelia Huck, linux-fsdevel, Eric Dumazet, Benjamin LaHaise,
	netdev
In-Reply-To: <m1fx3hk6gw.fsf@fess.ebiederm.org>

Quoting Eric W. Biederman (ebiederm@xmission.com):
> 
> The main short coming of using multiple network namespaces today
> is that only network devices for the primary network namespaces
> can be put in the kobject layer and sysfs.
> 
> This is essentially the earlier version of this patchset that was
> reviewed before, just now on top of a version of sysfs that doesn't
> need cleanup patches to support it.
> 
> I have been running these patches in some form for well over a
> year so the basics should at least be solid.  
> 
> This patchset is currently against 2.6.34-rc1.
> 
> This patchset is just the basic infrastructure a couple of more pretty
> trivial patches are needed to actually enable network namespaces to use this.
> My current plan is to send those after these patches have made it through
> review.

Thanks very much for keeping this going, Eric!  I'm going to keep
looking through the code some more, but so far I see no problems.

Acked-by: Serge Hallyn <serue@us.ibm.com>

to the full patchset.  I'm really hoping you'll also include the
patch to implement the netns support (i.e. basically commit
fdc0adeaa8bfab9a179e1eb349cab400ddb70403 that you sent inline this
morning to Tejun).

thanks,
-serge

^ permalink raw reply

* Re: [PATCH v3 10/12] l2tp: Add L2TP ethernet pseudowire support
From: Paul E. McKenney @ 2010-03-31 17:38 UTC (permalink / raw)
  To: James Chapman; +Cc: Stephen Hemminger, netdev
In-Reply-To: <4BB31761.2090906@katalix.com>

On Wed, Mar 31, 2010 at 10:35:29AM +0100, James Chapman wrote:
> Stephen Hemminger wrote:
> > On Tue, 30 Mar 2010 17:18:19 +0100
> > James Chapman <jchapman@katalix.com> wrote:
> > 
> >> +struct l2tp_eth_net {
> >> +	struct list_head l2tp_eth_dev_list;
> >> +	rwlock_t l2tp_eth_lock;
> >> +};
> > 
> > Reader/write locks are discouraged because they are slower than
> > spin locks.  If you have lots of readers use RCU, if reading
> > is infrequent just use a spin lock.
> 
> Ok. In doing the conversion of the rwlocks in l2tp_core.c, I'm finding
> that some list access primitives don't have rcu equivalents, namely
> list_is_last(), list_for_each_entry_safe(). Is this intentional? Should
> I add the missing ones in a separate patch?

The list_is_last() is RCU-safe already, since the ->next pointer is
only compared, never dereferenced.  I suggest adding a comment to its
header stating that it is RCU-safe.

Feel free to create a list_for_each_entry_safe_rcu(), and I will be
happy to review it.

							Thanx, Paul

^ permalink raw reply

* Re: [net-next-2.6 PATCH] netfilter: ctnetlink: compute message size properly
From: Patrick McHardy @ 2010-03-31 17:46 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, netfilter-devel, netfilter, davem, Krzysztof Oledzki
In-Reply-To: <20100331151102.GB8043@psychotron.lab.eng.brq.redhat.com>

Jiri Pirko wrote:
> Message size should be dependent on net->ct.sysctl_acct, not on
> CONFIG_NF_CT_ACCT definition.

Krzysztof actually wanted to get rid of the config option entirely
some time ago, but at that time there were some (now solved) problems
that prevented his. I've CCed him, hoping that this will finally
get completed :)

> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> 
> diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
> index 569410a..2b0cfa4 100644
> --- a/net/netfilter/nf_conntrack_netlink.c
> +++ b/net/netfilter/nf_conntrack_netlink.c
> @@ -426,6 +426,19 @@ ctnetlink_proto_size(const struct nf_conn *ct)
>  }
>  
>  static inline size_t
> +ctnetlink_counters_size(const struct nf_conn *ct)
> +{
> +	struct net *net = nf_ct_net(ct);
> +
> +	if (!net->ct.sysctl_acct)
> +		return 0;
> +	return 2 * nla_total_size(0) /* CTA_COUNTERS_ORIG|REPL */
> +	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_PACKETS */
> +	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_BYTES */
> +	       ;

This is also not fully correct since the sysctl only affects newly
created conntracks, existing ones still have counters that are dumped.
I'd suggest to simple check whether the conntrack has an accounting
extension.

^ permalink raw reply

* Re: [PATCH 3/4] xfrm: remove policy lock when accessing policy->walk.dead
From: jamal @ 2010-03-31 17:47 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Herbert Xu, Timo Teras, netdev, David S. Miller
In-Reply-To: <4BB37B48.5020308@trash.net>

On Wed, 2010-03-31 at 18:41 +0200, Patrick McHardy wrote:

> I agree with Herbert, the flush notification indicates that
> the table is now empty, independant of its previous state.

What purpose does it serve?

As an example, if i delete an entry, the fact i deleted an entry is 
of interest to some manager in user space for the purpose of syncing.
If i brought a link down, same thing. If i brought a link down
that was already down - why would that be of interest to generate
as an event? etc.

cheers,
jamal


^ permalink raw reply

* Re: [PATCH v2 5/7] drivers/net: Remove local #define IW_IOCTL, use STD_IW_HANDLER
From: Geoff Levand @ 2010-03-31 17:55 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel@vger.kernel.org, Richard Kennedy, Johannes Berg,
	Zhu Yi, Reinette Chatre, Intel Linux Wireless, John W. Linville,
	linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org,
	netdev@vger.kernel.org, linux-wireless@vger.kernel.org
In-Reply-To: <696c60e097ff35aeb2d746d1a0edf167514f2b61.1268892664.git.joe@perches.com>

Hi,

On 03/17/2010 11:21 PM, Joe Perches wrote:
> Use #define STD_IW_HANDLER from wireless.h instead
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/net/ps3_gelic_wireless.c       |   35 +++++++-------
>  drivers/net/wireless/ipw2x00/ipw2200.c |   83 ++++++++++++++++----------------
>  2 files changed, 58 insertions(+), 60 deletions(-)

Sorry for the delay.  This looks fine for the PS3.

Acked-by: Geoff Levand <geoff@infradead.org>

^ permalink raw reply

* RE: eth1: Detected Hardware Unit Hang
From: Tantilov, Emil S @ 2010-03-31 18:03 UTC (permalink / raw)
  To: Paweł Staszewski, Allan, Bruce W
  Cc: Linux Network Development list, e1000-devel@lists.sourceforge.net
In-Reply-To: <4BB2FE03.4090608@itcare.pl>

Pawel Staszewski wrote:
> Hello
> 
> I reproduce this problem on other machine with the same hardware and
> here is dmesg output: (kernel 2.6.33)
> 
> Mar 27 18:19:16 TM_01_C1 [1817894.769395] 0000:04:00.0: eth0: Detected
> Hardware Unit Hang:
> Mar 27 18:19:16 TM_01_C1 [1817894.769396]   TDH <2e>
> Mar 27 18:19:16 TM_01_C1 [1817894.769397]   TDT <1a>
> Mar 27 18:19:16 TM_01_C1 [1817894.769397]   next_to_use <1a>
> Mar 27 18:19:16 TM_01_C1 [1817894.769398]   next_to_clean <2d>
> Mar 27 18:19:16 TM_01_C1 [1817894.769398] buffer_info[next_to_clean]:
> Mar 27 18:19:16 TM_01_C1 [1817894.769399]   time_stamp <11b1591e9>
> Mar 27 18:19:16 TM_01_C1 [1817894.769399]   next_to_watch <2f>
> Mar 27 18:19:16 TM_01_C1 [1817894.769400]   jiffies <11b1592e4>
> Mar 27 18:19:16 TM_01_C1 [1817894.769401]   next_to_watch.status <0>
> Mar 27 18:19:16 TM_01_C1 [1817894.769401] MAC Status <80080783>
> Mar 27 18:19:16 TM_01_C1 [1817894.769402] PHY Status <796d>
> Mar 27 18:19:16 TM_01_C1 [1817894.769402] PHY 1000BASE-T Status <3800>
> Mar 27 18:19:16 TM_01_C1 [1817894.769403] PHY Extended Status <3000>
> Mar 27 18:19:16 TM_01_C1 [1817894.769404] PCI Status <10>
> Mar 27 18:19:18 TM_01_C1 [1817896.773365] 0000:04:00.0: eth0: Detected
> Hardware Unit Hang:
> Mar 27 18:19:18 TM_01_C1 [1817896.773367]   TDH <2e>
> Mar 27 18:19:18 TM_01_C1 [1817896.773368]   TDT <1a>
> Mar 27 18:19:18 TM_01_C1 [1817896.773368]   next_to_use <1a>
> Mar 27 18:19:18 TM_01_C1 [1817896.773369]   next_to_clean <2d>
> Mar 27 18:19:18 TM_01_C1 [1817896.773369] buffer_info[next_to_clean]:
> Mar 27 18:19:18 TM_01_C1 [1817896.773370]   time_stamp <11b1591e9>
> Mar 27 18:19:18 TM_01_C1 [1817896.773370]   next_to_watch <2f>
> Mar 27 18:19:18 TM_01_C1 [1817896.773371]   jiffies <11b1594d8>
> Mar 27 18:19:18 TM_01_C1 [1817896.773372]   next_to_watch.status <0>
> Mar 27 18:19:18 TM_01_C1 [1817896.773372] MAC Status <80080783>
> Mar 27 18:19:18 TM_01_C1 [1817896.773373] PHY Status <796d>
> Mar 27 18:19:18 TM_01_C1 [1817896.773373] PHY 1000BASE-T Status <3800>
> Mar 27 18:19:18 TM_01_C1 [1817896.773374] PHY Extended Status <3000>
> Mar 27 18:19:18 TM_01_C1 [1817896.773375] PCI Status <10>
> Mar 27 18:19:20 TM_01_C1 [1817898.769353] 0000:04:00.0: eth0: Detected

<snip>

I have a similar (not the same model) system in the lab with 82573E/L on board, but was not able to reproduce the Tx hangs you reported. So at this point we need to start looking into more details. Could you please file a bug at e1000.sf.net? Include the information you provided so far and also:
1. output from ethtoool -e
2. ethtool -d
3. cat /proc/interrupts
4. full dmesg output from boot to the point where Tx hangs occurred.
5. kernel config file

Looking at the description of your system (Supermicro X7DCT) I see this board has IPMI option. Do you have IPMI in your system?

Thanks,
Emil

^ permalink raw reply

* Re: Severe regression in bnx2 driver with bonding in post 2.6.30 kernels
From: Stuart Shelton @ 2010-03-31 18:04 UTC (permalink / raw)
  To: Michael Chan; +Cc: netdev@vger.kernel.org
In-Reply-To: <C27F8246C663564A84BB7AB3439772421AF2CD5940@IRVEXCHCCR01.corp.ad.broadcom.com>


Hi Michael,

Thanks for the reply.  When I first became aware of this problem, I checked ibm.com and applied the most recent Bladecenter/LS21 firmware updates - so the NIC firmware should be current compared to what IBM officially offers.

The ethtool output is:

$ sudo ethtool -i eg0
driver: bnx2
version: 2.0.1
firmware-version: 4.6.1 ipms 1.6.0
bus-info: 0000:02:04.0

The latest IBM firmware update appears to be:

http://www-947.ibm.com/systems/support/supportsite.wss/docdisplay?lndocid=MIGR-5083668&brandind=5000020

Many thanks,

Stuart


On 31 Mar 2010, at 17:01, Michael Chan wrote:

> Stuart Shelton wrote:
> 
>> The Broadcom NetXtreme II driver appears to have a severe
>> regression in
>> all kernels post 2.6.30 - I've observed problems with 2.6.31, 2.6.32.
>> and 2.6.33.
>> 
>> The hardware impacted is an IBM Bladecenter LS21 Blade, model
>> 7971.  We
>> have a large number of these, and all are affected.
>> 
> 
> Can you provide me ethtool -i eth0 to see what the NVRAM-based
> firmware version is?  Thanks.
> 


^ permalink raw reply

* Re: [PATCH 0/6] tagged sysfs support
From: Eric W. Biederman @ 2010-03-31 18:09 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: Greg Kroah-Hartman, Kay Sievers, Greg KH, linux-kernel, Tejun Heo,
	Cornelia Huck, linux-fsdevel, Eric Dumazet, Benjamin LaHaise,
	netdev
In-Reply-To: <20100331172110.GA18838@us.ibm.com>

"Serge E. Hallyn" <serue@us.ibm.com> writes:

> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> 
>> The main short coming of using multiple network namespaces today
>> is that only network devices for the primary network namespaces
>> can be put in the kobject layer and sysfs.
>> 
>> This is essentially the earlier version of this patchset that was
>> reviewed before, just now on top of a version of sysfs that doesn't
>> need cleanup patches to support it.
>> 
>> I have been running these patches in some form for well over a
>> year so the basics should at least be solid.  
>> 
>> This patchset is currently against 2.6.34-rc1.
>> 
>> This patchset is just the basic infrastructure a couple of more pretty
>> trivial patches are needed to actually enable network namespaces to use this.
>> My current plan is to send those after these patches have made it through
>> review.
>
> Thanks very much for keeping this going, Eric!  I'm going to keep
> looking through the code some more, but so far I see no problems.
>
> Acked-by: Serge Hallyn <serue@us.ibm.com>
>
> to the full patchset.  I'm really hoping you'll also include the
> patch to implement the netns support (i.e. basically commit
> fdc0adeaa8bfab9a179e1eb349cab400ddb70403 that you sent inline this
> morning to Tejun).

One step at a time.  My goal is to have it all send out and reviewed
in time for 2.6.35.

Eric

^ permalink raw reply

* Re: [net-next-2.6 PATCH] netfilter: ctnetlink: compute message size properly
From: Jiri Pirko @ 2010-03-31 18:21 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: netdev, netfilter-devel, netfilter, davem, Krzysztof Oledzki
In-Reply-To: <4BB38A8A.9050501@trash.net>

Wed, Mar 31, 2010 at 07:46:50PM CEST, kaber@trash.net wrote:
>Jiri Pirko wrote:
>> Message size should be dependent on net->ct.sysctl_acct, not on
>> CONFIG_NF_CT_ACCT definition.
>
>Krzysztof actually wanted to get rid of the config option entirely
>some time ago, but at that time there were some (now solved) problems
>that prevented his. I've CCed him, hoping that this will finally
>get completed :)
>
>> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>> 
>> diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
>> index 569410a..2b0cfa4 100644
>> --- a/net/netfilter/nf_conntrack_netlink.c
>> +++ b/net/netfilter/nf_conntrack_netlink.c
>> @@ -426,6 +426,19 @@ ctnetlink_proto_size(const struct nf_conn *ct)
>>  }
>>  
>>  static inline size_t
>> +ctnetlink_counters_size(const struct nf_conn *ct)
>> +{
>> +	struct net *net = nf_ct_net(ct);
>> +
>> +	if (!net->ct.sysctl_acct)
>> +		return 0;
>> +	return 2 * nla_total_size(0) /* CTA_COUNTERS_ORIG|REPL */
>> +	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_PACKETS */
>> +	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_BYTES */
>> +	       ;
>
>This is also not fully correct since the sysctl only affects newly
>created conntracks, existing ones still have counters that are dumped.
>I'd suggest to simple check whether the conntrack has an accounting
>extension.

Okay, I see your point. How about this:

Subject: [net-next-2.6 PATCH] netfilter: ctnetlink: compute message size properly V2

Message size should be dependent on net->ct.sysctl_acct, not on
CONFIG_NF_CT_ACCT definition.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>

diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 569410a..44487d8 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -426,6 +426,17 @@ ctnetlink_proto_size(const struct nf_conn *ct)
 }
 
 static inline size_t
+ctnetlink_counters_size(const struct nf_conn *ct)
+{
+	if (!nf_ct_ext_exist(ct, NF_CT_EXT_ACCT))
+		return 0;
+	return 2 * nla_total_size(0) /* CTA_COUNTERS_ORIG|REPL */
+	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_PACKETS */
+	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_BYTES */
+	       ;
+}
+
+static inline size_t
 ctnetlink_nlmsg_size(const struct nf_conn *ct)
 {
 	return NLMSG_ALIGN(sizeof(struct nfgenmsg))
@@ -435,11 +446,7 @@ ctnetlink_nlmsg_size(const struct nf_conn *ct)
 	       + 3 * nla_total_size(sizeof(u_int8_t)) /* CTA_PROTO_NUM */
 	       + nla_total_size(sizeof(u_int32_t)) /* CTA_ID */
 	       + nla_total_size(sizeof(u_int32_t)) /* CTA_STATUS */
-#ifdef CONFIG_NF_CT_ACCT
-	       + 2 * nla_total_size(0) /* CTA_COUNTERS_ORIG|REPL */
-	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_PACKETS */
-	       + 2 * nla_total_size(sizeof(uint64_t)) /* CTA_COUNTERS_BYTES */
-#endif
+	       + ctnetlink_counters_size(ct)
 	       + nla_total_size(sizeof(u_int32_t)) /* CTA_TIMEOUT */
 	       + nla_total_size(0) /* CTA_PROTOINFO */
 	       + nla_total_size(0) /* CTA_HELP */

^ permalink raw reply related

* Re: [PATCH] can: Add esd board support to plx_pci CAN driver
From: Wolfgang Grandegger @ 2010-03-31 18:25 UTC (permalink / raw)
  To: Matthias Fuchs; +Cc: netdev, Socketcan-core
In-Reply-To: <201003311732.59921.matthias.fuchs@esd.eu>

Hi Matthias,

Matthias Fuchs wrote:
> This patch adds support for SJA1000 based PCI CAN interface cards
> from electronic system design gmbh.
> 
> Two changes have been done on the common code:
>  - esd boards must not have the 2nd local interupt enabled (PLX9030/9050)
>  - a new path for PLX9056/PEX8311 chips has been added
> 
> In detail the following additional boards are now supported:
> 
>         CAN-PCI/200 (PCI)
>         CAN-PCI/266 (PCI)
>         CAN-PMC266 (PMC module)
>         CAN-PCIe/2000 (PCI Express)
>         CAN-CPCI/200 (Compact PCI, 3U)
>         CAN-PCI104 (PCI104)
> 
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>

Could you also please update the corresponding Kconfig entry. Apart
from that, the patch looks good.

Thanks,

Wolfgang.

>  drivers/net/can/sja1000/plx_pci.c |  110 ++++++++++++++++++++++++++++++++++---
>  1 files changed, 101 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
> index 6b46a63..42602e9 100644
> --- a/drivers/net/can/sja1000/plx_pci.c
> +++ b/drivers/net/can/sja1000/plx_pci.c
> @@ -40,7 +40,10 @@ MODULE_DESCRIPTION("Socket-CAN driver for PLX90xx PCI-bridge cards with "
>  MODULE_SUPPORTED_DEVICE("Adlink PCI-7841/cPCI-7841, "
>  			"Adlink PCI-7841/cPCI-7841 SE, "
>  			"Marathon CAN-bus-PCI, "
> -			"TEWS TECHNOLOGIES TPMC810");
> +			"TEWS TECHNOLOGIES TPMC810, "
> +			"esd CAN-PCI/CPCI/PCI104/200, "
> +			"esd CAN-PCI/PMC/266, "
> +			"esd CAN-PCIe/2000")
>  MODULE_LICENSE("GPL v2");
>  
>  #define PLX_PCI_MAX_CHAN 2
> @@ -53,7 +56,7 @@ struct plx_pci_card {
>  
>  #define PLX_PCI_CAN_CLOCK (16000000 / 2)
>  
> -/* PLX90xx registers */
> +/* PLX9030/9050/9052 registers */
>  #define PLX_INTCSR	0x4c		/* Interrupt Control/Status */
>  #define PLX_CNTRL	0x50		/* User I/O, Direct Slave Response,
>  					 * Serial EEPROM, and Initialization
> @@ -65,6 +68,12 @@ struct plx_pci_card {
>  #define PLX_PCI_INT_EN	(1 << 6)	/* PCI Interrupt Enable */
>  #define PLX_PCI_RESET	(1 << 30)	/* PCI Adapter Software Reset */
>  
> +/* PLX9056 registers */
> +#define PLX9056_INTCSR	0x68		/* Interrupt Control/Status */
> +
> +#define PLX9056_LINTI	(1 << 11)
> +#define PLX9056_PCI_INT_EN (1 << 8)
> +
>  /*
>   * The board configuration is probably following:
>   * RX1 is connected to ground.
> @@ -100,6 +109,13 @@ struct plx_pci_card {
>  #define ADLINK_PCI_VENDOR_ID		0x144A
>  #define ADLINK_PCI_DEVICE_ID		0x7841
>  
> +#define ESD_PCI_SUB_SYS_ID_PCI200	0x0004
> +#define ESD_PCI_SUB_SYS_ID_PCI266	0x0009
> +#define ESD_PCI_SUB_SYS_ID_PMC266	0x000e
> +#define ESD_PCI_SUB_SYS_ID_CPCI200	0x010b
> +#define ESD_PCI_SUB_SYS_ID_PCIE2000	0x0200
> +#define ESD_PCI_SUB_SYS_ID_PCI104200	0x0501
> +
>  #define MARATHON_PCI_DEVICE_ID		0x2715
>  
>  #define TEWS_PCI_VENDOR_ID		0x1498
> @@ -147,6 +163,30 @@ static struct plx_pci_card_info plx_pci_card_info_adlink_se __devinitdata = {
>  	/* based on PLX9052 */
>  };
>  
> +static struct plx_pci_card_info plx_pci_card_info_esd200 __devinitdata = {
> +	"esd CAN-PCI/CPCI/PCI104/200", 2,
> +	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
> +	{0, 0x00, 0x00}, { {2, 0x00, 0x80}, {2, 0x100, 0x80} },
> +	&plx_pci_reset_common
> +	/* based on PLX9030/9050 */
> +};
> +
> +static struct plx_pci_card_info plx_pci_card_info_esd266 __devinitdata = {
> +	"esd CAN-PCI/PMC/266", 2,
> +	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
> +	{0, 0x00, 0x00}, { {2, 0x00, 0x80}, {2, 0x100, 0x80} },
> +	&plx_pci_reset_common
> +	/* based on PLX9056 */
> +};
> +
> +static struct plx_pci_card_info plx_pci_card_info_esd2000 __devinitdata = {
> +	"esd CAN-PCIe/2000", 2,
> +	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
> +	{0, 0x00, 0x00}, { {2, 0x00, 0x80}, {2, 0x100, 0x80} },
> +	&plx_pci_reset_common
> +	/* based on PEX8311 */
> +};
> +
>  static struct plx_pci_card_info plx_pci_card_info_marathon __devinitdata = {
>  	"Marathon CAN-bus-PCI", 2,
>  	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
> @@ -179,6 +219,48 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
>  		(kernel_ulong_t)&plx_pci_card_info_adlink_se
>  	},
>  	{
> +		/* esd CAN-PCI/200 */
> +		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
> +		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PCI200,
> +		0, 0,
> +		(kernel_ulong_t)&plx_pci_card_info_esd200
> +	},
> +	{
> +		/* esd CAN-CPCI/200 */
> +		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
> +		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_CPCI200,
> +		0, 0,
> +		(kernel_ulong_t)&plx_pci_card_info_esd200
> +	},
> +	{
> +		/* esd CAN-PCI104/200 */
> +		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
> +		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PCI104200,
> +		0, 0,
> +		(kernel_ulong_t)&plx_pci_card_info_esd200
> +	},
> +	{
> +		/* esd CAN-PCI/266 */
> +		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9056,
> +		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PCI266,
> +		0, 0,
> +		(kernel_ulong_t)&plx_pci_card_info_esd266
> +	},
> +	{
> +		/* esd CAN-PMC/266 */
> +		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9056,
> +		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PMC266,
> +		0, 0,
> +		(kernel_ulong_t)&plx_pci_card_info_esd266
> +	},
> +	{
> +		/* esd CAN-PCIE/2000 */
> +		PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9056,
> +		PCI_VENDOR_ID_ESDGMBH, ESD_PCI_SUB_SYS_ID_PCIE2000,
> +		0, 0,
> +		(kernel_ulong_t)&plx_pci_card_info_esd2000
> +	},
> +	{
>  		/* Marathon CAN-bus-PCI card */
>  		PCI_VENDOR_ID_PLX, MARATHON_PCI_DEVICE_ID,
>  		PCI_ANY_ID, PCI_ANY_ID,
> @@ -304,10 +386,13 @@ static void plx_pci_del_card(struct pci_dev *pdev)
>  	plx_pci_reset_common(pdev);
>  
>  	/*
> -	 * Disable interrupts from PCI-card (PLX90xx) and disable Local_1,
> -	 * Local_2 interrupts
> +	 * Disable interrupts from PCI-card and disable local
> +	 * interrupts
>  	 */
> -	iowrite32(0x0, card->conf_addr + PLX_INTCSR);
> +	if (pdev->device != PCI_DEVICE_ID_PLX_9056)
> +		iowrite32(0x0, card->conf_addr + PLX_INTCSR);
> +	else
> +		iowrite32(0x0, card->conf_addr + PLX9056_INTCSR);
>  
>  	if (card->conf_addr)
>  		pci_iounmap(pdev, card->conf_addr);
> @@ -437,10 +522,17 @@ static int __devinit plx_pci_add_card(struct pci_dev *pdev,
>  	 * Enable interrupts from PCI-card (PLX90xx) and enable Local_1,
>  	 * Local_2 interrupts from the SJA1000 chips
>  	 */
> -	val = ioread32(card->conf_addr + PLX_INTCSR);
> -	val |= PLX_LINT1_EN | PLX_LINT2_EN | PLX_PCI_INT_EN;
> -	iowrite32(val, card->conf_addr + PLX_INTCSR);
> -
> +	if (pdev->device != PCI_DEVICE_ID_PLX_9056) {
> +		val = ioread32(card->conf_addr + PLX_INTCSR);
> +		if (pdev->subsystem_vendor == PCI_VENDOR_ID_ESDGMBH)
> +			val |= PLX_LINT1_EN | PLX_PCI_INT_EN;
> +		else
> +			val |= PLX_LINT1_EN | PLX_LINT2_EN | PLX_PCI_INT_EN;
> +		iowrite32(val, card->conf_addr + PLX_INTCSR);
> +	} else {
> +		iowrite32(PLX9056_LINTI | PLX9056_PCI_INT_EN,
> +			  card->conf_addr + PLX9056_INTCSR);
> +	}
>  	return 0;
>  
>  failure_cleanup:



^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox