* Re: [PATCH RESEND] can: mcp251x: Replace power callbacks with regulator API
From: Alexander Shiyan @ 2013-08-17 4:30 UTC (permalink / raw)
To: Haojian Zhuang
Cc: Russell King, netdev, linux-can, Marc Kleine-Budde,
linux-arm-kernel, Eric Miao, Wolfgang Grandegger
In-Reply-To: <520EDDA8.6050309@gmail.com>
On Sat, 17 Aug 2013 10:19:20 +0800
Haojian Zhuang <haojian.zhuang@gmail.com> wrote:
> On 08/09/2013 03:37 PM, Marc Kleine-Budde wrote:
> > On 08/08/2013 02:00 PM, Alexander Shiyan wrote:
> >> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> >> ---
> >> arch/arm/mach-pxa/icontrol.c | 3 --
> >> arch/arm/mach-pxa/zeus.c | 46 ++++++++++----------
> >
> > What's pxa's status of DT conversion? Do you (still) accept patches to
> > board files?
> >
> > Marc
> >
>
> Since DT conversion isn't finished, I still accept the board files.
> But this patch should be split into two parts. One is for pxa, and the
> other one is for net.
Patch cannot be splitted because this can create hole which break git-bisect.
In any case, I want to create a v2 with a more detailed description, and I
have a supplementary question for the CAN subsystem maintainers.
"Transciever power" is not used by any of the boards, can we remove it
completely? This will greatly simplify driver.
Thanks.
--
Alexander Shiyan <shc_work@mail.ru>
^ permalink raw reply
* [PATCH net-next 1/2 ] ipv6: convert the uses of ADBG and remove the superfluous parentheses
From: Ding Tianhong @ 2013-08-17 2:27 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, Joe Perches, Netdev
Just follow the Joe Perches's opinion, it is a better way to fix the
style errors.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Cc: Joe Perches <joe@perches.com>
---
net/ipv6/addrconf.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 7b55464..734724c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -99,9 +99,9 @@
#define ACONF_DEBUG 2
#if ACONF_DEBUG >= 3
-#define ADBG(x) printk x
+#define ADBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
#else
-#define ADBG(x)
+#define ADBG(fmt, ...) do { if (0) printk(fmt, ##__VA_ARGS__); } while (0)
#endif
#define INFINITY_LIFE_TIME 0xFFFFFFFF
@@ -369,9 +369,9 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
dev_hold(dev);
if (snmp6_alloc_dev(ndev) < 0) {
- ADBG((KERN_WARNING
+ ADBG(KERN_WARNING
"%s: cannot allocate memory for statistics; dev=%s.\n",
- __func__, dev->name));
+ __func__, dev->name);
neigh_parms_release(&nd_tbl, ndev->nd_parms);
dev_put(dev);
kfree(ndev);
@@ -379,9 +379,9 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
}
if (snmp6_register_dev(ndev) < 0) {
- ADBG((KERN_WARNING
+ ADBG(KERN_WARNING
"%s: cannot create /proc/net/dev_snmp6/%s\n",
- __func__, dev->name));
+ __func__, dev->name);
neigh_parms_release(&nd_tbl, ndev->nd_parms);
ndev->dead = 1;
in6_dev_finish_destroy(ndev);
@@ -844,7 +844,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
/* Ignore adding duplicate addresses on an interface */
if (ipv6_chk_same_addr(dev_net(idev->dev), addr, idev->dev)) {
- ADBG(("ipv6_add_addr: already assigned\n"));
+ ADBG("ipv6_add_addr: already assigned\n");
err = -EEXIST;
goto out;
}
@@ -852,7 +852,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
ifa = kzalloc(sizeof(struct inet6_ifaddr), GFP_ATOMIC);
if (ifa == NULL) {
- ADBG(("ipv6_add_addr: malloc failed\n"));
+ ADBG("ipv6_add_addr: malloc failed\n");
err = -ENOBUFS;
goto out;
}
@@ -2070,7 +2070,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
pinfo = (struct prefix_info *) opt;
if (len < sizeof(struct prefix_info)) {
- ADBG(("addrconf: prefix option too short\n"));
+ ADBG("addrconf: prefix option too short\n");
return;
}
@@ -3650,8 +3650,8 @@ restart:
if (time_before(next_sched, jiffies + ADDRCONF_TIMER_FUZZ_MAX))
next_sched = jiffies + ADDRCONF_TIMER_FUZZ_MAX;
- ADBG((KERN_DEBUG "now = %lu, schedule = %lu, rounded schedule = %lu => %lu\n",
- now, next, next_sec, next_sched));
+ ADBG(KERN_DEBUG "now = %lu, schedule = %lu, rounded schedule = %lu => %lu\n",
+ now, next, next_sec, next_sched);
addr_chk_timer.expires = next_sched;
add_timer(&addr_chk_timer);
--
1.8.2.1
^ permalink raw reply related
* [PATCH net-next 2/2] ipv6: fix checkpatch errors in net/ipv6/addrconf.c
From: Ding Tianhong @ 2013-08-17 2:27 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, Netdev
ERROR: code indent should use tabs where possible: fix 2.
ERROR: do not use assignment in if condition: fix 5.
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
---
net/ipv6/addrconf.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 734724c..00e3fdc 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1105,8 +1105,8 @@ retry:
spin_unlock_bh(&ifp->lock);
regen_advance = idev->cnf.regen_max_retry *
- idev->cnf.dad_transmits *
- idev->nd_parms->retrans_time / HZ;
+ idev->cnf.dad_transmits *
+ idev->nd_parms->retrans_time / HZ;
write_unlock(&idev->lock);
/* A temporary address is created only if this calculated Preferred
@@ -2514,7 +2514,8 @@ static int inet6_addr_del(struct net *net, int ifindex, const struct in6_addr *p
if (!dev)
return -ENODEV;
- if ((idev = __in6_dev_get(dev)) == NULL)
+ idev = __in6_dev_get(dev);
+ if (!idev)
return -ENXIO;
read_lock_bh(&idev->lock);
@@ -2653,7 +2654,8 @@ static void init_loopback(struct net_device *dev)
ASSERT_RTNL();
- if ((idev = ipv6_find_idev(dev)) == NULL) {
+ idev = ipv6_find_idev(dev);
+ if (!idev) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
@@ -2751,7 +2753,8 @@ static void addrconf_sit_config(struct net_device *dev)
* our v4 addrs in the tunnel
*/
- if ((idev = ipv6_find_idev(dev)) == NULL) {
+ idev = ipv6_find_idev(dev);
+ if (!idev) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
@@ -2783,7 +2786,8 @@ static void addrconf_gre_config(struct net_device *dev)
ASSERT_RTNL();
- if ((idev = ipv6_find_idev(dev)) == NULL) {
+ idev = ipv6_find_idev(dev);
+ if (!idev) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
@@ -2814,11 +2818,11 @@ static void ip6_tnl_add_linklocal(struct inet6_dev *idev)
struct net *net = dev_net(idev->dev);
/* first try to inherit the link-local address from the link device */
- if (idev->dev->iflink &&
- (link_dev = __dev_get_by_index(net, idev->dev->iflink))) {
- if (!ipv6_inherit_linklocal(idev, link_dev))
+ if (idev->dev->iflink)
+ link_dev = __dev_get_by_index(net, idev->dev->iflink);
+ if (link_dev && !ipv6_inherit_linklocal(idev, link_dev))
return;
- }
+
/* then try to inherit it from any device */
for_each_netdev(net, link_dev) {
if (!ipv6_inherit_linklocal(idev, link_dev))
--
1.8.2.1
^ permalink raw reply related
* Re: [PATCH net] ipv6: remove max_addresses check from ipv6_create_tempaddr
From: Ding Tianhong @ 2013-08-17 2:23 UTC (permalink / raw)
To: netdev, kargig, ppandit, yoshfuji
In-Reply-To: <20130816110226.GB2112@order.stressinduktion.org>
On 2013/8/16 19:02, Hannes Frederic Sowa wrote:
> Because of the max_addresses check attackers were able to disable privacy
> extensions on an interface by creating enough autoconfigured addresses:
>
> <http://seclists.org/oss-sec/2012/q4/292>
>
> But the check is not actually needed: max_addresses protects the
> kernel to install too many ipv6 addresses on an interface and guards
> addrconf_prefix_rcv to install further addresses as soon as this limit
> is reached. We only generate temporary addresses in direct response of
> a new address showing up. As soon as we filled up the maximum number of
> addresses of an interface, we stop installing more addresses and thus
> also stop generating more temp addresses.
>
> Even if the attacker tries to generate a lot of temporary addresses
> by announcing a prefix and removing it again (lifetime == 0) we won't
> install more temp addresses, because the temporary addresses do count
> to the maximum number of addresses, thus we would stop installing new
> autoconfigured addresses when the limit is reached.
>
> This patch fixes CVE-2013-0343 (but other layer-2 attacks are still
> possible).
>
> Thanks to Ding Tianhong to bring this topic up again.
>
> Cc: Ding Tianhong <dingtianhong@huawei.com>
> Cc: George Kargiotakis <kargig@void.gr>
> Cc: P J P <ppandit@redhat.com>
> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> ---
> net/ipv6/addrconf.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index ad12f7c..6926b56 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -1131,12 +1131,10 @@ retry:
> if (ifp->flags & IFA_F_OPTIMISTIC)
> addr_flags |= IFA_F_OPTIMISTIC;
>
> - ift = !max_addresses ||
> - ipv6_count_addresses(idev) < max_addresses ?
> - ipv6_add_addr(idev, &addr, NULL, tmp_plen,
> - ipv6_addr_scope(&addr), addr_flags,
> - tmp_valid_lft, tmp_prefered_lft) : NULL;
> - if (IS_ERR_OR_NULL(ift)) {
> + ift = ipv6_add_addr(idev, &addr, NULL, tmp_plen,
> + ipv6_addr_scope(&addr), addr_flags,
> + tmp_valid_lft, tmp_prefered_lft);
> + if (IS_ERR(ift)) {
> in6_ifa_put(ifp);
> in6_dev_put(idev);
> pr_info("%s: retry temporary address regeneration\n", __func__);
>
Acked-by: Ding Tianhong <dingtianhong@huawei.com>
^ permalink raw reply
* Re: [PATCH RESEND] can: mcp251x: Replace power callbacks with regulator API
From: Haojian Zhuang @ 2013-08-17 2:19 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: Alexander Shiyan, linux-can, netdev, Wolfgang Grandegger,
linux-arm-kernel, Eric Miao, Russell King
In-Reply-To: <52049C44.6030902@pengutronix.de>
On 08/09/2013 03:37 PM, Marc Kleine-Budde wrote:
> On 08/08/2013 02:00 PM, Alexander Shiyan wrote:
>> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
>> ---
>> arch/arm/mach-pxa/icontrol.c | 3 --
>> arch/arm/mach-pxa/zeus.c | 46 ++++++++++----------
>
> What's pxa's status of DT conversion? Do you (still) accept patches to
> board files?
>
> Marc
>
Since DT conversion isn't finished, I still accept the board files.
But this patch should be split into two parts. One is for pxa, and the
other one is for net.
Regards
Haojian
^ permalink raw reply
* Re: [PATCH RESEND] can: mcp251x: Replace power callbacks with regulator API
From: Haojian Zhuang @ 2013-08-17 2:03 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: Alexander Shiyan, linux-can, netdev, Wolfgang Grandegger,
linux-arm-kernel, Eric Miao, Russell King
In-Reply-To: <52049C44.6030902@pengutronix.de>
On 08/09/2013 03:37 PM, Marc Kleine-Budde wrote:
> On 08/08/2013 02:00 PM, Alexander Shiyan wrote:
>> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
>> ---
>> arch/arm/mach-pxa/icontrol.c | 3 --
>> arch/arm/mach-pxa/zeus.c | 46 ++++++++++----------
>
> What's pxa's status of DT conversion? Do you (still) accept patches to
> board files?
>
> Marc
>
Since DT conversion isn't finished, I still accept the board files.
But this patch should be split into two parts. One is for pxa, and the
other one is for net.
Regards
Haojian
^ permalink raw reply
* [PATCH 1/2] sundance: add netconsole support
From: Denis Kirjanov @ 2013-08-16 16:32 UTC (permalink / raw)
To: netdev, davem; +Cc: Denis Kirjanov
add netconsole logging support
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
---
drivers/net/ethernet/dlink/sundance.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/dlink/sundance.c b/drivers/net/ethernet/dlink/sundance.c
index 50d9c63..2688a84 100644
--- a/drivers/net/ethernet/dlink/sundance.c
+++ b/drivers/net/ethernet/dlink/sundance.c
@@ -469,6 +469,17 @@ static void sundance_reset(struct net_device *dev, unsigned long reset_cmd)
}
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void sundance_poll_controller(struct net_device *dev)
+{
+ struct netdev_private *np = netdev_priv(dev);
+
+ disable_irq(np->pci_dev->irq);
+ intr_handler(np->pci_dev->irq, dev);
+ enable_irq(np->pci_dev->irq);
+}
+#endif
+
static const struct net_device_ops netdev_ops = {
.ndo_open = netdev_open,
.ndo_stop = netdev_close,
@@ -480,6 +491,9 @@ static const struct net_device_ops netdev_ops = {
.ndo_change_mtu = change_mtu,
.ndo_set_mac_address = sundance_set_mac_addr,
.ndo_validate_addr = eth_validate_addr,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = sundance_poll_controller,
+#endif
};
static int sundance_probe1(struct pci_dev *pdev,
--
1.8.0.2
^ permalink raw reply related
* Re: [PATCH 0/3] ixgbe: request_firmware for configuration parameters
From: Ali Ayoub @ 2013-08-17 0:18 UTC (permalink / raw)
To: Greg KH
Cc: Shannon Nelson, netdev, davem, dwmw2, jeffrey.t.kirsher,
linux-kernel
In-Reply-To: <20130816223932.GB31247@kroah.com>
On 8/16/2013 3:39 PM, Greg KH wrote:
> On Fri, Aug 16, 2013 at 03:14:31PM -0700, Ali Ayoub wrote:
>> On 1/11/2013 11:41 AM, Greg KH wrote:
>
> Seriously? Restarting a thread from over 6 months ago?
Yes, it's an old thread, but still relevant for current code.
> Why?
Because currently there is no good alternative for module params for
device drivers that need to have low level configs in init time.
I found Shannon proposal in this thread the closest to what I am looking
for to configure the device driver and yet not to use module params.
Thus, pinged this thread.
>> Other device drivers of other vendors (not only netdevs) need such a
>> mechanism as well,
>
> Specifics please.
>
>> I think it's a general requirement for many drivers that normally need
>> low level configurations for device initialization in the very first
>> stage of the driver load.
>
> I do not, but feel free to prove me otherwise.
A driver that claims the PCI device needs some configuration in init
time such as: amount of resources to be allocated in the cache,
interrupt mode, maximum allowed resources to be created for a specific
type, number of event queues, etc. See for example:
/drivers/net/ethernet/mellanox/mlx4/main.c
This driver doesn't necessary register a logical device, it may claim
the PCI device only (e.g. for an HCA), and provide an infrastructure for
upper layer protocols to register a logical device (nic, hba, etc.) on
top of it.
The type of configuration needed varies between vendors, and they are
normally passed in HW initialization stage. So even if we have a tool to
configure the device (such as ethtool for netdevs) it wouldn't be a
replacement for the module param, because some systems requires
non-default (init) configurations, and if we load the driver with the
default, and then use a user-space tool to "adjust" the configuration
we'll have a "glitch" where the driver was loaded with unsuitable
configs for the system.
>>> All of the above issues you seem to have with sysfs and configfs can be
>>> resolved with userspace code, and having your driver not do anything to
>>> the hardware until it is told to by userspace.
>>
>> To tell the driver not to do anything until it's configured by a
>> userspace code will require a module param for non-default-configs
>> (which brings us back to the original argument of avoiding module params).
>
> No, never use a module paramater for configuring a driver or a device.
> That's not what they are there for.
>
>> By having userspace code to feed configfs/sysfs nodes, and making it
>> available in initrd; we will end up having similar mechanism to
>> request_firmware().
>
> Close, but not the same. That's why we created configfs, please use it.
configfs requires from the driver to provide the hooks before the HW is
initialized, while module params allow passing information to the driver
in init time before any driver hooks are ready.
The proposal of changing the driver not to configure the HW until it's
triggered by userspace service through configfs, means that we need:
a. To have driver config to toggle between the mode where the driver
"waits" for configfs, and the "auto" mode where the driver loads with
the default-configs (when using mod params for example, the driver
simply loads with the defaults when there is modprobe config files).
b. To have the userspace mechanism to feed the configs nodes, to store
the configs in a file to keep them persistent between reboots, and make
these userspace services available in initrd.
I don't see how this is better than module params, or
request_firmware_config().
^ permalink raw reply
* Re: [PATCH net-next 1/2] net-next: sundance: Add netconsole logging support
From: Sergei Shtylyov @ 2013-08-16 23:46 UTC (permalink / raw)
To: Denis Kirjanov; +Cc: netdev, davem
In-Reply-To: <1376672417-2798-1-git-send-email-kda@linux-powerpc.org>
Hello.
On 08/16/2013 09:00 PM, Denis Kirjanov wrote:
I'd rather name the patch "sundance: add netpoll support". "net-next:"
shouldn't be there twice definitely.
> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
> ---
> drivers/net/ethernet/dlink/sundance.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
> diff --git a/drivers/net/ethernet/dlink/sundance.c b/drivers/net/ethernet/dlink/sundance.c
> index 50d9c63..2688a84 100644
> --- a/drivers/net/ethernet/dlink/sundance.c
> +++ b/drivers/net/ethernet/dlink/sundance.c
[...]
> @@ -480,6 +491,9 @@ static const struct net_device_ops netdev_ops = {
> .ndo_change_mtu = change_mtu,
> .ndo_set_mac_address = sundance_set_mac_addr,
> .ndo_validate_addr = eth_validate_addr,
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> + .ndo_poll_controller = sundance_poll_controller,
Could you align = here with the reset of initializers?
> +#endif
WBR, Sergei
^ permalink raw reply
* Re: Provide ability to change default netdev name?
From: Ben Greear @ 2013-08-16 23:48 UTC (permalink / raw)
To: Ben Hutchings; +Cc: netdev
In-Reply-To: <1376696468.11042.74.camel@deadeye.wl.decadent.org.uk>
On 08/16/2013 04:41 PM, Ben Hutchings wrote:
> On Fri, 2013-08-16 at 15:14 -0700, Ben Greear wrote:
>> The latest udev in Fedora 19 (and perhaps elsewhere) will no longer
>> implement rules that rename an interface from ethX to ethY. Nor
>> wlanX or other 'kernel namespaces'. The Fedora udev developers do not seem
>> interested in changing this back to the old behaviour, evidently they
>> had a hard time implementing it properly.
>
> There is an inherent problem that a new device can appear at any time
> under the exact name udev is trying to rename to. I expect it is
> possible to do this properly but may be quite difficult to eliminate the
> possibility of deadlock.
>
> Still, if udev actively refuses to use the 'kernel namespaces' (rather
> than just being configured not to), that would be a bug.
I agree, but the Fedora udev developers do not. I'm not sure
if other distros will follow or not.
>> This effectively makes it impossible to have network device names of ethX
>> consistent across reboots in systems with multiple NICs and/or drivers.
>>
>> One way to work around this would be allow the kernel to use a different
>> default netdev name (for instance, keth%d). I'm thinking this would be
>> configured as a kernel command line argument. Then, a small change to udev/systemd to
>> make the 'kernel namespaces' configurable by letting it understand this new kernel
>> command line argument should resolve the problem.
>>
>> Does this sound like something that could be accepted upstream?
>
> This sounds completely ridiculous.
Yeah, seems lame to hack around funky user-space, but
if udev folks will truly not fix this, then life is
going to suck for users wanting to use 'ethX' naming
schemes for their network devices.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH -next] vxlan: using kfree_rcu() to simplify the code
From: Stephen Hemminger @ 2013-08-16 23:45 UTC (permalink / raw)
To: Wei Yongjun; +Cc: davem, pshelar, mike.rapoport, amwang, yongjun_wei, netdev
In-Reply-To: <CAPgLHd8gtuhjrPP-t0dHGj_BDY5WqqX-QQbHpNK+0gPpuSN9LQ@mail.gmail.com>
On Sat, 17 Aug 2013 07:32:09 +0800
Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> The callback function of call_rcu() just calls a kfree(), so we
> can use kfree_rcu() instead of call_rcu() + callback function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/vxlan.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 227b54a..d6fc046 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -498,12 +498,6 @@ static int vxlan_fdb_create(struct vxlan_dev *vxlan,
> return 0;
> }
>
> -static void vxlan_fdb_free_rdst(struct rcu_head *head)
> -{
> - struct vxlan_rdst *rd = container_of(head, struct vxlan_rdst, rcu);
> - kfree(rd);
> -}
> -
> static void vxlan_fdb_free(struct rcu_head *head)
> {
> struct vxlan_fdb *f = container_of(head, struct vxlan_fdb, rcu);
> @@ -643,7 +637,7 @@ static int vxlan_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
> */
> if (rd && !list_is_singular(&f->remotes)) {
> list_del_rcu(&rd->list);
> - call_rcu(&rd->rcu, vxlan_fdb_free_rdst);
> + kfree_rcu(rd, rcu);
> goto out;
> }
>
>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply
* [PATCH net-next 4/5] qlcnic: Add support for 84xx adapters to load firmware from file
From: Himanshu Madhani @ 2013-08-16 23:07 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Pratik Pujar, himanshu.madhani
In-Reply-To: <cover.1376720973.git.himanshu.madhani@qlogic.com>
From: Pratik Pujar <pratik.pujar@qlogic.com>
o Use appropriate firmware image file name based on device IDs.
Signed-off-by: Pratik Pujar <pratik.pujar@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 2 ++
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 28 ++++++++++++++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
index b89b074..d4c58c6 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
@@ -84,9 +84,11 @@
/* Firmware image definitions */
#define QLC_83XX_BOOTLOADER_FLASH_ADDR 0x10000
#define QLC_83XX_FW_FILE_NAME "83xx_fw.bin"
+#define QLC_84XX_FW_FILE_NAME "84xx_fw.bin"
#define QLC_83XX_BOOT_FROM_FLASH 0
#define QLC_83XX_BOOT_FROM_FILE 0x12345678
+#define QLC_FW_FILE_NAME_LEN 20
#define QLC_83XX_MAX_RESET_SEQ_ENTRIES 16
#define QLC_83XX_MBX_POST_BC_OP 0x1
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
index 17c26a1..8efbc131 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
@@ -1947,12 +1947,36 @@ static void qlcnic_83xx_init_hw(struct qlcnic_adapter *p_dev)
dev_err(&p_dev->pdev->dev, "%s: failed\n", __func__);
}
+static inline void qlcnic_83xx_get_fw_file_name(struct qlcnic_adapter *adapter,
+ char *file_name)
+{
+ struct pci_dev *pdev = adapter->pdev;
+
+ memset(file_name, 0, QLC_FW_FILE_NAME_LEN);
+
+ switch (pdev->device) {
+ case PCI_DEVICE_ID_QLOGIC_QLE834X:
+ strncpy(file_name, QLC_83XX_FW_FILE_NAME,
+ QLC_FW_FILE_NAME_LEN);
+ break;
+ case PCI_DEVICE_ID_QLOGIC_QLE844X:
+ strncpy(file_name, QLC_84XX_FW_FILE_NAME,
+ QLC_FW_FILE_NAME_LEN);
+ break;
+ default:
+ dev_err(&pdev->dev, "%s: Invalid device id\n",
+ __func__);
+ }
+}
+
static int qlcnic_83xx_load_fw_image_from_host(struct qlcnic_adapter *adapter)
{
+ char fw_file_name[QLC_FW_FILE_NAME_LEN];
int err = -EIO;
- if (request_firmware(&adapter->ahw->fw_info.fw,
- QLC_83XX_FW_FILE_NAME, &(adapter->pdev->dev))) {
+ qlcnic_83xx_get_fw_file_name(adapter, fw_file_name);
+ if (request_firmware(&adapter->ahw->fw_info.fw, fw_file_name,
+ &(adapter->pdev->dev))) {
dev_err(&adapter->pdev->dev,
"No file FW image, loading flash FW image.\n");
QLC_SHARED_REG_WR32(adapter, QLCNIC_FW_IMG_VALID,
--
1.8.1.4
^ permalink raw reply related
* Re: [PATCH] r8169: fix invalid register dump
From: Peter Wu @ 2013-08-16 22:58 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Francois Romieu, netdev, nic_swsd
In-Reply-To: <1376598795.11042.1.camel@deadeye.wl.decadent.org.uk>
On Thursday 15 August 2013 22:33:15 Ben Hutchings wrote:
> The kernel buffer size is max(regs->len,
> dev->ethtool_ops->get_regs_len()). So you can safely ignore regs->len
> and always read all your registers.
I see, that is something for a different patch though. While I am at it,
I checked all users of get_regs_len in drivers/net and found only one
other user that also checked the length. Patch will follow shortly.
^ permalink raw reply
* [PATCH -next] vxlan: using kfree_rcu() to simplify the code
From: Wei Yongjun @ 2013-08-16 23:32 UTC (permalink / raw)
To: davem, stephen, pshelar, mike.rapoport, amwang; +Cc: yongjun_wei, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
The callback function of call_rcu() just calls a kfree(), so we
can use kfree_rcu() instead of call_rcu() + callback function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/vxlan.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 227b54a..d6fc046 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -498,12 +498,6 @@ static int vxlan_fdb_create(struct vxlan_dev *vxlan,
return 0;
}
-static void vxlan_fdb_free_rdst(struct rcu_head *head)
-{
- struct vxlan_rdst *rd = container_of(head, struct vxlan_rdst, rcu);
- kfree(rd);
-}
-
static void vxlan_fdb_free(struct rcu_head *head)
{
struct vxlan_fdb *f = container_of(head, struct vxlan_fdb, rcu);
@@ -643,7 +637,7 @@ static int vxlan_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
*/
if (rd && !list_is_singular(&f->remotes)) {
list_del_rcu(&rd->list);
- call_rcu(&rd->rcu, vxlan_fdb_free_rdst);
+ kfree_rcu(rd, rcu);
goto out;
}
^ permalink raw reply related
* [PATCH] r8169,sis190: remove unnecessary length check
From: Peter Wu @ 2013-08-16 23:07 UTC (permalink / raw)
To: Ben Hutchings, Francois Romieu; +Cc: lekensteyn, netdev
The ethtool core will lower the requested length to the one returned by
get_regs_len, therefore no additional check is needed in the get_regs
function.
Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Peter Wu <lekensteyn@gmail.com>
---
Hi,
This was observed by Ben[1] while reviewing my other r8169 register dump
patch. I have combined the r8169 and sis190 patches since they were
trivial and both maintained by Francois. Let me know if you prefer to
split this trivial patch up.
Regards,
Peter
[1]: http://www.spinics.net/lists/netdev/msg246690.html
---
drivers/net/ethernet/realtek/r8169.c | 3 ---
drivers/net/ethernet/sis/sis190.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index b5eb419..93ee49d 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -1898,9 +1898,6 @@ static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs,
{
struct rtl8169_private *tp = netdev_priv(dev);
- if (regs->len > R8169_REGS_SIZE)
- regs->len = R8169_REGS_SIZE;
-
rtl_lock_work(tp);
memcpy_fromio(p, tp->mmio_addr, regs->len);
rtl_unlock_work(tp);
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index 02df089..ee18e6f 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -1770,9 +1770,6 @@ static void sis190_get_regs(struct net_device *dev, struct ethtool_regs *regs,
struct sis190_private *tp = netdev_priv(dev);
unsigned long flags;
- if (regs->len > SIS190_REGS_SIZE)
- regs->len = SIS190_REGS_SIZE;
-
spin_lock_irqsave(&tp->lock, flags);
memcpy_fromio(p, tp->mmio_addr, regs->len);
spin_unlock_irqrestore(&tp->lock, flags);
--
1.8.3.4
^ permalink raw reply related
* [PATCH net-next 3/5] qlcnic: Loopback Inter Driver Communication AEN handler
From: Himanshu Madhani @ 2013-08-16 23:07 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Manish Chopra, himanshu.madhani
In-Reply-To: <cover.1376720973.git.himanshu.madhani@qlogic.com>
From: Manish Chopra <manish.chopra@qlogic.com>
o Loopback initiator function drivers should process loopback time extend AEN.
These AENs are triggered by the loopback time extend mailbox command
issued by the target function drivers.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 +
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 45 +++++++++++++++++-----
2 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 9ae5d2e..86dd695 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -467,6 +467,7 @@ struct qlcnic_hardware_context {
u32 mbox_aen[QLC_83XX_MBX_AEN_CNT];
u32 mbox_reg[4];
struct qlcnic_mailbox *mailbox;
+ u8 extend_lb_time;
};
struct qlcnic_adapter_stats {
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index 78ca755..6b8e903 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -860,9 +860,9 @@ static void qlcnic_83xx_handle_idc_comp_aen(struct qlcnic_adapter *adapter,
void __qlcnic_83xx_process_aen(struct qlcnic_adapter *adapter)
{
+ struct qlcnic_hardware_context *ahw = adapter->ahw;
u32 event[QLC_83XX_MBX_AEN_CNT];
int i;
- struct qlcnic_hardware_context *ahw = adapter->ahw;
for (i = 0; i < QLC_83XX_MBX_AEN_CNT; i++)
event[i] = readl(QLCNIC_MBX_FW(ahw, i));
@@ -882,6 +882,7 @@ void __qlcnic_83xx_process_aen(struct qlcnic_adapter *adapter)
&adapter->idc_aen_work, 0);
break;
case QLCNIC_MBX_TIME_EXTEND_EVENT:
+ ahw->extend_lb_time = event[1] >> 8 & 0xf;
break;
case QLCNIC_MBX_BC_EVENT:
qlcnic_sriov_handle_bc_event(adapter, event[1]);
@@ -1706,13 +1707,28 @@ fail_diag_alloc:
return ret;
}
+static void qlcnic_extend_lb_idc_cmpltn_wait(struct qlcnic_adapter *adapter,
+ u32 *max_wait_count)
+{
+ struct qlcnic_hardware_context *ahw = adapter->ahw;
+ int temp;
+
+ netdev_info(adapter->netdev, "Recieved loopback IDC time extend event for 0x%x seconds\n",
+ ahw->extend_lb_time);
+ temp = ahw->extend_lb_time * 1000;
+ *max_wait_count += temp / QLC_83XX_LB_MSLEEP_COUNT;
+ ahw->extend_lb_time = 0;
+}
+
int qlcnic_83xx_set_lb_mode(struct qlcnic_adapter *adapter, u8 mode)
{
struct qlcnic_hardware_context *ahw = adapter->ahw;
struct net_device *netdev = adapter->netdev;
+ u32 config, max_wait_count;
int status = 0, loop = 0;
- u32 config;
+ ahw->extend_lb_time = 0;
+ max_wait_count = QLC_83XX_LB_WAIT_COUNT;
status = qlcnic_83xx_get_port_config(adapter);
if (status)
return status;
@@ -1754,9 +1770,14 @@ int qlcnic_83xx_set_lb_mode(struct qlcnic_adapter *adapter, u8 mode)
clear_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status);
return -EBUSY;
}
- if (loop++ > QLC_83XX_LB_WAIT_COUNT) {
- netdev_err(netdev,
- "Did not receive IDC completion AEN\n");
+
+ if (ahw->extend_lb_time)
+ qlcnic_extend_lb_idc_cmpltn_wait(adapter,
+ &max_wait_count);
+
+ if (loop++ > max_wait_count) {
+ netdev_err(netdev, "%s: Did not receive loopback IDC completion AEN\n",
+ __func__);
clear_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status);
qlcnic_83xx_clear_lb_mode(adapter, mode);
return -ETIMEDOUT;
@@ -1771,10 +1792,12 @@ int qlcnic_83xx_set_lb_mode(struct qlcnic_adapter *adapter, u8 mode)
int qlcnic_83xx_clear_lb_mode(struct qlcnic_adapter *adapter, u8 mode)
{
struct qlcnic_hardware_context *ahw = adapter->ahw;
+ u32 config = ahw->port_config, max_wait_count;
struct net_device *netdev = adapter->netdev;
int status = 0, loop = 0;
- u32 config = ahw->port_config;
+ ahw->extend_lb_time = 0;
+ max_wait_count = QLC_83XX_LB_WAIT_COUNT;
set_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status);
if (mode == QLCNIC_ILB_MODE)
ahw->port_config &= ~QLC_83XX_CFG_LOOPBACK_HSS;
@@ -1802,9 +1825,13 @@ int qlcnic_83xx_clear_lb_mode(struct qlcnic_adapter *adapter, u8 mode)
return -EBUSY;
}
- if (loop++ > QLC_83XX_LB_WAIT_COUNT) {
- netdev_err(netdev,
- "Did not receive IDC completion AEN\n");
+ if (ahw->extend_lb_time)
+ qlcnic_extend_lb_idc_cmpltn_wait(adapter,
+ &max_wait_count);
+
+ if (loop++ > max_wait_count) {
+ netdev_err(netdev, "%s: Did not receive loopback IDC completion AEN\n",
+ __func__);
clear_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status);
return -ETIMEDOUT;
}
--
1.8.1.4
^ permalink raw reply related
* [PATCH net-next 0/5] qlcnic: Enable support for 84xx Series adapter
From: Himanshu Madhani @ 2013-08-16 23:07 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Himanshu Madhani
From: Himanshu Madhani <himanshu.madhani@qlogic.com>
This patch series enables support for 84xx series adapters.
Please apply to net-next
Thanks,
Himanshu
Himanshu Madhani (1):
qlcnic: Update version to 5.3.47
Manish Chopra (3):
qlcnic: Enable support for 844X adapter
qlcnic: Add PVID support for 84xx adapters
qlcnic: Loopback Inter Driver Communication AEN handler
Pratik Pujar (1):
qlcnic: Add support for 84xx adapters to load firmware from file
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 21 +++++++---
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 45 +++++++++++++++++-----
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 3 ++
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 28 +++++++++++++-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 5 +--
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 11 ++++++
.../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 20 ++++++----
7 files changed, 105 insertions(+), 28 deletions(-)
--
1.8.1.4
^ permalink raw reply
* [PATCH net-next 1/5] qlcnic: Enable support for 844X adapter
From: Himanshu Madhani @ 2013-08-16 23:07 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Manish Chopra, himanshu.madhani
In-Reply-To: <cover.1376720973.git.himanshu.madhani@qlogic.com>
From: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 14 +++++++++++---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 5 +----
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 11 +++++++++++
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 7387354..9ae5d2e 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -1972,9 +1972,11 @@ extern const struct ethtool_ops qlcnic_ethtool_failed_ops;
__func__, ##_args); \
} while (0)
-#define PCI_DEVICE_ID_QLOGIC_QLE834X 0x8030
+#define PCI_DEVICE_ID_QLOGIC_QLE824X 0x8020
+#define PCI_DEVICE_ID_QLOGIC_QLE834X 0x8030
#define PCI_DEVICE_ID_QLOGIC_VF_QLE834X 0x8430
-#define PCI_DEVICE_ID_QLOGIC_QLE824X 0x8020
+#define PCI_DEVICE_ID_QLOGIC_QLE844X 0x8040
+#define PCI_DEVICE_ID_QLOGIC_VF_QLE844X 0x8440
static inline bool qlcnic_82xx_check(struct qlcnic_adapter *adapter)
{
@@ -1988,6 +1990,8 @@ static inline bool qlcnic_83xx_check(struct qlcnic_adapter *adapter)
bool status;
status = ((device == PCI_DEVICE_ID_QLOGIC_QLE834X) ||
+ (device == PCI_DEVICE_ID_QLOGIC_QLE844X) ||
+ (device == PCI_DEVICE_ID_QLOGIC_VF_QLE844X) ||
(device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X)) ? true : false;
return status;
@@ -2001,7 +2005,11 @@ static inline bool qlcnic_sriov_pf_check(struct qlcnic_adapter *adapter)
static inline bool qlcnic_sriov_vf_check(struct qlcnic_adapter *adapter)
{
unsigned short device = adapter->pdev->device;
+ bool status;
+
+ status = ((device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X) ||
+ (device == PCI_DEVICE_ID_QLOGIC_VF_QLE844X)) ? true : false;
- return (device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X) ? true : false;
+ return status;
}
#endif /* __QLCNIC_H_ */
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
index f807f3b..cec0908 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
@@ -147,10 +147,7 @@ static inline u8 qlcnic_mac_hash(u64 mac)
static inline u32 qlcnic_get_ref_handle(struct qlcnic_adapter *adapter,
u16 handle, u8 ring_id)
{
- unsigned short device = adapter->pdev->device;
-
- if ((device == PCI_DEVICE_ID_QLOGIC_QLE834X) ||
- (device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X))
+ if (qlcnic_83xx_check(adapter))
return handle | (ring_id << 15);
else
return handle;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index b8242bc..499c777 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -100,6 +100,8 @@ static DEFINE_PCI_DEVICE_TABLE(qlcnic_pci_tbl) = {
ENTRY(PCI_DEVICE_ID_QLOGIC_QLE824X),
ENTRY(PCI_DEVICE_ID_QLOGIC_QLE834X),
ENTRY(PCI_DEVICE_ID_QLOGIC_VF_QLE834X),
+ ENTRY(PCI_DEVICE_ID_QLOGIC_QLE844X),
+ ENTRY(PCI_DEVICE_ID_QLOGIC_VF_QLE844X),
{0,}
};
@@ -146,6 +148,11 @@ static const u32 qlcnic_reg_tbl[] = {
static const struct qlcnic_board_info qlcnic_boards[] = {
{ PCI_VENDOR_ID_QLOGIC,
+ PCI_DEVICE_ID_QLOGIC_QLE844X,
+ 0x0,
+ 0x0,
+ "8400 series 10GbE Converged Network Adapter (TCP/IP Networking)" },
+ { PCI_VENDOR_ID_QLOGIC,
PCI_DEVICE_ID_QLOGIC_QLE834X,
PCI_VENDOR_ID_QLOGIC,
0x24e,
@@ -829,7 +836,9 @@ static void qlcnic_get_bar_length(u32 dev_id, ulong *bar)
*bar = QLCNIC_82XX_BAR0_LENGTH;
break;
case PCI_DEVICE_ID_QLOGIC_QLE834X:
+ case PCI_DEVICE_ID_QLOGIC_QLE844X:
case PCI_DEVICE_ID_QLOGIC_VF_QLE834X:
+ case PCI_DEVICE_ID_QLOGIC_VF_QLE844X:
*bar = QLCNIC_83XX_BAR0_LENGTH;
break;
default:
@@ -2048,9 +2057,11 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
ahw->reg_tbl = (u32 *) qlcnic_reg_tbl;
break;
case PCI_DEVICE_ID_QLOGIC_QLE834X:
+ case PCI_DEVICE_ID_QLOGIC_QLE844X:
qlcnic_83xx_register_map(ahw);
break;
case PCI_DEVICE_ID_QLOGIC_VF_QLE834X:
+ case PCI_DEVICE_ID_QLOGIC_VF_QLE844X:
qlcnic_sriov_vf_register_map(ahw);
break;
default:
--
1.8.1.4
^ permalink raw reply related
* [PATCH net-next 5/5] qlcnic: Update version to 5.3.47
From: Himanshu Madhani @ 2013-08-16 23:07 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Himanshu Madhani
In-Reply-To: <cover.1376720973.git.himanshu.madhani@qlogic.com>
From: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 86dd695..3dcc666 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -36,9 +36,9 @@
#include "qlcnic_83xx_hw.h"
#define _QLCNIC_LINUX_MAJOR 5
-#define _QLCNIC_LINUX_MINOR 2
-#define _QLCNIC_LINUX_SUBVERSION 46
-#define QLCNIC_LINUX_VERSIONID "5.2.46"
+#define _QLCNIC_LINUX_MINOR 3
+#define _QLCNIC_LINUX_SUBVERSION 47
+#define QLCNIC_LINUX_VERSIONID "5.3.47"
#define QLCNIC_DRV_IDC_VER 0x01
#define QLCNIC_DRIVER_VERSION ((_QLCNIC_LINUX_MAJOR << 16) |\
(_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
--
1.8.1.4
^ permalink raw reply related
* Re: Provide ability to change default netdev name?
From: Ben Hutchings @ 2013-08-16 23:41 UTC (permalink / raw)
To: Ben Greear; +Cc: netdev
In-Reply-To: <520EA43F.2010304@candelatech.com>
On Fri, 2013-08-16 at 15:14 -0700, Ben Greear wrote:
> The latest udev in Fedora 19 (and perhaps elsewhere) will no longer
> implement rules that rename an interface from ethX to ethY. Nor
> wlanX or other 'kernel namespaces'. The Fedora udev developers do not seem
> interested in changing this back to the old behaviour, evidently they
> had a hard time implementing it properly.
There is an inherent problem that a new device can appear at any time
under the exact name udev is trying to rename to. I expect it is
possible to do this properly but may be quite difficult to eliminate the
possibility of deadlock.
Still, if udev actively refuses to use the 'kernel namespaces' (rather
than just being configured not to), that would be a bug.
> This effectively makes it impossible to have network device names of ethX
> consistent across reboots in systems with multiple NICs and/or drivers.
>
> One way to work around this would be allow the kernel to use a different
> default netdev name (for instance, keth%d). I'm thinking this would be
> configured as a kernel command line argument. Then, a small change to udev/systemd to
> make the 'kernel namespaces' configurable by letting it understand this new kernel
> command line argument should resolve the problem.
>
> Does this sound like something that could be accepted upstream?
This sounds completely ridiculous.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* [PATCH net-next 2/5] qlcnic: Add PVID support for 84xx adapters
From: Himanshu Madhani @ 2013-08-16 23:07 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Manish Chopra, himanshu.madhani
In-Reply-To: <cover.1376720973.git.himanshu.madhani@qlogic.com>
From: Manish Chopra <manish.chopra@qlogic.com>
o 84xx adapters support VLAN stripping for PVID. Packets don't have
VLAN tag inserted in case of PVID. So packet should follow non vlan path.
o Use capability bit to set PVID mode.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 1 +
.../net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 20 +++++++++++++-------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
index dd22ef3..b89b074 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
@@ -404,6 +404,7 @@ enum qlcnic_83xx_states {
#define QLC_83XX_MAX_MC_COUNT 38
#define QLC_83XX_MAX_UC_COUNT 4096
+#define QLC_83XX_PVID_STRIP_CAPABILITY BIT_22
#define QLC_83XX_GET_FUNC_MODE_FROM_NPAR_INFO(val) (val & 0x80000000)
#define QLC_83XX_GET_LRO_CAPABILITY(val) (val & 0x20)
#define QLC_83XX_GET_LSO_CAPABILITY(val) (val & 0x40)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index dc24979..b2fbefc 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -398,10 +398,14 @@ int qlcnic_sriov_get_vf_vport_info(struct qlcnic_adapter *adapter,
}
static int qlcnic_sriov_set_pvid_mode(struct qlcnic_adapter *adapter,
- struct qlcnic_cmd_args *cmd)
+ struct qlcnic_cmd_args *cmd, u32 cap)
{
- adapter->rx_pvid = (cmd->rsp.arg[1] >> 16) & 0xffff;
- adapter->flags &= ~QLCNIC_TAGGING_ENABLED;
+ if (cap & QLC_83XX_PVID_STRIP_CAPABILITY) {
+ adapter->rx_pvid = 0;
+ } else {
+ adapter->rx_pvid = (cmd->rsp.arg[1] >> 16) & 0xffff;
+ adapter->flags &= ~QLCNIC_TAGGING_ENABLED;
+ }
return 0;
}
@@ -432,12 +436,14 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter,
return 0;
}
-static int qlcnic_sriov_get_vf_acl(struct qlcnic_adapter *adapter)
+static int qlcnic_sriov_get_vf_acl(struct qlcnic_adapter *adapter,
+ struct qlcnic_info *info)
{
struct qlcnic_sriov *sriov = adapter->ahw->sriov;
struct qlcnic_cmd_args cmd;
- int ret;
+ int ret, cap;
+ cap = info->capabilities;
ret = qlcnic_sriov_alloc_bc_mbx_args(&cmd, QLCNIC_BC_CMD_GET_ACL);
if (ret)
return ret;
@@ -453,7 +459,7 @@ static int qlcnic_sriov_get_vf_acl(struct qlcnic_adapter *adapter)
ret = qlcnic_sriov_set_guest_vlan_mode(adapter, &cmd);
break;
case QLC_PVID_MODE:
- ret = qlcnic_sriov_set_pvid_mode(adapter, &cmd);
+ ret = qlcnic_sriov_set_pvid_mode(adapter, &cmd, cap);
break;
}
}
@@ -476,7 +482,7 @@ static int qlcnic_sriov_vf_init_driver(struct qlcnic_adapter *adapter)
if (err)
return -EIO;
- err = qlcnic_sriov_get_vf_acl(adapter);
+ err = qlcnic_sriov_get_vf_acl(adapter, &nic_info);
if (err)
return err;
--
1.8.1.4
^ permalink raw reply related
* [PATCH v4 0/3] Correctly perform offloads when VNET_HDR is disabled
From: Vlad Yasevich @ 2013-08-16 19:24 UTC (permalink / raw)
To: netdev; +Cc: mst, Vlad Yasevich
Changes since v3:
- The main change here is that instead of mucking around with checksum bits,
we instead treat macvtap as macvlan+tap each with separate feature sets.
tap_features identify the features of only the 'tap' part and we only use
them when forwarding, essentially making the 'tap' part a pseudo-device.
To properly handle GSO, we always set NETIF_F_SG | NETIF_F_GSO on the
'tap' part.
- The rest of the set is mostly the same in that we allow user to change
tap offload features whether VNET_HDR is set or cleared.
- When VNET_HDR is disabled, we ignore user specified tap offloads. This
is now a separate patch so that if there are disagreements, it can
be easily dropped.
Vlad Yasevich (3):
macvtap: simplify usage of tap_features
macvtap: Correctly set tap features when IFF_VNET_HDR is disabled.
macvtap: Ignore tap features when VNET_HDR is off
drivers/net/macvtap.c | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
--
1.8.1.4
^ permalink raw reply
* [PATCH v4 1/3] macvtap: simplify usage of tap_features
From: Vlad Yasevich @ 2013-08-16 19:25 UTC (permalink / raw)
To: netdev; +Cc: mst, Vlad Yasevich
In-Reply-To: <1376681102-19753-1-git-send-email-vyasevic@redhat.com>
In macvtap, tap_features specific the features of that the user
has specified via ioctl(). If we treat macvtap as a macvlan+tap
then we could all the tap a pseudo-device and give it other features
like SG and GSO. Then we can stop using the features of lower
device (macvlan) when forwarding the traffic the tap.
This solves the issue of possible checksum offload mismatch between
tap feature and macvlan features.
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
drivers/net/macvtap.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index b51db2a..448f8a5 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -68,6 +68,8 @@ static const struct proto_ops macvtap_socket_ops;
#define TUN_OFFLOADS (NETIF_F_HW_CSUM | NETIF_F_TSO_ECN | NETIF_F_TSO | \
NETIF_F_TSO6 | NETIF_F_UFO)
#define RX_OFFLOADS (NETIF_F_GRO | NETIF_F_LRO)
+#define TAP_FEATURES (NETIF_F_GSO | NETIF_F_SG)
+
/*
* RCU usage:
* The macvtap_queue and the macvlan_dev are loosely coupled, the
@@ -278,7 +280,8 @@ static int macvtap_forward(struct net_device *dev, struct sk_buff *skb)
{
struct macvlan_dev *vlan = netdev_priv(dev);
struct macvtap_queue *q = macvtap_get_queue(dev, skb);
- netdev_features_t features;
+ netdev_features_t features = TAP_FEATURES;
+
if (!q)
goto drop;
@@ -289,7 +292,7 @@ static int macvtap_forward(struct net_device *dev, struct sk_buff *skb)
/* Apply the forward feature mask so that we perform segmentation
* according to users wishes.
*/
- features = netif_skb_features(skb) & vlan->tap_features;
+ features |= vlan->tap_features;
if (netif_needs_gso(skb, features)) {
struct sk_buff *segs = __skb_gso_segment(skb, features, false);
@@ -1064,8 +1067,7 @@ static int set_offload(struct macvtap_queue *q, unsigned long arg)
/* tap_features are the same as features on tun/tap and
* reflect user expectations.
*/
- vlan->tap_features = vlan->dev->features &
- (feature_mask | ~TUN_OFFLOADS);
+ vlan->tap_features = feature_mask;
vlan->set_features = features;
netdev_update_features(vlan->dev);
--
1.8.1.4
^ permalink raw reply related
* [PATCH net-next 1/2] net-next: sundance: Add netconsole logging support
From: Denis Kirjanov @ 2013-08-16 17:00 UTC (permalink / raw)
To: netdev, davem; +Cc: Denis Kirjanov
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
---
drivers/net/ethernet/dlink/sundance.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/dlink/sundance.c b/drivers/net/ethernet/dlink/sundance.c
index 50d9c63..2688a84 100644
--- a/drivers/net/ethernet/dlink/sundance.c
+++ b/drivers/net/ethernet/dlink/sundance.c
@@ -469,6 +469,17 @@ static void sundance_reset(struct net_device *dev, unsigned long reset_cmd)
}
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void sundance_poll_controller(struct net_device *dev)
+{
+ struct netdev_private *np = netdev_priv(dev);
+
+ disable_irq(np->pci_dev->irq);
+ intr_handler(np->pci_dev->irq, dev);
+ enable_irq(np->pci_dev->irq);
+}
+#endif
+
static const struct net_device_ops netdev_ops = {
.ndo_open = netdev_open,
.ndo_stop = netdev_close,
@@ -480,6 +491,9 @@ static const struct net_device_ops netdev_ops = {
.ndo_change_mtu = change_mtu,
.ndo_set_mac_address = sundance_set_mac_addr,
.ndo_validate_addr = eth_validate_addr,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = sundance_poll_controller,
+#endif
};
static int sundance_probe1(struct pci_dev *pdev,
--
1.8.0.2
^ permalink raw reply related
* [PATCH net-next 2/2] net-next: sundance: Add myself as an maintainer Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
From: Denis Kirjanov @ 2013-08-16 17:00 UTC (permalink / raw)
To: netdev, davem; +Cc: Denis Kirjanov
In-Reply-To: <1376672417-2798-1-git-send-email-kda@linux-powerpc.org>
---
MAINTAINERS | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9ee0a8f..1b3fb7c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7968,6 +7968,12 @@ F: arch/m68k/sun3*/
F: arch/m68k/include/asm/sun3*
F: drivers/net/ethernet/i825xx/sun3*
+SUNDANCE NETWORK DRIVER
+M: Denis Kirjanov <kda@linux-powerpc.org>
+L: netdev@vger.kernel.org
+S: Maintained
+F: drivers/net/ethernet/dlink/sundance.c
+
SUPERH
M: Paul Mundt <lethal@linux-sh.org>
L: linux-sh@vger.kernel.org
--
1.8.0.2
^ permalink raw reply related
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