- Jul 26, 2011
-
-
Arun Sharma authored
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by:
Arun Sharma <asharma@fb.com> Reviewed-by:
Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Jul 12, 2011
-
-
Sergei Shtylyov authored
The driver reads PCI subsystem IDs from the PCI configuration registers while it is already stored by the PCI subsystem in the 'subsystem_device' field of 'struct pci_dev'... Signed-off-by:
Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 08, 2011
-
-
Wang Shaoyan authored
The macro FILL_RX_POOLS_IN_BH is never been used, in order to avoid the compiler reports error because of the usage of function INIT_WORK, we just delete the marco. Cc: Chas Williams <chas@cmf.nrl.navy.mil> Cc: linux-atm-general@lists.sourceforge.net Signed-off-by:
Wang Shaoyan <wangshaoyan.pt@taobao.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jun 06, 2011
-
-
Alexey Dobriyan authored
* remove interrupt.g inclusion from netdevice.h -- not needed * fixup fallout, add interrupt.h and hardirq.h back where needed. Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- May 18, 2011
-
-
Grant Likely authored
Commit b826291c, "drivercore/dt: add a match table pointer to struct device" added an of_match pointer to struct device to cache the of_match_table entry discovered at driver match time. This was unsafe because matching is not an atomic operation with probing a driver. If two or more drivers are attempted to be matched to a driver at the same time, then the cached matching entry pointer could get overwritten. This patch reverts the of_match cache pointer and reworks all users to call of_match_device() directly instead. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- Apr 17, 2011
-
-
David S. Miller authored
This is just a readback to entire completion of a register write, keep the readback but kill the unused variable. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Two cases here: 1) idt77252_rx_raw() really does not make any use of the extracted PTI field of the atm header. 2) idt77252_collect_stat() only uses the register values in code which has been compiled out by a "NOTDEF" cpp test for more than 10 years. Just kill this NOTDEF code entirely, but keep the register reads in case they have side effects. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
GCC complains in these queue index operations because we perform operations of the form: x = some_operation(++x); which is undefined. Replace with: x = some_operation(x + 1); which is well defined and provides the intended operation. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
The variable eni_dev is initialized but never subsequently used in these two functions. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 12, 2011
-
-
David S. Miller authored
The "iavcc" and "iadev" cases are obvious. The intr_status and frmr_intr cases are reading a register to clear the chip status. This driver is pretty old and creaky, and uses volatile pointer dereferences to do register I/O when it should be using readl() and friends. However that it outside of the scope of these changes. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 31, 2011
-
-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
-
- Mar 30, 2011
-
-
Philip A. Prindeville authored
Don't flap VCs when carrier state changes; higher-level protocols can detect loss of connectivity and act accordingly. This is more consistent with how other network interfaces work. We no longer use release_vccs() so we can delete it. release_vccs() was duplicated from net/atm/common.c; make the corresponding function exported, since other code duplicates it and could leverage it if it were public. Signed-off-by:
Philip A. Prindeville <philipp@redfish-solutions.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Philip A. Prindeville authored
Omit pkt_hdr preamble when dumping transmitted packet as hex-dump; we can pull this up because the frame has already been sent, and dumping it is the last thing we do with it before freeing it. Also include the size, vpi, and vci in the debug as is done on receive. Use "port" consistently instead of "device" intermittently. Signed-off-by:
Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Philip A. Prindeville authored
Use VPI.VCI notation consistently throughout the module. This is the one remaining place where the VCI is used before the VPI in any output. Signed-off-by:
Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 28, 2011
-
-
Grant Likely authored
Final step to eliminate of_platform_bus_type. They're all just platform drivers now. v2: fix type in pasemi_nand.c (thanks to Stephen Rothwell) Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- Feb 13, 2011
-
-
Jesper Juhl authored
If alloc_skb() fails to allocate memory and returns NULL then we want to return -ENOMEM from drivers/atm/solos-pci.c::popen() regardless of the value of net_ratelimit(). The way the code is today, we may not return if net_ratelimit() returns 0, then we'll proceed to pass a NULL pointer to skb_put() which will blow up in our face. This patch ensures that we always return -ENOMEM on alloc_skb() failure and only let the dev_warn() be controlled by the value of net_ratelimit(). Signed-off-by:
Jesper Juhl <jj@chaosbits.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 02, 2011
-
-
Justin P. Mattock authored
Signed-off-by:
Justin P. Mattock <justinmattock@gmail.com>
-
- Jan 21, 2011
-
-
Vasiliy Kulikov authored
copy_to_user() used PRIV(dev)->stats instead of local stats variable. Zero stats were returned to user in case of (zero != 0), also memcpy() was pointless. Signed-off-by:
Vasiliy Kulikov <segoon@openwall.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 09, 2011
-
-
Jesper Juhl authored
Madge Ambassador ATM Adapter driver: Always release_firmware() in ucode_init() and don't leak memory. Failure to call release_firmware() will result in memory leak in drivers/atm/ambassador.c::ucode_init(). This patch makes sure we always call release_firmware() when needed, thus removing the leak(s). Yes, I know checkpatch complains about this patch, but it was either that or completely mess up the existing style, so I opted to use the existing style and live with the checkpatch related flak. Signed-off-by:
Jesper Juhl <jj@chaosbits.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Dec 31, 2010
-
-
Julia Lawall authored
The earlier call to atm_dev_lookup increases the reference count of dev, so decrease it on the way out. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @@ expression x, E; constant C; @@ x = atm_dev_lookup(...); ... when != false x != NULL when != true x == NULL when != \(E = x\|x = E\) when != atm_dev_put(dev); *return -C; // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Dec 10, 2010
-
-
Dan Williams authored
The ATM subsystem was incorrectly creating the 'device' link for ATM nodes in sysfs. This led to incorrect device/parent relationships exposed by sysfs and udev. Instead of rolling the 'device' link by hand in the generic ATM code, pass each ATM driver's bus device down to the sysfs code and let sysfs do this stuff correctly. Signed-off-by:
Dan Williams <dcbw@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Dec 08, 2010
-
-
Andy Shevchenko authored
Signed-off-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Chas Williams <chas@cmf.nrl.navy.mil> Cc: linux-atm-general@lists.sourceforge.net Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Nov 18, 2010
-
-
David S. Miller authored
GCC (rightfully) complains that: drivers/atm/fore200e.c:614:5: warning: operation on 'cmdq->head' may be undefined This is due to the FORE200E_NEXT_ENTRY macro, which essentially evaluates to: i = ++i % m Make it what's explicitly intended here which is: i = (i + 1) % m and the warning goes away. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Nov 08, 2010
-
-
David Woodhouse authored
Signed-off-by:
David Woodhouse <David.Woodhouse@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David Woodhouse authored
The existing 'FirmwareVersion' attribute only covers the DSP firmware as provided by Conexant; not the overall version of the device firmware. We do want to be able to see the full version number too. Signed-off-by:
David Woodhouse <David.Woodhouse@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Nov 01, 2010
-
-
Uwe Kleine-König authored
"gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Oct 26, 2010
-
-
Joe Perches authored
Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 21, 2010
-
-
Tracey Dent authored
Changed <module>-objs to <module>-y in Makefile. Signed-off-by:
Tracey Dent <tdent48227@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 18, 2010
-
-
Justin P. Mattock authored
The patch below updates broken web addresses in the kernel Signed-off-by:
Justin P. Mattock <justinmattock@gmail.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Finn Thain <fthain@telegraphics.com.au> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Matt Turner <mattst88@gmail.com> Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Acked-by:
Ben Pfaff <blp@cs.stanford.edu> Acked-by:
Hans J. Koch <hjk@linutronix.de> Reviewed-by:
Finn Thain <fthain@telegraphics.com.au> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Oct 11, 2010
-
-
Jiri Slaby authored
Stanse found that ia_init_one locks a spinlock and inside of that it calls ia_start which calls: * request_irq * tx_init which does kmalloc(GFP_KERNEL) Both of them can thus sleep and result in a deadlock. I don't see a reason to have a per-device spinlock there which is used only there and inited right before the lock location. So remove it completely. Signed-off-by:
Jiri Slaby <jslaby@suse.cz> Cc: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jiri Slaby authored
Stanse found we do in console_show: kfree_skb(skb); return skb->len; which is not good. Fix that by remembering the len and use it in the function instead. Signed-off-by:
Jiri Slaby <jslaby@suse.cz> Cc: Chas Williams <chas@cmf.nrl.navy.mil> Acked-by:
Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 03, 2010
-
-
Julia Lawall authored
This code does not call deinit_card(card); in an error case, as done in other error-handling code in the same function. But actually, the called function init_sram can only return 0, so there is no need for the error check at all. init_sram is also given a void return type, and its single return statement at the end of the function is dropped. A simplified version of the sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @r exists@ @r@ statement S1,S2,S3; constant C1,C2,C3; @@ *if (...) {... S1 return -C1;} ... *if (...) {... when != S1 return -C2;} ... *if (...) {... S1 return -C3;} // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 21, 2010
-
-
Andy Shevchenko authored
Signed-off-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Chas Williams <chas@cmf.nrl.navy.mil> Cc: linux-atm-general@lists.sourceforge.net Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 06, 2010
-
-
Julia Lawall authored
The function has an unsigned return type, but returns a negative constant to indicate an error condition. The result of calling the function is always stored in a variable of type (signed) int, and thus unsigned can be dropped from the return type. A sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @exists@ identifier f; constant C; @@ unsigned f(...) { <+... * return -C; ...+> } // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 16, 2010
-
-
Julia Lawall authored
Indent the branch of an if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (...) { ... } | if (...) S1@p1 S2@p2 ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].column == p2[0].column): cocci.print_main("branch",p1) cocci.print_secs("after",p2) // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 08, 2010
-
-
David Woodhouse authored
We were seeing faults in the solos-pci receive tasklet when packets arrived for a VCC which was currently being closed: [18842.727906] EIP: [<e082f490>] br2684_push+0x19/0x234 [br2684] SS:ESP 0068:dfb89d14 [18845.090712] [<c13ecff3>] ? do_page_fault+0x0/0x2e1 [18845.120042] [<e082f490>] ? br2684_push+0x19/0x234 [br2684] [18845.153530] [<e084fa13>] solos_bh+0x28b/0x7c8 [solos_pci] [18845.186488] [<e084f711>] ? solos_irq+0x2d/0x51 [solos_pci] [18845.219960] [<c100387b>] ? handle_irq+0x3b/0x48 [18845.247732] [<c10265cb>] ? irq_exit+0x34/0x57 [18845.274437] [<c1025720>] tasklet_action+0x42/0x69 [18845.303247] [<c102643f>] __do_softirq+0x8e/0x129 [18845.331540] [<c10264ff>] do_softirq+0x25/0x2a [18845.358274] [<c102664c>] _local_bh_enable_ip+0x5e/0x6a [18845.389677] [<c102666d>] local_bh_enable+0xb/0xe [18845.417944] [<e08490a8>] ppp_unregister_channel+0x32/0xbb [ppp_generic] [18845.458193] [<e08731ad>] pppox_unbind_sock+0x18/0x1f [pppox] This patch uses an RCU-inspired approach to fix it. In the RX tasklet's find_vcc() function we first refuse to use a VCC which already has the ATM_VF_READY bit cleared. And in the VCC close function, we synchronise with the tasklet to ensure that it can't still be using the VCC before we continue and allow the VCC to be destroyed. Signed-off-by:
David Woodhouse <David.Woodhouse@intel.com> Tested-by:
Nathan Williams <nathan@traverse.com.au> Cc: stable@kernel.org Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 06, 2010
-
-
Grant Likely authored
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Reviewed-by:
David S. Miller <davem@davemloft.net>
-
- Jul 24, 2010
-
-
Grant Likely authored
Both of_bus_type and of_platform_bus_type are just #define aliases for the platform bus. This patch removes all references to them and switches to the of_register_platform_driver()/of_unregister_platform_driver() API for registering. Subsequent patches will convert each user of of_register_platform_driver() into plain platform_drivers without the of_platform_driver shim. At which point the of_register_platform_driver()/of_unregister_platform_driver() functions can be removed. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
David S. Miller <davem@davemloft.net>
-
- Jul 23, 2010
-
-
Andy Shevchenko authored
Signed-off-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Chas Williams <chas@cmf.nrl.navy.mil> Cc: linux-atm-general@lists.sourceforge.net Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 15, 2010
-
-
Peter Huewe authored
This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by:
Peter Huewe <peterhuewe@gmx.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-