Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] net/fsl_pq_mdio: add module license GPL
From: David Miller @ 2009-11-08  8:49 UTC (permalink / raw)
  To: bigeasy; +Cc: afleming, netdev
In-Reply-To: <20091106185028.GA5198@www.tglx.de>

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 6 Nov 2009 19:50:28 +0100

> or it will taint the kernel and fail to load becuase
> of_address_to_resource() is GPL only.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Applied to net-2.6, thanks.

^ permalink raw reply

* Re: [PATCH] can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo()
From: David Miller @ 2009-11-08  8:46 UTC (permalink / raw)
  To: wg; +Cc: netdev, socketcan-core
In-Reply-To: <4AF54389.1090309@grandegger.com>

From: Wolfgang Grandegger <wg@grandegger.com>
Date: Sat, 07 Nov 2009 10:53:13 +0100

> On older kernels, e.g. 2.6.27, a WARN_ON dump in rtmsg_ifinfo()
> is thrown when the CAN device is registered due to insufficient
> skb space, as reported by various users. This patch adds the
> rtnl_link_ops "get_size" to fix the problem. I think this patch
> is required for more recent kernels as well, even if no WARN_ON
> dumps are triggered. Maybe we also need "get_xstats_size" for
> the CAN xstats.
> 
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>

Applied to net-2.6, thanks Wolfgang.

^ permalink raw reply

* Re: [PATCH] appletalk/ddp.c: Neaten checksum function
From: David Miller @ 2009-11-08  8:44 UTC (permalink / raw)
  To: joe; +Cc: netdev, acme
In-Reply-To: <1257366373.18982.25.camel@Joe-Laptop.home>

From: Joe Perches <joe@perches.com>
Date: Wed, 04 Nov 2009 12:26:13 -0800

> atalk_sum_partial can now use the rol16 function in bitops.h
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next2.6] ipv6: avoid dev_hold()/dev_put() in rawv6_bind()
From: David Miller @ 2009-11-08  8:44 UTC (permalink / raw)
  To: eric.dumazet; +Cc: brian.haley, netdev
In-Reply-To: <4AF4565D.2070207@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 06 Nov 2009 18:01:17 +0100

> [PATCH net-next2.6] ipv6: avoid dev_hold()/dev_put() in rawv6_bind()
> 
> Using RCU helps not touching device refcount in rawv6_bind()
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH 1/3] fsl_pq_mdio: Fix compiler/sparse warnings (part 1)
From: David Miller @ 2009-11-08  8:43 UTC (permalink / raw)
  To: avorontsov; +Cc: linuxppc-dev, Sandeep.Kumar, afleming, netdev
In-Reply-To: <20091104225256.GA29537@oksana.dev.rtsoft.ru>

From: Anton Vorontsov <avorontsov@ru.mvista.com>
Date: Thu, 5 Nov 2009 01:52:56 +0300

> commit 1d2397d742b7a2b39b2f09dd9da3b9d1463f55e9 ("fsl_pq_mdio: Add
> Suport for etsec2.0 devices") introduced the following warnings:
 ...
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Applied.

^ permalink raw reply

* Re: [PATCH 3/3] gianfar: Fix compiler and sparse warnings
From: David Miller @ 2009-11-08  8:44 UTC (permalink / raw)
  To: avorontsov; +Cc: afleming, Sandeep.Kumar, netdev, linuxppc-dev
In-Reply-To: <20091104225300.GC29537@oksana.dev.rtsoft.ru>

From: Anton Vorontsov <avorontsov@ru.mvista.com>
Date: Thu, 5 Nov 2009 01:53:00 +0300

> commit fba4ed030cfae7efdb6b79a57b0c5a9d72c9de83 ("gianfar: Add Multiple
> Queue Support") introduced the following warnings:
...
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/3] fsl_pq_mdio: Fix compiler/sparse warnings (part 2)
From: David Miller @ 2009-11-08  8:43 UTC (permalink / raw)
  To: avorontsov; +Cc: afleming, Sandeep.Kumar, netdev, linuxppc-dev
In-Reply-To: <20091104225257.GB29537@oksana.dev.rtsoft.ru>

From: Anton Vorontsov <avorontsov@ru.mvista.com>
Date: Thu, 5 Nov 2009 01:52:57 +0300

> This patch fixes following warnings:
> 
> fsl_pq_mdio.c:112:38: warning: cast adds address space to expression (<asn:2>)
> fsl_pq_mdio.c:124:38: warning: cast adds address space to expression (<asn:2>)
> fsl_pq_mdio.c:133:38: warning: cast adds address space to expression (<asn:2>)
> fsl_pq_mdio.c:414:11: warning: cast adds address space to expression (<asn:2>)
> 
> Instead of adding __force all over the place, introduce convenient
> fsl_pq_mdio_get_regs() call that does the ugly casting just once.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Applied.

^ permalink raw reply

* Re: [PATCH] can: should not use __dev_get_by_index() without locks
From: David Miller @ 2009-11-08  8:34 UTC (permalink / raw)
  To: socketcan; +Cc: eric.dumazet, netdev
In-Reply-To: <4AF402B0.7090202@hartkopp.net>

From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: Fri, 06 Nov 2009 12:04:16 +0100

> Eric Dumazet wrote:
>> [PATCH] can: should not use __dev_get_by_index() without locks
>> 
>> bcm_proc_getifname() is called with RTNL and dev_base_lock
>> not held. It calls __dev_get_by_index() without locks, and
>> this is illegal (might crash)
>> 
>> Close the race by holding dev_base_lock and copying dev->name
>> in the protected section.
>> 
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
 ...
> Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>

Applied, thanks everyone.

^ permalink raw reply

* [PATCH] drivers/net/wireless: correct check on CCS_START_NETWORK
From: Julia Lawall @ 2009-11-08  8:23 UTC (permalink / raw)
  To: Corey Thomas, John W. Linville, linux-wireless, netdev,
	linux-kernel, kernel-janit

From: Julia Lawall <julia@diku.dk>

CCS_START_NETWORK is declared in drivers/net/wireless/rayctl.h with the
comment Values for cmd.  status is previously compared to
CCS_COMMAND_COMPLETE, which is declared in the same file with the comment
Values for buffer_status.  Finally, it is possible at this point that cmd
is CCS_START_NETWORK, because it is compared to that value in an enclosing
switch that has CCS_START_NETWORK as one of two case labels around this code.

Signed-off-by: Julia Lawall <julia@diku.dk>

---
 drivers/net/wireless/ray_cs.c       |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 1c88c2e..5ee9d2a 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -2074,7 +2074,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
 				del_timer(&local->timer);
 				local->timer.expires = jiffies + HZ * 5;
 				local->timer.data = (long)local;
-				if (status == CCS_START_NETWORK) {
+				if (cmd == CCS_START_NETWORK) {
 					DEBUG(0,
 					      "ray_cs interrupt network \"%s\" start failed\n",
 					      local->sparm.b4.a_current_ess_id);

^ permalink raw reply related

* [PATCH iproute2] libnetlink: fix rtnl_send_check()
From: Eric Dumazet @ 2009-11-08  6:18 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David S. Miller, Linux Netdev List

We currently cannot flush more than ~64 addresses on a device, with
strange status.

# ip -stats addr flush dev eth3
Failed to send flush request: Success
Flush terminated

Problem is in rtnl_send_check(), where a return -1; is misplaced.

After patch, we can flush 64000 addresses without any problem.

# ip -stats addr flush dev eth3

*** Round 1, deleting 32338 addresses ***

*** Round 2, deleting 16168 addresses ***

*** Round 3, deleting 8082 addresses ***

*** Round 4, deleting 4058 addresses ***

*** Round 5, deleting 2028 addresses ***

*** Round 6, deleting 918 addresses ***

*** Round 7, deleting 278 addresses ***

*** Round 8, deleting 130 addresses ***
*** Flush is complete after 8 rounds ***


Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index b68e2fd..100dd40 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -137,8 +137,8 @@ int rtnl_send_check(struct rtnl_handle *rth, const char *buf, int len)
 				fprintf(stderr, "ERROR truncated\n");
 			else 
 				errno = -err->error;
+			return -1;
 		}
-		return -1;
 	}
 
 	return 0;

^ permalink raw reply related

* Re: RFC: ethtool support for n-tuple filter programming
From: David Miller @ 2009-11-08  4:27 UTC (permalink / raw)
  To: peter.p.waskiewicz.jr; +Cc: netdev
In-Reply-To: <1257533841.2610.12.camel@ppwaskie-mobl2>

From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Date: Fri, 06 Nov 2009 10:57:21 -0800

> Any comments, thoughts, suggestions, or ideas are welcome.

We can use the existing datastructures and defines used for
ETHTOOL_GRX* for new ethtool commands that do filtering.

NIU can filter on these tuples too.

^ permalink raw reply

* Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server
From: Rusty Russell @ 2009-11-08  4:09 UTC (permalink / raw)
  To: paulmck
  Cc: Michael S. Tsirkin, Gregory Haskins, Eric Dumazet, netdev,
	virtualization, kvm, linux-kernel, mingo, linux-mm, akpm, hpa,
	s.hetze
In-Reply-To: <20091106163007.GC6746@linux.vnet.ibm.com>

On Sat, 7 Nov 2009 03:00:07 am Paul E. McKenney wrote:
> On Fri, Nov 06, 2009 at 03:31:20PM +1030, Rusty Russell wrote:
> > But it's still nasty to use half an API.  If it were a few places I would
> > have open-coded it with a comment, or wrapped it.  As it is, I don't think
> > that would be a win.
> 
> So would it help to have a rcu_read_lock_workqueue() and
> rcu_read_unlock_workqueue() that checked nesting and whether they were
> actually running in the context of a workqueue item?  Or did you have
> something else in mind?  Or am I misjudging the level of sarcasm in
> your reply?  ;-)

You read correctly.  If we get a second user, creating an API makes sense.

Thanks,
Rusty.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Re: TC-HTB issue : low throughput
From: Jarek Poplawski @ 2009-11-07 23:35 UTC (permalink / raw)
  To: jt; +Cc: netdev
In-Reply-To: <4AF60349.8000502@gmail.com>

Jarek Poplawski wrote, On 11/08/2009 12:31 AM:
> BTW, v2.6.31 should be more exact (but so much...) for above 100mbit
should be:
BTW, v2.6.31 should be more exact (but _not_ so much...) for above 100mbit

Jarek P.

^ permalink raw reply

* Re: TC-HTB issue : low throughput
From: Jarek Poplawski @ 2009-11-07 23:31 UTC (permalink / raw)
  To: jt; +Cc: netdev
In-Reply-To: <20091107024305.GA32398@bougret.hpl.hp.com>

Jean Tourrilhes wrote, On 11/07/2009 03:43 AM:

> 	Hi,
> 
> 	I'm playing with a TC-HTB. I'm noticing that the throughput is
> low. As the LARTC mailing list seems to be dead, I would welcome
> suggestions...
> 	The example below may seem contrived, but I reduced it to
> a simple testcase to make it easier to reproduce.
> 
> System :
> ------
> 	Debian Lenny with 2.6.30.9
> 	Quad Core 2.5 GHz Q9300
> 	Intel 1Gb/s NIC, e1000e drive

...

> Topology :
> --------
> Four PCs with Linux :
> 10.10.10.32 on br0
> 10.10.10.33 connected to eth5.33 (sender)
> 10.10.10.38 connected to eth7.38 (sender)
> 10.10.10.34 connected to eth6.34 (receiver)
> 
> Behaviour :
> ---------
> 	If I set only qdisc 1: and class 1:1, but *NOT* 1:2 and 1:3 :
> 	Each host independantly : ~935 Mb/s
> 	Both host together, for 10.10.10.38 : ~527 Mb/s ;
> 	Both host together, for 10.10.10.33 : ~443 Mb/s
> 
> 	If I add classes 1:2 and 1:3 :
> 	Each host independantly : ~170 Mb/s.
> 	Both host together, for 10.10.10.38 : ~106 Mb/s ;
> 	Both host together, for 10.10.10.33 : ~135 Mb/s
> 
> 	So, not only performance did drop significantely, but
> prioritisation did not happen as expected.

If these eths are vlans (or other virtuals) something like this
often happens if you forget to set dev's txqueuelen before
adding classes (or a subqdisc with some 'limit').

> Weird detail :
> ------------
> 	I've noticed that /sbin/tc calculates a very low burst
> value. This is due to the content of /proc/net/psched. I'm wondering
> if the burst calculation is what causes the issue here.
> 	However, I tried with "burst 50kb" and saw no difference...

There is (probably still) unfixed overflow in tc.

BTW, v2.6.31 should be more exact (but so much...) for above 100mbit
scheduling, especially with this patch to iproute2:
http://marc.info/?l=linux-netdev&m=124453482324409&w=2

Jarek P.

^ permalink raw reply

* Re: RFC: ethtool support for n-tuple filter programming
From: Rick Jones @ 2009-11-07 23:28 UTC (permalink / raw)
  To: Bill Fink; +Cc: Peter P Waskiewicz Jr, Caitlin Bestler, netdev@vger.kernel.org
In-Reply-To: <20091107144938.82957125.billfink@mindspring.com>

Bill Fink wrote:
> On Fri, 06 Nov 2009, Peter P Waskiewicz Jr wrote:
> 
> 
>>On Fri, 2009-11-06 at 11:12 -0800, Caitlin Bestler wrote:
>>
>>>The approach you are proposing assumes what type of packet filters
>>>that L2 hardware could support.
>>>
>>>Why not simply use existing filtering rules that overshoot the target,
>>>such as netfilter, and ask the
>>>device specific tool to indicate what set of these rules it can support?
>>
>>Are you proposing that netfilter is modified to pass the filters down to
>>the hardware if it supports it?  netfilter doesn't steer flows though to
>>queues (or flow ID's in the kernel), plus that's putting HW-specific
>>capabilities into netfilter.  I'm not sure we want to do that.
>>
>>Please correct me if I'm wrong with interpreting your suggestion.
> 
> 
> Plus I believe using netfilter has a significant performance penalty,
> and it would be desirable to use such a feature without incurring
> this penalty when there was otherwise no need to use netfilter.

At the risk of typing words into someone's keyboard, I interpreted it as 
suggesting using the filtering language of netfilter or something similar, not 
necessarily netfilter itself?

rick jones

^ permalink raw reply

* Re: CTP: Ethernet configuration testing protocol
From: Mark Smith @ 2009-11-07 22:23 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: netdev
In-Reply-To: <4AF5B997.4070601@superbug.co.uk>

On Sat, 07 Nov 2009 18:16:55 +0000
James Courtier-Dutton <James@superbug.co.uk> wrote:

> Hi,
> 
> How do I turn off CTP in Linux?
> 

As far as I'm aware, it isn't implemented in Linux. I wrote an
implementation a while back, and it wasn't accepted for inclusion at
that time. I'm not aware if that has changed, and I don't think any
other implementations have been included.

> Kind Regards
> 
> James
> 
> 
> --
> 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

^ permalink raw reply

* [PATCH 58/75] pcnet-cs: declare MODULE_FIRMWARE
From: Ben Hutchings @ 2009-11-07 22:04 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-pcmcia

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/pcmcia/pcnet_cs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 42aa81b..9088f06 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -1752,6 +1752,13 @@ static struct pcmcia_device_id pcnet_ids[] = {
 	PCMCIA_DEVICE_NULL
 };
 MODULE_DEVICE_TABLE(pcmcia, pcnet_ids);
+MODULE_FIRMWARE("cis/PCMLM28.cis");
+MODULE_FIRMWARE("cis/DP83903.cis");
+MODULE_FIRMWARE("cis/LA-PCM.cis");
+MODULE_FIRMWARE("PE520.cis");
+MODULE_FIRMWARE("cis/NE2K.cis");
+MODULE_FIRMWARE("cis/PE-200.cis");
+MODULE_FIRMWARE("cis/tamarack.cis");
 
 static struct pcmcia_driver pcnet_driver = {
 	.drv		= {
-- 
1.6.5.2




^ permalink raw reply related

* Re: [PATCH 38/75] iwmc3200top: declare MODULE_FIRMWARE
From: Tomas Winkler @ 2009-11-07 21:56 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: David Miller, netdev
In-Reply-To: <1257630800.15927.436.camel@localhost>

On Sat, Nov 7, 2009 at 11:53 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
>  drivers/misc/iwmc3200top/fw-download.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/misc/iwmc3200top/fw-download.c b/drivers/misc/iwmc3200top/fw-download.c
> index 33cb693..2817618 100644
> --- a/drivers/misc/iwmc3200top/fw-download.c
> +++ b/drivers/misc/iwmc3200top/fw-download.c
> @@ -357,3 +357,5 @@ exit:
>
>        return ret;
>  }
> +
> +MODULE_FIRMWARE("iwmc3200top.1.fw");

Thanks but I have this one already in the pipe but actually grouped
with all module declarations in the main.c
Thanks
Tomas

^ permalink raw reply

* [PATCH 44/75] tms380tr: declare MODULE_FIRMWARE
From: Ben Hutchings @ 2009-11-07 21:55 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/tokenring/tms380tr.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c
index a7b6888..fa15214 100644
--- a/drivers/net/tokenring/tms380tr.c
+++ b/drivers/net/tokenring/tms380tr.c
@@ -1364,6 +1364,8 @@ static int tms380tr_reset_adapter(struct net_device *dev)
 	return (-1);
 }
 
+MODULE_FIRMWARE("tms380tr.bin");
+
 /*
  * Starts bring up diagnostics of token ring adapter and evaluates
  * diagnostic results.
-- 
1.6.5.2




^ permalink raw reply related

* [PATCH 43/75] spider-net: declare MODULE_FIRMWARE
From: Ben Hutchings @ 2009-11-07 21:55 UTC (permalink / raw)
  To: David Miller; +Cc: Ishizaki Kou, Jens Osterkamp, netdev

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/spider_net.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 90e663f..782910c 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -57,6 +57,7 @@ MODULE_AUTHOR("Utz Bacher <utz.bacher@de.ibm.com> and Jens Osterkamp " \
 MODULE_DESCRIPTION("Spider Southbridge Gigabit Ethernet driver");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(VERSION);
+MODULE_FIRMWARE(SPIDER_NET_FIRMWARE_NAME);
 
 static int rx_descriptors = SPIDER_NET_RX_DESCRIPTORS_DEFAULT;
 static int tx_descriptors = SPIDER_NET_TX_DESCRIPTORS_DEFAULT;
-- 
1.6.5.2




^ permalink raw reply related

* [PATCH 42/75] myri10ge: declare MODULE_FIRMWARE
From: Ben Hutchings @ 2009-11-07 21:54 UTC (permalink / raw)
  To: David Miller; +Cc: Andrew Gallatin, Brice Goglin, netdev

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/myri10ge/myri10ge.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 5319db9..85e1b6a 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -263,6 +263,10 @@ static char *myri10ge_fw_unaligned = "myri10ge_ethp_z8e.dat";
 static char *myri10ge_fw_aligned = "myri10ge_eth_z8e.dat";
 static char *myri10ge_fw_rss_unaligned = "myri10ge_rss_ethp_z8e.dat";
 static char *myri10ge_fw_rss_aligned = "myri10ge_rss_eth_z8e.dat";
+MODULE_FIRMWARE("myri10ge_ethp_z8e.dat");
+MODULE_FIRMWARE("myri10ge_eth_z8e.dat");
+MODULE_FIRMWARE("myri10ge_rss_ethp_z8e.dat");
+MODULE_FIRMWARE("myri10ge_rss_eth_z8e.dat");
 
 static char *myri10ge_fw_name = NULL;
 module_param(myri10ge_fw_name, charp, S_IRUGO | S_IWUSR);
-- 
1.6.5.2




^ permalink raw reply related

* [PATCH 40/75] cxgb3: declare MODULE_FIRMWARE
From: Ben Hutchings @ 2009-11-07 21:53 UTC (permalink / raw)
  To: David Miller; +Cc: Divy Le Ray, netdev

Replace run-time string formatting with preprocessor string
manipulation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/cxgb3/common.h     |    8 +++-----
 drivers/net/cxgb3/cxgb3_main.c |   25 ++++++++++++++++---------
 2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
index 1b2c305..6ff356d 100644
--- a/drivers/net/cxgb3/common.h
+++ b/drivers/net/cxgb3/common.h
@@ -125,11 +125,9 @@ enum {				/* adapter interrupt-maintained statistics */
 	IRQ_NUM_STATS		/* keep last */
 };
 
-enum {
-	TP_VERSION_MAJOR	= 1,
-	TP_VERSION_MINOR	= 1,
-	TP_VERSION_MICRO	= 0
-};
+#define TP_VERSION_MAJOR	1
+#define TP_VERSION_MINOR	1
+#define TP_VERSION_MICRO	0
 
 #define S_TP_VERSION_MAJOR		16
 #define M_TP_VERSION_MAJOR		0xFF
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index c9113d3..b1a5a00 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -44,6 +44,7 @@
 #include <linux/rtnetlink.h>
 #include <linux/firmware.h>
 #include <linux/log2.h>
+#include <linux/stringify.h>
 #include <asm/uaccess.h>
 
 #include "common.h"
@@ -992,11 +993,21 @@ static int bind_qsets(struct adapter *adap)
 	return err;
 }
 
-#define FW_FNAME "cxgb3/t3fw-%d.%d.%d.bin"
-#define TPSRAM_NAME "cxgb3/t3%c_psram-%d.%d.%d.bin"
+#define FW_VERSION __stringify(FW_VERSION_MAJOR) "."			\
+	__stringify(FW_VERSION_MINOR) "." __stringify(FW_VERSION_MICRO)
+#define FW_FNAME "cxgb3/t3fw-" FW_VERSION ".bin"
+#define TPSRAM_VERSION __stringify(TP_VERSION_MAJOR) "."		\
+	__stringify(TP_VERSION_MINOR) "." __stringify(TP_VERSION_MICRO)
+#define TPSRAM_NAME "cxgb3/t3%c_psram-" TPSRAM_VERSION ".bin"
 #define AEL2005_OPT_EDC_NAME "cxgb3/ael2005_opt_edc.bin"
 #define AEL2005_TWX_EDC_NAME "cxgb3/ael2005_twx_edc.bin"
 #define AEL2020_TWX_EDC_NAME "cxgb3/ael2020_twx_edc.bin"
+MODULE_FIRMWARE(FW_FNAME);
+MODULE_FIRMWARE("cxgb3/t3b_psram-" TPSRAM_VERSION ".bin");
+MODULE_FIRMWARE("cxgb3/t3c_psram-" TPSRAM_VERSION ".bin");
+MODULE_FIRMWARE(AEL2005_OPT_EDC_NAME);
+MODULE_FIRMWARE(AEL2005_TWX_EDC_NAME);
+MODULE_FIRMWARE(AEL2020_TWX_EDC_NAME);
 
 static inline const char *get_edc_fw_name(int edc_idx)
 {
@@ -1067,16 +1078,13 @@ int t3_get_edc_fw(struct cphy *phy, int edc_idx, int size)
 static int upgrade_fw(struct adapter *adap)
 {
 	int ret;
-	char buf[64];
 	const struct firmware *fw;
 	struct device *dev = &adap->pdev->dev;
 
-	snprintf(buf, sizeof(buf), FW_FNAME, FW_VERSION_MAJOR,
-		 FW_VERSION_MINOR, FW_VERSION_MICRO);
-	ret = request_firmware(&fw, buf, dev);
+	ret = request_firmware(&fw, FW_FNAME, dev);
 	if (ret < 0) {
 		dev_err(dev, "could not upgrade firmware: unable to load %s\n",
-			buf);
+			FW_FNAME);
 		return ret;
 	}
 	ret = t3_load_fw(adap, fw->data, fw->size);
@@ -1120,8 +1128,7 @@ static int update_tpsram(struct adapter *adap)
 	if (!rev)
 		return 0;
 
-	snprintf(buf, sizeof(buf), TPSRAM_NAME, rev,
-		 TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO);
+	snprintf(buf, sizeof(buf), TPSRAM_NAME, rev);
 
 	ret = request_firmware(&tpsram, buf, dev);
 	if (ret < 0) {
-- 
1.6.5.2




^ permalink raw reply related

* [PATCH 39/75] bnx2x: declare MODULE_FIRMWARE
From: Ben Hutchings @ 2009-11-07 21:53 UTC (permalink / raw)
  To: David Miller; +Cc: Eilon Greenstein, netdev

Replace run-time string formatting with preprocessor string
manipulation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/bnx2x_main.c |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 59b58d8..5f9d457 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -49,6 +49,7 @@
 #include <linux/prefetch.h>
 #include <linux/zlib.h>
 #include <linux/io.h>
+#include <linux/stringify.h>
 

 #include "bnx2x.h"
@@ -63,8 +64,13 @@
 #include <linux/firmware.h>
 #include "bnx2x_fw_file_hdr.h"
 /* FW files */
-#define FW_FILE_PREFIX_E1	"bnx2x-e1-"
-#define FW_FILE_PREFIX_E1H	"bnx2x-e1h-"
+#define FW_FILE_VERSION					\
+	__stringify(BCM_5710_FW_MAJOR_VERSION) "."	\
+	__stringify(BCM_5710_FW_MINOR_VERSION) "."	\
+	__stringify(BCM_5710_FW_REVISION_VERSION) "."	\
+	__stringify(BCM_5710_FW_ENGINEERING_VERSION)
+#define FW_FILE_NAME_E1		"bnx2x-e1-" FW_FILE_VERSION ".fw"
+#define FW_FILE_NAME_E1H	"bnx2x-e1h-" FW_FILE_VERSION ".fw"
 
 /* Time in jiffies before concluding the transmitter is hung */
 #define TX_TIMEOUT		(5*HZ)
@@ -77,6 +83,8 @@ MODULE_AUTHOR("Eliezer Tamir");
 MODULE_DESCRIPTION("Broadcom NetXtreme II BCM57710/57711/57711E Driver");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_MODULE_VERSION);
+MODULE_FIRMWARE(FW_FILE_NAME_E1);
+MODULE_FIRMWARE(FW_FILE_NAME_E1H);
 
 static int multi_mode = 1;
 module_param(multi_mode, int, 0);
@@ -12117,21 +12125,14 @@ static inline void be16_to_cpu_n(const u8 *_source, u8 *_target, u32 n)
 
 static int __devinit bnx2x_init_firmware(struct bnx2x *bp, struct device *dev)
 {
-	char fw_file_name[40] = {0};
+	const char *fw_file_name;
 	struct bnx2x_fw_file_hdr *fw_hdr;
-	int rc, offset;
+	int rc;
 
-	/* Create a FW file name */
 	if (CHIP_IS_E1(bp))
-		offset = sprintf(fw_file_name, FW_FILE_PREFIX_E1);
+		fw_file_name = FW_FILE_NAME_E1;
 	else
-		offset = sprintf(fw_file_name, FW_FILE_PREFIX_E1H);
-
-	sprintf(fw_file_name + offset, "%d.%d.%d.%d.fw",
-		BCM_5710_FW_MAJOR_VERSION,
-		BCM_5710_FW_MINOR_VERSION,
-		BCM_5710_FW_REVISION_VERSION,
-		BCM_5710_FW_ENGINEERING_VERSION);
+		fw_file_name = FW_FILE_NAME_E1H;
 
 	printk(KERN_INFO PFX "Loading %s\n", fw_file_name);
 
-- 
1.6.5.2




^ permalink raw reply related

* [PATCH 38/75] iwmc3200top: declare MODULE_FIRMWARE
From: Ben Hutchings @ 2009-11-07 21:53 UTC (permalink / raw)
  To: David Miller; +Cc: Tomas Winkler, netdev

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/misc/iwmc3200top/fw-download.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/iwmc3200top/fw-download.c b/drivers/misc/iwmc3200top/fw-download.c
index 33cb693..2817618 100644
--- a/drivers/misc/iwmc3200top/fw-download.c
+++ b/drivers/misc/iwmc3200top/fw-download.c
@@ -357,3 +357,5 @@ exit:
 
 	return ret;
 }
+
+MODULE_FIRMWARE("iwmc3200top.1.fw");
-- 
1.6.5.2




^ permalink raw reply related

* [PATCH 08/75] ambassador: declare MODULE_FIRMWARE
From: Ben Hutchings @ 2009-11-07 21:46 UTC (permalink / raw)
  To: Chas Williams; +Cc: linux-atm-general, netdev

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/atm/ambassador.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 66e1813..8af2341 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -2351,6 +2351,7 @@ static void __init amb_check_args (void) {
 MODULE_AUTHOR(maintainer_string);
 MODULE_DESCRIPTION(description_string);
 MODULE_LICENSE("GPL");
+MODULE_FIRMWARE("atmsar11.fw");
 module_param(debug,   ushort, 0644);
 module_param(cmds,    uint, 0);
 module_param(txs,     uint, 0);
-- 
1.6.5.2




^ permalink raw reply related


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