aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2009-12-02TCPCT part 1d: define TCP cookie option, extend existing struct'sWilliam Allen Simpson5-14/+177
Data structures are carefully composed to require minimal additions. For example, the struct tcp_options_received cookie_plus variable fits between existing 16-bit and 8-bit variables, requiring no additional space (taking alignment into consideration). There are no additions to tcp_request_sock, and only 1 pointer in tcp_sock. This is a significantly revised implementation of an earlier (year-old) patch that no longer applies cleanly, with permission of the original author (Adam Langley): http://thread.gmane.org/gmane.linux.network/102586 The principle difference is using a TCP option to carry the cookie nonce, instead of a user configured offset in the data. This is more flexible and less subject to user configuration error. Such a cookie option has been suggested for many years, and is also useful without SYN data, allowing several related concepts to use the same extension option. "Re: SYN floods (was: does history repeat itself?)", September 9, 1996. http://www.merit.net/mail.archives/nanog/1996-09/msg00235.html "Re: what a new TCP header might look like", May 12, 1998. ftp://ftp.isi.edu/end2end/end2end-interest-1998.mail These functions will also be used in subsequent patches that implement additional features. Requires: TCPCT part 1a: add request_values parameter for sending SYNACK TCPCT part 1b: generate Responder Cookie secret TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS Signed-off-by: William.Allen.Simpson@gmail.com Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONSWilliam Allen Simpson5-6/+52
Define sysctl (tcp_cookie_size) to turn on and off the cookie option default globally, instead of a compiled configuration option. Define per socket option (TCP_COOKIE_TRANSACTIONS) for setting constant data values, retrieving variable cookie values, and other facilities. Move inline tcp_clear_options() unchanged from net/tcp.h to linux/tcp.h, near its corresponding struct tcp_options_received (prior to changes). This is a straightforward re-implementation of an earlier (year-old) patch that no longer applies cleanly, with permission of the original author (Adam Langley): http://thread.gmane.org/gmane.linux.network/102586 These functions will also be used in subsequent patches that implement additional features. Requires: net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED Signed-off-by: William.Allen.Simpson@gmail.com Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02TCPCT part 1b: generate Responder Cookie secretWilliam Allen Simpson3-0/+149
Define (missing) hash message size for SHA1. Define hashing size constants specific to TCP cookies. Add new function: tcp_cookie_generator(). Maintain global secret values for tcp_cookie_generator(). This is a significantly revised implementation of earlier (15-year-old) Photuris [RFC-2522] code for the KA9Q cooperative multitasking platform. Linux RCU technique appears to be well-suited to this application, though neither of the circular queue items are freed. These functions will also be used in subsequent patches that implement additional features. Signed-off-by: William.Allen.Simpson@gmail.com Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02TCPCT part 1a: add request_values parameter for sending SYNACKWilliam Allen Simpson10-33/+42
Add optional function parameters associated with sending SYNACK. These parameters are not needed after sending SYNACK, and are not used for retransmission. Avoids extending struct tcp_request_sock, and avoids allocating kernel memory. Also affects DCCP as it uses common struct request_sock_ops, but this parameter is currently reserved for future use. Signed-off-by: William.Allen.Simpson@gmail.com Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller3-38/+3
2009-12-02cnic: Use dma_alloc_coherent().Michael Chan1-24/+30
Replace pci_alloc_consistent() with dma_alloc_coherent() so that appropriate GFP flags can be used. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02cnic: Fix rq_page_table DMA address.Michael Chan1-2/+2
The old code mistakenly zeroed out the upper 32-bit of the DMA address. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02cnic: Fix bogus iSCSI MAC addressMichael Chan1-2/+6
Fix code to read the proper iSCSI MAC address for bnx2x devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02cnic: Fix bnx2x ring shutdown.Michael Chan1-0/+7
Need to send a HALT command to the firmware to fully shutdown the bnx2x rings. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02cnic: Fix ring I/O address for bnx2x devices.Michael Chan1-5/+3
Old code was initializing the ring producers using an incorrect I/O address. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02netxen: fix failure cases for fw hang recoveryAmit Kumar Salecha1-11/+15
Handle few corner cases in firmware hang detection and recovery: o Don't mark device state as READY, till handshake with firmware is done. o During probe, if start_firmware fails, restore reference count. o Don't increment refernce count, if start_firmware fails during firmware reset. o Clear __NX_RESETTING bit, incase of fatal error or tempeature reaches critical limit so that pci remove() doesn't poll on this bit. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02netxen : fix debug tools access for NX2031Narender Kumar1-19/+44
Driver maps only some part of the MMIO bar 0 in case of NX2031. This is sufficient for tx and rx by the driver. When debug tools need to access resources in unmapped regions, driver needs to map these on the fly in order to complete read/write request. Signed-off-by: Narender Kumar <narender.kumar@qlogic.com> Signed-off-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: correct ICH/PCH PHY operations function pointersBruce Allan3-209/+204
Some function pointers for a few PHY operations (for 82578 and 82567) and were set incorrectly causing functions to be executed that were accessing incorrect PHY register offsets for that particular device. This patch also moves a few PHY-specific functions from ich8lan.c to the more appropriate phy.c. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: refactor PHY ID detection workaroundBruce Allan2-11/+17
The workaround that detects the correct PHY ID when an initial read of the PHY ID registers returns an invalid one should retry up to ten times with a small delay between attempts using a single PHY address and then repeat using the remaining possible PHY addresses. Do this instead of trying each possible PHY address repeating that up to 100 times. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: check_polarity function pointers not set for 8257xBruce Allan2-0/+4
The function pointers for 8257x devices are not set. This is not really a problem now because there is nothing in the driver that references the pointers for this particular MAC-family (the appropriate functions are called directly), but the pointers should be set in case they are used in the future. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02skbuff: remove skb_dma_map/unmapAlexander Duyck3-74/+0
The two functions skb_dma_map/unmap are unsafe to use as they cause problems when packets are cloned and sent to multiple devices while a HW IOMMU is enabled. Due to this it is best to remove the code so it is not used by any other network driver maintainters. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02tg3: remove use of skb_dma_map/unmapAlexander Duyck2-47/+132
Due to the fact that skb_dma_map/unmap do not work correctly when a HW IOMMU is enabled it has been recommended to go about removing the calls from the network device drivers. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: Matt Carlson <mcarlson@broadcom.com> CC: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02be2net: remove use of skb_dma_map/unmapAlexander Duyck1-11/+26
Due to the fact that skb_dma_map/unmap do not work correctly when a HW IOMMU is enabled it has been recommended to go about removing the calls from the network device drivers. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02bnx2: remove skb_dma_map/unmap calls from driverAlexander Duyck2-12/+61
Due to the fact that skb_dma_map/unmap do not work correctly when a HW IOMMU is enabled it has been recommended to go about removing the calls from the network device drivers. [ Fix bnx2_free_tx_skbs() ring indexing and use NETDEV_TX_OK return code in bnx2_start_xmit() after cleaning up DMA mapping errors. -Mchan ] Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02igbvf: remove skb_dma_map/unmap call from driversAlexander Duyck2-14/+52
This patch removes the skb_dma_map/unmap calls from the igbvf driver due to the fact that it does not play well with HW IOMMU when combined with transmitting cloned skbs. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02igb: remove use of skb_dma_map from driverAlexander Duyck2-18/+56
This change removes skb_dma_map/unmap calls from the igb driver due to the fact that the call is incompatible with iommu enabled kernels. In order to prevent warnings about using the wrong unmap call I have added a mapped_as_page value to the buffer_info structure to track if the mapped region is a page or a buffer. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02ixgbe: remove skb_dma_map/unmap calls from driverAlexander Duyck2-14/+50
This patch removes skb_dma_map/unmap calls from the ixgbe driver due to the fact that the calls don't work with HW IOMMU enabled systems. The problem is that multiple mappings will give different results when HW IOMMU is enabled and the skb_dma_map/unmap calls only have one location to store mappings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02ixgb: remove use of skb_dma_map from ixgbAlexander Duyck2-19/+42
skb_dma_map is incompatible with HW iommu due to the fact that multiple mappings can result in different results each time. For this reason it is best to just remove use of these function calls. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000: remove use of skb_dma_map from e1000 driverAlexander Duyck2-16/+41
Remove the use of skb_dma_map from the e1000 driver in order to avoid issues when HW iommu are in use. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: remove use of skb_dma_map from e1000e driverAlexander Duyck2-21/+47
In testing we have found that skb_dma_map/unmap is incompatible with HW IOMMU due to the fact that multiple mappings will return different results. In order to correct this we need to remove skb_dma_map/unmap calls from the e1000e driver. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02ip: update the description of rp_filter in ip-sysctl.txtShan Wei1-2/+2
The commit 27fed4175acf81ddd91d9a4ee2fd298981f60295 (ip: fix logic of reverse path filter sysctl) has changed the logic of rp_filter. The document about rp_filter is out of date. Now, setting conf/all/rp_filte with 0 can also enable source validation. Update the document according to the commit. Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02bnx2: EEH is failing with timeoutBreno Leitao1-0/+1
bnx2 is failing when a PCI error is detected. The error is the following: bnx2: Chip not in correct endian mode bnx2: fw sync timeout, reset code = 404001d This error was caused because the way pci_restore_state() is working after commit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff ("PCI: Clear saved_state after the state has been restored"). Signed-off-by: Breno Leitao<leitao@linux.vnet.ibm.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02net: Coding style corrections on Sealevel Systems 4021 driver.Rudy Matela1-7/+4
Changed braces position on some statements. Inserted a space between an "if" keyword and a parenthesis. Signed-off-by: Rudy Matela <rudy.matela@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02net: compat_sys_recvmmsg user timespec arg can be NULLJean-Mickael Guerin1-2/+6
We must test if user timespec is non-NULL before copying from userpace, same as sys_recvmmsg(). Commiter note: changed it so that we have just one branch. Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02net: compat_mmsghdr must be used in sys_recvmmsgJean-Mickael Guerin1-6/+18
Both to traverse the entries and to set the msg_len field. Commiter note: folded two patches and avoided one branch repeating the compat test. Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02sctp: fix sctp_setsockopt_autoclose compile warningAndrei Pelinescu-Onciul1-1/+1
Fix the following warning, when building on 64 bits: net/sctp/socket.c:2091: warning: large integer implicitly truncated to unsigned type Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org> Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02ieee802154: merge cleanupEric Dumazet1-3/+0
A small cleanup after last net-2.6 merge into net-next-2.6 As we are going to free skb, no need to set skb->skb_iif or skb->dev Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02net/ps3: Add support for gelic link negotiationHideyuki Sasaki2-2/+72
Add ethtool_ops.set_settings support to the PS3 gelic network driver. Allows manual setting of ethernet link speed. Signed-off-by: Hideyuki Sasaki <xhide@rd.scei.sony.co.jp> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02net/ps3: Cleanup gelic enumsGeoff Levand2-20/+25
Cleanup of the gelic driver enumerations: o Add some missing commas. o Add an Ether port post fix (PS3 currently only supports PORT_0). o Add a new enum gelic_lv1_phy to use when interacting with the PHY. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02be2net: fix unnecessary access to hardware to get link, port infoAjit Khaparde3-21/+38
Every time while doing ethtool->get_settings we are accessing the hardware to get link status and port information. This is not necessary. We now use the cached copy for this info and update it when the link status changes. From: Suresh R <sureshr@serverengines.com> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02be2net: Add be_rx_polls counterAjit Khaparde3-2/+3
Add be_rx_polls to count number of times NAPI called rx poll function. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02be2net: fix to allow port beacon when device is closedAjit Khaparde1-3/+0
port identification/beaconing is failing if device open has not been done. Fixing it. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02be2net: check for valid ether addressAjit Khaparde1-0/+7
Allow only valid ether addresses to be assigned and used for the interface. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02be2net: initialize netdev->perm_addrAjit Khaparde1-0/+1
patch to initialize netdev->perm_addr Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02be2net: set netdev->vlan_features appropriatelyAjit Khaparde1-0/+2
patch to initialize netdev->vlan_features appropriately. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02atl1e:disable NETIF_F_TSO6 for hardware limitJie Yang1-36/+0
For hardware limit to support TSOV6, just disable this feature Signed-off-by: Jie Yang <jie.yang@atheros.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom()Roel Kluin1-1/+2
Don't use the sizeof the pointer to clear the result Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: PHY type cleanups in e1000e_check_downshift()Bruce Allan1-1/+1
Remove the case for 82577 because it does not support the ability to check for downshift. Add case for e1000_phy_bm which can do this. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: add debug messagesBruce Allan2-7/+23
Add some helpful debug messages. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: comment correctionsBruce Allan4-15/+11
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: enable new 82567V-3 deviceBruce Allan3-0/+3
This new PCI device ID is for a new combination of MAC and PHY both of which already have supporting code in the driver, just not yet in this combination. During validation of the device, an intermittent issue was discovered with waking it from a suspended state which can be resolved with the pre-existing workaround to disable gigabit speed prior to suspending. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: ensure the link state is correct for serdes linksBruce Allan1-28/+48
This patch ensures that the link state (as reported in mac->serdes_has_link) will transition to false when autoneg fails to complete but valid codewords were detected. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: provide family-specific PHY power up/down operationsBruce Allan7-39/+122
The different families (80003es2lan, 8257x, ICHx/PCH) supported by the driver each have their own conditions when the PHY can be powered down. This patch rewrites the PHY power up/down code to fit with the family- specific style used in the driver. All pre-existing calls to power up or down the PHY remain untouched. A new call to power down the PHY when removing the driver when the interface is down replaces the current call to reset the PHY in order to reduce power consumption. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: guard against buffer overflow in cable length tablesBruce Allan2-7/+24
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: provide family-specific functions to manage VLAN filter arraysBruce Allan6-16/+45
The two MAC-families that have VLAN filter table register arrays manage each a bit differently from one another, so provide family-specific functions for managing the register arrays and function pointers to access the appropriate function. Also make sure attempts to access these register arrays are not done on parts not supporting that feature. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>