summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)Author
2012-04-17dmfe: enforce consistent timing delay.françois romieu
The driver does not always use the same timing for what looks like the same operations. - DCR0 Use the same udelay everywhere for reset. Upper bound is 100 us. - DCR9 Use 5us delay for srom clock. 1us delay for phy_write_1bit (writes PHY_DATA_[01]) are not changed as they stay withing a 2,5MHz MDIO clock range. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Reviewed-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-17r8169: support the new RTL8411 chip.Hayes Wang
Compared with previous chipsets, it needs no special action trough the jumbo{enable/disable} helpers to operate with jumbo frames. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-17r8169: adjust some functions of 8111fHayes Wang
Put some settings of 8111f into one function which may be reused. Signed-off-by: Hayes Wang <hayeswang@realtek.com>
2012-04-17r8169: support the new RTL8402 chip.Hayes Wang
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
2012-04-17r8169: add device specific CSI access helpers.Hayes Wang
New chipsets need it. Signed-off-by: Hayes Wang <hayeswang@realtek.com>
2012-04-17r8169: modify pll power functionHayes Wang
Adjust r810x_pll_power_down, r810x_pll_power_up, and r8168_pll_power_up. Always power up device during rtl_open. For r810x, turn off more power when the WOL is disabled. Signed-off-by: Hayes Wang <hayeswang@realtek.com>
2012-04-17r8169: 8168c and later require bit 0x20 to be set in Config2 for PME signaling.Francois Romieu
The new 84xx stopped flying below the radars. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Hayes Wang <hayeswang@realtek.com>
2012-04-17r8169: Config1 is read-only on 8168c and later.Francois Romieu
Suggested by Hayes. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Hayes Wang <hayeswang@realtek.com>
2012-04-16hippi: fix printk format in rrunner.cRandy Dunlap
Fix printk format warning (from i386 build): drivers/net/hippi/rrunner.c:146:9: warning: format '%08llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Jes Sorensen <jes@trained-monkey.org> Cc: linux-hippi@sunsite.dk Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-16net/can: use module_pci_driverAxel Lin
This patch converts the drivers in drivers/net/can/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-can@vger.kernel.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-04-16atl1: remove unused member from atl1_adapter structureTony Zelenoff
Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-16drivers/net: fix unresolved 64bit math in mellanox/mlx4/en_dcb_nl.cPaul Gortmaker
Commit 109d2446052a484c58f07f71f9457bf7b71017f8 "net/mlx4_en: Set max rate-limit for a TC" introduced 64 bit math operations into mlx4_en_dcbnl_ieee_setmaxrate() causing the following final link failure on an x86_32 allmodconfig ERROR: "__udivdi3" [drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko] undefined! Convert it to use div_u64() instead. Cc: Amir Vadai <amirv@mellanox.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/atheros/atlx/atl1.c drivers/net/ethernet/atheros/atlx/atl1.h Resolved a conflict between a DMA error bug fix and NAPI support changes in the atl1 driver. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15macvlan: add FDB bridge ops and macvlan flagsJohn Fastabend
This adds FDB bridge ops to the macvlan device passthru mode. Additionally a flags field was added and a NOPROMISC bit to allow users to use passthru mode without the driver calling dev_set_promiscuity(). The flags field is a u16 placed in a 4 byte hole (consuming 2 bytes) of the macvlan_dev struct. We want to do this so that the macvlan driver or stack above the macvlan driver does not have to process every packet. For the use case where we know all the MAC addresses of the endstations above us this works well. This patch is a result of Roopa Prabhu's work. Follow up patches are needed for VEPA and VEB macvlan modes. v2: Change from distinct nopromisc mode to a flags field to configure this. This avoids the tendency to add a new mode every time we need some slightly different behavior. v3: fix error in dev_set_promiscuity and add change and get link attributes for flags. CC: Roopa Prabhu <roprabhu@cisco.com> CC: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15ixgbe: UTA table incorrectly programmedGreg Rose
The UTA table was being set to the functional equivalent of promiscuous mode. This was resulting in traffic from the virtual function being flooded onto the wire and the PF device. This resulted in additional overhead for VF traffic sent to the network and in the case of traffic sent to the PF or another VF resulted in unwanted packets on the wire. This was actually not the intended behavior. Now that we can program the embedded switch correctly we can remove this snippit of code. Users who want to support this should configure the FDB correctly using the FDB ops. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15ixgbe: allow RAR table to be updated in promisc modeJohn Fastabend
This allows RAR table updates while in promiscuous. With SR-IOV enabled it is valuable to allow the RAR table to be updated even when in promisc mode to configure forwarding Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15ixgbe: enable FDB netdevice opsJohn Fastabend
Enable FDB ops on ixgbe when in SR-IOV mode. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: do not drop rx/tx interrupts before they are scheduledTony Zelenoff
To prevent interrupts lost they should be dropped only if they are scheduled via napi interfaces. In other case, there is exists situation when napi handler process TX interrupt, stay in RX processing and in that moment any other interrupt received. Then before this patch TX bit in ISR will be cleaned, napi schedule will not occur in case of currently processing event and TX interrupt definitely will be lost. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: do not process interrupts in cycle in handlerTony Zelenoff
As the rx/tx handled inside napi handler, the cycle is not needed now, because only the rx/tx need such kind of processing. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: enable errors and link ints when rx/tx scheduledTony Zelenoff
Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: add value to check ability of reenabling IRQsTony Zelenoff
Unfortunately it is not clear from code is usage of IMR register possible or not. So, to prevent possible side-effects of reading this register i prefer store interrupts enable flag separately. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: make function to set imr of cardTony Zelenoff
This function should be used later to set/remove proper bits in imr to disable only rx ints. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: use defined functions to disable irqTony Zelenoff
Looks like direct writes to IMR register is not good idea, because there are exist functions to make this work. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: add napi process of tx interruptsTony Zelenoff
Make the tx ints processing same as rx ones via napi. The idea got from e1000. The interrupt disabling is still not fine grained. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: make driver napi compatibleTony Zelenoff
This is first step, here there is no fine interrupt disabling which cause TX/ERR interrupts stalling when RX scheduled ints processed. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15atl1: handle rx in separate conditionTony Zelenoff
Remove rx from unlikely optimization in case of rx is very likely thing for network card. This also reduce code a bit. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15virtio-net: send gratuitous packets when neededJason Wang
As hypervior does not have the knowledge of guest network configuration, it's better to ask guest to send gratuitous packets when needed. This patch implements VIRTIO_NET_F_GUEST_ANNOUNCE feature: hypervisor would notice the guest when it thinks it's time for guest to announce the link presnece. Guest tests VIRTIO_NET_S_ANNOUNCE bit during config change interrupt and woule send gratuitous packets through netif_notify_peers() and ack the notification through ctrl vq. We need to make sure the atomicy of read and ack in guest otherwise we may ack more times than being notified. This is done through handling the whole config change interrupt in an non-reentrant workqueue. Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-15isdn/hysdn: Convert to kstrtoul_from_userPeter Hüwe
This patch replaces the code for getting an number from a userspace buffer by a simple call to kstroul_from_user. This makes it easier to read and less error prone. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-14net: Fix spelling typo in netMasanari Iida
Correct spelling typo within drivers/net. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-14net/ethernet: ks8851_mll fix rx frame buffer overflowDavide Ciminaghi
At the beginning of ks_rcv(), a for loop retrieves the header information relevant to all the frames stored in the mac's internal buffers. The number of pending frames is stored as an 8 bits field in KS_RXFCTR. If interrupts are disabled long enough to allow for more than 32 frames to accumulate in the MAC's internal buffers, a buffer overflow occurs. This patch fixes the problem by making the driver's frame_head_info buffer big enough. Well actually, since the chip appears to have 12K of internal rx buffers and the shortest ethernet frame should be 64 bytes long, maybe the limit could be set to 12*1024/64 = 192 frames, but 255 should be safer. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-14net/wan: use module_pci_driverAxel Lin
This patch converts the drivers in drivers/net/wan/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-14net/tokenring: use module_pci_driverAxel Lin
This patch converts the drivers in drivers/net/tokenring/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-14ixgbe: add I2C clock stretchingDon Skidmore
This patch adds support for I2C clock stretching which is required per SFF-8636. Customers with passive DA cables implement clock stretching would fail without this patch. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-04-14igb: Update version to 3.4.7.Carolyn Wyborny
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-04-14e1000e: cleanup boolean logicBruce Allan
Replace occurrences of 'if (<bool expr> == <1|0>)' with 'if ([!]<bool expr>)' Replace occurrences of '<bool var> = (<non-bool expr>) ? true : false' with '<bool var> = <non-bool expr>'. Replace occurrence of '<bool var> = <non-bool expr>' with '<bool var> = !!<non-bool expr>' While the latter replacement is not really necessary, it is done here for consistency and clarity. No functional changes. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-04-14e1000e: cleanup remaining strings split across multiple linesBruce Allan
Now that split strings generate checkpatch warnings (per Chapter 2 of Documentation/CodingStyle to make it easier to grep the code for the string) cleanup the remaining instances of them in the driver. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-04-14e100: enable transmit time stamping.Richard Cochran
This patch enables software (and phy device) transmit time stamping. Tested on an old PIII laptop with built in NIC. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-04-14e100: Support the get_ts_info ethtool method.Richard Cochran
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-04-14ixgbe: fix WoL issue with fiberDon Skidmore
There are times we turn of the laser before shutdown. This is a bad thing if we want to wake on lan to work so now we make sure the laser is on before shutdown if we support WoL. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-04-14e1000e: issues in Sx on 82577/8/9Bruce Allan
A workaround was previously put in the driver to reset the device when transitioning to Sx in order to activate the changed settings of the PHY OEM bits (Low Power Link Up, or LPLU, and GbE disable configuration) for 82577/8/9 devices. After further review, it was found such a reset can cause the 82579 to confuse which version of 82579 it actually is and broke LPLU on all 82577/8/9 devices. The workaround during an S0->Sx transition on 82579 (instead of resetting the PHY) is to restart auto-negotiation after the OEM bits are configured; the restart of auto-negotiation activates the new OEM bits as does the reset. With 82577/8, the reset is changed to a generic reset which fixes the LPLU bits getting set wrong. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-04-13bonding: Fixup get_tx_queue() op second arg type.David S. Miller
I missed this when fixing up the warning in the previous commit. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13net: smsc911x: fix skb handling in receive pathWill Deacon
The SMSC911x driver resets the ->head, ->data and ->tail pointers in the skb on the reset path in order to avoid buffer overflow due to packet padding performed by the hardware. This patch fixes the receive path so that the skb pointers are fixed up after the data has been read from the device, The error path is also fixed to use number of words consistently and prevent erroneous FIFO fastforwarding when skipping over bad data. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13ks8851: Fix missing mutex_lock/unlockMatt Renzelmann
Move the ks8851_rdreg16 call above the call to request_irq and cache the result for subsequent repeated use. A spurious interrupt may otherwise cause a crash. Thanks to Stephen Boyd, Flavio Leitner, and Ben Hutchings for feedback. Signed-off-by: Matt Renzelmann <mjr@cs.wisc.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13drivers/net/ethernet/xilinx/axi ethernet: Correct CopyrightMichal Simek
Also fix MAINTAINERS file to reflect autorship. Daniel and Ariane changed coding style but not any functional changes in the driver itself. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-138139cp: set intr mask after its handler is registeredJason Wang
We set intr mask before its handler is registered, this does not work well when 8139cp is sharing irq line with other devices. As the irq could be enabled by the device before 8139cp's hander is registered which may lead unhandled irq. Fix this by introducing an helper cp_irq_enable() and call it after request_irq(). Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13atl1: fix kernel panic in case of DMA errorsTony Zelenoff
Problem: There was two separate work_struct structures which share one handler. Unfortunately getting atl1_adapter structure from work_struct in case of DMA error was done from incorrect offset which cause kernel panics. Solution: The useless work_struct for DMA error removed and handler name changed to more generic one. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13net: WIZnet drivers: fix possible NULL dereferenceMike Sinkovsky
This fixes possible null dereference in probe() function: when both .mac_addr and .link_gpio are unknown, dev.platform_data may be NULL Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mike Sinkovsky <msink@permonline.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13rtnetlink & bonding: change args got get_tx_queuesstephen hemminger
Change get_tx_queues, drop unsused arg/return value real_tx_queues, and use return by value (with error) rather than call by reference. Probably bonding should just change to LLTX and the whole get_tx_queues API could disappear! Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13ethernet: replace open-coded ARRAY_SIZE with macroJim Cromie
Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13enic: replace open-coded ARRAY_SIZE with macroJim Cromie
Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>