Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 00/11] ISDN patches for 2.6.36
From: Tilman Schmidt @ 2010-07-06  7:47 UTC (permalink / raw)
  To: David Miller; +Cc: isdn, hjlipp, keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20100705.185352.39176355.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

Am 2010-07-06 03:53 schrieb David Miller:
> From: Tilman Schmidt <tilman@imap.cc>
> Date: Tue,  6 Jul 2010 02:18:32 +0200 (CEST)
> 
>> Karsten, David,
>>
>> following are a series of patches to the Gigaset driver I'd like
>> to see included in kernel release 2.6.36.
> 
> Do they have any dependencies on the two patch set of fixes
> you just sent out for net-2.6?

None. They are completely independent.

I guess your question arose because I gave both series the same
title by mistake. The second one should have been called:
"*Gigaset* patches for 2.6.36".

Thanks,
Tilman


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply

* Re: [PATCH 05/11] isdn/gigaset: improve CAPI message debugging
From: Tilman Schmidt @ 2010-07-06  8:14 UTC (permalink / raw)
  To: David Miller; +Cc: isdn, hjlipp, keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20100705.192356.52184135.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]

Am 2010-07-06 04:23 schrieb David Miller:
> From: Tilman Schmidt <tilman@imap.cc>
> Date: Tue,  6 Jul 2010 02:18:59 +0200 (CEST)
> 
>> @@ -384,7 +388,7 @@ void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *dskb)
>>  
>>  	/* don't send further B3 messages if disconnected */
>>  	if (bcs->apconnstate < APCONN_ACTIVE) {
>> -		gig_dbg(DEBUG_LLDATA, "disconnected, discarding ack");
>> +		gig_dbg(DEBUG_MCMD, "disconnected, discarding ack");
>>  		return;
>>  	}
> 
> This is against something other than net-next-2.6 even with your
> other two ISDN patches applied, because all of these lines read
> "if (ap->connected ..."
> 
> Please tell me what exactly these patches are against so that I
> can apply them to net-next-2.6 cleanly.

They are against mainline and apply cleanly to v2.6.35-rc3.
IOW, they go on top of the series you applied to net-2.6 on
Fri, 25 Jun 2010 21:31:28 -0700 (PDT).

Specifically, the last patch of that series,
> Subject: [PATCH 5/5] isdn/gigaset: correct CAPI connection state storage
makes the switch from ap->connected to bcs->apconnstate.

So if you'll postpone applying last night's series until
after your next merge of net-2.6 into net-next-2.6, it
should then apply cleanly.

Thanks,
Tilman


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply

* Re: setsockopt(IP_TOS) being privileged or distinct capability?
From: Rémi Denis-Courmont @ 2010-07-06  8:17 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: netdev
In-Reply-To: <4C2F7A55.5090700@redfish-solutions.com>




On Sat, 03 Jul 2010 11:58:45 -0600, Philip Prindeville
<philipp_subx@redfish-solutions.com> wrote:
> Does anyone else think that setsockopt(IP_TOS) should be a privileged
> operation, perhaps using CAP_NET_ADMIN, or maybe even adding separate
> granularity as CAP_NET_TOS?

That's a terribly idea.
Some applications do rely on this to set their TOS "correctly". If you
don't want unprivileged applications to be able to affect the queuing
policy, then don't use the TOS bits in your queuing policy - as simple as
that.

-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis


^ permalink raw reply

* Dear friend,
From: mamudadiallo @ 2010-07-06 10:17 UTC (permalink / raw)


Dear friend, 
I want to transfer ($2,500.000.00) Two million Five hundred thousand United States Dollars to overseas account. 
  
Your assistance as a foreigner is necessary because the management of the bank will welcome any foreigner who has correct information to this account which I will give to you immediately, if you are interested to do this business with me please reply with the assurance, include your private telephone and fax numbers as it is necessary to facilitate an easy communication in this transaction. 
  
As soon as you reply, I will let you know the next step to follow in order to finalize this transaction immediately. I expect your urgent communication. 
  
Upon your response and strong assurance that you will not let me down once the fund goes into your account. 
  
I will let you know the origin of the fund and the transfer procedures without delay. 
Yours sincerely. 
MAMUDA DIALLO


      


^ permalink raw reply

* Re: setsockopt(IP_TOS) being privileged or distinct capability?
From: Benny Amorsen @ 2010-07-06 10:56 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: Alexander Clouter, netdev
In-Reply-To: <4C321EAF.9000508@redfish-solutions.com>

Philip Prindeville <philipp_subx@redfish-solutions.com> writes:

> Once QoS markings actually *are* implemented in carrier networks, the
> potential for abuse is non-insignificant.  Hence the suggestion to
> make it privileged.

I think you are overestimating the potential for abuse. ISP's who
oversubscribe enough to suffer from heavy congestion internally should
stop doing that and most likely have fancy congestion control equipment
installed. That equipment can apply all sorts of limits to prioritized
traffic.

For a more typical ISP, marking TCP packets with EF means you get
marginally lower and more stable latency but risk increased packet loss.
TCP does not mind a little extra latency and suffers badly from packet
loss, so that behaviour should be self-limiting.


/Benny


^ permalink raw reply

* [PATCH  kernel 2.6.35-rc3-git7] axnet_cs: local_irq_save before calling ei_irq_wrapper
From: Ken Kawasaki @ 2010-07-06 11:22 UTC (permalink / raw)
  To: netdev
In-Reply-To: <20100620102427.77d2c7d3.ken_kawasaki@spring.nifty.jp>


axnet_cs:
    local_irq_save before calling ei_irq_wrapper.


Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>

---

--- linux-2.6.35-git7/drivers/net/pcmcia/axnet_cs.c.orig	2010-07-04 08:28:15.000000000 +0900
+++ linux-2.6.35-git7/drivers/net/pcmcia/axnet_cs.c	2010-07-04 08:40:23.000000000 +0900
@@ -606,6 +606,7 @@ static void ei_watchdog(u_long arg)
     unsigned int nic_base = dev->base_addr;
     unsigned int mii_addr = nic_base + AXNET_MII_EEP;
     u_short link;
+    unsigned long flags;
 
     if (!netif_device_present(dev)) goto reschedule;
 
@@ -614,7 +615,10 @@ static void ei_watchdog(u_long arg)
     if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) {
 	if (!info->fast_poll)
 	    printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name);
+	local_irq_save(flags);
 	ei_irq_wrapper(dev->irq, dev);
+	local_irq_restore(flags);
+
 	info->fast_poll = HZ;
     }
     if (info->fast_poll) {

^ permalink raw reply

* Re: [patch v2.3 1/4] netfilter: xt_ipvs (netfilter matcher for IPVS)
From: Patrick McHardy @ 2010-07-06 11:32 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, linux-kernel, netfilter, netfilter-devel,
	Malcolm Turnbull, Wensong Zhang, Julius Volz, David S. Miller,
	Hannes Eder
In-Reply-To: <20100704114808.459045895@vergenet.net>

Simon Horman wrote:
> From:	Hannes Eder <heder@google.com>
>
> This implements the kernel-space side of the netfilter matcher xt_ipvs.
>   
> @@ -0,0 +1,25 @@
> +#ifndef _XT_IPVS_H
> +#define _XT_IPVS_H
> +
> +#define XT_IPVS_IPVS_PROPERTY	(1 << 0) /* all other options imply this one */
> +#define XT_IPVS_PROTO		(1 << 1)
> +#define XT_IPVS_VADDR		(1 << 2)
> +#define XT_IPVS_VPORT		(1 << 3)
> +#define XT_IPVS_DIR		(1 << 4)
> +#define XT_IPVS_METHOD		(1 << 5)
> +#define XT_IPVS_VPORTCTL	(1 << 6)
> +#define XT_IPVS_MASK		((1 << 7) - 1)
> +#define XT_IPVS_ONCE_MASK	(XT_IPVS_MASK & ~XT_IPVS_IPVS_PROPERTY)
> +
> +struct xt_ipvs_mtinfo {
> +	union nf_inet_addr	vaddr, vmask;
> +	__be16			vport;
> +	__u16			l4proto;
> +	__u16			fwd_method;
>   
It seems you could use __u8 for both l4proto and fwd_method
and reduce the match size by 2 bytes.

> +	__be16			vportctl;
> +
> +	__u8			invert;
> +	__u8			bitmask;
> +};
> +static bool
> +ipvs_mt(const struct sk_buff *skb, struct xt_action_param *par)
> +...
>   
> +	if (data->bitmask & XT_IPVS_DIR) {
> +		enum ip_conntrack_info ctinfo;
> +		struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
> +
> +		if (ct == NULL || ct == &nf_conntrack_untracked) {
>   
We're using per-cpu structures for nf_conntrack_untracked in the
current net-next/nf-next tree, so this doesn't work anymore. You
need to use nf_ct_is_untracked() instead.

> +			match = false;
> +			goto out_put_cp;
> +		}


^ permalink raw reply

* Re: [patch v2.3 2/4] IPVS: make friends with nf_conntrack
From: Patrick McHardy @ 2010-07-06 11:36 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, linux-kernel, netfilter, netfilter-devel,
	Malcolm Turnbull, Wensong Zhang, Julius Volz, David S. Miller,
	Hannes Eder
In-Reply-To: <20100704114808.668473084@vergenet.net>

Simon Horman wrote:
> +static void
> +ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp)
> +{
> +	struct nf_conn *ct = (struct nf_conn *)skb->nfct;
> +	struct nf_conntrack_tuple new_tuple;
> +
> +	if (ct == NULL || ct == &nf_conntrack_untracked ||
> +	    nf_ct_is_confirmed(ct))
>   
Similar to the last patch, this needs to use nf_ct_is_untracked().

> +		return;
> +


^ permalink raw reply

* Re: [patch v2.3 3/4] IPVS: make FTP work with full NAT support
From: Patrick McHardy @ 2010-07-06 11:43 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, linux-kernel, netfilter, netfilter-devel,
	Malcolm Turnbull, Wensong Zhang, Julius Volz, David S. Miller,
	Hannes Eder
In-Reply-To: <20100704114808.932594876@vergenet.net>

Simon Horman wrote:
> @@ -219,19 +358,23 @@ static int ip_vs_ftp_out(struct ip_vs_ap
>  
>  		buf_len = strlen(buf);
>  
> +		ct = nf_ct_get(skb, &ctinfo);
> +		ret = nf_nat_mangle_tcp_packet(skb,
> +					       ct,
> +					       ctinfo,
> +					       start-data,
> +					       end-start,
> +					       buf,
> +					       buf_len);
> +
> +		if (ct && ct != &nf_conntrack_untracked)
>   
This does not make sense, you're already using the conntrack above
in the call to nf_nat_mangle_tcp_packet(), so the check should
probably happen before that. You also should be checking the
return value of nf_nat_mangle_tcp_packet() before setting up the
expectation.

> +			ip_vs_expect_related(skb, ct, n_cp,
> +					     IPPROTO_TCP, NULL, 0);


^ permalink raw reply

* Re: iwl3945: HARDWARE GONE??
From: Priit Laes @ 2010-07-06 12:48 UTC (permalink / raw)
  To: Robert Hancock; +Cc: netdev, linux-kernel
In-Reply-To: <4C32766C.4080305@gmail.com>

Ühel kenal päeval, E, 2010-07-05 kell 18:18, kirjutas Robert Hancock:
> On 07/02/2010 10:02 AM, Priit Laes wrote:
> > Heya!
> >
> > Bumped my kernel to version 2.6.35-rc3-00391-g97e0214 and ran into
> > HARDWARE GONE error message..
> >
> > Hardware is Lenovo x60s and wireless card is intel 3945:
> >
> > 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
> > 	Subsystem: Intel Corporation ThinkPad R60e/X60s
> > 	Flags: bus master, fast devsel, latency 0, IRQ 47
> > 	Memory at edf00000 (32-bit, non-prefetchable) [size=4K]
> > 	Capabilities: [c8] Power Management version 2
> > 	Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
> > 	Capabilities: [e0] Express Legacy Endpoint, MSI 00
> > 	Capabilities: [100] Advanced Error Reporting
> > 	Capabilities: [140] Device Serial Number 00-xx-xx-xx-xx-xx-xx-xx
> > 	Kernel driver in use: iwl3945
> > 	Kernel modules: iwl3945
> 
> Wonder if somehow an ACPI power resource powering the wireless card got 
> switched off? What previous kernel version was working, can you try 
> bisecting?

Bisecting is a bit hard, because I haven't seen this issue anymore :(

^ permalink raw reply

* [PATCH] vxge: show startup message with KERN_INFO
From: Wu Fengguang @ 2010-07-06 13:02 UTC (permalink / raw)
  To: David Miller; +Cc: Sreenivasa Honnur, netdev

The original KERN_CRIT will mess up terminals.

CC: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 drivers/net/vxge/vxge-main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 45c5dc2..93a9147 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -4515,9 +4515,9 @@ vxge_starter(void)
 	char version[32];
 	snprintf(version, 32, "%s", DRV_VERSION);
 
-	printk(KERN_CRIT "%s: Copyright(c) 2002-2009 Neterion Inc\n",
+	printk(KERN_INFO "%s: Copyright(c) 2002-2009 Neterion Inc\n",
 		VXGE_DRIVER_NAME);
-	printk(KERN_CRIT "%s: Driver version: %s\n",
+	printk(KERN_INFO "%s: Driver version: %s\n",
 			VXGE_DRIVER_NAME, version);
 
 	verify_bandwidth();
-- 
1.6.6


^ permalink raw reply related

* [net-next PATCH] bnx2x: Set RXHASH for LRO packets
From: Vladislav Zolotarov @ 2010-07-06 14:09 UTC (permalink / raw)
  To: Dave Miller; +Cc: netdev, Eilon Greenstein

Set Toeplitz hash both for LRO and none-LRO skbs.
The first CQE (TPA_START) will contain a hash for an LRO packet.

Current code sets skb->rx_hash for none-LRO skbs only.

 Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
 Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x_main.c |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 57ff5b3..a868e4a 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -1545,6 +1545,20 @@ static inline void bnx2x_update_rx_prod(struct bnx2x *bp,
 	   fp->index, bd_prod, rx_comp_prod, rx_sge_prod);
 }
 
+/* Set Toeplitz hash value in the skb using the value from the
+ * CQE (calculated by HW).
+ */
+static inline void bnx2x_set_skb_rxhash(struct bnx2x *bp, union eth_rx_cqe *cqe,
+					struct sk_buff *skb)
+{
+	/* Set Toeplitz hash from CQE */
+	if ((bp->dev->features & NETIF_F_RXHASH) &&
+	    (cqe->fast_path_cqe.status_flags &
+	     ETH_FAST_PATH_RX_CQE_RSS_HASH_FLG))
+		skb->rxhash =
+		le32_to_cpu(cqe->fast_path_cqe.rss_hash_result);
+}
+
 static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
 {
 	struct bnx2x *bp = fp->bp;
@@ -1582,7 +1596,7 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
 		struct sw_rx_bd *rx_buf = NULL;
 		struct sk_buff *skb;
 		union eth_rx_cqe *cqe;
-		u8 cqe_fp_flags, cqe_fp_status_flags;
+		u8 cqe_fp_flags;
 		u16 len, pad;
 
 		comp_ring_cons = RCQ_BD(sw_comp_cons);
@@ -1598,7 +1612,6 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
 
 		cqe = &fp->rx_comp_ring[comp_ring_cons];
 		cqe_fp_flags = cqe->fast_path_cqe.type_error_flags;
-		cqe_fp_status_flags = cqe->fast_path_cqe.status_flags;
 
 		DP(NETIF_MSG_RX_STATUS, "CQE type %x  err %x  status %x"
 		   "  queue %x  vlan %x  len %u\n", CQE_TYPE(cqe_fp_flags),
@@ -1634,6 +1647,10 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
 
 					bnx2x_tpa_start(fp, queue, skb,
 							bd_cons, bd_prod);
+
+					/* Set Toeplitz hash for an LRO skb */
+					bnx2x_set_skb_rxhash(bp, cqe, skb);
+
 					goto next_rx;
 				}
 
@@ -1726,11 +1743,8 @@ reuse_rx:
 
 			skb->protocol = eth_type_trans(skb, bp->dev);
 
-			if ((bp->dev->features & NETIF_F_RXHASH) &&
-			    (cqe_fp_status_flags &
-			     ETH_FAST_PATH_RX_CQE_RSS_HASH_FLG))
-				skb->rxhash = le32_to_cpu(
-				    cqe->fast_path_cqe.rss_hash_result);
+			/* Set Toeplitz hash for a none-LRO skb */
+			bnx2x_set_skb_rxhash(bp, cqe, skb);
 
 			skb->ip_summed = CHECKSUM_NONE;
 			if (bp->rx_csum) {
-- 
1.7.0.4





^ permalink raw reply related

* NET: SB1250: Initialize .owner
From: Ralf Baechle @ 2010-07-06 15:18 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: linux-mips, Maciej W. Rozycki

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 drivers/net/sb1250-mac.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index 1f3acc3..79eee30 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -2671,6 +2671,7 @@ static struct platform_driver sbmac_driver = {
 	.remove = __exit_p(sbmac_remove),
 	.driver = {
 		.name = sbmac_string,
+		.owner  = THIS_MODULE,
 	},
 };
 

^ permalink raw reply related

* [PATCH] ks8842: Do the TX timeout work in workqueue context.
From: Richard Röjfors @ 2010-07-06 15:20 UTC (permalink / raw)
  To: netdev; +Cc: davem

Currently all code that needs to be run at TX timeout is done in the
calling context, where bottom halves are disabled. Some of the code
blocks, so it needs to be done in a different context. This patch
adds in a work struct which is scheduled at TX timeout. Then the
timeout code is executed within work queue context.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
---
diff --git a/drivers/net/ks8842.c b/drivers/net/ks8842.c
index d47bba9..0be9261 100644
--- a/drivers/net/ks8842.c
+++ b/drivers/net/ks8842.c
@@ -119,6 +119,8 @@ struct ks8842_adapter {
 	int		irq;
 	struct tasklet_struct	tasklet;
 	spinlock_t	lock; /* spinlock to be interrupt safe */
+	struct work_struct timeout_work;
+	struct net_device *netdev;
 };
 
 static inline void ks8842_select_bank(struct ks8842_adapter *adapter,
u16 bank)
@@ -197,7 +199,6 @@ static void ks8842_reset(struct ks8842_adapter
*adapter)
 	msleep(10);
 	iowrite16(0, adapter->hw_addr + REG_GRR);
 	*/
-	iowrite16(32, adapter->hw_addr + REG_SELECT_BANK);
 	iowrite32(0x1, adapter->hw_addr + REG_TIMB_RST);
 	msleep(20);
 }
@@ -553,6 +554,8 @@ static int ks8842_close(struct net_device *netdev)
 
 	netdev_dbg(netdev, "%s - entry\n", __func__);
 
+	cancel_work_sync(&adapter->timeout_work);
+
 	/* free the irq */
 	free_irq(adapter->irq, netdev);
 
@@ -595,9 +598,11 @@ static int ks8842_set_mac(struct net_device
*netdev, void *p)
 	return 0;
 }
 
-static void ks8842_tx_timeout(struct net_device *netdev)
+static void ks8842_tx_timeout_work(struct work_struct *work)
 {
-	struct ks8842_adapter *adapter = netdev_priv(netdev);
+	struct ks8842_adapter *adapter =
+		container_of(work, struct ks8842_adapter, timeout_work);
+	struct net_device *netdev = adapter->netdev;
 	unsigned long flags;
 
 	netdev_dbg(netdev, "%s: entry\n", __func__);
@@ -606,6 +611,9 @@ static void ks8842_tx_timeout(struct net_device
*netdev)
 	/* disable interrupts */
 	ks8842_write16(adapter, 18, 0, REG_IER);
 	ks8842_write16(adapter, 18, 0xFFFF, REG_ISR);
+
+	netif_stop_queue(netdev);
+
 	spin_unlock_irqrestore(&adapter->lock, flags);
 
 	ks8842_reset_hw(adapter);
@@ -615,6 +623,15 @@ static void ks8842_tx_timeout(struct net_device
*netdev)
 	ks8842_update_link_status(netdev, adapter);
 }
 
+static void ks8842_tx_timeout(struct net_device *netdev)
+{
+	struct ks8842_adapter *adapter = netdev_priv(netdev);
+
+	netdev_dbg(netdev, "%s: entry\n", __func__);
+
+	schedule_work(&adapter->timeout_work);
+}
+
 static const struct net_device_ops ks8842_netdev_ops = {
 	.ndo_open		= ks8842_open,
 	.ndo_stop		= ks8842_close,
@@ -649,6 +666,8 @@ static int __devinit ks8842_probe(struct
platform_device *pdev)
 	SET_NETDEV_DEV(netdev, &pdev->dev);
 
 	adapter = netdev_priv(netdev);
+	adapter->netdev = netdev;
+	INIT_WORK(&adapter->timeout_work, ks8842_tx_timeout_work);
 	adapter->hw_addr = ioremap(iomem->start, resource_size(iomem));
 	if (!adapter->hw_addr)
 		goto err_ioremap;


^ permalink raw reply related

* Re: [PATCH] vxge: show startup message with KERN_INFO
From: Jon Mason @ 2010-07-06 16:08 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: David Miller, Sreenivasa Honnur, netdev@vger.kernel.org
In-Reply-To: <20100706130203.GA31471@localhost>

On Tue, Jul 06, 2010 at 06:02:03AM -0700, Wu Fengguang wrote:
> The original KERN_CRIT will mess up terminals.

Looks reasonable to me.

Thanks,
Jon

>
> CC: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
>  drivers/net/vxge/vxge-main.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
> index 45c5dc2..93a9147 100644
> --- a/drivers/net/vxge/vxge-main.c
> +++ b/drivers/net/vxge/vxge-main.c
> @@ -4515,9 +4515,9 @@ vxge_starter(void)
>       char version[32];
>       snprintf(version, 32, "%s", DRV_VERSION);
>
> -     printk(KERN_CRIT "%s: Copyright(c) 2002-2009 Neterion Inc\n",
> +     printk(KERN_INFO "%s: Copyright(c) 2002-2009 Neterion Inc\n",
>               VXGE_DRIVER_NAME);
> -     printk(KERN_CRIT "%s: Driver version: %s\n",
> +     printk(KERN_INFO "%s: Driver version: %s\n",
>                       VXGE_DRIVER_NAME, version);
>
>       verify_bandwidth();
> --
> 1.6.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

The information and any attached documents contained in this message
may be confidential and/or legally privileged.  The message is
intended solely for the addressee(s).  If you are not the intended
recipient, you are hereby notified that any use, dissemination, or
reproduction is strictly prohibited and may be unlawful.  If you are
not the intended recipient, please contact the sender immediately by
return e-mail and destroy all copies of the original message.

^ permalink raw reply

* Re: [linux-pm] [PATCH 3/3] pm_qos: get rid of the allocation in pm_qos_add_request()
From: James Bottomley @ 2010-07-06 16:12 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm, Takashi Iwai, netdev, markgross
In-Reply-To: <201007052307.07655.rjw@sisk.pl>

On Mon, 2010-07-05 at 23:07 +0200, Rafael J. Wysocki wrote:
> On Monday, July 05, 2010, James Bottomley wrote:
> > On Mon, 2010-07-05 at 08:41 +0200, Takashi Iwai wrote:
> > > sorry for the late reply, as I've been on vacation in the last week
> > > (and shut off mails intentionally :)
> > 
> > Envy forbids me from saying that's OK.
> > 
> > > At Mon, 28 Jun 2010 12:44:48 -0500,
> > > James Bottomley wrote:
> > > > 
> > > > Since every caller has to squirrel away the returned pointer anyway,
> > > > they might as well supply the memory area.  This fixes a bug in a few of
> > > > the call sites where the returned pointer was dereferenced without
> > > > checking it for NULL (which gets returned if the kzalloc failed).
> > > > 
> > > > I'd like to hear how sound and netdev feels about this: it will add
> > > > about two more pointers worth of data to struct netdev and struct
> > > > snd_pcm_substream .. but I think it's worth it.  If you're OK, I'll add
> > > > your acks and send through the pm tree.
> > > > 
> > > > This also looks to me like an android independent clean up (even though
> > > > it renders the request_add atomically callable).  I also added include
> > > > guards to include/linux/pm_qos_params.h
> > > 
> > > I like the patch very well, too.
> > > But, just wondering...
> > > 
> > > > @@ -262,6 +260,11 @@ void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req,
> > > >  	if (!pm_qos_req) /*guard against callers passing in null */
> > > >  		return;
> > > >  
> > > > +	if (pm_qos_request_active(pm_qos_req)) {
> > > > +		WARN(1, KERN_ERR "pm_qos_update_request() called for unknown object\n");
> > > > +		return;
> > > > +	}
> > > > +
> > > 
> > > Is this correct...?  Shouldn't it be a negative check?
> > 
> > Yes, it should be a negative check ... I'll update the patch.
> 
> I've already fixed it in my tree.

Ah, OK, thanks ... so that would explain why we haven't been getting
floods of reports (instead of me thinking no-one has tested it).

> > I guess this still means that no-one has managed to test it on a functional
> > system ...
> 
> Well, it's been for a while in linux-next ...

So here's hoping ...

James



^ permalink raw reply

* Re: [PATCH net-next-2.6] IB/{nes, ipoib}: Pass supported flags to ethtool_op_set_flags()
From: Randy Dunlap @ 2010-07-06 16:22 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: amit.salecha, linux-net-drivers, dm, sgruszka, amwang,
	Faisal Latif, e1000-devel, netdev, anirban.chakraborty, jgarzik,
	vkolluri, Chien Tung, brice, gallatin, linux-rdma, scofeldm,
	Roland Dreier, shemminger, David Miller, buytenh, roprabhu
In-Reply-To: <1278186089.4878.570.camel@localhost>

On 07/03/10 12:41, Ben Hutchings wrote:
> Following commit 1437ce3983bcbc0447a0dedcd644c14fe833d266 "ethtool:
> Change ethtool_op_set_flags to validate flags", ethtool_op_set_flags
> takes a third parameter and cannot be used directly as an
> implementation of ethtool_ops::set_flags.
> 
> Changes nes and ipoib driver to pass in the appropriate value.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> This is compile-tested only.

Ack, thanks.

> Dave, Roland, you'd better decide between yourselves should apply this.
> 
> Ben.
> 
>  drivers/infiniband/hw/nes/nes_nic.c          |    8 +++++++-
>  drivers/infiniband/ulp/ipoib/ipoib_ethtool.c |    7 ++++++-
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
> index 5cc0a9a..42e7aad 100644
> --- a/drivers/infiniband/hw/nes/nes_nic.c
> +++ b/drivers/infiniband/hw/nes/nes_nic.c
> @@ -1567,6 +1567,12 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd
>  }
>  
> 
> +static int nes_netdev_set_flags(struct net_device *netdev, u32 flags)
> +{
> +	return ethtool_op_set_flags(netdev, flags, ETH_FLAG_LRO);
> +}
> +
> +
>  static const struct ethtool_ops nes_ethtool_ops = {
>  	.get_link = ethtool_op_get_link,
>  	.get_settings = nes_netdev_get_settings,
> @@ -1588,7 +1594,7 @@ static const struct ethtool_ops nes_ethtool_ops = {
>  	.get_tso = ethtool_op_get_tso,
>  	.set_tso = ethtool_op_set_tso,
>  	.get_flags = ethtool_op_get_flags,
> -	.set_flags = ethtool_op_set_flags,
> +	.set_flags = nes_netdev_set_flags,
>  };
>  
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> index 40e8584..1a1657c 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> @@ -147,6 +147,11 @@ static void ipoib_get_ethtool_stats(struct net_device *dev,
>  	data[index++] = priv->lro.lro_mgr.stats.no_desc;
>  }
>  
> +static int ipoib_set_flags(struct net_device *dev, u32 flags)
> +{
> +	return ethtool_op_set_flags(dev, flags, ETH_FLAG_LRO);
> +}
> +
>  static const struct ethtool_ops ipoib_ethtool_ops = {
>  	.get_drvinfo		= ipoib_get_drvinfo,
>  	.get_rx_csum		= ipoib_get_rx_csum,
> @@ -154,7 +159,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
>  	.get_coalesce		= ipoib_get_coalesce,
>  	.set_coalesce		= ipoib_set_coalesce,
>  	.get_flags		= ethtool_op_get_flags,
> -	.set_flags		= ethtool_op_set_flags,
> +	.set_flags		= ipoib_set_flags,
>  	.get_strings		= ipoib_get_strings,
>  	.get_sset_count		= ipoib_get_sset_count,
>  	.get_ethtool_stats	= ipoib_get_ethtool_stats,


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply

* Re: linux-next: Tree for July 6 (NET_DSA + PHYLIB kconfig)
From: Randy Dunlap @ 2010-07-06 17:34 UTC (permalink / raw)
  To: Stephen Rothwell, netdev; +Cc: linux-next, LKML
In-Reply-To: <20100706190519.93d8b785.sfr@canb.auug.org.au>

On Tue, 6 Jul 2010 19:05:19 +1000 Stephen Rothwell wrote:

> Hi all,
> 
> Changes since 20100705:
> 
> My fixes tree contains:
> 	kbuild: Fix path to scripts/setlocalversion
> 
> ----------------------------------------------------------------------------

kconfig now detects symbol dependency errors and warns about them.
E.g.:

warning: (NET_DSA && NET && EXPERIMENTAL && !S390 || MACB && NETDEVICES && NET_ETHERNET && (AVR32 || ARCH_AT91SAM9260 || ARCH_AT91SAM9263 || ARCH_AT91SAM9G20 || ARCH_AT91SAM9G45 || ARCH_AT91CAP9) || IXP4XX_ETH && NETDEVICES && NET_ETHERNET && ARM && ARCH_IXP4XX && IXP4XX_NPE && IXP4XX_QMGR || W90P910_ETH && NETDEVICES && NET_ETHERNET && ARM && ARCH_W90X900 || MIPS_AU1X00_ENET && NETDEVICES && NET_ETHERNET && SOC_AU1X00 || SH_ETH && NETDEVICES && NET_ETHERNET && SUPERH && (CPU_SUBTYPE_SH7710 {{20 lines deleted}}
selects PHYLIB which has unmet direct dependencies (!S390 && NET_ETHERNET)

says that NET_DSA & PHYLIB have some kind of problem.
NET_DSA selects PHYLIB.  PHYLIB depends on NET_ETHERNET, which is not enabled
in this randconfig.  net/dsa code does need PHYLIB code, so PHYLIB symbol should
either drop "depends on NET_ETHERNET" or it should be changed to
	depends on NET_ETHERNET || NET_DSA

Preference?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply

* Re: [PATCH 05/11] isdn/gigaset: improve CAPI message debugging
From: David Miller @ 2010-07-06 17:44 UTC (permalink / raw)
  To: tilman; +Cc: isdn, hjlipp, keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <4C32E5FD.70103@imap.cc>

From: Tilman Schmidt <tilman@imap.cc>
Date: Tue, 06 Jul 2010 10:14:53 +0200

> So if you'll postpone applying last night's series until
> after your next merge of net-2.6 into net-next-2.6, it
> should then apply cleanly.

That's the kind of information I'd like to see from you when you
post patches which have such dependencies.

Thanks.

^ permalink raw reply

* [RFC] gre: propagate ipv6 transport class
From: Stephen Hemminger @ 2010-07-06 17:58 UTC (permalink / raw)
  To: David Miller, YOSHIFUJI Hideaki, Herbert Xu; +Cc: netdev

This patch makes IPV6 over IPv4 GRE tunnel propagate the transport
class field from the underlying IPV6 header to the IPV4 Type Of Service
field. Without the patch, all IPV6 packets in tunnel look the same to QoS.

This assumes that IPV6 transport class is exactly the same
as IPv4 TOS. Not sure if that is always the case?  Maybe need
to mask off some bits.

The mask and shift to get tclass is copied from ipv6/datagram.c

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/net/ipv4/ip_gre.c	2010-07-06 08:52:03.702096234 -0700
+++ b/net/ipv4/ip_gre.c	2010-07-06 08:59:18.416738831 -0700
@@ -731,6 +731,8 @@ static netdev_tx_t ipgre_tunnel_xmit(str
 		tos = 0;
 		if (skb->protocol == htons(ETH_P_IP))
 			tos = old_iph->tos;
+		else if (skb->protocol == htons(ETH_P_IPV6))
+			tos = (ntohl(*(__be32 *)ipv6_hdr(skb)) >> 20) & 0xff;
 	}
 
 	{

^ permalink raw reply

* Re: [PATCH 1/2] Export firmware assigned labels of network devices to sysfs
From: Narendra K @ 2010-07-06 18:52 UTC (permalink / raw)
  To: greg
  Cc: netdev, linux-hotplug, linux-pci, matt_domsch, jordan_hargrave,
	charles_rose, vijay_nijhawan
In-Reply-To: <EDA0A4495861324DA2618B4C45DCB3EE612B1B@blrx3m08.blr.amer.dell.com>

> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com] 
> Sent: Wednesday, June 30, 2010 9:12 PM
> To: K, Narendra
> Cc: Domsch, Matt; netdev@vger.kernel.org; linux-hotplug@vger.kernel.org;
> linux-pci@vger.kernel.org; Hargrave, Jordan; Rose, Charles; Nijhawan,
> Vijay
> Subject: Re: [PATCH 1/2] Export firmware assigned labels of network
> devices to sysfs
> 
> On Tue, Jun 29, 2010 at 11:28:18AM -0500, Narendra K wrote:
> > --- a/drivers/pci/Makefile
> > +++ b/drivers/pci/Makefile
> > @@ -4,7 +4,7 @@
> >  
> >  obj-y		+= access.o bus.o probe.o remove.o pci.o \
> >  			pci-driver.o search.o pci-sysfs.o rom.o
> setup-res.o \
> > -			irq.o vpd.o
> > +			irq.o vpd.o pci-label.o
> 
> No, only build this if CONFIG_DMI is set.

I have corrected this to build pci-label.o if only if CONFIG_DMI is set.


> > +pci_create_smbiosname_file(struct pci_dev *pdev)
> > +{
> > +	if (smbios_attr_label.test && smbios_attr_label.test(&pdev->dev,
> NULL, NULL)) {
> > +		if (sysfs_create_file(&pdev->dev.kobj,
> &smbios_attr_label.attr))
> > +			return -1;
> 
> What's wrong with the 'device_create_file' calls?

'device_create_file' takes 'struct device_attribute *' as a param which 
we have not used here because  'struct device_attribute' does not have .test
member which we needed in this patch.

Please find the patch with the above change here -

From: Narendra K <narendra_k@dell.com>
Subject: [PATCH] Export SMBIOS provided firmware instance and label to sysfs

This patch exports SMBIOS provided firmware instance and label of
onboard pci devices to sysfs

Signed-off-by: Jordan Hargrave <jordan_hargrave@dell.com>
Signed-off-by: Narendra K <narendra_k@dell.com>
---
 drivers/firmware/dmi_scan.c |   25 +++++++++
 drivers/pci/Makefile        |    3 +
 drivers/pci/pci-label.c     |  123 +++++++++++++++++++++++++++++++++++++++++++
 drivers/pci/pci-sysfs.c     |    5 ++
 drivers/pci/pci.h           |    7 +++
 include/linux/dmi.h         |    9 +++
 6 files changed, 172 insertions(+), 0 deletions(-)
 create mode 100644 drivers/pci/pci-label.c

diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index d464672..ce73fcc 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -277,6 +277,29 @@ static void __init dmi_save_ipmi_device(const struct dmi_header *dm)
 	list_add_tail(&dev->list, &dmi_devices);
 }
 
+static void __init dmi_save_dev_onboard(int instance, int segment, int bus, 
+                                    int devfn, const char *name)
+{
+	struct dmi_dev_onboard *onboard_dev;
+
+	onboard_dev = dmi_alloc(sizeof(*onboard_dev) + strlen(name) + 1);
+	if (!onboard_dev) {
+		printk(KERN_ERR "dmi_save_dev_onboard: out of memory.\n");
+		return;
+	}	
+	onboard_dev->instance = instance;
+	onboard_dev->segment = segment;
+	onboard_dev->bus = bus;
+	onboard_dev->devfn = devfn;
+
+	strcpy((char *)&onboard_dev[1], name);
+	onboard_dev->dev.type = DMI_DEV_TYPE_DEV_ONBOARD;
+	onboard_dev->dev.name = (char *)&onboard_dev[1];
+	onboard_dev->dev.device_data = onboard_dev;
+
+	list_add(&onboard_dev->dev.list, &dmi_devices);
+}
+
 static void __init dmi_save_extended_devices(const struct dmi_header *dm)
 {
 	const u8 *d = (u8*) dm + 5;
@@ -285,6 +308,7 @@ static void __init dmi_save_extended_devices(const struct dmi_header *dm)
 	if ((*d & 0x80) == 0)
 		return;
 
+	dmi_save_dev_onboard(*(d+1), *(u16 *)(d+2), *(d+4), *(d+5), dmi_string_nosave(dm, *(d-1)));
 	dmi_save_one_device(*d & 0x7f, dmi_string_nosave(dm, *(d - 1)));
 }
 
@@ -333,6 +357,7 @@ static void __init dmi_decode(const struct dmi_header *dm, void *dummy)
 		break;
 	case 41:	/* Onboard Devices Extended Information */
 		dmi_save_extended_devices(dm);
+		break;
 	}
 }
 
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 0b51857..dc1aa09 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -55,6 +55,9 @@ obj-$(CONFIG_MICROBLAZE) += setup-bus.o
 #
 obj-$(CONFIG_ACPI)    += pci-acpi.o
 
+# SMBIOS provided firmware instance and labels
+obj-$(CONFIG_DMI)    += pci-label.o
+
 # Cardbus & CompactPCI use setup-bus
 obj-$(CONFIG_HOTPLUG) += setup-bus.o
 
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c
new file mode 100644
index 0000000..829362a
--- /dev/null
+++ b/drivers/pci/pci-label.c
@@ -0,0 +1,123 @@
+/*
+ * Purpose: Export the firmware instance/index and label associated with 
+ * a pci device to sysfs
+ * Copyright (C) 2010 Dell Inc.
+ * by Narendra K <Narendra_K@dell.com>, Jordan Hargrave <Jordan_Hargrave@dell.com>
+ *
+ * SMBIOS defines type 41 for onboard pci devices. This code retrieves
+ * the instance number and string from the type 41 record and exports 
+ * it to sysfs.
+ *
+ * Please see http://linux.dell.com/wiki/index.php/Oss/libnetdevname for more
+ * information.
+ */
+
+#include <linux/dmi.h>
+#include <linux/sysfs.h>
+#include <linux/pci.h>
+#include <linux/pci_ids.h>
+#include <linux/module.h>
+#include "pci.h"
+
+struct smbios_attribute {
+	struct attribute attr;
+	ssize_t (*show) (struct device *dev, struct device_attribute *, char *buf);
+	ssize_t (*test) (struct device *dev, char *buf, char *attribute);
+};
+
+static ssize_t
+smbios_instance_string_exist(struct device *dev, char *buf, char *attribute)
+{
+	struct pci_dev *pdev = to_pci_dev(dev);
+  	const struct dmi_device *dmi;
+  	struct dmi_dev_onboard *donboard;
+  	int bus;
+  	int devfn;
+	int attribute_is_instance = 0;
+
+  	bus = pdev->bus->number;
+  	devfn = pdev->devfn;
+
+	if (attribute && !strncmp(attribute, "instance", strlen(attribute)))
+		attribute_is_instance=1;
+
+  	dmi = NULL;
+  	while ((dmi = dmi_find_device(DMI_DEV_TYPE_DEV_ONBOARD, NULL, dmi)) != NULL) {
+    		donboard = dmi->device_data;
+    		if (donboard && donboard->bus == bus && donboard->devfn == devfn) {
+			if (buf) {
+				if (attribute_is_instance)
+      					return scnprintf(buf, PAGE_SIZE, 
+							 "%d\n", donboard->instance);
+				else
+      					return scnprintf(buf, PAGE_SIZE, 
+							 "%s\n", dmi->name);
+			}
+			return strlen(dmi->name);
+		}
+	}
+	
+	return 0;
+}
+
+static ssize_t
+smbiosname_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+	return smbios_instance_string_exist(dev, buf, "label");
+}
+
+static ssize_t
+smbiosinstance_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+	return smbios_instance_string_exist(dev, buf, "instance");
+}
+
+struct smbios_attribute smbios_attr_label = {
+	.attr = {.name = "label", .mode = 0444, .owner = THIS_MODULE},
+	.show = smbiosname_show,
+	.test = smbios_instance_string_exist,
+};
+
+struct smbios_attribute smbios_attr_instance = {
+	.attr = {.name = "index", .mode = 0444, .owner = THIS_MODULE},
+	.show = smbiosinstance_show,
+	.test = smbios_instance_string_exist,
+};
+
+static int 
+pci_create_smbiosname_file(struct pci_dev *pdev)
+{
+	if (smbios_attr_label.test && smbios_attr_label.test(&pdev->dev, NULL, NULL)) {
+		if (sysfs_create_file(&pdev->dev.kobj, &smbios_attr_label.attr))
+			return -1;
+		if (sysfs_create_file(&pdev->dev.kobj, &smbios_attr_instance.attr))
+			return -1;
+		return 0;
+	}
+	return -1;	
+}
+
+static int 
+pci_remove_smbiosname_file(struct pci_dev *pdev)
+{
+	if (smbios_attr_label.test && smbios_attr_label.test(&pdev->dev, NULL, NULL)) {
+		sysfs_remove_file(&pdev->dev.kobj, &smbios_attr_label.attr);
+		sysfs_remove_file(&pdev->dev.kobj, &smbios_attr_instance.attr);
+		return 0;
+	}
+	return -1;
+}
+
+int pci_create_firmware_label_files(struct pci_dev *pdev)
+{
+	if (!pci_create_smbiosname_file(pdev))
+		return 0;
+	return -ENODEV;
+}
+
+int pci_remove_firmware_label_files(struct pci_dev *pdev)
+{
+	if (!pci_remove_smbiosname_file(pdev))
+		return 0;
+	return -ENODEV;
+}
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index afd2fbf..01fd799 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -1132,6 +1132,8 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev)
 
 	pci_create_slot_links(pdev);
 
+	pci_create_firmware_label_files(pdev);
+
 	return 0;
 
 err_vga_file:
@@ -1201,6 +1203,9 @@ void pci_remove_sysfs_dev_files(struct pci_dev *pdev)
 		sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr);
 		kfree(pdev->rom_attr);
 	}
+
+	pci_remove_firmware_label_files(pdev);
+
 }
 
 static int __init pci_sysfs_init(void)
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index f8077b3..67264c7 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -11,6 +11,13 @@
 extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env);
 extern int pci_create_sysfs_dev_files(struct pci_dev *pdev);
 extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
+#ifndef CONFIG_DMI
+static inline int pci_create_firmware_label_files(struct pci_dev *pdev) { return 0; }
+static inline int pci_remove_firmware_label_files(struct pci_dev *pdev) { return 0; }
+#else
+extern int pci_create_firmware_label_files(struct pci_dev *pdev);
+extern int pci_remove_firmware_label_files(struct pci_dev *pdev);
+#endif
 extern void pci_cleanup_rom(struct pci_dev *dev);
 #ifdef HAVE_PCI_MMAP
 extern int pci_mmap_fits(struct pci_dev *pdev, int resno,
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index a8a3e1a..90e087f 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -20,6 +20,7 @@ enum dmi_device_type {
 	DMI_DEV_TYPE_SAS,
 	DMI_DEV_TYPE_IPMI = -1,
 	DMI_DEV_TYPE_OEM_STRING = -2,
+	DMI_DEV_TYPE_DEV_ONBOARD = -3,
 };
 
 struct dmi_header {
@@ -37,6 +38,14 @@ struct dmi_device {
 
 #ifdef CONFIG_DMI
 
+struct dmi_dev_onboard {
+	struct dmi_device dev;
+	int instance;
+	int segment;
+	int bus;
+	int devfn;
+};
+
 extern int dmi_check_system(const struct dmi_system_id *list);
 const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
 extern const char * dmi_get_system_info(int field);
-- 
1.6.5.2

With regards,
Narendra K

^ permalink raw reply related

* Re: [PATCH 4/4] phylib: Allow reading and writing a mii bus from atomic context.
From: Andy Fleming @ 2010-07-06 17:09 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev
In-Reply-To: <a06cf09ed5096bf8f9434d90828adfa70586e936.1278307573.git.richard.cochran@omicron.at>

On Mon, Jul 5, 2010 at 12:33 AM, Richard Cochran
<richardcochran@gmail.com> wrote:
> In order to support hardware time stamping from a PHY, it is necessary to
> read from the PHY while running in_interrupt(). This patch allows a mii
> bus to operate in an atomic context. An mii_bus driver may declare itself
> capable for this mode. Drivers which do not do this will remain with the
> default that bus operations may sleep.
>
> Before commit 35b5f6b1a82b5c586e0b24c711dc6ba944e88ef1 mii bus
> operations were protected with spin locks. That commit replaced the
> locks with mutexs in order to accommodate i2c buses that need to
> sleep. Thus, this patch restores the original behavior as a run time
> option.


The reason we moved to mutexes was because we didn't want PHY
operations to be done in interrupt context.  They are too slow.  Also,
some MII busses will trigger an interrupt when the operation is done,
which means their driver has the option of sleeping.  As such, it was
an original principle of the PHY lib that MII transactions were not
allowed in interrupt context.  *Certainly*, once you *do* allow MII
transactions in interrupt context, you *cannot* use spin_lock().  You
at least have to use spin_lock_irq[save].

Also, I agree with David's comments, and Grant's.  There's got to be
another way to do this.

Andy

^ permalink raw reply

* Re: [PATCH v2 1/9] atm: propagate signal changes via notifier
From: chas williams - CONTRACTOR @ 2010-07-06 19:29 UTC (permalink / raw)
  To: Karl Hiramoto; +Cc: linux-atm-general, netdev, nathan
In-Reply-To: <1278319561-23548-2-git-send-email-karl@hiramoto.org>

On Mon,  5 Jul 2010 10:45:53 +0200
Karl Hiramoto <karl@hiramoto.org> wrote:


> +void atm_dev_signal_change(struct atm_dev *dev, char signal)
> +{
> +	int i;
> +	pr_debug("%s signal=%d dev=%p number=%d dev->signal=%d\n",
> +		__func__, signal, dev, dev->number, dev->signal);
> +
> +	/* atm driver sending invalid signal */
> +	WARN_ON(signal < ATM_PHY_SIG_LOST || signal >
> ATM_PHY_SIG_FOUND); +
> +	if (dev->signal == signal)
> +		return; /* no change */
> +
> +	dev->signal = signal;
> +
> +	blocking_notifier_call_chain(&atm_dev_notify_chain, signal,
> dev); +}
> +EXPORT_SYMBOL(atm_dev_signal_change);


net/atm/common.c: In function 'atm_dev_signal_change':
net/atm/common.c:213: warning: unused variable 'i'

please remove i unless you need it

^ permalink raw reply

* Re: [PATCH v2 1/9] atm: propagate signal changes via notifier
From: chas williams - CONTRACTOR @ 2010-07-06 19:33 UTC (permalink / raw)
  To: Karl Hiramoto; +Cc: linux-atm-general, netdev, nathan
In-Reply-To: <1278319561-23548-2-git-send-email-karl@hiramoto.org>

On Mon,  5 Jul 2010 10:45:53 +0200
Karl Hiramoto <karl@hiramoto.org> wrote:


> +/**
> +* register_atmdevice_notifier - register atm_dev notify events
> +* Currently we notify of signal found/lost
> +*/

per Documentation/CodingStyle, the preferred style for multiline
comments would look like:

/*
 * This is the preferred style for multi-line
 * comments in the Linux kernel source code.
 * Please use it consistently.
 *
 * Description:  A column of asterisks on the left side,
 * with beginning and ending almost-blank lines.
 */

please update all your comments to reflect this style.

^ permalink raw reply

* Re: [PATCH v2 1/9] atm: propagate signal changes via notifier
From: chas williams - CONTRACTOR @ 2010-07-06 19:41 UTC (permalink / raw)
  To: Karl Hiramoto; +Cc: linux-atm-general, netdev, nathan
In-Reply-To: <1278319561-23548-2-git-send-email-karl@hiramoto.org>

On Mon,  5 Jul 2010 10:45:53 +0200
Karl Hiramoto <karl@hiramoto.org> wrote:

> +void atm_dev_signal_change(struct atm_dev *dev, char signal)
> +{
> +	int i;
> +	pr_debug("%s signal=%d dev=%p number=%d dev->signal=%d\n",
> +		__func__, signal, dev, dev->number, dev->signal);
> +
> +	/* atm driver sending invalid signal */
> +	WARN_ON(signal < ATM_PHY_SIG_LOST || signal >
> ATM_PHY_SIG_FOUND); +
> +	if (dev->signal == signal)
> +		return; /* no change */
> +
> +	dev->signal = signal;
> +
> +	&atm_dev_notify_chain, signal,
> dev); +}

i am not sure that you can use blocking_notifier_call_chain() here.
atm_dev_signal_change() might be called from an interrupt context in
some of the drivers.

this implies that the notifier functions themselves must also not block.
so in br2684 you probably want to use read_lock_irq() instead of just
read_lock()

^ 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