summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-11-15Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller
Marc Kleine-Budde says: ==================== this pull request is for net-next, for the v3.8 release cycle. Muhammad Ghias added support another board to the plx_pci sja1000 driver. Matthias Fuchs improved the esd_usb2 driver with listen-only mode and CAN-USB/Micro support. Andreas Larsson contributed a driver for the GRHCAN CAN IP-Core ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15net: phy: smsc: Re-enable EDPD mode for LAN87xxPatrick Trantham
This patch re-enables Energy Detect Power Down (EDPD) mode for the LAN8710/LAN8720. EDPD mode was disabled in a previous commit, (b629820d18fa65cc598390e4b9712fd5f83ee693), because it was causing the PHY to not be able to detect a link when cold started without a cable connected. The LAN8710/LAN8720 requires a minimum of 2 link pulses within 64ms of each other in order to set the ENERGYON bit and exit EDPD mode. If a link partner does send the pulses within this interval, the PHY will remained powered down. This workaround will manually toggle the PHY on/off upon calls to read_status in order to generate link test pulses if the link is down. If a link partner is present, it will respond to the pulses, which will cause the ENERGYON bit to be set and will cause the EDPD mode to be exited. Signed-off-by: Patrick Trantham <patrick.trantham@fuel7.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15can: grcan: Add device driver for GRCAN and GRHCAN coresAndreas Larsson
This driver supports GRCAN and CRHCAN CAN controllers available in the GRLIB VHDL IP core library. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-15can: janz-ican3: Fix the usage of wait_for_completion_timeoutChuansheng Liu
The return value of wait_for_completion_timeout() is always >= 0 with unsigned int type. So the condition "ret < 0" or "ret >= 0" is pointless. Signed-off-by: liu chuansheng <chuansheng.liu@intel.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-15can: usb: esd_usb2: Add support for CAN-USB/MicroMatthias Fuchs
This patch extends the esd_usb2 driver to support the tiny CAN-USB/Micro CAN/USB interface. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-15can: usb: esd_usb2: Add support for listen-only modeMatthias Fuchs
Add listen-only mode for esd_usb2 driver. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-15can: sja1000: plx_pci: add support for Connect Tech Inc's Canpro/104-Plus ↵Muhammad Ghias
Opto CAN board Patch adds support for CANpro/104-Plus Opto CAN board. Board uses PLX9030 bridge and two NXP SJA1000 CAN controllers. Patch is generated and tested with kernel 3.6.1. Signed-off-by: Muhammad Ghias <mghias@connecttech.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> [mkl: minor adjustments to commit message] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-15ixgbevf: Add checksum statistics counters to ringsGreg Rose
Add hardware checksum statistic counters to the ring structures and then during packet processing update those counters instead of the global counters in the adapter structure. Only update the adapter structure counters when all other statistics are gathered in the ixgbevf_update_stats() function. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15ixgbevf: Remove unneeded and obsolete commentGreg Rose
Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15ixgbevf: White space and comments clean upGreg Rose
Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15ixgbevf: Remove mailbox spinlock from the reset functionGreg Rose
The spinlocks are not required during reset. There won't be any contention for the mailbox resource. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15ixgbevf: Remove checking for mac.ops function pointersGreg Rose
The function pointers will always be set - there is no good reason to check them. Also just remove get_bus_info() call as the VF has no bus info to report. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15ixgbevf: Remove the ring adapter pointer valueGreg Rose
It is unused - remove it. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15ixgbevf: Fix unnecessary dereference where local var is available.Greg Rose
Remove dereference of hw pointer from adapter structure since a pointer to the hw structure has already been allocated off the stack. Also clean up useless parenthesis. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15ixgbevf: Streamline the rx buffer allocationGreg Rose
Moves allocation of local variable to section where it is needed and removes unnecessary if statement. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15ioat: Do not enable DCA if tag map is invalidAlexander Duyck
I have encountered several systems that have an invalid tag map. This invalid tag map results in only two tags being generated 0x1F which is usually applied to the first core in a Hyper-threaded pair and 0x00 which is applied to the second core in a Hyper-threaded pair. The net result of all this is that DCA causes significant cache thrash because the 0x1F tag will send traffic to the second socket, which the 0x00 tag will not DCA tag the frame resulting in no benefit. For now the best solution from the driver's perspective is to just disable DCA if the tag map is invalid. The correct solution for this would be to have the BIOS on affected systems updated so that the correct tags are generated for a given APIC ID. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-15net: cpsw: halt network stack before halting the device during suspendMugunthan V N
Move network stack halt APIs before halting the hardware to ensure no packets are queued to hardware during closing the device during suspend sequence. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15cpsw: simplify the setup of the register pointersRichard Cochran
Instead of having a host of different register offsets in the device tree, this patch simplifies the CPSW code by letting the driver set the proper register offsets automatically, based on the CPSW version. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15net: cpsw: Add parent<->child relation support between cpsw and mdioVaibhav Hiremath
CPGMAC SubSystem consist of various sub-modules, like, mdio, cpdma, cpsw, etc... These sub-modules are also used in some of Davinci family of devices. Now based on requirement, use-case and available technology nodes the integration of these sub-modules varies across devices. So coming back to Linux net driver, currently separate and independent platform devices & drivers for CPSW and MDIO is implemented. In case of Davinci they both has separate control, from resources perspective, like clock. In case of AM33XX, the resources are shared and only one register bit-field is provided to control module/clock enable/disable, makes it difficult to handle common resource. So the solution here implemented in this patch is, Create parent<->child relationship between both the drivers, making CPSW as a parent and MDIO as its child and enumerate all the child nodes under CPSW module. Both the drivers will function exactly the way it was operating before, including runtime-pm functionality. No change is required in MDIO driver (for that matter to any child driver). As this is only supported during DT boot, the parent<->child relationship is created and populated in DT execution flow. The only required change is inside DTS file, making MDIO as a child to CPSW node. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15net: davinci_mdio: Fix typo mistake in calling runtime-pm apiVaibhav Hiremath
By mistake (most likely a copy-paste), instead of pm_runtime_get_sync() api, driver is calling pm_runtime_put_sync() api in resume callback function. The bug was introduced by commit id (ae2c07aaf74: davinci_mdio: runtime PM support). Now, the reason why it didn't impact functionality is, the patch has been tested on AM335x-EVM and BeagleBone platform while submitting; and in case of AM335x the MDIO driver doesn't control the module enable/disable part, which is handled by CPSW driver. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15Merge branch 'for-davem' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next John W. Linville says: ==================== Included is a Bluetooth pull -- Gustavo says: "These are the Bluetooth bits for inclusion in 3.8, there is basically one big thing here which is the High Speed patches from Andrei, he did a lot of work on A2MP and management of AMP devices. The rest are mostly clean up and bug fixes." Also included is an NFC pull -- Samuel says: "With this one we have: - pn544 p2p support. - pn544 physical and HCI layers separation. We are getting the pn544 driver ready to support non i2c physical layers. - LLCP SNL (Service Name Lookup). This is the NFC p2p service discovery protocol. - LLCP datagram sockets (connection less) support. - IDR library usage for NFC devices indexes assignement. - NFC netlink extension for setting and getting LLCP link characteristics. - Various code style fixes and cleanups spread over the pn533, LLCP, HCI and pn544 code." There are a couple of mac80211 pulls as well -- Johannes says: "Please pull my mac80211-next tree to get the first round of new features for 3.8. We have: * finally, the mac80211 multi-channel work * scan improvements: - bg scan - scan flush - forced AP scan * cfg80211 tracing * a bit of new code to allow implementing SAE (secure authentication of equals) in managed mode Along with a few random improvements, features and fixes." and... "Please pull from mac80211-next (per below pull request) to get a few updates. Most important is probably the fix for the WDS regression that my previous pull request introduced. Other than that, I have some tracing code, two mesh updates and a change to allow drivers to calculate the AES CMAC subkeys without having to implement the GF_mulx operation themselves." On top of that are the usual updates to iwlwifi, ath9k, rt2x00, brcmfmac, mwifiex, and a few others here and there. Of note is the addition of the ar5523 driver, ported from an original FreeBSD driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15tg3: Use tp->rxq_cnt when checking RSS tables.Michael Chan
irq_cnt is no longer reliable since rxq_cnt can be independently configured. Update version to 3.127. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15tg3: Cleanup hardcoded ethtool test array indexesNithin Nayak Sujir
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15tg3: Prevent spurious tx timeout by setting carrier off before tx disable.Nithin Nayak Sujir
The watchdog will not trigger when the carrier is off when reconfiguring the device. Because carrier state is now off during reset, we need to introduce a link_up flag to keep track of link state during PHY setup. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15tg3: Set 10_100_ONLY flag for additional 10/100 Mbps devicesNithin Nayak Sujir
- Also refactor the conditional to use the existing tg3_pci_tbl array. - Set flags in the driver_data field of the pci_device_id structure to identify these devices. - Add PCI_DEVICE_SUB() to pci.h to declare PCI 4-part IDs to match these devices. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-15vmxnet3: fix indentationstephen hemminger
Minor indentation out of alignment. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net/macb: clear unused address registerJoachim Eastwood
Only the first register set is used for matching but we support getting the initial hw addr from any of the registers. To prevent stale entries and false matches clear unused register sets. This most important for the at91_ether driver where u-boot always uses the 2nd register set. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net/macb: add support for phy irq via gpio pinJoachim Eastwood
Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net/phy/davicom: add irq functions to DM9161E and DM9161AJoachim Eastwood
Both these PHYs support interrupt generation on IC pin 32. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net: convert __IPTUNNEL_XMIT() to an inline functionAmerigo Wang
__IPTUNNEL_XMIT() is an ugly macro, convert it to a static inline function, so make it more readable. IPTUNNEL_XMIT() is unused, just remove it. Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-11-13bnx2x: Add static declaration to several functionsMerav Sicron
This patch adds static declaration to several functions in bnx2x. It eliminates newly introduced sparse warnings reported by Fengguang Wu. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Merav Sicron <meravs@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13igb: Ethtool support to enable and disable EEEAkeem G. Abodunrin
This patch allows users to enable and disable EEE using Ethtool. It also allows users to get EEE settings, as supported by the device. Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13igb: Improve performance and reduce size of igb_tx_mapAlexander Duyck
This change is meant to both improve the performance and reduce the size of igb_tx_map. To do this I have expanded the work done in the main loop by pushing first into tx_buffer. This allows us to pull in the dma_mapping_error check, the tx_buffer value assignment, and the initial DMA value assignment to the Tx descriptor. The net result is that the function reduces in size by a little over a 100 bytes and is about 1% or 2% faster. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13igb: Update igb Tx flags to improve code efficiencyAlexander Duyck
This change is meant to improve the efficiency of the Tx flags in igb by aligning them with the values that will later be written into either the cmd_type or olinfo. By doing this we are able to reduce most of these functions to either just a simple shift followed by an or in the case of cmd_type, or an and followed by an or in the case of olinfo. In order to avoid type conversion errors I also adjusted the locations where we were switching between CPU and little endian. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13igb: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso checkAlexander Duyck
This change is meant to reduce the overhead for workloads that are not using either TSO or checksum offloads. Most of the time the compiler should jump ahead after failing this check to the VLAN check since in the igb_tx_csum call we start with that check as well. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13igb: Support for modifying UDP RSS flow hashingAkeem G. Abodunrin
This patch provides ability to enable or disable UDP RSS hashing. It gives users option of generating RSS hash based on the UDP source and destination ports numbers. Currently, UDP flow hash is always disabled in igb-driver. Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13igb: Clear Go Link Disconnect for 82580 and later devicesCarolyn Wyborny
Customers are requesting that the hw prevents PHY from establishing link until the driver loads. This patch clears the Go Link Disconnect bit which provides the requested behavior on parts 82580 and later. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13ixgbevf: Reduce size of maximum rx bufferGreg Rose
There's no need to support up to 15k buffers since the HW is limited to 9.5k in SR-IOV mode. Instead, allocate buffers that fit and align inside of a 32K memory buffer. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13ixgbevf: Add flag to indicate when rx is in net pollGreg Rose
napi_gro_receive shouldn't be called from netpoll context. Doing so was causing kernel panics when jumbo frames larger than 2K were set. Add a flag to check if the Rx ring processing is occurring from interrupt context or from netpoll context and call netif_rx() if in the polling context. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13ixgbevf: fix possible use of uninitialized variableEmil Tantilov
This patch resolves the following warning: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function ‘ixgbevf_probe’: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1742:290: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized] drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1717:6: note: ‘err’ was declared here Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13ixgbevf: make sure probe fails on MSI-X enable errorJakub Kicinski
This driver cannot work without MSI-X interrupts so there is no mechanism to fall back to. Signed-off-by: Jakub Kicinski <jakub.kicinski@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13ixgbe: Do not use DCA to prefetch the entire packet into the cacheAlexander Duyck
The way the code was previously written it was causing DCA to prefetch the entire packet into the cache when it was enabled. That is excessive as we only really need the headers. We are now prefetching the headers via software so doing this from DCA would be redundant anyway. So clear the bit that was causing us to prefetch the packet data and instead only use DCA for the descriptor rings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-11r8169: Drop tp arg from rtl8169_tx_vlan_tag()Kirill Smelkov
Since eab6d18d (vlan: Don't check for vlan group before vlan_tx_tag_present.) we don't check tp->vlgrp and thus tp is not needed in this function. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-11-11r8169: remove unused macros.Dayanidhi Sreenivasan
Signed-off-by: Dayanidhi Sreenivasan <dayanidhi.sreenivasan@gmail.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-11-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c Minor conflict between the BCM_CNIC define removal in net-next and a bug fix added to net. Based upon a conflict resolution patch posted by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-09isdn: Fix typo in drivers/isdnMasanari Iida
Correct spelling typo in printk within drivers/isdn Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-09gianfar: ethernet vanishes after restoring from hibernationWang Dongsheng
If a gianfar ethernet device is down prior to hibernating a system, it will no longer be present upon system restore. For example: ~# ifconfig eth0 down ~# echo disk > /sys/power/state <trigger a restore from hibernation> ~# ifconfig eth0 up SIOCSIFFLAGS: No such device This happens because the restore function bails out early upon finding devices that were not up at hibernation. In doing so, it never gets to the netif_device_attach call at the end of the restore function. Adding the netif_device_attach as done here also makes the gfar_restore code consistent with what is done in the gfar_resume code. Cc: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-09gianfar: Fix alloc_skb_resources on -ENOMEM cleanup pathClaudiu Manoil
Should gfar_init_bds() return with -ENOMEM inside gfar_alloc_skb_resources(), free_skb_resources() will be called twice in a row on the "cleanup" path, leading to duplicate kfree() calls for rx_|tx_queue->rx_|tx_skbuff resulting in segmentation fault. This patch prevents the segmentation fault to happen in the future (rx_|tx_sbkbuff set to NULL), and corrects the error path handling for gfar_init_bds(). Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-09virtio_net: use net_*_ratelimited() helpersAmerigo Wang
These can be converted to net_*_ratelimited(). Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>