* Re: [PATCH net-next 0/5] bonding: patchset for rcu use in bonding
From: Ding Tianhong @ 2013-10-22 2:16 UTC (permalink / raw)
To: Veaceslav Falico
Cc: Jay Vosburgh, Andy Gospodarek, David S. Miller,
Nikolay Aleksandrov, Netdev
In-Reply-To: <20131021132136.GE692@redhat.com>
On 2013/10/21 21:21, Veaceslav Falico wrote:
> On Mon, Oct 21, 2013 at 02:41:44PM +0200, Veaceslav Falico wrote:
>> On Mon, Oct 21, 2013 at 08:32:11PM +0800, Ding Tianhong wrote:
>>> On 2013/10/21 17:35, Veaceslav Falico wrote:
>>>> On Mon, Oct 21, 2013 at 05:27:51PM +0800, Ding Tianhong wrote:
>>>>> On 2013/10/21 17:13, Veaceslav Falico wrote:
>>>>>> On Mon, Oct 21, 2013 at 04:58:36PM +0800, Ding Tianhong wrote:
>>>>>>> Hi:
>>>>>>>
>>>>>>> The Patch Set will remove the invalid lock for bond work queue and replace it
>>>>>>> with rtnl lock, as read lock for bond could not protect slave list any more.
>>>>>>
>>>>>> rtnl lock is a lot more expensive than bond lock, and not only for bond,
>>>>>> but for all the networking stack.
>>>>>>
>>>>>> Why is the bond->lock invalid? It correctly protects slaves from being
>>>>>> modified concurrently.
>>>>>>
>>>>>> I don't see the point in this patchset.
>>>>>>
>>>>>
>>>>> yes, rtnl lock is a big lock, but I think bond->lock could not protect
>>>>> bond_for_each_slave any more, am I miss something?
>>>>
>>>> Why can't it protect bond_for_each_slave()?
>>>>
>>>
>>> bond_master_upper_dev_link() and bond_upper_dev_unlink() was only in rtnl lock,
>>> bond_for_each_slave may changed while loop in bond read lock, but it sees that
>>> nothing serious will happen yet.
>>> Maybe I miss something.
>>
>> Even if it is unsafe to use bond_for_each_slave() while holding bond->lock
>> - it means that we must protect the list by locking the
>> bond_upper_dev_(un)link() via bond->lock, but not by removing bond->lock
>> from everywhere where it is now. And I'm not that sure if it's safe or not.
>
> I've quickly looked over the code - yes, theoretically we could race
> between bond_for_each_slave() that is not rtnl-protected and
> bond_upper_dev_(un)link().
>
> Your patchset, also, doesn't 'replace' bond->lock with rtnl_lock(), cause
> everywhere the rtnl_lock() is already present, it just moves it around,
> while removing the bond->lock.
>
> The commit message is wrong and says actually nothing why is it done, how
> is it done, why it's safe to do so and what do we get in the end. For every
> patch, and the cover letter is also not an exception.
>
It is my fault, too lazy to describe the detail for the patch and occurs so many
missmatch, I'll fix it later.
> I'd suggest you either:
>
> 1) add bond->lock around bond_upper_dev_(un)link() (GFP_ATOMIC might be needed).
>
bond_upper_dev_(un)link() will call call_netdevice_notifiers(), it is not safe to call it
in read lock, call_netdevice_notifiers() may sleep or schedule, and sometimes
call_netdevice_notifiers() will read bond lock again.
> or
>
> 2) add ASSERT_RTNL() to bond_for_each_slave() macro, catch all the offenders
> and remove the bond->lock from them. Also, I'm not that sure that it's safe
> to do so - cause one of the slaves (not the slave list) might change, and
> we might have race conditions there.
>
yes, it is not a good idea, as your meaning, it is a big cost, but monitor is a slow path,
I think the cost is acceptable,whatever we should find a better way.
> or
>
> 3) move bond_for_each_slave() to bond_for_each_slave_rcu() where appropriate.
>
> And in any case write specific commit messages - bonding's code is really
> old and full of locks that were placed for some reason (and the reason
> might have gone away long ago, too), so it's really hard to say if the
> change is safe or not.
above all, the 3) is the wise idea, rtnl or rcu, every one is enough for
bond_for_each_slave().
>
> I'd personally go for either 3) (preferred), or 1).
>
> Sorry, I'm a bit tired of going in-depth on your patches. Start either
> doing patches with commit messages that *prove* me that you're right (I'll,
> obviously, verify it - but at least I'll know what you're doing, and won't
> have to figure it out from code), or I'll start explicitly NAKing them.
>
> Sorry again, but I don't really have time for that. I didn't have time to
> review your last patchset (RCUifying the remaining transmit path), and now
> I can understand nothing from their commit description, except that you've
> changed bond_for_each_slave() to bond_for_each_slave_rcu() and bond->lock
> to rcu_read_lock(). I'm not saying that they're wrong, just that they're
> really hard to understand.
>
> So, please, start writing commit messages.
>
>>
>>>
>>> Ding
>>>
>>>
>>>>>
>>>>> Ding
>>>>>
>>>>>>>
>>>>>>> Ding Tianhong (5):
>>>>>>> bonding: remove bond read lock for bond_mii_monitor()
>>>>>>> bonding: remove bond read lock for bond_alb_monitor()
>>>>>>> bonding: remove bond read lock for bond_loadbalance_arp_mon()
>>>>>>> bonding: remove bond read lock for bond_activebackup_arp_mon()
>>>>>>> bonding: remove bond read lock for bond_3ad_state_machine_handler()
>>>>>>>
>>>>>>> drivers/net/bonding/bond_3ad.c | 9 ++--
>>>>>>> drivers/net/bonding/bond_alb.c | 20 ++------
>>>>>>> drivers/net/bonding/bond_main.c | 100 +++++++++++++---------------------------
>>>>>>> 3 files changed, 40 insertions(+), 89 deletions(-)
>>>>>>>
>>>>>>> --
>>>>>>> 1.8.2.1
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> .
>>>>
>>>
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> .
>
^ permalink raw reply
* Re: [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup
From: Prabhakar Lad @ 2013-10-22 2:34 UTC (permalink / raw)
To: Mariusz Ceier
Cc: David S. Miller, Mugunthan V N, Jingoo Han, Jiri Pirko, netdev,
LKML
In-Reply-To: <1382377504-24688-1-git-send-email-mceier+kernel@gmail.com>
Hi Mariusz,
On Mon, Oct 21, 2013 at 11:15 PM, Mariusz Ceier <mceier+kernel@gmail.com> wrote:
> When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
> emac_dev_mcast_set should only enable RX of multicasts and reset
> MACHASH registers.
>
> It does this, but afterwards it either sets up multicast MACs
> filtering or disables RX of multicasts and resets MACHASH registers
> again, rendering IFF_ALLMULTI flag useless.
>
> This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
> disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
>
> Tested with kernel 2.6.37.
>
It would have been better if you would have tested this on the latest kernel.
Anyway David has pulled this patch in his tree.
Regards,
--Prabhakar Lad
^ permalink raw reply
* Re: [PATCH] packet: Deliver VLAN TPID to userspace
From: Atzm Watanabe @ 2013-10-22 2:56 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Stephen Hemminger, netdev
In-Reply-To: <1382347494.25689.8.camel@deadeye.wl.decadent.org.uk>
At Mon, 21 Oct 2013 10:24:54 +0100,
Ben Hutchings wrote:
>
> On Sat, 2013-10-19 at 15:19 +0900, Atzm Watanabe wrote:
> > At Fri, 18 Oct 2013 10:56:55 -0700,
> > Stephen Hemminger wrote:
> > >
> > > On Sat, 19 Oct 2013 02:08:11 +0900
> > > Atzm Watanabe <atzm@stratosphere.co.jp> wrote:
> > >
> > > > diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
> > > > index dbf0666..6e36e0a 100644
> > > > --- a/include/uapi/linux/if_packet.h
> > > > +++ b/include/uapi/linux/if_packet.h
> > > > @@ -83,7 +83,7 @@ struct tpacket_auxdata {
> > > > __u16 tp_mac;
> > > > __u16 tp_net;
> > > > __u16 tp_vlan_tci;
> > > > - __u16 tp_padding;
> > > > + __u16 tp_vlan_tpid;
> > > > };
> > > >
> > > > /* Rx ring - header status */
> > > > @@ -132,12 +132,13 @@ struct tpacket2_hdr {
> > > > __u32 tp_sec;
> > > > __u32 tp_nsec;
> > > > __u16 tp_vlan_tci;
> > > > - __u16 tp_padding;
> > > > + __u16 tp_vlan_tpid;
> > > > };
> > > >
> > > > struct tpacket_hdr_variant1 {
> > > > __u32 tp_rxhash;
> > > > __u32 tp_vlan_tci;
> > > > + __u32 tp_vlan_tpid;
> > > > };
> > >
> > > The last change will break ABI to userspace applications.
> > > You can reuse padding elements; but you can't increase (or shrink)
> > > an existing structure.
> >
> > Thank you for pointing.
> > But I have two questions:
> >
> > - The patch that increases existing structures was posted and
> > accepted in the past (e.g 393e52e33c6c26ec7db290dab803bac1bed962d4
> > "packet: deliver VLAN TCI to userspace").
> > What is the difference between them and my patch?
>
> struct tpacket_auxdata is allowed to grow as it will be written/read
> using the cmsg API where the length of each structure is explicit at
> run-time.
>
> > - I tested using tools/testing/selftests/net/psock_tpacket.c built
> > before applying my patch, and all test cases were passed.
> > Also I tested by the code that was listed in
> > Documentation/networking/packet_mmap.txt "AF_PACKET TPACKET_V3
> > example". It seems that problem was not caused.
> > What situation causes the problem that you assumed?
>
> Yes, it looks like it would be safe to grow struct tpacket3_hdr too, as
> the length is also explicit at run-time.
Thank you for the reply. That's same as my thought!
I'll repost the patch with such additional comments.
> (And TPACKET{1,2,3}_HDRLEN should be removed from
> include/uapi/linux/if_packet.h, as they are not relevant to userland.)
Hmm... I think TPACKET{,2,3}_HDRLEN should not be removed without
careful considerations. Because some userspace programs (e.g libpcap)
are using them in order to check mmap ability of the kernel...
Thanks again!
^ permalink raw reply
* [PATCH 1/3] net: cxgb4vf: use DEFINE_PCI_DEVICE_TABLE
From: Jingoo Han @ 2013-10-22 2:59 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Casey Leedom', 'Jingoo Han'
This macro is used to create a struct pci_device_id array.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 43bb012..5f90ec5 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2905,7 +2905,7 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev)
#define CH_DEVICE(devid, idx) \
{ PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, PCI_ANY_ID, 0, 0, idx }
-static struct pci_device_id cxgb4vf_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(cxgb4vf_pci_tbl) = {
CH_DEVICE(0xb000, 0), /* PE10K FPGA */
CH_DEVICE(0x4800, 0), /* T440-dbg */
CH_DEVICE(0x4801, 0), /* T420-cr */
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/3] net: tulip: use DEFINE_PCI_DEVICE_TABLE
From: Jingoo Han @ 2013-10-22 3:00 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Grant Grundler', 'Jingoo Han'
In-Reply-To: <000e01ceced2$a9e5d970$fdb18c50$%han@samsung.com>
This macro is used to create a struct pci_device_id array.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/dec/tulip/de4x5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index 263b92c..c05b66d 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -2328,7 +2328,7 @@ static void de4x5_pci_remove(struct pci_dev *pdev)
pci_disable_device (pdev);
}
-static struct pci_device_id de4x5_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(de4x5_pci_tbl) = {
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS,
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3/3] net: ksz884x: use DEFINE_PCI_DEVICE_TABLE
From: Jingoo Han @ 2013-10-22 3:01 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Lennert Buytenhek', 'Jingoo Han'
In-Reply-To: <000e01ceced2$a9e5d970$fdb18c50$%han@samsung.com>
This macro is used to create a struct pci_device_id array.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/micrel/ksz884x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 6462dc5..ddd252a 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -7225,7 +7225,7 @@ static int pcidev_suspend(struct pci_dev *pdev, pm_message_t state)
static char pcidev_name[] = "ksz884xp";
-static struct pci_device_id pcidev_table[] = {
+static DEFINE_PCI_DEVICE_TABLE(pcidev_table) = {
{ PCI_VENDOR_ID_MICREL_KS, 0x8841,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ PCI_VENDOR_ID_MICREL_KS, 0x8842,
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH] Revert "bridge: only expire the mdb entry when query is received"
From: Cong Wang @ 2013-10-22 3:02 UTC (permalink / raw)
To: Linus Lüssing
Cc: Stephen Hemminger, Linux Kernel Network Developers, bridge,
David S. Miller, LKML
In-Reply-To: <1382223537-10844-1-git-send-email-linus.luessing@web.de>
On Sat, Oct 19, 2013 at 3:58 PM, Linus Lüssing <linus.luessing@web.de> wrote:
> While this commit was a good attempt to fix issues occuring when no
> multicast querier is present, this commit still has two more issues:
>
> 1) There are cases where mdb entries do not expire even if there is a
> querier present. The bridge will unnecessarily continue flooding
> multicast packets on the according ports.
>
> 2) Never removing an mdb entry could be exploited for a Denial of
> Service by an attacker on the local link, slowly, but steadily eating up
> all memory.
>
I raised the first issue too when I sent the patch, but Herbert said
it is not a problem. So, I will leave this to Herbert to decide.
For me, your patch makes sense.
Thanks.
^ permalink raw reply
* [PATCH V2] staging: r8188eu: Set device type to wlan
From: Larry Finger @ 2013-10-22 3:15 UTC (permalink / raw)
To: gregkh; +Cc: netdev, devel, Larry Finger, Stable
The latest version of NetworkManager does not recognize the device as wireless
without this change.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>a [3.12+]
---
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index da9f0d5..17659bb 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -707,6 +707,10 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname)
return 0;
}
+static const struct device_type wlan_type = {
+ .name = "wlan",
+};
+
struct net_device *rtw_init_netdev(struct adapter *old_padapter)
{
struct adapter *padapter;
@@ -722,6 +726,7 @@ struct net_device *rtw_init_netdev(struct adapter *old_padapter)
if (!pnetdev)
return NULL;
+ pnetdev->dev.type = &wlan_type;
padapter = rtw_netdev_priv(pnetdev);
padapter->pnetdev = pnetdev;
DBG_88E("register rtw_netdev_ops to netdev_ops\n");
--
1.8.4
^ permalink raw reply related
* [PATCH] igb: Add EEPROM IO stubs for iNVM
From: Marek Vasut @ 2013-10-22 3:22 UTC (permalink / raw)
To: netdev
Cc: e1000-devel, Marek Vasut, Carolyn Wyborny, Aaron Brown,
Jeff Kirsher, David S. Miller
Add stub functions for EEPROM operations in case where the i210 is
used without external EEPROM. The EEPROM operations must not be set
to NULL, since otherwise we will get a backtrace when attempting the
command below. Once such place to trigger this is from igb_ethtool.c
igb_set_eeprom(), where hw->nvm.ops.write() is called without first
checking if .write() is valid . By grepping through the code, there
are more such occasions which assume .write() to be always valid.
Thus, instead of poluting the code with checks, add stubs. I believe
it'd be prefferable to possibly even implement those functions, but
my knowledge of the adapter is still limited and as far as I understand,
the iNVM is programmable only once.
Command:
$ ethtool -E eth0 magic 0x157b8086 offset 6 value 0x1b
Backtrace:
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = be7ac000
[00000000] *pgd=4e6a6831, *pte=00000000, *ppte=00000000
Internal error: Oops: 80000007 [#1] SMP ARM
CPU: 2 PID: 59 Comm: ethtool Not tainted 3.12.0-rc6+ #8
task: bf8f3600 ti: be73c000 task.ti: be73c000
PC is at 0x0
LR is at igb_set_eeprom+0x27c/0x3b4
pc : [<00000000>] lr : [<803bc780>] psr: 20000013
sp : be73dd80 ip : 00000000 fp : be73ddf4
r10: 00000001 r9 : 00000003 r8 : be6d6000
r7 : bfa64a38 r6 : be6d7000 r5 : bfa64000 r4 : be73de20
r3 : be6d6000 r2 : 00000001 r1 : 00000003 r0 : bfa64a38
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c53c7d Table: 4e7ac04a DAC: 00000015
Process ethtool (pid: 59, stack limit = 0xbe73c240)
Stack: (0xbe73dd80 to 0xbe73e000)
dd80: 803c7e2c 803c8554 00000000 00000000 00000000 803c827c 00000004 00000000
dda0: 00000000 00000000 00010800 00080008 00000008 be73ddc0 800d1a34 8054db6c
ddc0: be6d6000 00000003 00ad97c8 00000001 be73c000 bfa64000 be6d7000 80584d58
dde0: be73de20 00ad97d8 be73de7c be73ddf8 80465e00 803bc510 be73de14 be6d7000
de00: e4114bb3 00000000 be73de6c 0000000c 8055048c 80076b5c 00000002 00000000
de20: 0000000c 157b8086 00000006 00000001 8094cac0 be73c000 00000000 00000000
de40: be73de7c 00008946 8094cac0 7e8cfcf4 be73de98 00008946 8094cac0 7e8cfcf4
de60: be73de98 be73c000 00000000 00000000 be73dee4 be73de80 80474f54 804656ac
de80: 000000a8 00000200 be73dec4 be73de98 80077c7c 80076b5c 30687465 00000000
dea0: 00000000 00000000 00ad97c8 00000000 00000000 00000000 be73c000 00008946
dec0: fffffdfd 7e8cfcf4 7e8cfcf4 7e8cfcf4 bf18c020 00000000 be73df04 be73dee8
dee0: 80449c18 80474ac8 80449b94 00008946 be6b0600 00000003 be73df74 be73df08
df00: 800e6d10 80449ba0 be6b0600 00030002 be6b5f40 be6b5f40 be73df3c be73df28
df20: 80554b2c 802b03e8 be6b5f6c be6b5f00 be73df5c be73c000 8000ea44 be73c000
df40: 8000eab0 bf8f3600 00000001 00008946 00000003 00000000 7e8cfcf4 be6b0600
df60: be73c000 00000000 be73dfa4 be73df78 800e72ac 800e6c98 be73df94 00000000
df80: 80076b64 0002bd0c 00000000 0002bcc8 00000036 8000ebe4 00000000 be73dfa8
dfa0: 8000ea20 800e7278 0002bd0c 00000000 00000003 00008946 7e8cfcf4 7e8cfcf4
dfc0: 0002bd0c 00000000 0002bcc8 00000036 00000000 00000000 00000000 7e8cfb84
dfe0: 7e8cfe65 7e8cfb78 0001201c 0004535c 20000010 00000003 00000000 00000000
Backtrace:
[<803bc504>] (igb_set_eeprom+0x0/0x3b4) from [<80465e00>] (dev_ethtool+0x760/0x1f68)
[<804656a0>] (dev_ethtool+0x0/0x1f68) from [<80474f54>] (dev_ioctl+0x498/0x86c)
[<80474abc>] (dev_ioctl+0x0/0x86c) from [<80449c18>] (sock_ioctl+0x84/0x258)
[<80449b94>] (sock_ioctl+0x0/0x258) from [<800e6d10>] (do_vfs_ioctl+0x84/0x5e0)
r6:00000003 r5:be6b0600 r4:00008946 r3:80449b94
[<800e6c8c>] (do_vfs_ioctl+0x0/0x5e0) from [<800e72ac>] (SyS_ioctl+0x40/0x68)
[<800e726c>] (SyS_ioctl+0x0/0x68) from [<8000ea20>] (ret_fast_syscall+0x0/0x48)
r8:8000ebe4 r7:00000036 r6:0002bcc8 r5:00000000 r4:0002bd0c
Code: bad PC value
---[ end trace 59379e9bf8fc8437 ]---
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>
Cc: Aaron Brown <aaron.f.brown@intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: David S. Miller <davem@davemloft.net>
---
drivers/net/ethernet/intel/igb/e1000_i210.c | 46 +++++++++++++++++++++++++++--
1 file changed, 43 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_i210.c b/drivers/net/ethernet/intel/igb/e1000_i210.c
index 0c03933..e4492fd 100644
--- a/drivers/net/ethernet/intel/igb/e1000_i210.c
+++ b/drivers/net/ethernet/intel/igb/e1000_i210.c
@@ -455,6 +455,46 @@ static s32 igb_read_invm_i210(struct e1000_hw *hw, u16 offset,
}
/**
+ * igb_write_invm_i210 - Write invm stub function for I210/I211
+ * @hw: pointer to the HW structure
+ * @offset: offset within the iNVM to be written to
+ * @words: number of words to write
+ * @data: 16 bit word(s) to be written to the iNVM
+ *
+ * This is just a stub for unimplemented function.
+ **/
+static s32 igb_write_invm_i210(struct e1000_hw *hw, u16 offset, u16 words,
+ u16 *data)
+{
+ /* Unimplemented. */
+ return E1000_ERR_NVM;
+}
+
+/**
+ * igb_validate_invm_checksum_i210 - Validate EEPROM checksum
+ * @hw: pointer to the HW structure
+ *
+ * This is just a stub for unimplemented function.
+ **/
+s32 igb_validate_invm_checksum_i210(struct e1000_hw *hw)
+{
+ /* Unimplemented. */
+ return E1000_ERR_NVM;
+}
+
+/**
+ * igb_update_invm_checksum_i210 - Update EEPROM checksum
+ * @hw: pointer to the HW structure
+ *
+ * This is just a stub for unimplemented function.
+ **/
+s32 igb_update_invm_checksum_i210(struct e1000_hw *hw)
+{
+ /* Unimplemented. */
+ return E1000_ERR_NVM;
+}
+
+/**
* igb_read_invm_version - Reads iNVM version and image type
* @hw: pointer to the HW structure
* @invm_ver: version structure for the version read
@@ -829,9 +869,9 @@ s32 igb_init_nvm_params_i210(struct e1000_hw *hw)
} else {
hw->nvm.type = e1000_nvm_invm;
nvm->ops.read = igb_read_invm_i210;
- nvm->ops.write = NULL;
- nvm->ops.validate = NULL;
- nvm->ops.update = NULL;
+ nvm->ops.write = igb_write_invm_i210;
+ nvm->ops.validate = igb_validate_invm_checksum_i210;
+ nvm->ops.update = igb_update_invm_checksum_i210;
}
return ret_val;
}
--
1.8.4.rc3
^ permalink raw reply related
* Re: [PATCH 2/3] net: tulip: use DEFINE_PCI_DEVICE_TABLE
From: Grant Grundler @ 2013-10-22 3:37 UTC (permalink / raw)
To: Jingoo Han
Cc: David S. Miller, open list:TULIP NETWORK DRI..., Grant Grundler
In-Reply-To: <000f01ceced2$dde772b0$99b65810$%han@samsung.com>
On Mon, Oct 21, 2013 at 8:00 PM, Jingoo Han <jg1.han@samsung.com> wrote:
> This macro is used to create a struct pci_device_id array.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
LGTM.
Acked-by: Grant Grundler <grundler@parisc-linux.org>
> ---
> drivers/net/ethernet/dec/tulip/de4x5.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
> index 263b92c..c05b66d 100644
> --- a/drivers/net/ethernet/dec/tulip/de4x5.c
> +++ b/drivers/net/ethernet/dec/tulip/de4x5.c
> @@ -2328,7 +2328,7 @@ static void de4x5_pci_remove(struct pci_dev *pdev)
> pci_disable_device (pdev);
> }
>
> -static struct pci_device_id de4x5_pci_tbl[] = {
> +static DEFINE_PCI_DEVICE_TABLE(de4x5_pci_tbl) = {
> { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP,
> PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
> { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS,
> --
> 1.7.10.4
>
>
^ permalink raw reply
* [PATCH net-next] net: remove function sk_reset_txq()
From: ZHAO Gang @ 2013-10-22 4:11 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, linux-kernel
What sk_reset_txq() does is just calls function sk_tx_queue_reset(),
and sk_reset_txq() is used only in sock.h, by dst_negative_advice().
Let dst_negative_advice() calls sk_tx_queue_reset() directly so we
can remove unneeded sk_reset_txq().
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com>
---
include/net/sock.h | 4 +---
net/core/sock.c | 6 ------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index 1d37a80..db66682 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1752,8 +1752,6 @@ sk_dst_get(struct sock *sk)
return dst;
}
-extern void sk_reset_txq(struct sock *sk);
-
static inline void dst_negative_advice(struct sock *sk)
{
struct dst_entry *ndst, *dst = __sk_dst_get(sk);
@@ -1763,7 +1761,7 @@ static inline void dst_negative_advice(struct sock *sk)
if (ndst != dst) {
rcu_assign_pointer(sk->sk_dst_cache, ndst);
- sk_reset_txq(sk);
+ sk_tx_queue_clear(sk);
}
}
}
diff --git a/net/core/sock.c b/net/core/sock.c
index 5b6beba..3f1545f 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -475,12 +475,6 @@ discard_and_relse:
}
EXPORT_SYMBOL(sk_receive_skb);
-void sk_reset_txq(struct sock *sk)
-{
- sk_tx_queue_clear(sk);
-}
-EXPORT_SYMBOL(sk_reset_txq);
-
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
{
struct dst_entry *dst = __sk_dst_get(sk);
--
1.8.3.1
^ permalink raw reply related
* [PATCH 00/15] net: ethernet: remove unnecessary pci_set_drvdata() part 3
From: Jingoo Han @ 2013-10-22 4:13 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound),
the driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
---
drivers/net/ethernet/pasemi/pasemi_mac.c | 1 -
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 --
drivers/net/ethernet/qlogic/qla3xxx.c | 2 --
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 --
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 1 -
drivers/net/ethernet/rdc/r6040.c | 2 --
drivers/net/ethernet/realtek/8139cp.c | 1 -
drivers/net/ethernet/realtek/8139too.c | 1 -
drivers/net/ethernet/realtek/r8169.c | 1 -
drivers/net/ethernet/sis/sis190.c | 1 -
drivers/net/ethernet/smsc/epic100.c | 1 -
drivers/net/ethernet/smsc/smsc9420.c | 2 --
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 1 -
drivers/net/ethernet/sun/cassini.c | 2 --
drivers/net/ethernet/sun/sunhme.c | 2 --
15 files changed, 22 deletions(-)
^ permalink raw reply
* [PATCH 01/15] net: pasemi: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:14 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Olof Johansson'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/pasemi/pasemi_mac.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
index 5b65356..dbaa49e 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -1870,7 +1870,6 @@ static void pasemi_mac_remove(struct pci_dev *pdev)
pasemi_dma_free_chan(&mac->tx->chan);
pasemi_dma_free_chan(&mac->rx->chan);
- pci_set_drvdata(pdev, NULL);
free_netdev(netdev);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 02/15] net: netxen: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:15 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Manish Chopra',
'Sony Chacko', 'Rajesh Borundia'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 5ec21c5..3bec8cf 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -1630,7 +1630,6 @@ err_out_free_res:
pci_release_regions(pdev);
err_out_disable_pdev:
- pci_set_drvdata(pdev, NULL);
pci_disable_device(pdev);
return err;
}
@@ -1689,7 +1688,6 @@ static void netxen_nic_remove(struct pci_dev *pdev)
pci_release_regions(pdev);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
free_netdev(netdev);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 03/15] net: qlge: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:15 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Shahed Shaikh',
'Jitendra Kalsaria', 'Ron Mercer'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 64f9409..a245dc1 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4577,7 +4577,6 @@ static void ql_release_all(struct pci_dev *pdev)
iounmap(qdev->doorbell_area);
vfree(qdev->mpi_coredump);
pci_release_regions(pdev);
- pci_set_drvdata(pdev, NULL);
}
static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev,
--
1.7.10.4
^ permalink raw reply related
* [PATCH 04/15] net: qlcnic: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:16 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Himanshu Madhani',
'Rajesh Borundia', 'Shahed Shaikh',
'Jitendra Kalsaria', 'Sony Chacko',
'Sucheta Chakraborty'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 0274832..24e6b11 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2406,7 +2406,6 @@ err_out_free_res:
pci_release_regions(pdev);
err_out_disable_pdev:
- pci_set_drvdata(pdev, NULL);
pci_disable_device(pdev);
return err;
@@ -2482,7 +2481,6 @@ static void qlcnic_remove(struct pci_dev *pdev)
pci_disable_pcie_error_reporting(pdev);
pci_release_regions(pdev);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
if (adapter->qlcnic_wq) {
destroy_workqueue(adapter->qlcnic_wq);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 05/15] net: qla3xxx: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:16 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Jitendra Kalsaria',
'Ron Mercer'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/qlogic/qla3xxx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c
index 91a8fcd..0758b94 100644
--- a/drivers/net/ethernet/qlogic/qla3xxx.c
+++ b/drivers/net/ethernet/qlogic/qla3xxx.c
@@ -3916,7 +3916,6 @@ err_out_free_regions:
pci_release_regions(pdev);
err_out_disable_pdev:
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
err_out:
return err;
}
@@ -3939,7 +3938,6 @@ static void ql3xxx_remove(struct pci_dev *pdev)
iounmap(qdev->mem_map_registers);
pci_release_regions(pdev);
- pci_set_drvdata(pdev, NULL);
free_netdev(ndev);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 06/15] net: r6040: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:17 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Florian Fainelli'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/rdc/r6040.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index e9dc849..1e49ec5 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -1231,7 +1231,6 @@ err_out_mdio:
mdiobus_free(lp->mii_bus);
err_out_unmap:
netif_napi_del(&lp->napi);
- pci_set_drvdata(pdev, NULL);
pci_iounmap(pdev, ioaddr);
err_out_free_res:
pci_release_regions(pdev);
@@ -1257,7 +1256,6 @@ static void r6040_remove_one(struct pci_dev *pdev)
pci_release_regions(pdev);
free_netdev(dev);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 07/15] net: 8139cp: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:17 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/realtek/8139cp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index d2e5919..f2a2128 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -2052,7 +2052,6 @@ static void cp_remove_one (struct pci_dev *pdev)
pci_release_regions(pdev);
pci_clear_mwi(pdev);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
free_netdev(dev);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 08/15] net: 8139too: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:17 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/realtek/8139too.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
index 3ccedeb..50a9210 100644
--- a/drivers/net/ethernet/realtek/8139too.c
+++ b/drivers/net/ethernet/realtek/8139too.c
@@ -727,7 +727,6 @@ static void __rtl8139_cleanup_dev (struct net_device *dev)
pci_release_regions (pdev);
free_netdev(dev);
- pci_set_drvdata (pdev, NULL);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 09/15] net: r8169: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:18 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han',
'Realtek linux nic maintainers',
'Francois Romieu'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/realtek/r8169.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 3397cee..7993875 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6811,7 +6811,6 @@ static void rtl_remove_one(struct pci_dev *pdev)
rtl_disable_msi(pdev, tp);
rtl8169_release_board(pdev, dev, tp->mmio_addr);
- pci_set_drvdata(pdev, NULL);
}
static const struct net_device_ops rtl_netdev_ops = {
--
1.7.10.4
^ permalink raw reply related
* [PATCH 10/15] net: sis190: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:18 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Francois Romieu'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/sis/sis190.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index ee18e6f..acbbe48 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -1921,7 +1921,6 @@ static void sis190_remove_one(struct pci_dev *pdev)
cancel_work_sync(&tp->phy_task);
unregister_netdev(dev);
sis190_release_board(pdev);
- pci_set_drvdata(pdev, NULL);
}
static struct pci_driver sis190_pci_driver = {
--
1.7.10.4
^ permalink raw reply related
* [PATCH 11/15] net: epic100: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:19 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/smsc/epic100.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/smsc/epic100.c b/drivers/net/ethernet/smsc/epic100.c
index 03b256a..8c5c24a 100644
--- a/drivers/net/ethernet/smsc/epic100.c
+++ b/drivers/net/ethernet/smsc/epic100.c
@@ -1535,7 +1535,6 @@ static void epic_remove_one(struct pci_dev *pdev)
pci_release_regions(pdev);
free_netdev(dev);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
/* pci_power_off(pdev, -1); */
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 12/15] net: smsc9420: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:19 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Steve Glendinning'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/smsc/smsc9420.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
index 5f9e79f..e55e336 100644
--- a/drivers/net/ethernet/smsc/smsc9420.c
+++ b/drivers/net/ethernet/smsc/smsc9420.c
@@ -1707,8 +1707,6 @@ static void smsc9420_remove(struct pci_dev *pdev)
if (!dev)
return;
- pci_set_drvdata(pdev, NULL);
-
pd = netdev_priv(dev);
unregister_netdev(dev);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 13/15] net: stmmac: remove unnecessary pci_set_drvdata()
From: Jingoo Han @ 2013-10-22 4:20 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Jingoo Han', 'Giuseppe Cavallaro'
In-Reply-To: <000601cecedd$1981e300$4c85a900$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index 023b7c2..644d80e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -138,7 +138,6 @@ static void stmmac_pci_remove(struct pci_dev *pdev)
stmmac_dvr_remove(ndev);
- pci_set_drvdata(pdev, NULL);
pci_iounmap(pdev, priv->ioaddr);
pci_release_regions(pdev);
pci_disable_device(pdev);
--
1.7.10.4
^ 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