* Re: network device reference leak with net-next
From: Stephen Hemminger @ 2010-11-15 19:10 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
In-Reply-To: <1289847840.2607.120.camel@edumazet-laptop>
On Mon, 15 Nov 2010 20:04:00 +0100
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le lundi 15 novembre 2010 à 10:56 -0800, Stephen Hemminger a écrit :
> > This is a new regression (doesn't exist with 2.6.36)
> >
> > If I shutdown KVM instance with Virt manager, the virtual
> > interfaces in the bridge aren't getting cleaned up because
> > of leftover reference count.
> >
> >
> > [ 9781.050474] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
> > [ 9785.143400] virbr4: port 3(vnet6) entering forwarding state
> > [ 9785.177194] virbr4: port 3(vnet6) entering disabled state
> > [ 9785.201129] device vnet6 left promiscuous mode
> > [ 9785.201135] virbr4: port 3(vnet6) entering disabled state
> > [ 9791.286950] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
> > [ 9795.461526] unregister_netdevice: waiting for vnet6 to become free. Usage count = 1
> > [ 9801.523398] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
> > --
>
> Is the refcount stay forever to 1, or eventually reaches 0 ?
>
>
>
Stays 1 for as long as I waited about 10 minutes
--
^ permalink raw reply
* Re: [PATCH 0/5] bridge RCU patches (rev2)
From: David Miller @ 2010-11-15 19:13 UTC (permalink / raw)
To: shemminger; +Cc: netdev
In-Reply-To: <20101115163809.215552143@vyatta.com>
All applied to net-next-2.6
^ permalink raw reply
* Re: [PATCH] hso: Fix unused variable warning
From: David Miller @ 2010-11-15 19:13 UTC (permalink / raw)
To: alan; +Cc: netdev
In-Reply-To: <20101115173038.6846.72062.stgit@localhost.localdomain>
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Mon, 15 Nov 2010 17:30:42 +0000
> From: Alan Cox <alan@linux.intel.com>
>
> Fallout from the TIOCGICOUNT work
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply
* Re: [net-next-2.6 PATCH] enic: Fix build warnings
From: David Miller @ 2010-11-15 19:13 UTC (permalink / raw)
To: vkolluri; +Cc: netdev, roprabhu, dwang2
In-Reply-To: <20101115180955.5779.32244.stgit@savbu-pc100.cisco.com>
From: Vasanthy Kolluri <vkolluri@cisco.com>
Date: Mon, 15 Nov 2010 10:09:55 -0800
> From: Vasanthy Kolluri <vkolluri@cisco.com>
>
> Fix data type of argument passed to pci_alloc_consistent and pci_free_consistent routines.
>
> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
> Signed-off-by: David Wang <dwang2@cisco.com>
Applied, thank you.
^ permalink raw reply
* Re: ethtool maintenance
From: Jeff Garzik @ 2010-11-15 19:16 UTC (permalink / raw)
To: Ben Hutchings; +Cc: NetDev, David Miller
In-Reply-To: <1289832387.2586.10.camel@bwh-desktop>
[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]
On 11/15/2010 09:46 AM, Ben Hutchings wrote:
> On Sat, 2010-11-13 at 14:30 +0000, Ben Hutchings wrote:
>> On Sat, 2010-11-13 at 03:45 -0500, Jeff Garzik wrote:
>>> So, a recent emergency surgery has really set me back, work-wise.
>>> ethtool [the userspace utility] 2.6.36 is still not out, and personally
>>> it remains a third or fourth priority.
>>>
>>> While it's likely that I could get back to ethtool's patch queue next
>>> week, it continues to be low man on the totem pole. Seems only fair to
>>> see if anyone else is interested in maintaining it.
>>>
>>> I emailed Ben Hutchings privately about this, but haven't heard back, so
>>> I thought I'd go ahead and email the list.
>>>
>>> Anyone interested?
>>
>> I am interested, but will need to clear it with my boss before making
>> such a commitment.
>
> OK, this is fine. Are there any patches waiting other than mine and
> these?
>
> http://patchwork.ozlabs.org/patch/67662/
> http://patchwork.ozlabs.org/patch/68237/
> http://patchwork.ozlabs.org/patch/69155/
>
> I'll need to sort out my kernel.org account before I can publish a git
> tree.
I've attached an mbox.
In the short term, there is no need to wait, I can simply publish 'git
pull' requests from you, and push a release out to SF.
I would recommend moving the tarball release area away from SF in the
long term; SF is really going downhill.
Jeff
[-- Attachment #2: mbox.bz2 --]
[-- Type: application/x-bzip, Size: 23028 bytes --]
^ permalink raw reply
* Re: [PATCH 1/1] net: rtnetlink.h -- only include linux/netdevice.h when used by the kernel
From: David Miller @ 2010-11-15 19:30 UTC (permalink / raw)
To: apw; +Cc: eric.dumazet, netdev, linux-kernel, tim.gardner
In-Reply-To: <1289836919-19153-2-git-send-email-apw@canonical.com>
From: Andy Whitcroft <apw@canonical.com>
Date: Mon, 15 Nov 2010 16:01:59 +0000
> The commit below added a new helper dev_ingress_queue to cleanly obtain the
> ingress queue pointer. This necessitated including 'linux/netdevice.h':
...
> However this include triggers issues for applications in userspace
> which use the rtnetlink interfaces. Commonly this requires they include
> 'net/if.h' and 'linux/rtnetlink.h' leading to a compiler error as below:
>
> In file included from /usr/include/linux/netdevice.h:28:0,
> from /usr/include/linux/rtnetlink.h:9,
> from t.c:2:
> /usr/include/linux/if.h:135:8: error: redefinition of ‘struct ifmap’
> /usr/include/net/if.h:112:8: note: originally defined here
> /usr/include/linux/if.h:169:8: error: redefinition of ‘struct ifreq’
> /usr/include/net/if.h:127:8: note: originally defined here
> /usr/include/linux/if.h:218:8: error: redefinition of ‘struct ifconf’
> /usr/include/net/if.h:177:8: note: originally defined here
>
> The new helper is only defined for the kernel and protected by __KERNEL__
> therefore we can simply pull the include down into the same protected
> section.
>
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Applied, thanks Andy.
^ permalink raw reply
* Re: [PATCH 1/1] UDEV - Add 'udevlom' command line param to start_udev
From: Rick Jones @ 2010-11-15 19:32 UTC (permalink / raw)
To: Ben Hutchings
Cc: Matt Domsch, Greg KH, K, Narendra, linux-hotplug@vger.kernel.org,
netdev@vger.kernel.org, Hargrave, Jordan, Rose, Charles
In-Reply-To: <1289841399.2586.18.camel@bwh-desktop>
>>I'm getting a lot of pushback from Dell customers on our
>>linux-poweredge mailing list (thread starts [1]) that the choice of
>>name "lomX" is poor, due to HP's extensive use of LOM meaning Lights
>>Out Management, rather than my intended meaning of "LAN on
>>Motherboard". Gotta hate TLA collisions.
I think Sun (sorry, Oracle) push LOM for Lights-Out Management quite a lot -
calling their service processor an iLOM IIRC.
>>So, I'm open to new ideas for naming these. At LPC, Ted noted that
>>2- and 3-letter names are expected. "nic[1234]" or "en[1234]" ?
>
> [...]
>
> I would suggest avoiding "nic" since some people use "NIC" to mean
> specifically an add-in card rather than LOM. In addition there is some
> ambiguity with multi-port cards/controllers of whether NIC means a
> controller or a port.
>
> Other options for the prefix:
> - "lan". Maybe too generic.
yes and no - that is the prefix for "ethernet" network interface names in HP-UX,
going back decades. so, there is precedent for that, and given the way HP-UX
device name persistence works, 99 times out of ten, the "built-in" or "core" LAN
interfaces ended-up being enumerated starting from zero - lan0, lan1, etc.
(There are exceptions relating to certain modles of systems and a full
re-install of the OS with add-on cards present but that is a story for another
thread).
> - "mbe" = MotherBoard Ethernet. Looks a bit like "GbE" as some OEMs put
> on the port labels.
Collides with Multi-Bit Error.
> - "eom" = Ethernet On Motherboard
Collides with End of Message.
If there is indeed *no* way to get then named eth[1-N], and "lan" doesn't
resonate well-enough, then my contribution to the bikeshed would be "cor" simply
because I don't know the TLA with which that collides :)
Are folks sufficently confident that using anything other than "eth" won't cause
some unpleasant "our app always ass-u-me-d interfaces started with 'eth'"
situations?
rick jones
^ permalink raw reply
* the future of ethtool
From: Jeff Garzik @ 2010-11-15 19:41 UTC (permalink / raw)
To: Ben Hutchings; +Cc: NetDev, David Miller
Thanks for accepting ethtool maintainership.
There are two key unresolved issues with ethtool that are worth noting
to the next maintainer. Both of these come from years of user and
customer complaints.
1) ethtool command line interface.
For 1,001 minor reasons of user taste and expectation, people tend to
complain about the command line interface. Due to script usage it is
set in stone, and has been since before my tenure. But users
continually request something more flexible, often, in particular,
wanting to set multiple settings in one execution, or wanting to apply
the same setting to multiple interface in one execution.
Obviously one can script this, but, it is probably the #1 user request.
My thought was to create "nictool", a new tool with more flexible
command line interface, using the same old ethtool ioctls currently in
use today. ('nictool' also solves a minor naming complaint from
wireless and other people, who use ethtool on non-ethernet network
interfaces)
2) multiple settings and the ethtool kernel interface
Another common complaint is related to multiple settings, and associated
hardware NIC resets.
Many ethtool driver implementations look like this:
ethtool_op_do_something()
stop RX/TX
apply settings
perform full NIC reset, consuming much time
start RX/TX
The problem arises when the user wishes to change multiple hardware
attributes at the same time. A user wishing to change 4 attributes
could wind up with 4 ethtool(1) invocations, with 4 accompanying
hardware NIC resets. Time consuming, inefficient, and unnecessary.
Obviously the world has not ended without these changes, but these items
do cause continued complaints from users, and we're here to be
responsive to users presumably ;-)
Jeff
^ permalink raw reply
* Re: [RFC PATCH] network: return errors if we know tcp_connect failed
From: Alexey Kuznetsov @ 2010-11-15 20:00 UTC (permalink / raw)
To: Eric Paris
Cc: Patrick McHardy, Hua Zhong, netdev, linux-kernel, davem, pekkas,
jmorris, yoshfuji
In-Reply-To: <1289836066.14282.7.camel@localhost.localdomain>
Hello!
On Mon, Nov 15, 2010 at 10:47:46AM -0500, Eric Paris wrote:
> Well I'm (I guess?) surprised that the --reject-with icmp doesn't do
> anything with a local outgoing connection
Yeah. This was "an obvious surpise": for local socket the first icmp error always
arrives on locked socket and gets dropped. I even forgot about this (tcp-reset
still works ok due to backlog) This makes the idea to respect error more attractive.
Alexey
^ permalink raw reply
* [PATCH 00/11] Remove unnecessary casts of pci_get_drvdata
From: Joe Perches @ 2010-11-15 20:13 UTC (permalink / raw)
To: Jiri Kosina
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-media-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-scsi-u79uwXL29TY76Z2rM5mHXA,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw
Joe Perches (11):
drivers/i2c/busses/i2c-nforce2.c: Remove unnecessary casts of pci_get_drvdata
drivers/ide/pmac.c: Remove unnecessary casts of pci_get_drvdata
drivers/media/dvb/ngene/ngene-core.c: Remove unnecessary casts of pci_get_drvdata
drivers/misc/ibmasm/module.c: Remove unnecessary casts of pci_get_drvdata
drivers/net/irda: Remove unnecessary casts of pci_get_drvdata
drivers/net/s2io.c: Remove unnecessary casts of pci_get_drvdata
drivers/net/vxge/vxge-main.c: Remove unnecessary casts of pci_get_drvdata
drivers/scsi/be2iscsi/be_main.c: Remove unnecessary casts of pci_get_drvdata
drivers/staging: Remove unnecessary casts of pci_get_drvdata
drivers/usb/host/uhci-hcd.c: Remove unnecessary casts of pci_get_drvdata
sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata
drivers/i2c/busses/i2c-nforce2.c | 2 +-
drivers/ide/pmac.c | 4 ++--
drivers/media/dvb/ngene/ngene-core.c | 2 +-
drivers/misc/ibmasm/module.c | 2 +-
drivers/net/irda/donauboe.c | 6 +++---
drivers/net/irda/vlsi_ir.c | 2 +-
drivers/net/s2io.c | 3 +--
drivers/net/vxge/vxge-main.c | 28 ++++++++++++----------------
drivers/scsi/be2iscsi/be_main.c | 2 +-
drivers/staging/crystalhd/crystalhd_lnx.c | 6 +++---
drivers/staging/et131x/et131x_initpci.c | 2 +-
drivers/staging/wlags49_h2/wl_pci.c | 2 +-
drivers/usb/host/uhci-hcd.c | 2 +-
sound/pci/asihpi/hpioctl.c | 2 +-
14 files changed, 30 insertions(+), 35 deletions(-)
--
1.7.3.1.g432b3.dirty
^ permalink raw reply
* [PATCH 05/11] drivers/net/irda: Remove unnecessary casts of pci_get_drvdata
From: Joe Perches @ 2010-11-15 20:13 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Samuel Ortiz, netdev, linux-kernel
In-Reply-To: <cover.1289851770.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/irda/donauboe.c | 6 +++---
drivers/net/irda/vlsi_ir.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index b626ccc..bee5ccc 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -1488,7 +1488,7 @@ static void
toshoboe_close (struct pci_dev *pci_dev)
{
int i;
- struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev);
+ struct toshoboe_cb *self = pci_get_drvdata(pci_dev);
IRDA_DEBUG (4, "%s()\n", __func__);
@@ -1698,7 +1698,7 @@ freeself:
static int
toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap)
{
- struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev);
+ struct toshoboe_cb *self = pci_get_drvdata(pci_dev);
unsigned long flags;
int i = 10;
@@ -1727,7 +1727,7 @@ toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap)
static int
toshoboe_wakeup (struct pci_dev *pci_dev)
{
- struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev);
+ struct toshoboe_cb *self = pci_get_drvdata(pci_dev);
unsigned long flags;
IRDA_DEBUG (4, "%s()\n", __func__);
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index c3d0738..62f2d12 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -542,7 +542,7 @@ static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd)
int crclen, len = 0;
struct sk_buff *skb;
int ret = 0;
- struct net_device *ndev = (struct net_device *)pci_get_drvdata(r->pdev);
+ struct net_device *ndev = pci_get_drvdata(r->pdev);
vlsi_irda_dev_t *idev = netdev_priv(ndev);
pci_dma_sync_single_for_cpu(r->pdev, rd_get_addr(rd), r->len, r->dir);
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 06/11] drivers/net/s2io.c: Remove unnecessary casts of pci_get_drvdata
From: Joe Perches @ 2010-11-15 20:13 UTC (permalink / raw)
To: Jiri Kosina
Cc: Ramkrishna Vepa, Sivakumar Subramani, Sreenivasa Honnur,
Jon Mason, netdev, linux-kernel
In-Reply-To: <cover.1289851770.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/s2io.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index ecc25aa..0f4219c 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -8321,8 +8321,7 @@ mem_alloc_failed:
static void __devexit s2io_rem_nic(struct pci_dev *pdev)
{
- struct net_device *dev =
- (struct net_device *)pci_get_drvdata(pdev);
+ struct net_device *dev = pci_get_drvdata(pdev);
struct s2io_nic *sp;
if (dev == NULL) {
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 07/11] drivers/net/vxge/vxge-main.c: Remove unnecessary casts of pci_get_drvdata
From: Joe Perches @ 2010-11-15 20:13 UTC (permalink / raw)
To: Jiri Kosina
Cc: Ramkrishna Vepa, Sivakumar Subramani, Sreenivasa Honnur,
Jon Mason, netdev, linux-kernel
In-Reply-To: <cover.1289851770.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/vxge/vxge-main.c | 28 ++++++++++++----------------
1 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 3f2d6ed..22c7d79 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -688,7 +688,7 @@ static int vxge_learn_mac(struct vxgedev *vdev, u8 *mac_header)
struct vxge_vpath *vpath = NULL;
struct __vxge_hw_device *hldev;
- hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
+ hldev = pci_get_drvdata(vdev->pdev);
mac_address = (u8 *)&mac_addr;
memcpy(mac_address, mac_header, ETH_ALEN);
@@ -1313,7 +1313,7 @@ static void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id)
struct __vxge_hw_device *hldev;
int msix_id;
- hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
+ hldev = pci_get_drvdata(vdev->pdev);
vxge_hw_vpath_wait_receive_idle(hldev, vpath->device_id);
@@ -1632,8 +1632,7 @@ static int vxge_poll_inta(struct napi_struct *napi, int budget)
int budget_org = budget;
struct vxge_ring *ring;
- struct __vxge_hw_device *hldev = (struct __vxge_hw_device *)
- pci_get_drvdata(vdev->pdev);
+ struct __vxge_hw_device *hldev = pci_get_drvdata(vdev->pdev);
for (i = 0; i < vdev->no_of_vpath; i++) {
ring = &vdev->vpaths[i].ring;
@@ -1673,7 +1672,7 @@ static void vxge_netpoll(struct net_device *dev)
struct vxgedev *vdev;
vdev = (struct vxgedev *)netdev_priv(dev);
- hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
+ hldev = pci_get_drvdata(vdev->pdev);
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
@@ -2107,7 +2106,7 @@ static irqreturn_t vxge_isr_napi(int irq, void *dev_id)
vxge_debug_intr(VXGE_TRACE, "%s:%d", __func__, __LINE__);
dev = vdev->ndev;
- hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
+ hldev = pci_get_drvdata(vdev->pdev);
if (pci_channel_offline(vdev->pdev))
return IRQ_NONE;
@@ -2342,7 +2341,7 @@ static void vxge_rem_msix_isr(struct vxgedev *vdev)
static void vxge_rem_isr(struct vxgedev *vdev)
{
struct __vxge_hw_device *hldev;
- hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
+ hldev = pci_get_drvdata(vdev->pdev);
#ifdef CONFIG_PCI_MSI
if (vdev->config.intr_type == MSI_X) {
@@ -2583,7 +2582,7 @@ vxge_open(struct net_device *dev)
"%s: %s:%d", dev->name, __func__, __LINE__);
vdev = (struct vxgedev *)netdev_priv(dev);
- hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
+ hldev = pci_get_drvdata(vdev->pdev);
function_mode = vdev->config.device_hw_info.function_mode;
/* make sure you have link off by default every time Nic is
@@ -2811,7 +2810,7 @@ static int do_vxge_close(struct net_device *dev, int do_io)
dev->name, __func__, __LINE__);
vdev = (struct vxgedev *)netdev_priv(dev);
- hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
+ hldev = pci_get_drvdata(vdev->pdev);
if (unlikely(!is_vxge_card_up(vdev)))
return 0;
@@ -3985,8 +3984,7 @@ static int vxge_pm_resume(struct pci_dev *pdev)
static pci_ers_result_t vxge_io_error_detected(struct pci_dev *pdev,
pci_channel_state_t state)
{
- struct __vxge_hw_device *hldev =
- (struct __vxge_hw_device *)pci_get_drvdata(pdev);
+ struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
struct net_device *netdev = hldev->ndev;
netif_device_detach(netdev);
@@ -4015,8 +4013,7 @@ static pci_ers_result_t vxge_io_error_detected(struct pci_dev *pdev,
*/
static pci_ers_result_t vxge_io_slot_reset(struct pci_dev *pdev)
{
- struct __vxge_hw_device *hldev =
- (struct __vxge_hw_device *)pci_get_drvdata(pdev);
+ struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
struct net_device *netdev = hldev->ndev;
struct vxgedev *vdev = netdev_priv(netdev);
@@ -4041,8 +4038,7 @@ static pci_ers_result_t vxge_io_slot_reset(struct pci_dev *pdev)
*/
static void vxge_io_resume(struct pci_dev *pdev)
{
- struct __vxge_hw_device *hldev =
- (struct __vxge_hw_device *)pci_get_drvdata(pdev);
+ struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
struct net_device *netdev = hldev->ndev;
if (netif_running(netdev)) {
@@ -4689,7 +4685,7 @@ static void __devexit vxge_remove(struct pci_dev *pdev)
struct net_device *dev;
int i = 0;
- hldev = (struct __vxge_hw_device *)pci_get_drvdata(pdev);
+ hldev = pci_get_drvdata(pdev);
if (hldev == NULL)
return;
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* Re: the future of ethtool
From: Ben Hutchings @ 2010-11-15 20:18 UTC (permalink / raw)
To: Jeff Garzik; +Cc: NetDev, David Miller
In-Reply-To: <4CE18CEA.5080502@garzik.org>
On Mon, 2010-11-15 at 14:41 -0500, Jeff Garzik wrote:
> Thanks for accepting ethtool maintainership.
>
> There are two key unresolved issues with ethtool that are worth noting
> to the next maintainer. Both of these come from years of user and
> customer complaints.
>
> 1) ethtool command line interface.
>
> For 1,001 minor reasons of user taste and expectation, people tend to
> complain about the command line interface. Due to script usage it is
> set in stone, and has been since before my tenure. But users
> continually request something more flexible, often, in particular,
> wanting to set multiple settings in one execution, or wanting to apply
> the same setting to multiple interface in one execution.
>
> Obviously one can script this, but, it is probably the #1 user request.
Thinking further along those lines, it would be useful to have ethtool
API bindings for Perl/Python/whatever, though those belong outside of
the current ethtool package. I tried doing that for use in my own
scripts and it looks reasonably practical, though I'm not volunteering
to maintain such bindings.
> My thought was to create "nictool", a new tool with more flexible
> command line interface, using the same old ethtool ioctls currently in
> use today. ('nictool' also solves a minor naming complaint from
> wireless and other people, who use ethtool on non-ethernet network
> interfaces)
I agree, some of the ethtool operations are very Ethernet-specific but
enough of them are applicable to other media that this makes sense.
I've recently been looking at FreeBSD where the sort of configuration we
do through ethtool is invoked through ifconfig, but then ifconfig is
effectively deprecated on Linux...
> 2) multiple settings and the ethtool kernel interface
>
> Another common complaint is related to multiple settings, and associated
> hardware NIC resets.
>
> Many ethtool driver implementations look like this:
>
> ethtool_op_do_something()
> stop RX/TX
> apply settings
> perform full NIC reset, consuming much time
> start RX/TX
>
> The problem arises when the user wishes to change multiple hardware
> attributes at the same time. A user wishing to change 4 attributes
> could wind up with 4 ethtool(1) invocations, with 4 accompanying
> hardware NIC resets. Time consuming, inefficient, and unnecessary.
Right. In fact the begin() and complete() operations look like they
were meant to support this sort of optimisation. Is that the case?
Ben.
> Obviously the world has not ended without these changes, but these items
> do cause continued complaints from users, and we're here to be
> responsive to users presumably ;-)
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
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
* Re: the future of ethtool
From: Stephen Hemminger @ 2010-11-15 20:44 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Jeff Garzik, NetDev, David Miller
In-Reply-To: <1289852326.2586.32.camel@bwh-desktop>
On Mon, 15 Nov 2010 20:18:46 +0000
Ben Hutchings <bhutchings@solarflare.com> wrote:
> On Mon, 2010-11-15 at 14:41 -0500, Jeff Garzik wrote:
> > Thanks for accepting ethtool maintainership.
> >
> > There are two key unresolved issues with ethtool that are worth noting
> > to the next maintainer. Both of these come from years of user and
> > customer complaints.
> >
> > 1) ethtool command line interface.
> >
> > For 1,001 minor reasons of user taste and expectation, people tend to
> > complain about the command line interface. Due to script usage it is
> > set in stone, and has been since before my tenure. But users
> > continually request something more flexible, often, in particular,
> > wanting to set multiple settings in one execution, or wanting to apply
> > the same setting to multiple interface in one execution.
> >
> > Obviously one can script this, but, it is probably the #1 user request.
>
> Thinking further along those lines, it would be useful to have ethtool
> API bindings for Perl/Python/whatever, though those belong outside of
> the current ethtool package. I tried doing that for use in my own
> scripts and it looks reasonably practical, though I'm not volunteering
> to maintain such bindings.
>
> > My thought was to create "nictool", a new tool with more flexible
> > command line interface, using the same old ethtool ioctls currently in
> > use today. ('nictool' also solves a minor naming complaint from
> > wireless and other people, who use ethtool on non-ethernet network
> > interfaces)
>
> I agree, some of the ethtool operations are very Ethernet-specific but
> enough of them are applicable to other media that this makes sense.
>
> I've recently been looking at FreeBSD where the sort of configuration we
> do through ethtool is invoked through ifconfig, but then ifconfig is
> effectively deprecated on Linux...
>
> > 2) multiple settings and the ethtool kernel interface
> >
> > Another common complaint is related to multiple settings, and associated
> > hardware NIC resets.
> >
> > Many ethtool driver implementations look like this:
> >
> > ethtool_op_do_something()
> > stop RX/TX
> > apply settings
> > perform full NIC reset, consuming much time
> > start RX/TX
> >
> > The problem arises when the user wishes to change multiple hardware
> > attributes at the same time. A user wishing to change 4 attributes
> > could wind up with 4 ethtool(1) invocations, with 4 accompanying
> > hardware NIC resets. Time consuming, inefficient, and unnecessary.
>
> Right. In fact the begin() and complete() operations look like they
> were meant to support this sort of optimisation. Is that the case?
>
> Ben.
>
> > Obviously the world has not ended without these changes, but these items
> > do cause continued complaints from users, and we're here to be
> > responsive to users presumably ;-)
>
>
My views are simple:
Ethtool needs to be an extension of existing netlink API for interfaces.
- handles multiple values per transaction
- extensible
Someone has to write good libraries to access netlink from Perl/Python/C++.
The best so far is libmnl.
--
^ permalink raw reply
* [PATCH] gianfar: fix signedness issue
From: Nicolas Kaiser @ 2010-11-15 20:59 UTC (permalink / raw)
To: Kumar Gala; +Cc: netdev, kernel-janitors, linux-kernel
irq_of_parse_and_map() has an unsigned return type.
Testing for a negative error value doesn't work here.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
I see that in numerous places the return value is tested
for NO_IRQ. I hope it's the right thing to do here as well?
drivers/net/gianfar.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 49e4ce1..d1bec62 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -577,11 +577,10 @@ static int gfar_parse_group(struct device_node *np,
irq_of_parse_and_map(np, 1);
priv->gfargrp[priv->num_grps].interruptError =
irq_of_parse_and_map(np,2);
- if (priv->gfargrp[priv->num_grps].interruptTransmit < 0 ||
- priv->gfargrp[priv->num_grps].interruptReceive < 0 ||
- priv->gfargrp[priv->num_grps].interruptError < 0) {
+ if (priv->gfargrp[priv->num_grps].interruptTransmit == NO_IRQ ||
+ priv->gfargrp[priv->num_grps].interruptReceive == NO_IRQ ||
+ priv->gfargrp[priv->num_grps].interruptError == NO_IRQ)
return -EINVAL;
- }
}
priv->gfargrp[priv->num_grps].grp_id = priv->num_grps;
--
1.7.2.2
^ permalink raw reply related
* Re: [PATCH] r8169: fix checksum broken
From: Francois Romieu @ 2010-11-15 21:01 UTC (permalink / raw)
To: Shan Wei; +Cc: David Miller, netdev@vger.kernel.org, jgarzik
In-Reply-To: <4CE0A994.4080606@cn.fujitsu.com>
Shan Wei <shanwei@cn.fujitsu.com> :
[...]
> If these are right, driver will set ip_summed with CHECKSUM_UNNECESSARY for other
> upper protocol, e.g. sctp, igmp protocol. This will cause protocol stack ignores
> checksum check for packets with invalid checksum.
The documentation of these bits is identical for the 8139c+ and the 8169.
--
Ueimor
^ permalink raw reply
* Re: the future of ethtool
From: Jeff Garzik @ 2010-11-15 21:03 UTC (permalink / raw)
To: Ben Hutchings; +Cc: NetDev, David Miller
In-Reply-To: <1289852326.2586.32.camel@bwh-desktop>
On 11/15/2010 03:18 PM, Ben Hutchings wrote:
> On Mon, 2010-11-15 at 14:41 -0500, Jeff Garzik wrote:
>> Thanks for accepting ethtool maintainership.
>>
>> There are two key unresolved issues with ethtool that are worth noting
>> to the next maintainer. Both of these come from years of user and
>> customer complaints.
>>
>> 1) ethtool command line interface.
>>
>> For 1,001 minor reasons of user taste and expectation, people tend to
>> complain about the command line interface. Due to script usage it is
>> set in stone, and has been since before my tenure. But users
>> continually request something more flexible, often, in particular,
>> wanting to set multiple settings in one execution, or wanting to apply
>> the same setting to multiple interface in one execution.
>>
>> Obviously one can script this, but, it is probably the #1 user request.
>
> Thinking further along those lines, it would be useful to have ethtool
> API bindings for Perl/Python/whatever, though those belong outside of
> the current ethtool package. I tried doing that for use in my own
> scripts and it looks reasonably practical, though I'm not volunteering
> to maintain such bindings.
I agree. FWIW, python-ethtool exists out there in the wild.
There is
git://git.kernel.org/pub/scm/linux/kernel/git/acme/python-ethtool.git
but I'm pretty sure acme handed off maintainership to someone else. If
you have the energy, integrating that into the official ethtool package
would probably be welcomed by all parties.
>> My thought was to create "nictool", a new tool with more flexible
>> command line interface, using the same old ethtool ioctls currently in
>> use today. ('nictool' also solves a minor naming complaint from
>> wireless and other people, who use ethtool on non-ethernet network
>> interfaces)
>
> I agree, some of the ethtool operations are very Ethernet-specific but
> enough of them are applicable to other media that this makes sense.
>
> I've recently been looking at FreeBSD where the sort of configuration we
> do through ethtool is invoked through ifconfig, but then ifconfig is
> effectively deprecated on Linux...
FreeBSD is back in the stone ages, when it comes to this sort of thing, IMO.
Though, I do understand users' desire for a single tool that configures
both generic network interface parameters and hardware-specific,
vendor-specific interface parameters.
>> 2) multiple settings and the ethtool kernel interface
>>
>> Another common complaint is related to multiple settings, and associated
>> hardware NIC resets.
>>
>> Many ethtool driver implementations look like this:
>>
>> ethtool_op_do_something()
>> stop RX/TX
>> apply settings
>> perform full NIC reset, consuming much time
>> start RX/TX
>>
>> The problem arises when the user wishes to change multiple hardware
>> attributes at the same time. A user wishing to change 4 attributes
>> could wind up with 4 ethtool(1) invocations, with 4 accompanying
>> hardware NIC resets. Time consuming, inefficient, and unnecessary.
>
> Right. In fact the begin() and complete() operations look like they
> were meant to support this sort of optimisation. Is that the case?
Somewhat...
->begin() and ->complete() were initially for reducing internal code
duplication. You would put stop-RXTX in begin(), and
nic-reset/start-RXTX in complete().
Fundamentally, the ioctl interface itself is still fine-grained. You
don't have ETHTOOL_BEGIN and ETHTOOL_COMPLETE ioctls. And even if you
did, such operations would be fundamentally race-prone.
AFAICS, the only race-free way to implement would be to have userspace
issue a single ioctl that contains a list of operations to perform. eg.
A new ETHTOOL_MULTI_OP ioctl would contain
op SSET + payload
op SSG + payload
op SGSO + payload
and the kernel would handle that internally by calling
->begin()
->set_settings()
->set_sg()
->set_gso()
->complete()
So the kernel API is largely already there, while the userspace ABI
constrains us mightily.
Jeff
^ permalink raw reply
* Re: [PATCH 0/2] net: Changes in queue allocation and freeing
From: Tom Herbert @ 2010-11-15 21:04 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20101115.105822.233710935.davem@davemloft.net>
On Mon, Nov 15, 2010 at 10:58 AM, David Miller <davem@davemloft.net> wrote:
> From: Tom Herbert <therbert@google.com>
> Date: Tue, 9 Nov 2010 12:47:26 -0800 (PST)
>
>> Changes to both RX and TX queue allocation. In both cases allocate
>> in alloc_netdev_mq and free in free_netdev. For RX the reference
>> couting also changed, the device reference count can now be used.
>
> Both applied, with the comment removal added as promised.
>
Thanks.
> I assume you'll spin a new version of the XPS patches
> against this?
>
Yes, those will be forthcoming.
> Thanks!
>
^ permalink raw reply
* [PATCH 00/10] Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: devel, netdev, linux-usb, linux-kernel, bonding-devel
Joe Perches (10):
drivers/isdn/i4l: Remove unnecessary casts of netdev_priv
drivers/net/bonding: Remove unnecessary casts of netdev_priv
drivers/net/pcmcia: Remove unnecessary casts of netdev_priv
drivers/net/qla3xxx.c: Remove unnecessary casts of netdev_priv
drivers/net/qlge: Remove unnecessary casts of netdev_priv
drivers/net/usb: Remove unnecessary casts of netdev_priv
drivers/net/vxge: Remove unnecessary casts of netdev_priv
drivers/net: Remove unnecessary casts of netdev_priv
drivers/staging: Remove unnecessary casts of netdev_priv
net/atm: Remove unnecessary casts of netdev_priv
drivers/isdn/i4l/isdn_concap.c | 2 +-
drivers/isdn/i4l/isdn_net.c | 20 ++++----
drivers/isdn/i4l/isdn_ppp.c | 12 ++--
drivers/net/ax88796.c | 8 ++--
drivers/net/bonding/bond_3ad.c | 3 +-
drivers/net/bonding/bonding.h | 2 +-
drivers/net/dm9000.c | 2 +-
drivers/net/iseries_veth.c | 2 +-
drivers/net/lib8390.c | 24 ++++----
drivers/net/ne-h8300.c | 12 ++--
drivers/net/pcmcia/axnet_cs.c | 18 +++---
drivers/net/qla3xxx.c | 8 ++--
drivers/net/qlge/qlge_main.c | 8 ++--
drivers/net/usb/pegasus.c | 4 +-
drivers/net/vxge/vxge-ethtool.c | 26 +++++-----
drivers/net/vxge/vxge-main.c | 26 +++++-----
drivers/net/xilinx_emaclite.c | 20 ++++----
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 54 ++++++++++----------
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c | 8 ++--
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 8 ++--
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 16 +++---
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 6 +-
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 2 +-
drivers/staging/rtl8712/usb_intf.c | 2 +-
net/atm/br2684.c | 2 +-
net/atm/lec.c | 3 +-
26 files changed, 148 insertions(+), 150 deletions(-)
--
1.7.3.1.g432b3.dirty
^ permalink raw reply
* [PATCH 01/10] drivers/isdn/i4l: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Karsten Keil, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/isdn/i4l/isdn_concap.c | 2 +-
drivers/isdn/i4l/isdn_net.c | 20 ++++++++++----------
drivers/isdn/i4l/isdn_ppp.c | 12 ++++++------
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/isdn/i4l/isdn_concap.c b/drivers/isdn/i4l/isdn_concap.c
index 46048e5..d568689 100644
--- a/drivers/isdn/i4l/isdn_concap.c
+++ b/drivers/isdn/i4l/isdn_concap.c
@@ -61,7 +61,7 @@ static int isdn_concap_dl_data_req(struct concap_proto *concap, struct sk_buff *
static int isdn_concap_dl_connect_req(struct concap_proto *concap)
{
struct net_device *ndev = concap -> net_dev;
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
int ret;
IX25DEBUG( "isdn_concap_dl_connect_req: %s \n", ndev -> name);
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index 26d44c3..afeede7 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -827,7 +827,7 @@ isdn_net_dial(void)
void
isdn_net_hangup(struct net_device *d)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(d);
+ isdn_net_local *lp = netdev_priv(d);
isdn_ctrl cmd;
#ifdef CONFIG_ISDN_X25
struct concap_proto *cprot = lp->netdev->cprot;
@@ -1052,7 +1052,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
{
isdn_net_dev *nd;
isdn_net_local *slp;
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
int retv = NETDEV_TX_OK;
if (((isdn_net_local *) netdev_priv(ndev))->master) {
@@ -1116,7 +1116,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
static void
isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
if (!skb)
return;
if (lp->p_encap == ISDN_NET_ENCAP_ETHER) {
@@ -1131,7 +1131,7 @@ isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
static void isdn_net_tx_timeout(struct net_device * ndev)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
printk(KERN_WARNING "isdn_tx_timeout dev %s dialstate %d\n", ndev->name, lp->dialstate);
if (!lp->dialstate){
@@ -1165,7 +1165,7 @@ static void isdn_net_tx_timeout(struct net_device * ndev)
static netdev_tx_t
isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
#ifdef CONFIG_ISDN_X25
struct concap_proto * cprot = lp -> netdev -> cprot;
/* At this point hard_start_xmit() passes control to the encapsulation
@@ -1347,7 +1347,7 @@ isdn_net_close(struct net_device *dev)
static struct net_device_stats *
isdn_net_get_stats(struct net_device *dev)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
return &lp->stats;
}
@@ -1426,7 +1426,7 @@ isdn_net_ciscohdlck_alloc_skb(isdn_net_local *lp, int len)
static int
isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
unsigned long len = 0;
unsigned long expires = 0;
int tmp = 0;
@@ -1493,7 +1493,7 @@ isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static int isdn_net_ioctl(struct net_device *dev,
struct ifreq *ifr, int cmd)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
switch (lp->p_encap) {
#ifdef CONFIG_ISDN_PPP
@@ -1786,7 +1786,7 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb)
static void
isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
{
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
+ isdn_net_local *lp = netdev_priv(ndev);
isdn_net_local *olp = lp; /* original 'lp' */
#ifdef CONFIG_ISDN_X25
struct concap_proto *cprot = lp -> netdev -> cprot;
@@ -1800,7 +1800,7 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
* handle master's statistics and hangup-timeout
*/
ndev = lp->master;
- lp = (isdn_net_local *) netdev_priv(ndev);
+ lp = netdev_priv(ndev);
lp->stats.rx_packets++;
lp->stats.rx_bytes += skb->len;
}
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index fe824e0..97c5cc2 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -1221,7 +1221,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
struct ippp_struct *ipt,*ipts;
int slot, retval = NETDEV_TX_OK;
- mlp = (isdn_net_local *) netdev_priv(netdev);
+ mlp = netdev_priv(netdev);
nd = mlp->netdev; /* get master lp */
slot = mlp->ppp_slot;
@@ -1985,7 +1985,7 @@ isdn_ppp_dev_ioctl_stats(int slot, struct ifreq *ifr, struct net_device *dev)
{
struct ppp_stats __user *res = ifr->ifr_data;
struct ppp_stats t;
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats)))
return -EFAULT;
@@ -2024,7 +2024,7 @@ isdn_ppp_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
int error=0;
int len;
- isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
+ isdn_net_local *lp = netdev_priv(dev);
if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP)
@@ -2091,7 +2091,7 @@ isdn_ppp_dial_slave(char *name)
sdev = lp->slave;
while (sdev) {
- isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev);
+ isdn_net_local *mlp = netdev_priv(sdev);
if (!(mlp->flags & ISDN_NET_CONNECTED))
break;
sdev = mlp->slave;
@@ -2099,7 +2099,7 @@ isdn_ppp_dial_slave(char *name)
if (!sdev)
return 2;
- isdn_net_dial_req((isdn_net_local *) netdev_priv(sdev));
+ isdn_net_dial_req(netdev_priv(sdev));
return 0;
#else
return -1;
@@ -2122,7 +2122,7 @@ isdn_ppp_hangup_slave(char *name)
sdev = lp->slave;
while (sdev) {
- isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev);
+ isdn_net_local *mlp = netdev_priv(sdev);
if (mlp->slave) { /* find last connected link in chain */
isdn_net_local *nlp = ISDN_SLAVE_PRIV(mlp);
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 02/10] drivers/net/bonding: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Jay Vosburgh, bonding-devel, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/bonding/bond_3ad.c | 3 +--
drivers/net/bonding/bonding.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 106718c..171782e 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2474,8 +2474,7 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac
goto out;
read_lock(&bond->lock);
- slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev),
- orig_dev);
+ slave = bond_get_slave_by_dev(netdev_priv(dev), orig_dev);
if (!slave)
goto out_unlock;
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 4eedb12..ad3ae46 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -286,7 +286,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
return NULL;
}
- return (struct bonding *)netdev_priv(slave->dev->master);
+ return netdev_priv(slave->dev->master);
}
static inline bool bond_is_lb(const struct bonding *bond)
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 04/10] drivers/net/qla3xxx.c: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Ron Mercer, linux-driver, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/qla3xxx.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 7496ed2..1a3584e 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -2467,7 +2467,7 @@ map_error:
static netdev_tx_t ql3xxx_send(struct sk_buff *skb,
struct net_device *ndev)
{
- struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
+ struct ql3_adapter *qdev = netdev_priv(ndev);
struct ql3xxx_port_registers __iomem *port_regs =
qdev->mem_map_registers;
struct ql_tx_buf_cb *tx_cb;
@@ -3390,7 +3390,7 @@ static void ql_set_mac_info(struct ql3_adapter *qdev)
static void ql_display_dev_info(struct net_device *ndev)
{
- struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
+ struct ql3_adapter *qdev = netdev_priv(ndev);
struct pci_dev *pdev = qdev->pdev;
netdev_info(ndev,
@@ -3573,7 +3573,7 @@ static int ql3xxx_open(struct net_device *ndev)
static int ql3xxx_set_mac_address(struct net_device *ndev, void *p)
{
- struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
+ struct ql3_adapter *qdev = netdev_priv(ndev);
struct ql3xxx_port_registers __iomem *port_regs =
qdev->mem_map_registers;
struct sockaddr *addr = p;
@@ -3608,7 +3608,7 @@ static int ql3xxx_set_mac_address(struct net_device *ndev, void *p)
static void ql3xxx_tx_timeout(struct net_device *ndev)
{
- struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
+ struct ql3_adapter *qdev = netdev_priv(ndev);
netdev_err(ndev, "Resetting...\n");
/*
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 05/10] drivers/net/qlge: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Ron Mercer, linux-driver, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/qlge/qlge_main.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index c30e0fe..d9a7626 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -3844,7 +3844,7 @@ static int ql_adapter_reset(struct ql_adapter *qdev)
static void ql_display_dev_info(struct net_device *ndev)
{
- struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
+ struct ql_adapter *qdev = netdev_priv(ndev);
netif_info(qdev, probe, qdev->ndev,
"Function #%d, Port %d, NIC Roll %d, NIC Rev = %d, "
@@ -4264,7 +4264,7 @@ static struct net_device_stats *qlge_get_stats(struct net_device
static void qlge_set_multicast_list(struct net_device *ndev)
{
- struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
+ struct ql_adapter *qdev = netdev_priv(ndev);
struct netdev_hw_addr *ha;
int i, status;
@@ -4354,7 +4354,7 @@ exit:
static int qlge_set_mac_address(struct net_device *ndev, void *p)
{
- struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
+ struct ql_adapter *qdev = netdev_priv(ndev);
struct sockaddr *addr = p;
int status;
@@ -4377,7 +4377,7 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
static void qlge_tx_timeout(struct net_device *ndev)
{
- struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
+ struct ql_adapter *qdev = netdev_priv(ndev);
ql_queue_asic_error(qdev);
}
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 06/10] drivers/net/usb: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina
Cc: Petko Manolov, Greg Kroah-Hartman,
linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <cover.1289855436.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
---
drivers/net/usb/pegasus.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 6710f093..ef36676 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -359,7 +359,7 @@ fail:
static int mdio_read(struct net_device *dev, int phy_id, int loc)
{
- pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev);
+ pegasus_t *pegasus = netdev_priv(dev);
u16 res;
read_mii_word(pegasus, phy_id, loc, &res);
@@ -397,7 +397,7 @@ fail:
static void mdio_write(struct net_device *dev, int phy_id, int loc, int val)
{
- pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev);
+ pegasus_t *pegasus = netdev_priv(dev);
write_mii_word(pegasus, phy_id, loc, val);
}
--
1.7.3.1.g432b3.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ 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