* Re: [PATCH] Fix NULL pointer dereference on firmware name for early calls to get_drvinfo.
From: David Miller @ 2012-03-31 0:51 UTC (permalink / raw)
To: notting; +Cc: netdev, wimax, inaky.perez-gonzalez
In-Reply-To: <1333139045-18170-1-git-send-email-notting@redhat.com>
From: Bill Nottingham <notting@redhat.com>
Date: Fri, 30 Mar 2012 16:24:05 -0400
> The driver comments show an initialization sequence of:
> * i2400m_setup()
> * i2400m->bus_setup()
> * i2400m_bootrom_init()
> * register_netdev()
> * wimax_dev_add()
> * i2400m_dev_start()
> * __i2400m_dev_start()
> * i2400m_dev_bootstrap()
>
> dev_bootstrap() is where the firmware is loaded. So, if something calls
> get_drvinfo() from a register_netdevice_notifier (such as the cnic driver),
> we won't have a firmware name, and strncpy will crash.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=808603
>
> Signed-off-by: Bill Nottingham <notting@redhat.com>
Already fixed in current sources.
^ permalink raw reply
* Re: sendmmsg: put_user vs __put_user
From: David Miller @ 2012-03-31 0:51 UTC (permalink / raw)
To: drepper; +Cc: netdev, linux-kernel
In-Reply-To: <CAOPLpQf2bmj+i_zYtsS8JNzTDuBxCO5ByNRRqwv0kxaDBFdezg@mail.gmail.com>
From: Ulrich Drepper <drepper@gmail.com>
Date: Fri, 30 Mar 2012 09:36:11 -0400
> Shouldn't the compat code in the sendmmsg implementation use the same
> code as the normal code? In which case you probably want something
> like this:
Compat processes are not able to generate virtual addresses anywhere
near the range where the kernel resides, so the address range
verification done by put_user() is completely superfluous and
therefore not necessary. The normal exception handling done by the
access is completely sufficient.
^ permalink raw reply
* [PATCH] tilepro ethernet driver: fix a few minor issues
From: Chris Metcalf @ 2012-03-30 23:23 UTC (permalink / raw)
To: Chris Metcalf, netdev, linux-kernel
This commit fixes a number of issues seen with the driver:
- Improve handling of return credits to the hardware shim
- Use skb_frag_size() appropriately
- Add netpoll support to run console over UDP
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
---
drivers/net/ethernet/tile/tilepro.c | 75 +++++++++++++++++++++++------------
1 files changed, 50 insertions(+), 25 deletions(-)
diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c
index d9951af..eb4ea08 100644
--- a/drivers/net/ethernet/tile/tilepro.c
+++ b/drivers/net/ethernet/tile/tilepro.c
@@ -342,6 +342,21 @@ inline int __netio_fastio1(u32 fastio_index, u32 arg0)
}
+static void tile_net_return_credit(struct tile_net_cpu *info)
+{
+ struct tile_netio_queue *queue = &info->queue;
+ netio_queue_user_impl_t *qup = &queue->__user_part;
+
+ /* Return four credits after every fourth packet. */
+ if (--qup->__receive_credit_remaining == 0) {
+ u32 interval = qup->__receive_credit_interval;
+ qup->__receive_credit_remaining = interval;
+ __netio_fastio_return_credits(qup->__fastio_index, interval);
+ }
+}
+
+
+
/*
* Provide a linux buffer to LIPP.
*/
@@ -864,19 +879,11 @@ static bool tile_net_poll_aux(struct tile_net_cpu *info, int index)
stats->rx_packets++;
stats->rx_bytes += len;
-
- if (small)
- info->num_needed_small_buffers++;
- else
- info->num_needed_large_buffers++;
}
- /* Return four credits after every fourth packet. */
- if (--qup->__receive_credit_remaining == 0) {
- u32 interval = qup->__receive_credit_interval;
- qup->__receive_credit_remaining = interval;
- __netio_fastio_return_credits(qup->__fastio_index, interval);
- }
+ /* ISSUE: It would be nice to defer this until the packet has */
+ /* actually been processed. */
+ tile_net_return_credit(info);
/* Consume this packet. */
qup->__packet_receive_read = index2;
@@ -1543,7 +1550,7 @@ static int tile_net_drain_lipp_buffers(struct tile_net_priv *priv)
/* Drain all the LIPP buffers. */
while (true) {
- int buffer;
+ unsigned int buffer;
/* NOTE: This should never fail. */
if (hv_dev_pread(priv->hv_devhdl, 0, (HV_VirtAddr)&buffer,
@@ -1707,7 +1714,7 @@ static unsigned int tile_net_tx_frags(lepp_frag_t *frags,
if (!hash_default) {
void *va = pfn_to_kaddr(pfn) + f->page_offset;
BUG_ON(PageHighMem(skb_frag_page(f)));
- finv_buffer_remote(va, f->size, 0);
+ finv_buffer_remote(va, skb_frag_size(f), 0);
}
cpa = ((phys_addr_t)pfn << PAGE_SHIFT) + f->page_offset;
@@ -1735,8 +1742,8 @@ static unsigned int tile_net_tx_frags(lepp_frag_t *frags,
* Sometimes, if "sendfile()" requires copying, we will be called with
* "data" containing the header and payload, with "frags" being empty.
*
- * In theory, "sh->nr_frags" could be 3, but in practice, it seems
- * that this will never actually happen.
+ * Sometimes, for example when using NFS over TCP, a single segment can
+ * span 3 fragments, which must be handled carefully in LEPP.
*
* See "emulate_large_send_offload()" for some reference code, which
* does not handle checksumming.
@@ -1844,10 +1851,8 @@ static int tile_net_tx_tso(struct sk_buff *skb, struct net_device *dev)
spin_lock_irqsave(&priv->eq_lock, irqflags);
- /*
- * Handle completions if needed to make room.
- * HACK: Spin until there is sufficient room.
- */
+ /* Handle completions if needed to make room. */
+ /* NOTE: Return NETDEV_TX_BUSY if there is still no room. */
if (lepp_num_free_comp_slots(eq) == 0) {
nolds = tile_net_lepp_grab_comps(eq, olds, wanted, 0);
if (nolds == 0) {
@@ -1861,6 +1866,7 @@ busy:
cmd_tail = eq->cmd_tail;
/* Prepare to advance, detecting full queue. */
+ /* NOTE: Return NETDEV_TX_BUSY if the queue is full. */
cmd_next = cmd_tail + cmd_size;
if (cmd_tail < cmd_head && cmd_next >= cmd_head)
goto busy;
@@ -2023,10 +2029,8 @@ static int tile_net_tx(struct sk_buff *skb, struct net_device *dev)
spin_lock_irqsave(&priv->eq_lock, irqflags);
- /*
- * Handle completions if needed to make room.
- * HACK: Spin until there is sufficient room.
- */
+ /* Handle completions if needed to make room. */
+ /* NOTE: Return NETDEV_TX_BUSY if there is still no room. */
if (lepp_num_free_comp_slots(eq) == 0) {
nolds = tile_net_lepp_grab_comps(eq, olds, wanted, 0);
if (nolds == 0) {
@@ -2040,6 +2044,7 @@ busy:
cmd_tail = eq->cmd_tail;
/* Copy the commands, or fail. */
+ /* NOTE: Return NETDEV_TX_BUSY if the queue is full. */
for (i = 0; i < num_frags; i++) {
/* Prepare to advance, detecting full queue. */
@@ -2260,6 +2265,23 @@ static int tile_net_get_mac(struct net_device *dev)
return 0;
}
+
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+static void tile_net_netpoll(struct net_device *dev)
+{
+ struct tile_net_priv *priv = netdev_priv(dev);
+ disable_percpu_irq(priv->intr_id);
+ tile_net_handle_ingress_interrupt(priv->intr_id, dev);
+ enable_percpu_irq(priv->intr_id, 0);
+}
+#endif
+
+
static const struct net_device_ops tile_net_ops = {
.ndo_open = tile_net_open,
.ndo_stop = tile_net_stop,
@@ -2268,7 +2290,10 @@ static const struct net_device_ops tile_net_ops = {
.ndo_get_stats = tile_net_get_stats,
.ndo_change_mtu = tile_net_change_mtu,
.ndo_tx_timeout = tile_net_tx_timeout,
- .ndo_set_mac_address = tile_net_set_mac_address
+ .ndo_set_mac_address = tile_net_set_mac_address,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = tile_net_netpoll,
+#endif
};
@@ -2408,7 +2433,7 @@ static void tile_net_cleanup(void)
*/
static int tile_net_init_module(void)
{
- pr_info("Tilera IPP Net Driver\n");
+ pr_info("Tilera Network Driver\n");
tile_net_devs[0] = tile_net_dev_init("xgbe0");
tile_net_devs[1] = tile_net_dev_init("xgbe1");
--
1.6.5.2
^ permalink raw reply related
* adding ipv6 address manually in Linux
From: Adishesh M @ 2012-03-30 20:57 UTC (permalink / raw)
To: netdev
In-Reply-To: <CA+f1OFri1pvyn2n=L82bip+KEY4QnXEwPxNvy=23UOR4vDTzJQ@mail.gmail.com>
Hi,
there some problem in linux if we send 'unsolicited Neighbor
Advertisement' message for an ipv6 address as explained below.
Manually add a new ipv6 address in to a Linux machine and send
immediately 'unsolicited Neighbor Advertisement' then newly added
address is considered as duplicate ipv6 address.
usually if a new ipv6 address is added then Linux is sending '
Neighbor solicitation message in order to detect duplicate address. By some
how if i send unsolicited Neighbor advertisement message before linux
sends 'neighbor solicitation' message then linux is marking this
address as duplicate.
'ip -6 addr show' command output is
inet6 2001:3333:5678:ddd1::55/64 scope global tentative dadfailed
why Linux is considering ipv6 address as duplicate if we send
unsolicited message?
if unsolicited message is sent after Linux completes duplicate address
detection procedure by using neighbor solicitation message then this
address is not considered as duplicate.
Regards,
Adishesh
^ permalink raw reply
* Re: [PATCH] net: add QCA alx Ethernet driver
From: Luis R. Rodriguez @ 2012-03-30 20:52 UTC (permalink / raw)
To: David Miller
Cc: xiong, netdev, linux-kernel, qca-linux-team, nic-devel, kgiori,
chris.snook, mathieu, bryanh, jespera, julia
In-Reply-To: <20120330.164554.2217665316338460995.davem@davemloft.net>
On Fri, Mar 30, 2012 at 04:45:54PM -0400, David Miller wrote:
> From: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com>
> Date: Fri, 30 Mar 2012 10:10:55 -0700
>
> > On Wed, Mar 21, 2012 at 6:28 PM, Luis R. Rodriguez
> > <rodrigue@qca.qualcomm.com> wrote:
> >> On Tue, Feb 28, 2012 at 7:32 PM, David Miller <davem@davemloft.net> wrote:
> >> Would it be worthwhile to consider alx upstream only for the newer
> >> chipsets (regardless of the litmus test, which I do agree with on
> >> technical grounds) in consideration for helping pave the way on
> >> killing proprietary drivers?
> ...
> > David, please us know if you think the above reason is worthy for
> > consideration of alx upstream, if at least for the newer chipsets.
>
> Submitting alx that only supports the newer chipsets is fine.
We will work on this and resubmit, the delta for the other chipsets
can also be addressed within atl1c, in addition to working on getting
documentation out to help enable further.
Luis
^ permalink raw reply
* Re: [PATCH] net: add QCA alx Ethernet driver
From: David Miller @ 2012-03-30 20:45 UTC (permalink / raw)
To: rodrigue
Cc: xiong, netdev, linux-kernel, qca-linux-team, nic-devel, kgiori,
chris.snook, mathieu, bryanh, jespera, julia
In-Reply-To: <CAB=NE6WPWmrTZ__JQViqhde-krBsbM5G+ZQgK0pNC+W909u_ew@mail.gmail.com>
From: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com>
Date: Fri, 30 Mar 2012 10:10:55 -0700
> On Wed, Mar 21, 2012 at 6:28 PM, Luis R. Rodriguez
> <rodrigue@qca.qualcomm.com> wrote:
>> On Tue, Feb 28, 2012 at 7:32 PM, David Miller <davem@davemloft.net> wrote:
>> Would it be worthwhile to consider alx upstream only for the newer
>> chipsets (regardless of the litmus test, which I do agree with on
>> technical grounds) in consideration for helping pave the way on
>> killing proprietary drivers?
...
> David, please us know if you think the above reason is worthy for
> consideration of alx upstream, if at least for the newer chipsets.
Submitting alx that only supports the newer chipsets is fine.
^ permalink raw reply
* [PATCH] Fix NULL pointer dereference on firmware name for early calls to get_drvinfo.
From: Bill Nottingham @ 2012-03-30 20:24 UTC (permalink / raw)
To: inaky.perez-gonzalez, wimax, netdev
The driver comments show an initialization sequence of:
* i2400m_setup()
* i2400m->bus_setup()
* i2400m_bootrom_init()
* register_netdev()
* wimax_dev_add()
* i2400m_dev_start()
* __i2400m_dev_start()
* i2400m_dev_bootstrap()
dev_bootstrap() is where the firmware is loaded. So, if something calls
get_drvinfo() from a register_netdevice_notifier (such as the cnic driver),
we won't have a firmware name, and strncpy will crash.
https://bugzilla.redhat.com/show_bug.cgi?id=808603
Signed-off-by: Bill Nottingham <notting@redhat.com>
---
drivers/net/wimax/i2400m/netdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c
index 63e4b70..e44f4e2 100644
--- a/drivers/net/wimax/i2400m/netdev.c
+++ b/drivers/net/wimax/i2400m/netdev.c
@@ -597,7 +597,8 @@ static void i2400m_get_drvinfo(struct net_device *net_dev,
struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver) - 1);
- strncpy(info->fw_version, i2400m->fw_name, sizeof(info->fw_version) - 1);
+ if (i2400m->fw_name)
+ strncpy(info->fw_version, i2400m->fw_name, sizeof(info->fw_version) - 1);
if (net_dev->dev.parent)
strncpy(info->bus_info, dev_name(net_dev->dev.parent),
sizeof(info->bus_info) - 1);
--
1.7.9.3
^ permalink raw reply related
* [PATCH v2 04/15] net: mark const init data with __initconst instead of __initdata
From: Uwe Kleine-König @ 2012-03-30 20:04 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: kernel, Andreas Koensgen, Klaus Kudielka, Joerg Reuter,
Jean-Paul Roubelat, netdev, linux-hams
In-Reply-To: <20120330200358.GV15647@pengutronix.de>
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
Cc: Klaus Kudielka <klaus.kudielka@ieee.org>
Cc: Joerg Reuter <jreuter@yaina.de>
Cc: Jean-Paul Roubelat <jpr@f6fbb.org>
Cc: netdev@vger.kernel.org
Cc: linux-hams@vger.kernel.org
---
changes since (implicit) v1:
- drop wrong changes in drivers/net/ethernet/8390/ne3210.c
drivers/net/hamradio/6pack.c | 4 ++--
drivers/net/hamradio/bpqether.c | 2 +-
drivers/net/hamradio/mkiss.c | 4 ++--
drivers/net/hamradio/scc.c | 2 +-
drivers/net/hamradio/yam.c | 2 +-
drivers/net/tokenring/smctr.c | 2 +-
drivers/net/wan/z85230.c | 2 +-
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 64783a0..d225a2a 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -811,9 +811,9 @@ static struct tty_ldisc_ops sp_ldisc = {
/* Initialize 6pack control device -- register 6pack line discipline */
-static const char msg_banner[] __initdata = KERN_INFO \
+static const char msg_banner[] __initconst = KERN_INFO \
"AX.25: 6pack driver, " SIXPACK_VERSION "\n";
-static const char msg_regfail[] __initdata = KERN_ERR \
+static const char msg_regfail[] __initconst = KERN_ERR \
"6pack: can't register line discipline (err = %d)\n";
static int __init sixpack_init_driver(void)
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 76d5477..c2e5497 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -87,7 +87,7 @@
#include <linux/bpqether.h>
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
"AX.25: bpqether driver version 004\n";
static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index aed1a61..d694215 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -997,9 +997,9 @@ static struct tty_ldisc_ops ax_ldisc = {
.write_wakeup = mkiss_write_wakeup
};
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
"mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n";
-static const char msg_regfail[] __initdata = KERN_ERR \
+static const char msg_regfail[] __initconst = KERN_ERR \
"mkiss: can't register line discipline (err = %d)\n";
static int __init mkiss_init_driver(void)
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index efc6c97..1b4a47b 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -182,7 +182,7 @@
#include "z8530.h"
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
"AX.25: Z8530 SCC driver version "VERSION".dl1bke\n";
static void t_dwait(unsigned long);
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 5a6412e..c6645f1 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -76,7 +76,7 @@
/* --------------------------------------------------------------------- */
static const char yam_drvname[] = "yam";
-static const char yam_drvinfo[] __initdata = KERN_INFO \
+static const char yam_drvinfo[] __initconst = KERN_INFO \
"YAM driver version 0.8 by F1OAT/F6FBB\n";
/* --------------------------------------------------------------------- */
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index cb35fb7..90b5f1e 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -59,7 +59,7 @@
#include "smctr.h" /* Our Stuff */
-static const char version[] __initdata =
+static const char version[] __initconst =
KERN_INFO "smctr.c: v1.4 7/12/00 by jschlst@samba.org\n";
static const char cardname[] = "smctr";
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
index 0e57690..feacc3b 100644
--- a/drivers/net/wan/z85230.c
+++ b/drivers/net/wan/z85230.c
@@ -1775,7 +1775,7 @@ EXPORT_SYMBOL(z8530_queue_xmit);
/*
* Module support
*/
-static const char banner[] __initdata =
+static const char banner[] __initconst =
KERN_INFO "Generic Z85C30/Z85230 interface driver v0.02\n";
static int __init z85230_init_driver(void)
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-hams" 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 related
* [PATCH v2 00/15] mark const init data with __initconst instead of __initdata
From: Uwe Kleine-König @ 2012-03-30 20:03 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: Andrew Lunn, Christoph Lameter, linux-mips, Tony Lindgren,
Benjamin Herrenschmidt, Linus Walleij, Matt Porter, Nicolas Ferre,
Matthew Garrett, platform-driver-x86, Grant Likely,
ibm-acpi-devel, Randy Dunlap, linux-mtd, Sekhar Nori,
Daniel Walker, lm-sensors, Klaus Kudielka, Guenter Roeck,
Kevin Hilman, linux-ia64, Kukjin Kim, Russell King, Samuel Ortiz
In-Reply-To: <20120329211131.GA31250@pengutronix.de>
Hello,
On Thu, Mar 29, 2012 at 11:11:31PM +0200, Uwe Kleine-König wrote:
> this series fixes a common error to use __initdata to mark const
> variables. Most of the time this works well enough to go unnoticed
> (though I wonder why the linker doesn't warn about that).
> Just try adding something like
>
> int something __initdata;
>
> to one of the patched files and compile to see the error.
>
> While touching these annotations I also corrected the position where it
> was wrong to go between the variable name and the =.
>
> Note this series is not compile tested.
I now dropped the wrong annotations. So two patches became obsolete
(mtd and percpu). Note that I also dropped fixing the position of
__initdata if changing it to __initconst was wrong. (I think if
__initdata is placed before the variable name it doesn't have any
effect.)
I didn't promote the Acks I got because all acked changes changed in v2.
For the details changed in each patch see the changelogs in the
respective patch mails that I follow up to this mail.
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply
* question about frag_can_reassemble()
From: Dan Carpenter @ 2012-03-30 20:02 UTC (permalink / raw)
To: Sven Eckelmann
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
Hi Sven,
I had a question about the code in frag_can_reassemble().
net/batman-adv/unicast.h
51
52 merged_size = (skb->len - sizeof(*unicast_packet)) * 2;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53 merged_size += sizeof(struct unicast_packet) + uneven_correction;
54
55 return merged_size <= mtu;
56 }
Can the skb->len be less than sizeof(*unicast_packet) (ie 20 bytes)?
If "len" is less than 10 then we would return false but if it's
over 10 then we would return true. Roughly.
regards,
dan carpenter
^ permalink raw reply
* Re: [REGRESSION][PATCH V4 2/3] bpf jit: Let the x86 jit handle negative offsets
From: Eric Dumazet @ 2012-03-30 18:58 UTC (permalink / raw)
To: kaffeemonster; +Cc: netdev, linux-kernel, David S. Miller
In-Reply-To: <4F75D015.30609@googlemail.com>
On Fri, 2012-03-30 at 17:24 +0200, Jan Seiffert wrote:
> Now the helper function from filter.c for negative offsets is exported,
> it can be used it in the jit to handle negative offsets.
>
> First modify the asm load helper functions to handle:
> - know positive offsets
> - know negative offsets
> - any offset
>
> then the compiler can be modified to explicitly use these helper
> when appropriate.
>
> This fixes the case of a negative X register and allows to lift
> the restriction that bpf programs with negative offsets can't
> be jited.
>
> Signed-of-by: Jan Seiffert <kaffeemonster@googlemail.com>
Nice work Jan, thanks a lot.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply
* Re: [REGRESSION][PATCH V4 1/3] bpf jit: Make the filter.c::__load_pointer helper non-static for the jits
From: Eric Dumazet @ 2012-03-30 18:56 UTC (permalink / raw)
To: Jan Seiffert
Cc: netdev, linux-kernel, linuxppc-dev, Matt Evans, David S. Miller
In-Reply-To: <4F75CC63.10405@googlemail.com>
On Fri, 2012-03-30 at 17:08 +0200, Jan Seiffert wrote:
> The function is renamed to make it a little more clear what it does.
> It is not added to any .h because it is not for general consumption, only for
> bpf internal use (and so by the jits).
>
> Signed-of-by: Jan Seiffert <kaffeemonster@googlemail.com>
>
Missing "---" line separator (check Documentation/SubmittingPatches line
490)
You can check http://patchwork.ozlabs.org/patch/149683/ and see there is
a problem, compared to http://patchwork.ozlabs.org/patch/149441/ for
example
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -40,8 +40,12 @@
> #include <linux/reciprocal_div.h>
> #include <linux/ratelimit.h>
>
> -/* No hurry in this branch */
> -static void *__load_pointer(const struct sk_buff *skb, int k, unsigned int size)
> +/*
> + * No hurry in this branch
> + *
> + * Exported for the bpf jit load helper.
> + */
Seems good to me, maybe add a strong warning in the comment to say that
function prototype can NOT change without major surgery in ASM files,
since assembler wont catch the prototype change for us.
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply
* Re: [PATCH] net: add QCA alx Ethernet driver
From: Luis R. Rodriguez @ 2012-03-30 18:31 UTC (permalink / raw)
To: Dave Taht
Cc: davem, netdev, linux-kernel, qca-linux-team, nic-devel, kgiori,
chris.snook, mathieu, bryanh
In-Reply-To: <CAA93jw4NwHaLazxK2Eo6a6TuvF3svqdZjTpHUwOyEHv-Q=busQ@mail.gmail.com>
On Fri, Mar 30, 2012 at 11:16 AM, Dave Taht <dave.taht@gmail.com> wrote:
>
>
> On Wed, Feb 29, 2012 at 1:50 AM, Luis R. Rodriguez
> <rodrigue@qca.qualcomm.com> wrote:
>>
>> From: Luis R. Rodriguez <mcgrof@frijolero.org>
>>
>> The next patch adds the new QCA alx Ethernet driver that
>> supercedes the atl1c Ethernet driver. For details please
>> read the commit log of the patch. Given the size you can
>> download the patch from:
>
>
>
>>
>>
>>
>> http://bombadil.infradead.org/~mcgrof/2012/02/28/add-alx-next-20120228.patch
>> sha1sum: 8a8f7b6f1cbe737e70ec3b3eda483a6925fd9bd6
>>
>
> The shiny graph was rather impressive vs a vs the old driver.
>
> https://www.linuxfoundation.org/sites/main/files/alx-iperf.jpg
>
> A quick grep showed no BQL support. :(
Good point, we'll add that to our TODO list.
Luis
^ permalink raw reply
* Re: pull request: wireless 2012-03-30
From: John W. Linville @ 2012-03-30 18:30 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <4F75F620.9030101@hartkopp.net>
On Fri, Mar 30, 2012 at 08:06:24PM +0200, Oliver Hartkopp wrote:
> Hello John,
>
> there are at least two patches that i know from that fix issues in the current
> 3.4-merge tree.
>
> [PATCH] iwlwifi: fix unused variable warning
> http://marc.info/?l=linux-wireless&m=133266148006409&w=2
> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> http://marc.info/?l=linux-wireless&m=133272671523532&w=2
>
> [PATCH 3.4] mac80211: fix association beacon wait timeout
> http://marc.info/?l=linux-wireless&m=133296144416566&w=2
> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
> http://marc.info/?l=linux-wireless&m=133296423617914&w=2
>
> Did you miss them?
>
> Regards,
> Oliver
No, I didn't. Please be patient.
John
--
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
* Re: TCP_MAXSEG option with TSO enabled
From: Daniel Baluta @ 2012-03-30 18:07 UTC (permalink / raw)
To: Rick Jones; +Cc: netdev
In-Reply-To: <4F75EF78.4060402@hp.com>
On Fri, Mar 30, 2012 at 8:38 PM, Rick Jones <rick.jones2@hp.com> wrote:
> On 03/30/2012 04:33 AM, Daniel Baluta wrote:
>>
>> Hello,
>>
>> I am using TCP_MAXSEG option on an interface which has TSO enabled.
>>
>> strace output for connection looks as follows:
>>
>> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 26
>> setsockopt(26, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
>> setsockopt(26, SOL_TCP, TCP_NODELAY, [1], 4) = 0
>> setsockopt(26, SOL_TCP, TCP_MAXSEG, [300], 4) = 0
>> connect(26, {sa_family=AF_INET, sin_port=htons(1935),
>> sin_addr=inet_addr("10.10.0.1")}, 16) = -1 EINPROGRESS (Operation now
>> in progress)
>>
>> I can see that MSS (300) is advertised in SYN packet, anyhow capturing
>> the traffic
>> I notice that are some TCP segments with length greater than MSS.
>>
>> Is this normal taking in consideration that TSO is enabled?
>
>
> I would think so. What do the netstat stats suggest for segments and bytes
> per segment when you are running your test? You could always look for an
> on-the-wire packet trace.
>
> Not sure that a trace on a receiver would give you that though - the inbound
> promiscuous tap may be above GRO (and almost certainly will be above LRO)
Thanks Rick. Indeed on-the-wire capture looks fine. I have TSO enabled
at sender and LRO at receiver, everything makes sense now.
thanks,
Daniel.
^ permalink raw reply
* Re: pull request: wireless 2012-03-30
From: Oliver Hartkopp @ 2012-03-30 18:06 UTC (permalink / raw)
To: John W. Linville; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <20120330175533.GC8273@tuxdriver.com>
Hello John,
there are at least two patches that i know from that fix issues in the current
3.4-merge tree.
[PATCH] iwlwifi: fix unused variable warning
http://marc.info/?l=linux-wireless&m=133266148006409&w=2
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
http://marc.info/?l=linux-wireless&m=133272671523532&w=2
[PATCH 3.4] mac80211: fix association beacon wait timeout
http://marc.info/?l=linux-wireless&m=133296144416566&w=2
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
http://marc.info/?l=linux-wireless&m=133296423617914&w=2
Did you miss them?
Regards,
Oliver
On 30.03.2012 19:55, John W. Linville wrote:
> commit de312db345f9770b64ff39ef5a7f86f6358e93cc
>
> Dave,
>
> I have a few more small fixes, hopefully still in time for 3.4-rc1...
>
> Rajkukmar provides us with a one-line timestamp correction related to
> scanning in mac80211. Sujith gives us a small fixup for a regression
> in the handling of HT capability bits for ath9k. Stanislav Yakovlev
> is stepping-up as maintainer for the ipw2x00 drivers, so we'll add
> him to MAINTAINERS. Stanislav also gives us a fix for a thinko
> that registers the wrong band information for ipw2200 and 802.11a.
> Finally, Santosh Nayak adds some simple error checking to orinoco to
> avoid some potential NULL pointer dereferences.
>
> Please let me know if there are problems!
>
> Thanks,
>
> John
>
> ---
>
> The following changes since commit 643c61e119459e9d750087b7b34be94491efebf9:
>
> rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: Fix low-gain setting when scanning (2012-03-26 15:07:30 -0400)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git master
>
> Rajkumar Manoharan (1):
> mac80211: fix oper channel timestamp updation
>
> Santosh Nayak (1):
> net: orinoco: add error handling for failed kmalloc().
>
> Stanislav Yakovlev (2):
> net/wireless: ipw2x00: fix a typo in wiphy struct initilization
> MAINTAINERS: adding maintainer for ipw2x00
>
> Sujith Manoharan (1):
> ath9k: Use HW HT capabilites properly
>
> MAINTAINERS | 12 ++++--------
> drivers/net/wireless/ath/ath9k/main.c | 4 ++--
> drivers/net/wireless/ipw2x00/ipw2200.c | 4 ++--
> drivers/net/wireless/orinoco/main.c | 8 ++++++++
> net/mac80211/scan.c | 2 +-
> 5 files changed, 17 insertions(+), 13 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0ddc77fe..09a79f9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3519,17 +3519,13 @@ L: linux-pm@vger.kernel.org
> S: Supported
> F: arch/x86/platform/mrst/pmu.*
>
> -INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
> +INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
> +M: Stanislav Yakovlev <stas.yakovlev@gmail.com>
> L: linux-wireless@vger.kernel.org
> -S: Orphan
> +S: Maintained
> F: Documentation/networking/README.ipw2100
> -F: drivers/net/wireless/ipw2x00/ipw2100.*
> -
> -INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
> -L: linux-wireless@vger.kernel.org
> -S: Orphan
> F: Documentation/networking/README.ipw2200
> -F: drivers/net/wireless/ipw2x00/ipw2200.*
> +F: drivers/net/wireless/ipw2x00/
>
> INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
> M: Joseph Cihula <joseph.cihula@intel.com>
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index 3879485..215eb25 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -640,7 +640,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta,
> an->sta = sta;
> an->vif = vif;
>
> - if (sta->ht_cap.ht_supported) {
> + if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
> ath_tx_node_init(sc, an);
> an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
> sta->ht_cap.ampdu_factor);
> @@ -659,7 +659,7 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta)
> an->sta = NULL;
> #endif
>
> - if (sta->ht_cap.ht_supported)
> + if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
> ath_tx_node_cleanup(sc, an);
> }
>
> diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
> index 4fcdac6..2b02257 100644
> --- a/drivers/net/wireless/ipw2x00/ipw2200.c
> +++ b/drivers/net/wireless/ipw2x00/ipw2200.c
> @@ -11507,9 +11507,9 @@ static int ipw_wdev_init(struct net_device *dev)
> rc = -ENOMEM;
> goto out;
> }
> - /* translate geo->bg to a_band.channels */
> + /* translate geo->a to a_band.channels */
> for (i = 0; i < geo->a_channels; i++) {
> - a_band->channels[i].band = IEEE80211_BAND_2GHZ;
> + a_band->channels[i].band = IEEE80211_BAND_5GHZ;
> a_band->channels[i].center_freq = geo->a[i].freq;
> a_band->channels[i].hw_value = geo->a[i].channel;
> a_band->channels[i].max_power = geo->a[i].max_power;
> diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
> index dd6c64a..88e3ad2 100644
> --- a/drivers/net/wireless/orinoco/main.c
> +++ b/drivers/net/wireless/orinoco/main.c
> @@ -1336,6 +1336,10 @@ static void qbuf_scan(struct orinoco_private *priv, void *buf,
> unsigned long flags;
>
> sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
> + if (!sd) {
> + printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
> + return;
> + }
> sd->buf = buf;
> sd->len = len;
> sd->type = type;
> @@ -1353,6 +1357,10 @@ static void qabort_scan(struct orinoco_private *priv)
> unsigned long flags;
>
> sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
> + if (!sd) {
> + printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
> + return;
> + }
> sd->len = -1; /* Abort */
>
> spin_lock_irqsave(&priv->scan_lock, flags);
> diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
> index 33cd169..c70e176 100644
> --- a/net/mac80211/scan.c
> +++ b/net/mac80211/scan.c
> @@ -370,7 +370,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
> */
> drv_sw_scan_start(local);
>
> - local->leave_oper_channel_time = 0;
> + local->leave_oper_channel_time = jiffies;
> local->next_scan_state = SCAN_DECISION;
> local->scan_channel_idx = 0;
>
^ permalink raw reply
* pull request: wireless 2012-03-30
From: John W. Linville @ 2012-03-30 17:55 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 5570 bytes --]
commit de312db345f9770b64ff39ef5a7f86f6358e93cc
Dave,
I have a few more small fixes, hopefully still in time for 3.4-rc1...
Rajkukmar provides us with a one-line timestamp correction related to
scanning in mac80211. Sujith gives us a small fixup for a regression
in the handling of HT capability bits for ath9k. Stanislav Yakovlev
is stepping-up as maintainer for the ipw2x00 drivers, so we'll add
him to MAINTAINERS. Stanislav also gives us a fix for a thinko
that registers the wrong band information for ipw2200 and 802.11a.
Finally, Santosh Nayak adds some simple error checking to orinoco to
avoid some potential NULL pointer dereferences.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 643c61e119459e9d750087b7b34be94491efebf9:
rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: Fix low-gain setting when scanning (2012-03-26 15:07:30 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git master
Rajkumar Manoharan (1):
mac80211: fix oper channel timestamp updation
Santosh Nayak (1):
net: orinoco: add error handling for failed kmalloc().
Stanislav Yakovlev (2):
net/wireless: ipw2x00: fix a typo in wiphy struct initilization
MAINTAINERS: adding maintainer for ipw2x00
Sujith Manoharan (1):
ath9k: Use HW HT capabilites properly
MAINTAINERS | 12 ++++--------
drivers/net/wireless/ath/ath9k/main.c | 4 ++--
drivers/net/wireless/ipw2x00/ipw2200.c | 4 ++--
drivers/net/wireless/orinoco/main.c | 8 ++++++++
net/mac80211/scan.c | 2 +-
5 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 0ddc77fe..09a79f9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3519,17 +3519,13 @@ L: linux-pm@vger.kernel.org
S: Supported
F: arch/x86/platform/mrst/pmu.*
-INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
+INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
+M: Stanislav Yakovlev <stas.yakovlev@gmail.com>
L: linux-wireless@vger.kernel.org
-S: Orphan
+S: Maintained
F: Documentation/networking/README.ipw2100
-F: drivers/net/wireless/ipw2x00/ipw2100.*
-
-INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
-L: linux-wireless@vger.kernel.org
-S: Orphan
F: Documentation/networking/README.ipw2200
-F: drivers/net/wireless/ipw2x00/ipw2200.*
+F: drivers/net/wireless/ipw2x00/
INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
M: Joseph Cihula <joseph.cihula@intel.com>
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3879485..215eb25 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -640,7 +640,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta,
an->sta = sta;
an->vif = vif;
- if (sta->ht_cap.ht_supported) {
+ if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
ath_tx_node_init(sc, an);
an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
sta->ht_cap.ampdu_factor);
@@ -659,7 +659,7 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta)
an->sta = NULL;
#endif
- if (sta->ht_cap.ht_supported)
+ if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
ath_tx_node_cleanup(sc, an);
}
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 4fcdac6..2b02257 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -11507,9 +11507,9 @@ static int ipw_wdev_init(struct net_device *dev)
rc = -ENOMEM;
goto out;
}
- /* translate geo->bg to a_band.channels */
+ /* translate geo->a to a_band.channels */
for (i = 0; i < geo->a_channels; i++) {
- a_band->channels[i].band = IEEE80211_BAND_2GHZ;
+ a_band->channels[i].band = IEEE80211_BAND_5GHZ;
a_band->channels[i].center_freq = geo->a[i].freq;
a_band->channels[i].hw_value = geo->a[i].channel;
a_band->channels[i].max_power = geo->a[i].max_power;
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index dd6c64a..88e3ad2 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -1336,6 +1336,10 @@ static void qbuf_scan(struct orinoco_private *priv, void *buf,
unsigned long flags;
sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
+ if (!sd) {
+ printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
+ return;
+ }
sd->buf = buf;
sd->len = len;
sd->type = type;
@@ -1353,6 +1357,10 @@ static void qabort_scan(struct orinoco_private *priv)
unsigned long flags;
sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
+ if (!sd) {
+ printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
+ return;
+ }
sd->len = -1; /* Abort */
spin_lock_irqsave(&priv->scan_lock, flags);
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 33cd169..c70e176 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -370,7 +370,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
*/
drv_sw_scan_start(local);
- local->leave_oper_channel_time = 0;
+ local->leave_oper_channel_time = jiffies;
local->next_scan_state = SCAN_DECISION;
local->scan_channel_idx = 0;
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related
* Re: TCP_MAXSEG option with TSO enabled
From: Rick Jones @ 2012-03-30 17:38 UTC (permalink / raw)
To: Daniel Baluta; +Cc: netdev
In-Reply-To: <CAEnQRZC1sLW8BUOx2ov-S-UUSyfAi7Wem2mAzUHBHn2o9q-eRg@mail.gmail.com>
On 03/30/2012 04:33 AM, Daniel Baluta wrote:
> Hello,
>
> I am using TCP_MAXSEG option on an interface which has TSO enabled.
>
> strace output for connection looks as follows:
>
> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 26
> setsockopt(26, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> setsockopt(26, SOL_TCP, TCP_NODELAY, [1], 4) = 0
> setsockopt(26, SOL_TCP, TCP_MAXSEG, [300], 4) = 0
> connect(26, {sa_family=AF_INET, sin_port=htons(1935),
> sin_addr=inet_addr("10.10.0.1")}, 16) = -1 EINPROGRESS (Operation now
> in progress)
>
> I can see that MSS (300) is advertised in SYN packet, anyhow capturing
> the traffic
> I notice that are some TCP segments with length greater than MSS.
>
> Is this normal taking in consideration that TSO is enabled?
I would think so. What do the netstat stats suggest for segments and
bytes per segment when you are running your test? You could always look
for an on-the-wire packet trace.
Not sure that a trace on a receiver would give you that though - the
inbound promiscuous tap may be above GRO (and almost certainly will be
above LRO)
rick jones
>
> thanks,
> Daniel.
> --
> 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] sky2: fix missing register reset on error path in sky2_test_msi()
From: Lino Sanfilippo @ 2012-03-30 17:36 UTC (permalink / raw)
To: shemminger; +Cc: linux-kernel, netdev
In sky2_test_msi() the temporarily set SW IRQ in B0 register is not reset in case
that request_irq() fails.
With this patch we only set the interrupt mask if request_irq() was successful.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
---
This applies against 3.3
drivers/net/ethernet/marvell/sky2.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 760c2b1..0e23ce4 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -4795,14 +4795,14 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
init_waitqueue_head(&hw->msi_wait);
- sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
-
err = request_irq(pdev->irq, sky2_test_intr, 0, DRV_NAME, hw);
if (err) {
dev_err(&pdev->dev, "cannot assign irq %d\n", pdev->irq);
return err;
}
+ sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
+
sky2_write8(hw, B0_CTST, CS_ST_SW_IRQ);
sky2_read8(hw, B0_CTST);
--
1.5.6.5
^ permalink raw reply related
* [PATCH] sky2: dont overwrite settings for PHY Quick link
From: Lino Sanfilippo @ 2012-03-30 17:28 UTC (permalink / raw)
To: shemminger; +Cc: netdev, linux-kernel
This patch corrects a bug in function sky2_open() of the Marvell Yukon 2 driver
in which the settings for PHY quick link are overwritten.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
---
This applies against 3.3
drivers/net/ethernet/marvell/sky2.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 760c2b1..d0132d8 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -1756,13 +1756,14 @@ static int sky2_open(struct net_device *dev)
sky2_hw_up(sky2);
+ /* Enable interrupts from phy/mac for port */
+ imask = sky2_read32(hw, B0_IMSK);
+
if (hw->chip_id == CHIP_ID_YUKON_OPT ||
hw->chip_id == CHIP_ID_YUKON_PRM ||
hw->chip_id == CHIP_ID_YUKON_OP_2)
imask |= Y2_IS_PHY_QLNK; /* enable PHY Quick Link */
- /* Enable interrupts from phy/mac for port */
- imask = sky2_read32(hw, B0_IMSK);
imask |= portirq_msk[port];
sky2_write32(hw, B0_IMSK, imask);
sky2_read32(hw, B0_IMSK);
--
1.5.6.5
^ permalink raw reply related
* Re: [PATCH] net: add QCA alx Ethernet driver
From: Luis R. Rodriguez @ 2012-03-30 17:10 UTC (permalink / raw)
To: David Miller
Cc: xiong, netdev, linux-kernel, qca-linux-team, nic-devel, kgiori,
chris.snook, mathieu, bryanh, Jesper Andersen, Julia Lawall
In-Reply-To: <CAB=NE6W-CYjEhbfYOv7XqXFGvdhZxRECqfAmgouaa5_j45gnOQ@mail.gmail.com>
On Wed, Mar 21, 2012 at 6:28 PM, Luis R. Rodriguez
<rodrigue@qca.qualcomm.com> wrote:
> On Tue, Feb 28, 2012 at 7:32 PM, David Miller <davem@davemloft.net> wrote:
>> From: "Huang, Xiong" <xiong@qca.qualcomm.com>
>> Date: Wed, 29 Feb 2012 03:11:14 +0000
>>
>>> We understand your concern. To support the new chipset, do you
>>> think it's reasonable to upstream it as a new driver, not a
>>> replacement ?
>>
>> It depends upon how similar the chips are.
>
> OK.
>
>> To be honest tg3, as one example, supports quite a large array of
>> different pieces of hardware that use the same logical core.
>
> At certain point it becomes a pain in the ass to support older
> chipsets, and simply easier to leave the older driver to rot.
>
>> So that would be my litmus test about how different a chip needs
>> to be to deserve an entirely new driver.
>
> Understood.
>
>> I strongly suggest you try to get atl1c working properly.
>
> This is what I have recommended since the alx driver was rejected, and
> our team has been working on the atl1c driver now but we need to get
> the legal approval to get contributions out to atl1c (I know this is
> silly, but hey just letting you know).
>
> Anyway, in the meantime another topic has creeped up, and that is to
> share with BSD and also help kill proprietary drivers [0]. Me and
> Adrian intend on sharing our thoughts on how we intend on doing this
> at LF collab but was in hopes we can use alx as a test case. We've
> gone back to the drawing board for another simple driver to test our
> work against but... we come back to alx.
>
> Would it be worthwhile to consider alx upstream only for the newer
> chipsets (regardless of the litmus test, which I do agree with on
> technical grounds) in consideration for helping pave the way on
> killing proprietary drivers?
>
> [0] https://events.linuxfoundation.org/events/collaboration-summit/rodriguez-chadd
David, please us know if you think the above reason is worthy for
consideration of alx upstream, if at least for the newer chipsets. Our
engineers are ready to work on either approach, and we have a approval
take either route now. The sharing benefits however would make this a
great case to work on for the above mentioned project.
Luis
^ permalink raw reply
* Re: [REGRESSION][PATCH] bpf_jit drops the ball on indirect negative mem references
From: Jan Seiffert @ 2012-03-30 15:51 UTC (permalink / raw)
To: Matt Evans
Cc: <netdev@vger.kernel.org>, Eric Dumazet,
<linux-kernel@vger.kernel.org>
In-Reply-To: <5D02999E-C16F-4D2B-9007-173AE054E614@ozlabs.org>
Matt Evans schrieb:
> Hi Jan,
>
> On 30 Mar 2012, at 14:42, Jan Seiffert <kaffeemonster@googlemail.com> wrote:
>
[snip]
>> Do you know where i can ping the powerpc guys a little bit harder?
>
> No need (unless you mean a different guy), I have enough guilt as it
> is! :) (Sorry for no response, am moving house and am netless.)
Oh, ok, didn't know.
> I skimmed your patches on my phone but hope to be in a state to
> review/test over the weekend or early next week. :)>>
It would be great if you could review it.
With pinging harder i meant to get anyone fluent in powerpc asm to look
at the changes i made in the asm. I think the stack setup I've done is wrong.
> Cheers,
>
> Matt
>
Greetings
Jan
>
[snip]
--
Real programmer are surprised when their
odometer does not flip over from 000009
to 00000A.
^ permalink raw reply
* [REGRESSION][PATCH V4 0/3] bpf jit drops the ball on negative memory references
From: Jan Seiffert @ 2012-03-30 15:00 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, linuxppc-dev, Matt Evans, Eric Dumazet,
David S. Miller
Consider the following test program:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <pcap-bpf.h>
#define die(x) do {perror(x); return 1;} while (0)
struct bpf_insn udp_filter[] = {
/* 0 */ BPF_STMT(BPF_LDX|BPF_W|BPF_IMM, -1048576+(0)), /* leax net[0] */
/* 1 */ BPF_STMT(BPF_LD|BPF_B|BPF_IND, 0), /* ldb [x+0] */
/* 2 */ BPF_STMT(BPF_RET|BPF_A, 0), /* ret a */
};
int main(int argc, char *argv[])
{
char buf[512];
struct sockaddr_in addr;
struct bpf_program prg;
socklen_t addr_s;
ssize_t res;
int fd;
addr.sin_family = AF_INET;
addr.sin_port = htons(5000);
addr.sin_addr.s_addr = 0;
addr_s = sizeof(addr);
prg.bf_len = sizeof(udp_filter)/sizeof(udp_filter[0]);
prg.bf_insns = udp_filter;
if(-1 == (fd = socket(AF_INET, SOCK_DGRAM, 0)))
die("socket");
if(-1 == bind(fd, (struct sockaddr *)&addr, sizeof(addr)))
die("bind");
if(-1 == setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &prg, sizeof(prg)))
die("setsockopt");
res = recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr *)&addr, &addr_s);
if(res != -1)
printf("packet received: %zi bytes\n", res);
else
die("recvfrom");
return 0;
}
when used with the bpf jit disabled works:
console 1 $ ./bpf
console 2 $ echo "hello" | nc -u localhost 5000
console 1: packet received: 6 bytes
When the bpf jit gets enabled (echo 100 >
/proc/sys/net/core/bpf_jit_enable) the same program stops working:
console 1 $ ./bpf
console 2 $ echo "hello" | nc -u localhost 5000
console 1:
The reason is that both jits (x86 and powerpc) do not handle negative
memory references like SKF_NET_OFF or SKF_LL_OFF, only the simple
ancillary data references are supported (by mapping to special
instructions).
In the case of an absolute reference, the jit aborts the translation
if a negative reference is seen, also a negative k on the indirect
load aborts the translation, but if X is negative to begin with, only
the error handler is reached at runtime which drops the whole packet.
Such a setup is useful to say filter bogus source addresses on an UDP
socket.
I propose the following patch series to fix this situation.
Patch 1 exports the helper function the interpreter uses.
Patch 2 incorporates the helper into the x86 jit (so it depends on patch 1).
Patch 3 incorporates the helper into the powerpc jit (so it depends on patch 1).
Lightly tested on x86, but the powerpc asm part is prop. wrong, could
need assistance.
Signed-of-by: Jan Seiffert <kaffeemonster@googlemail.com>
^ permalink raw reply
* [REGRESSION][PATCH V4 1/3] bpf jit: Make the filter.c::__load_pointer helper non-static for the jits
From: Jan Seiffert @ 2012-03-30 15:08 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, linuxppc-dev, Matt Evans, Eric Dumazet,
David S. Miller
In-Reply-To: <4F75CA89.4010709@googlemail.com>
The function is renamed to make it a little more clear what it does.
It is not added to any .h because it is not for general consumption, only for
bpf internal use (and so by the jits).
Signed-of-by: Jan Seiffert <kaffeemonster@googlemail.com>
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -40,8 +40,12 @@
#include <linux/reciprocal_div.h>
#include <linux/ratelimit.h>
-/* No hurry in this branch */
-static void *__load_pointer(const struct sk_buff *skb, int k, unsigned int size)
+/*
+ * No hurry in this branch
+ *
+ * Exported for the bpf jit load helper.
+ */
+void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, unsigned int size)
{
u8 *ptr = NULL;
@@ -60,7 +64,7 @@ static inline void *load_pointer(const struct sk_buff *skb, int k,
{
if (k >= 0)
return skb_header_pointer(skb, k, size, buffer);
- return __load_pointer(skb, k, size);
+ return bpf_internal_load_pointer_neg_helper(skb, k, size);
}
/**
^ permalink raw reply
* (unknown),
From: 2012 SCAM VICTIMS COMPENSATIONS PAYMENTS. @ 2012-03-30 16:40 UTC (permalink / raw)
2012 SCAM VICTIMS COMPENSATIONS PAYMENTS.
ECOWAS NATIONS STATE/UNITED NATIONS
YOUR REF/PAYMENTS CODE: ECB/06654 FOR $500,000 USD ONLY.
Dear Victims of scam,
This is to bring to your notice that our bank (ECOBANK INTL. PLC) is
delegated by the ECOWAS/UNITED NATIONS in Central Bank to compensate victims
of scam $500,000 (Five Hundred Thousand Dollars Only).
Your Name.___________________________
Address.___________________________
Phone .___________________________
Amount Defrauded.___________________________
Country.________________________
Send a copy of your response with the PAYMENT CODE
NUMBER(ECB/06654).
NAME: MR.CLEMENT SYLVANIUS
SCAMMED VICTIM/REF/PAYMENTS CODE:
ECB/06654 $500,000 USD.
Email: scamvictimstransfer_22@yahoo.co.jp
Yours Faithfully,
Mrs. Rosemary Peter
PUBLIC RELATIONS OFFICER
Copyright © 2012
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox