aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-04-02ipvlan: implement ndo_get_iflinkNicolas Dichtel1-1/+8
Don't use dev->iflink anymore. CC: Mahesh Bandewar <maheshb@google.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-02macvlan: implement ndo_get_iflinkNicolas Dichtel1-1/+8
Don't use dev->iflink anymore. CC: Patrick McHardy <kaber@trash.net> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-02vlan: implement ndo_get_iflinkNicolas Dichtel1-1/+8
Don't use dev->iflink anymore. CC: Patrick McHardy <kaber@trash.net> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-02ipmr,ip6mr: implement ndo_get_iflinkNicolas Dichtel2-2/+12
Don't use dev->iflink anymore. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-02ipip,gre,vti,sit: implement ndo_get_iflinkNicolas Dichtel6-5/+14
Don't use dev->iflink anymore. CC: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-02ip6tnl,gre6,vti6: implement ndo_get_iflinkNicolas Dichtel4-10/+12
Don't use dev->iflink anymore. CC: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-02dev: introduce dev_get_iflink()Nicolas Dichtel11-18/+48
The goal of this patch is to prepare the removal of the iflink field. It introduces a new ndo function, which will be implemented by virtual interfaces. There is no functional change into this patch. All readers of iflink field now call dev_get_iflink(). Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01crypto: algif - explicitly mark end of datatadeusz.struk@intel.com1-4/+8
After the TX sgl is expanded we need to explicitly mark end of data at the last buffer that contains data. Changes in v2 - use type 'bool' and true/false for 'mark'. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01Merge branch 'dsa-next'David S. Miller6-764/+728
Andrew Lunn says: ==================== DSA Mavell drivers refactoring and cleanup v1->v2: * Add missing signed-of-by: For patches authored by Guenter Roeck. * Add Reviewed by from Guenter Roack to patch #5. This is a collection of patches again net-next from today containing refactoring and consolidate of code, cleanups and using #define's to replace register numbers. Patch #1 Swaps the 6131 driver to use the consolidated setup code. Patch #2 Moves the Switch IDs used during probe into a central location. We need these later so that we can differentiate the different features the devices have. Patch #3 Makes the 6131 driver set the number of ports in the private state structure. It then uses this, rather than hard coded maximum number of ports. Patch #4 Similar to Patch #3, but for the 6123_61_65 driver. Patch #5 Similar to Patch #3, and #4, but for all the remaining drivers. This greatly increases the similarity of the code between drivers, allow further patches to consolidate the duplicated code. Patch #6 Consolidate the switch reset code, which has two minor variants. Removes around 35 lines per driver. Patch #7 Moves phy page access functions out of the 6352 driver into the shared code. Currently only the 6352 driver uses this, but it is likely other devices will come along wanting this functionality. Patch #8 Consolidates the code used to access phy registers. Removes around 40 lines of code per driver. Patch #9 Fixes missing mutex locking in the EEE code, and refactors the code a bit to make it more understandable with respect to locks. Patch #10 Consolidates reading statistics. This is very similar code for all devices, but the number of available statistics differ, which can be determined from the product ID. Removes around 65 lines per driver. Patch #11 Add #defines for registers, and bits within the registers. For the moment, this is limited to the shared code. The individual drivers will be converted once the remaining duplicated code is consolidated Patch #12 Fix broken statistic counters on the 6172. The 6352 family requires the port number is poked into a different set of bits in the register compared to other devices. Many thanks to Guenter Roeck for repeatedly reviewing the patches and testing them on his hardware. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: mv88e6xxx: Fix stats counters for 6352 familyAndrew Lunn1-0/+16
The statistic counters for the mv88e6172 never worked. This device is a member of the 6352 family of chips, which has a slightly different layout of the register used for capturing statistics. Add support for detecting this family and poking the port in the right place in the register. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: Use mnemonics rather than register numbersAndrew Lunn6-178/+335
Rather than refer to registers by number, define mnemonics. Also define mnemonics for the commonly used bits within the registers. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: Consolidate getting the statisticsAndrew Lunn6-241/+110
Reading the statistics from the hardware is the same for all chips. What differs is the number of available statistics. Have just one copy of the code in the shared mv88e6xxx. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: mv88e6xxx: Add missing mutex's in EEE operations.Andrew Lunn1-29/+30
The phy_mutex should be held while reading and writing to the phy. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: Consolidate phy read and write functionsAndrew Lunn5-146/+110
Move the common code for reading and writing phy registers into the shared mv88e6xxx. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: Move phy page access functions into shared codeAndrew Lunn3-41/+42
These functions could in future be used by other drivers. Move them into the shared area. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: Centralize Marvell switch resetAndrew Lunn6-154/+45
Marvell switches are all reset in nearly the same way. The only difference is if the PPU should be enabled or not. Move this code into the shared mv88x6xxx.c. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: Consistently set and use ps->num_portsAndrew Lunn2-11/+22
As a step towards consolidating code, consistently set the number of ports in the private state structure, and make use of it in loops. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: mv88e6123_61_65: Determine and use number of switch portsGuenter Roeck1-16/+38
Determine and use number of switch ports from chip ID instead of always using the maximum, and return error when an attempt is made to access a non-existing port. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: mv88e6131: Determine and use number of switch portsGuenter Roeck2-7/+36
Determine and use number of switch ports from chip ID instead of always using the maximum, and return error when an attempt is made to access a non-existing port. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: mv88e6xxx: Move switch product IDs into common include fileGuenter Roeck3-10/+36
This will let us use the switch product IDs in the common source code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: dsa: mv88e6131: Use common initialization functionsGuenter Roeck1-28/+5
Common initialization functions will be needed to enable HW bridging support. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01pkt_sched: fq: correct spelling of locallySimon Horman1-2/+2
Correct spelling of locally. Also remove extra space before tab character in struct fq_flow. Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01vxlan: correct spelling in commentsSimon Horman1-3/+3
Fix some spelling / typos: * droppped -> dropped * asddress -> address * compatbility -> compatibility Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01vmxnet3: spelling fixesstephen hemminger1-2/+2
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01vxge: Add const to ethtool_driver_stats_keysJoe Perches2-19/+19
Move about half a KB of data to text. Miscellanea: o Move strings out of the .h file into the .c file in case the .h file is ever #included twice Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01crypto: algif - use kmalloc instead of kzallocTadeusz Struk1-1/+1
No need to use kzalloc to allocate sgls as the structure is initialized anyway. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01crypto: af_alg - make exports consistantTadeusz Struk1-1/+1
Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01Merge tag 'wireless-drivers-for-davem-2015-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-driversDavid S. Miller1-0/+1
Kalle Valo says: ==================== iwlwifi: * fix a memory leak, we leaked memory each time the module was loaded. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01Merge branch 'cxgb4-net'David S. Miller6-32/+106
Hariprasad Shenai says: ==================== cxgb4 FW macro changes for new FW Fix to dump device log even in the case of firmware crash. Also incorporates changes for new FW. This patch series has been created against net tree and includes patches on cxgb4 driver. We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01cxgb4: Fix to dump devlog, even if FW is crashedHariprasad Shenai4-26/+65
Add new Common Code routines to retrieve Firmware Device Log parameters from PCIE_FW_PF[7]. The firmware initializes its Device Log very early on and stores the parameters for its location/size in that register. Using the parameters from the register allows us to access the Firmware Device Log even when the firmware crashes very early on or we're not attached to the firmware Based on original work by Casey Leedom <leedom@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01cxgb4: Firmware macro changes for fw verison 1.13.32.0Hariprasad Shenai2-6/+41
Adds new macro and few macro changes for fw version 1.13.32.0 also changes version string in driver to match 1.13.32.0 Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01chelsio cxgb/cxgb3: Make stats_strings arrays constJoe Perches2-2/+2
Move ~2KB of strings in each driver from data to text. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01Merge tag 'wireless-drivers-next-for-davem-2015-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller140-1344/+4459
Kalle Valo says: ==================== Major changes: ath9k: * add Active Interference Cancellation, a method implemented in the HW to counter WLAN RX > sensitivity degradation when BT is transmitting at the same time. This feature is supported by cards like WB222 based on AR9462. iwlwifi: * Location Aware Regulatory was added by Arik * 8000 device family work * update to the BT Coex firmware API brmcfmac: * add new BCM43455 and BCM43457 SDIO device support * add new BCM43430 SDIO device support wil6210: * take care of AP bridging * fix NAPI behavior * found approach to achieve 4*n+2 alignment of Rx frames rt2x00: * add new rt2800usb device DWA 130 rtlwifi: * add USB ID for D-Link DWA-131 * add USB ID ASUS N10 WiFi dongle mwifiex: * throughput enhancements ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01Merge tag 'mac80211-for-davem-2015-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211David S. Miller3-5/+12
Johannes Berg says: ==================== This contains just a single fix for a crash I happened to randomly run into today during testing. It's clearly been around for a while, but is pretty hard to trigger, even when I tried explicitly (and modified the code to make it more likely) it rarely did. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01Merge tag 'linux-can-next-for-4.1-20150401' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-nextDavid S. Miller5-10/+74
Marc Kleine-Budde says: ==================== pull-request: can-next 2015-04-01 this is a pull request of 5 patches for net-next/master. There are two patches for the ems_usb driver by Gerhard Uttenthaler and me, which fix sparse endianess warnings. Oliver Hartkopp adds two patches to improve and extend the CAN-ID filter handling on RAW CAN sockets. The last patch is by me, it silences an uninitialized variable warning in the peak_usb driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01net: bcmgenet: enable MoCA link state change detectionPetri Gynther3-2/+24
Currently, MoCA fixed PHYs are always in link-up state, regardless of whether the link is actually up or not. Add code to properly detect MoCA link state changes and to reflect the new state in MoCA fixed PHY. Only GENET V3 and V4 MACs are capable of detecting MoCA link state changes. The code works as follows: 1. GENET MAC detects MoCA link state change and issues UMAC_IRQ_LINK_UP or UMAC_IRQ_LINK_DOWN interrupt. 2. Link up/down interrupt is processed in bcmgenet_irq_task(), which calls phy_mac_interrupt(). 3. phy_mac_interrupt() updates the fixed PHY phydev->link and kicks the PHY state machine. 4. PHY state machine proceeds to read the fixed PHY link status register. 5. When the fixed PHY link status register is being read, the new function bcmgenet_fixed_phy_link_update() gets called. It copies the fixed PHY phydev->link value to the fixed PHY status->link. 6. PHY state machine receives the new link state of the fixed PHY. 7. MoCA fixed PHY link state now correctly reflects the real MoCA hardware link state. Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01Merge tag 'iommu-fixes-v4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommuLinus Torvalds3-7/+10
Pull IOMMU fixes from Joerg Roedel: "This contains fixes for: - a VT-d issue where hardware domain-ids might be freed while still in use. - an ipmmu-vmsa issue where where the device-table was not zero terminated - unchecked register access issue in the arm-smmu driver" * tag 'iommu-fixes-v4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Remove unused variable iommu: ipmmu-vmsa: Add terminating entry for ipmmu_of_ids iommu/vt-d: Detach domain *only* from attached iommus iommu/arm-smmu: fix ARM_SMMU_FEAT_TRANS_OPS condition
2015-04-01lguest: now needs PCI_DIRECT.Rusty Russell1-1/+1
Since commit 8e7094694396 ("lguest: add a dummy PCI host bridge.") lguest uses PCI, but it needs you to frob the ports directly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-01Merge tag 'lazytime_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4Linus Torvalds4-10/+95
Pull lazytime fixes from Ted Ts'o: "This fixes a problem in the lazy time patches, which can cause frequently updated inods to never have their timestamps updated. These changes guarantee that no timestamp on disk will be stale by more than 24 hours" * tag 'lazytime_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: fs: add dirtytime_expire_seconds sysctl fs: make sure the timestamps for lazytime inodes eventually get written
2015-04-01Merge branch 'for-4.0' of git://linux-nfs.org/~bfields/linuxLinus Torvalds13-64/+78
Pull nfsd fixes from Bruce Fields: "Two main issues: - We found that turning on pNFS by default (when it's configured at build time) was too aggressive, so we want to switch the default before the 4.0 release. - Recent client changes to increase open parallelism uncovered a serious bug lurking in the server's open code. Also fix a krb5/selinux regression. The rest is mainly smaller pNFS fixes" * 'for-4.0' of git://linux-nfs.org/~bfields/linux: sunrpc: make debugfs file creation failure non-fatal nfsd: require an explicit option to enable pNFS NFSD: Fix bad update of layout in nfsd4_return_file_layout NFSD: Take care the return value from nfsd4_encode_stateid NFSD: Printk blocklayout length and offset as format 0x%llx nfsd: return correct lockowner when there is a race on hash insert nfsd: return correct openowner when there is a race to put one in the hash NFSD: Put exports after nfsd4_layout_verify fail NFSD: Error out when register_shrinker() fail NFSD: Take care the return value from nfsd4_decode_stateid NFSD: Check layout type when returning client layouts NFSD: restore trace event lost in mismerge
2015-04-01net: phy: at803x: simplify using devm_gpiod_get_optional and its 4th argumentUwe Kleine-König1-5/+6
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Moreover use devm_gpiod_get_optional instead of ignoring all errors returned by devm_gpiod_get and simplify accordingly. The result is more strict error handling which is good. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01caif: remove unused struct memberRasmus Villemoes1-1/+0
The tty_name member of struct ser_device is never set or used, so it can be removed. (The definition of struct ser_device is private to this .c file, and the identifier tty_name only occurs in this one place.) Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01Merge branch 'bnx2'David S. Miller1-41/+51
Yuval Mintz says: ==================== bnx2x: kdump related fixes This patch series aims to fix bnx2x driver issues when loading in kdump kernel. Both issues fixed here would be fatal to the device, requiring full reset of the system in order to recover, preventing the device from serving its purpose in the kdump environment. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01bnx2x: Fix kdump when iommu=onYuval Mintz1-23/+16
When IOMM-vtd is active, once main kernel crashes unfinished DMAE transactions will be blocked, putting the HW in an error state which will cause further transactions to timeout. Current employed logic uses wrong macros, causing the first function to be the only function that cleanups that error state during its probe/load. This patch allows all the functions to successfully re-load in kdump kernel. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01bnx2x: Fix kdump on 4-port deviceYuval Mintz1-18/+35
When running in a kdump kernel, it's very likely that due to sync. loss with management firmware the first PCI function to probe and reach the previous unload flow would decide it can reset the chip and continue onward. While doing so, it will only close its own Rx port. On a 4-port device where 2nd port on engine is a 1g-port, the 2nd port would allow ingress traffic after the chip is reset [assuming it was active on the first kernel]. This would later cause a HW attention. This changes driver flow to close both ports' 1g capabilities during the previous driver unload flow prior to the chip reset. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01mac80211: fix RX A-MPDU session reorder timer deletionJohannes Berg3-5/+12
There's an issue with the way the RX A-MPDU reorder timer is deleted that can cause a kernel crash like this: * tid_rx is removed - call_rcu(ieee80211_free_tid_rx) * station is destroyed * reorder timer fires before ieee80211_free_tid_rx() runs, accessing the station, thus potentially crashing due to the use-after-free The station deletion is protected by synchronize_net(), but that isn't enough -- ieee80211_free_tid_rx() need not have run when that returns (it deletes the timer.) We could use rcu_barrier() instead of synchronize_net(), but that's much more expensive. Instead, to fix this, add a field tracking that the session is being deleted. In this case, the only re-arming of the timer happens with the reorder spinlock held, so make that code not rearm it if the session is being deleted and also delete the timer after setting that field. This ensures the timer cannot fire after ___ieee80211_stop_rx_ba_session() returns, which fixes the problem. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-04-01can: pcan_usb: pcan_usb_fd_send_cmd(): silence compiler warning about uninitialized varMarc Kleine-Budde1-1/+1
This patch silences the compiler warning: drivers/net/can/usb/peak_usb/pcan_usb_fd.c: In function 'pcan_usb_fd_send_cmd': drivers/net/can/usb/peak_usb/pcan_usb_fd.c:185:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] by initialising the variable as 0. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-04-01can: introduce new raw socket option to join the given CAN filtersOliver Hartkopp3-3/+49
The CAN_RAW socket can set multiple CAN identifier specific filters that lead to multiple filters in the af_can.c filter processing. These filters are indenpendent from each other which leads to logical OR'ed filters when applied. This socket option joines the given CAN filters in the way that only CAN frames are passed to user space that matched *all* given CAN filters. The semantic for the applied filters is therefore changed to a logical AND. This is useful especially when the filterset is a combination of filters where the CAN_INV_FILTER flag is set in order to notch single CAN IDs or CAN ID ranges from the incoming traffic. As the raw_rcv() function is executed from NET_RX softirq the introduced variables are implemented as per-CPU variables to avoid extensive locking at CAN frame reception time. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-04-01can: fix multiple delivery of a single CAN frame for overlapping CAN filtersOliver Hartkopp1-0/+21
The CAN_RAW socket can set multiple CAN identifier specific filters that lead to multiple filters in the af_can.c filter processing. These filters are indenpendent from each other which leads to logical OR'ed filters when applied. This patch makes sure that every CAN frame which is filtered for a specific socket is only delivered once to the user space. This is independent from the number of matching CAN filters of this socket. As the raw_rcv() function is executed from NET_RX softirq the introduced variables are implemented as per-CPU variables to avoid extensive locking at CAN frame reception time. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-04-01can: ems_usb: mark timestamp as little endianMarc Kleine-Budde1-2/+2
The struct ems_cpc_msg describes the a message received from the USB device, which uses little endian byte order. This patch marks the timestamp in struct ems_cpc_msg accordingly. Acked-by: Gerhard Uttenthaler <uttenthaler@ems-wuensche.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>