summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ipip: convert hash tables locking to RCUEric Dumazet2009-10-241-21/+28
| | | | | | | | | | IPIP tunnels use one rwlock to protect their hash tables. This locking scheme can be converted to RCU for free, since netdevice already must wait for a RCU grace period at dismantle time. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* xfrm6_tunnel: RCU conversionEric Dumazet2009-10-241-19/+28
| | | | | | | | | | xfrm6_tunnels use one rwlock to protect their hash tables. Plain and straightforward conversion to RCU locking to permit better SMP performance. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6 sit: RCU conversion phase IIEric Dumazet2009-10-241-18/+27
| | | | | | | | | | SIT tunnels use one rwlock to protect their hash tables. This locking scheme can be converted to RCU for free, since netdevice already must wait for a RCU grace period at dismantle time. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6 sit: RCU conversion phase IEric Dumazet2009-10-242-23/+51
| | | | | | | | | | SIT tunnels use one rwlock to protect their prl entries. This first patch adds RCU locking for prl management, with standard call_rcu() calls. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Rename 'xfp' file and functions to reflect realityBen Hutchings2009-10-245-58/+58
| | | | | | | | | | The 'XFP' driver is really a driver for the QT2022C2 and QT2025C PHYs, covering both more and less than XFP. Rename its functions and constants to reflect reality and to reduce namespace pollution when sfc is a built-in driver. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove unused code for non-autoneg speed/duplex switchingBen Hutchings2009-10-241-69/+39
| | | | | | | | The only multi-speed PHY driver using this is 10Xpress, and it does not support non-autoneg operation. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Merge efx_fc_resolve() into efx_mdio_get_pause()Ben Hutchings2009-10-242-15/+8
| | | | | | | | efx_fc_resolve() is specific to MDIO and is not used by any other function. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move MTD probe after netdev registration and name allocationBen Hutchings2009-10-241-2/+4
| | | | | | | | | | | | | The MTD partition is named based on the netdev name, which is set to 'eth%d' before registration. Also, the MTD partition will currently be left registered if netdev registration fails. Fix both these problems by moving the MTD probe after netdev registration. Hold the RTNL to serialise this with the netdev notifier that calls efx_mtd_rename(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove unnecessary tests of efx->membaseBen Hutchings2009-10-241-8/+0
| | | | | | | | These cleanup functions will never be called if the MMIO region could not be mapped. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove incorrect assertion from efx_pci_remove_main()Ben Hutchings2009-10-241-2/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Merge falcon_probe_phy() into falcon_probe_port()Ben Hutchings2009-10-241-35/+25
| | | | | | | | | MAC and PHY probing are bound up together, as evidenced by the initialisation of efx_nic::loopback_modes. Remove the current arbitrary separation. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove pointless abstraction of memory BAR numberBen Hutchings2009-10-243-11/+10
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Removed kernel-doc for nonexistent member of efx_phy_operationsBen Hutchings2009-10-241-1/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Maintain interrupt moderation values in ticks, not microsecondsBen Hutchings2009-10-244-34/+28
| | | | | | | This simplifies the implementation a lot. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move shared members of struct falcon_nic_data into struct efx_nicBen Hutchings2009-10-242-16/+14
| | | | | | | These will also be used with Siena NICs. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move efx_xmit_done() declaration into correct stanzaBen Hutchings2009-10-241-1/+1
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove declarations of nonexistent functionsBen Hutchings2009-10-241-2/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Change order of device removal to reverse of probe orderBen Hutchings2009-10-241-1/+1
| | | | | | | | This makes efx_pci_remove_main() more obviously the inverse of efx_pci_probe_main(), and matches our out-of-tree driver. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Merge struct efx_blinker into struct efx_boardBen Hutchings2009-10-242-29/+21
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move all TX DMA length limiting into tx.cBen Hutchings2009-10-244-25/+25
| | | | | | | | | | | Replace the duplicated logic in efx_enqueue_skb() and efx_tx_queue_insert() with an inline function, efx_max_tx_len(). Remove the failed attempt at abstracting hardware-specifics and put all the magic numbers in efx_max_tx_len(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Define DMA address mask explicitly in terms of descriptor field widthBen Hutchings2009-10-241-5/+2
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Eliminate indirect lookups of queue size constantsBen Hutchings2009-10-247-98/+62
| | | | | | | Move size and mask definitions into efx.h; calculate page orders in falcon.c. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Rename register I/O header and functions used by both Falcon and SienaBen Hutchings2009-10-247-421/+426
| | | | | | | | While we're at it, use type suffixes of 'd', 'q' and 'o', consistent with register type names. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Update hardware definitions for SienaBen Hutchings2009-10-247-1887/+3756
| | | | | | | | | | | | | Siena is still based on the Falcon hardware architecture and will share many of these definitions, so replace falcon_hwdefs.h with regs.h. The new definitions have been generated according to a naming convention which incorporates the type and revision information. Update the code accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move RX data FIFO thresholds out of struct efx_nic_typeBen Hutchings2009-10-242-15/+12
| | | | | | | | | Since there are now separate blocks of code to set the thresholds for each NIC type, it is no longer useful to include them in the NIC type description. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove versioned bitfield macrosBen Hutchings2009-10-243-40/+47
| | | | | | | | | | | | | | | | | | These macros are not extensible to more than two NIC types without repetition of register definitions, and they are only used to deal with a few fields in RX_CFG_REG and global events which moved between Falcon rev A1 and B0. Therefore: - Move RX_CFG_REG initialisation into its own function which tests the NIC revision just once - Explicitly test the NIC revision when checking the RX_RECOVERY flag in global events - Merge definitions of RX_XOFF_MAC_EN flag, which did not move - Remove the macro definitions Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove boards.h, moving last remaining declaration to falcon.hBen Hutchings2009-10-249-22/+2
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Merge sfe4001.c into falcon_boards.cBen Hutchings2009-10-244-443/+420
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Rename Falcon-specific board code and typesBen Hutchings2009-10-245-26/+25
| | | | | | | Siena will require entirely different board code. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove redundant hardware initialisationBen Hutchings2009-10-241-4/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove redundant header gmii.hBen Hutchings2009-10-242-61/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* pkt_sched: skbedit add support for setting markjamal2009-10-223-1/+20
| | | | | | | This adds support for setting the skb mark. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: 10Xpress: Report support for pause framesBen Hutchings2009-10-221-0/+1
| | | | | | | | | | | | Commits 27fbc7d 'mdio: Expose pause frame advertising flags to ethtool' and c634263 'sfc: 10Xpress: Initialise pause advertising flags' added to our reported advertising flags. efx_mdio_set_settings() requires that all advertising flags are also present in the supported flags, so make sure that is true. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtnetlink: rtnl_setlink() and rtnl_getlink() changesEric Dumazet2009-10-221-19/+19
| | | | | | | | | | | | rtnl_getlink() & rtnl_setlink() run with RTNL held, we can use __dev_get_by_index() and __dev_get_by_name() variants and avoid dev_hold()/dev_put() Adds to rtnl_getlink() the capability to find a device by its name, not only by its index. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Add ethtool register dump function.Ron Mercer2009-10-213-0/+345
| | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Add ethtool wake on LAN function.Ron Mercer2009-10-214-0/+172
| | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Add ethtool blink function.Ron Mercer2009-10-213-0/+89
| | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Add ethtool get/set pause parameter.Ron Mercer2009-10-213-2/+37
| | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Use sk_tx_queue_mapping for connected socketsKrishna Kumar2009-10-201-6/+18
| | | | | | | | | | | For connected sockets, the first run of dev_pick_tx saves the calculated txq in sk_tx_queue_mapping. This is not saved if either the device has a queue select or the socket is not connected. Next iterations of dev_pick_tx uses the cached value of sk_tx_queue_mapping. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Fix for dst_negative_adviceKrishna Kumar2009-10-205-7/+21
| | | | | | | | | | | | | dst_negative_advice() should check for changed dst and reset sk_tx_queue_mapping accordingly. Pass sock to the callers of dst_negative_advice. (sk_reset_txq is defined just for use by dst_negative_advice. The only way I could find to get around this is to move dst_negative_() from dst.h to dst.c, include sock.h in dst.c, etc) Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: IPv6 changesKrishna Kumar2009-10-201-2/+1
| | | | | | | | IPv6: Reset sk_tx_queue_mapping when dst_cache is reset. Use existing macro to do the work. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Introduce sk_tx_queue_mappingKrishna Kumar2009-10-202-1/+30
| | | | | | | | | | | | Introduce sk_tx_queue_mapping; and functions that set, test and get this value. Reset sk_tx_queue_mapping to -1 whenever the dst cache is set/reset, and in socket alloc. Setting txq to -1 and using valid txq=<0 to n-1> allows the tx path to use the value of sk_tx_queue_mapping directly instead of subtracting 1 on every tx. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Avoid compiler warning for mmsghdr when CONFIG_COMPAT is not selectedArnaldo Carvalho de Melo2009-10-201-1/+5
| | | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* filter: Add SKF_AD_QUEUE instructionEric Dumazet2009-10-202-1/+5
| | | | | | | | | | | | | It can help being able to filter packets on their queue_mapping. If filter performance is not good, we could add a "numqueue" field in struct packet_type, so that netif_nit_deliver() and other functions can directly ignore packets with not expected queue number. Lets experiment this simple filter extension first. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* af_packet: mc_drop/flush_mclist changesEric Dumazet2009-10-201-8/+4
| | | | | | | We hold RTNL, we can use __dev_get_by_index() instead of dev_get_by_index() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* af_packet: Avoid cache line dirtyingEric Dumazet2009-10-201-1/+1
| | | | | | | | | | | | | | | | While doing multiple captures, I found af_packet was dirtying cache line containing its prot_hook. This slow down machines where several cpus are necessary to handle capture traffic, as each prot_hook is traversed for each packet coming in or out the host. This patches moves "struct packet_type prot_hook" to the end of packet_sock, and uses a ____cacheline_aligned_in_smp to make sure this remains shared by all cpus. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* can: provide library functions for skb allocationWolfgang Grandegger2009-10-206-76/+47
| | | | | | | | | | | | | | | | | | | | | | This patch makes the private functions alloc_can_skb() and alloc_can_err_skb() of the at91_can driver public and adapts all drivers to use these. While making the patch I realized, that the skb's are *not* setup consistently. It's now done as shown below: skb->protocol = htons(ETH_P_CAN); skb->pkt_type = PACKET_BROADCAST; skb->ip_summed = CHECKSUM_UNNECESSARY; *cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame)); memset(*cf, 0, sizeof(struct can_frame)); The frame is zeroed out to avoid uninitialized data to be passed to user space. Some drivers or library code did not set "pkt_type" or "ip_summed". Also, "__constant_htons()" should not be used for runtime invocations, as pointed out by David Miller. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* IP: CleanupsJohn Dykstra2009-10-193-5/+2
| | | | | | | | | | Use symbols instead of magic constants while checking PMTU discovery setsockopt. Remove redundant test in ip_rt_frag_needed() (done by caller). Signed-off-by: John Dykstra <john.dykstra1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* i2400m-sdio: select IWMC3200TOP in KconfigTomas Winkler2009-10-191-0/+8
| | | | | | | | i2400m-sdio requires iwmc3200top for its operation Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iwmc3200wifi: select IWMC3200TOP in KconfigTomas Winkler2009-10-191-0/+1
| | | | | | | | iwmc3200wifi requires iwmc3200top for its operation Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud