summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* netdevice zd1201: Use after freeWang Chen2008-12-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3d29b0c33d431ecc69ec778f8c236d382f59a85f | Author: John W. Linville <linville@tuxdriver.com> | Date: Fri Oct 31 14:13:12 2008 -0400 | | netdevice zd1201: Convert directly reference of netdev->priv to netdev_priv() | | We have some reasons to kill netdev->priv: | 1. netdev->priv is equal to netdev_priv(). | 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously | netdev_priv() is more flexible than netdev->priv. | But we cann't kill netdev->priv, because so many drivers reference to it | directly. | | OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug", | and I want to kill netdev->priv later, I decided to convert all the direct | reference of netdev->priv first. | | (Original patch posted by Wang Chen <wangchen@cn.fujitsu.com> w/ above | changelog but using dev->ml_priv. That doesn't seem appropriate | to me for this driver, so I've revamped it to use netdev_priv() | instead. -- JWL) This commit changed the allocation of netdev, but didn't change the free method of it. This causes "zd" be used after the memory, which is pointed by "zd", being freed by free_netdev(). Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Revert "xfrm: Accept ESP packets regardless of UDP encapsulation mode"David S. Miller2008-12-191-0/+5
| | | | | | This reverts commit e061b165c7f4ec5e2e160d990b49011b5b6e5c6a. Signed-off-by: David S. Miller <davem@davemloft.net>
* Revert "net: release skb->dst in sock_queue_rcv_skb()"David S. Miller2008-12-181-5/+1Star
| | | | | | | | | | This reverts commit 70355602879229c6f8bd694ec9c0814222bc4936. As pointed out by Mark McLoughlin IP_PKTINFO cmsg data is one post-queueing user, so this optimization is not valid right now. Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: use port_params in __update_lacpdu_from_portHolger Eitzenberger2008-12-181-6/+7
| | | | | Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: use port_params in __update_default_selected()Holger Eitzenberger2008-12-181-8/+10
| | | | | | | | I also removed some of the unneeded braces in the if condition to improve readability and a little bit of reformatting. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: use port_params in __update_selected()Holger Eitzenberger2008-12-181-8/+8
| | | | | Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: remove various function declarationsHolger Eitzenberger2008-12-181-28/+0Star
| | | | | | | | They are all defined before used, it's therefore ok to remove them. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: init port_params from templateHolger Eitzenberger2008-12-181-12/+11Star
| | | | | Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: use plain memcpy in __record_default()Holger Eitzenberger2008-12-181-7/+2Star
| | | | | | | Also remove the pointless comment at the top. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: use port_params in __record_pdu()Holger Eitzenberger2008-12-181-9/+10
| | | | | | | | It helps in maintaining the various partner information values from the LACPDU. It also removes the pointless comment at the top. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: introduce and use port_params structureHolger Eitzenberger2008-12-182-72/+73
| | | | | | | | | | It generally helps to handle those values in various places, using it might make the code more readable and gives room for other improvements. The IEEE standard talks about them as "parameter values". Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: improve elaborate port_state assignmentHolger Eitzenberger2008-12-181-10/+1Star
| | | | | | | | The previous code was just a funny way of assigning both values (they are both of type u8). Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Continue polling until both tx and rx are emptyAndy Fleming2008-12-181-5/+9
| | | | | | | | | | gfar_poll would declare polling done once the rx queue was empty, but the tx queue could still have packets left. Stolen mostly from the e1000 driver. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Merge Tx and Rx interrupt for scheduling clean up ringDai Haruki2008-12-182-42/+19Star
| | | | | | | | No clean up function is executed in the interrupt context by this patch. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Use interface name in interrupt name to distinguish the source.Dai Haruki2008-12-182-6/+31
| | | | | | | | | | Interface name (ex. eth0) is used as the prefix for the interrupt name, with _rx, _tx, and _er appended to distinguish multiple interrupts on the same interface. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Add Scatter Gather supportDai Haruki2008-12-183-71/+149
| | | | | | | | | | Scatter Gather support in gianfar driver to handle fragmented frames on the transmit side. Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Fix packet drop when out of memoryAndy Fleming2008-12-181-2/+1Star
| | | | | | | | | | The patch which fixed gianfar so it drops packets when it runs out of memory left in the code which frees the skb when it drops packets. Change the code so that we only free the skb if the new skb was successfully created. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* dccp_diag: LISTEN sockets don't have CCIDsArnaldo Carvalho de Melo2008-12-181-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | And thus when we try to use 'ss -danemi' on these sockets that have no ccid blocks (data collected using systemtap after I fixed the problem): dccp_diag_get_info sk=0xffff8801220a3100, dp->dccps_hc_rx_ccid=0x0000000000000000, dp->dccps_hc_tx_ccid=0x0000000000000000 We get an OOPS: mica.ghostprotocols.net login: BUG: unable to handle kernel NULL pointer dereferenc0 IP: [<ffffffffa0136082>] dccp_diag_get_info+0x82/0xc0 [dccp_diag] PGD 12106f067 PUD 122488067 PMD 0 Oops: 0000 [#1] PREEMPT Fix is trivial, and 'ss -d' is working again: [root@mica ~]# ss -danemi State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 0 *:5001 *:* ino:7288 sk:220a3100ffff8801 mem:(r0,w0,f0,t0) cwnd:0 ssthresh:0 [root@mica ~]# Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: USB CDC Phonet function for gadget frameworkRémi Denis-Courmont2008-12-182-0/+642
| | | | | | | | | This implements the Nokia vendor-specific communication device class function to exchange Phonet messages over USB. This function is already found in the "PC suite" USB profile of (non-Linux) Nokia handsets. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: get rid of deferred work on the transmission pathRémi Denis-Courmont2008-12-181-63/+28Star
| | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: use atomic for packet TX windowRémi Denis-Courmont2008-12-183-19/+23
| | | | | | | GPRS TX flow control won't need to lock the underlying socket anymore. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: allocate separate ARP type for GPRS over a Phonet pipeRémi Denis-Courmont2008-12-183-3/+4
| | | | | | | | A separate xmit lock class supports GPRS over a Phonet pipe over a TUN device (type ARPHRD_NONE). Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: allocate a non-Ethernet ARP typeRémi Denis-Courmont2008-12-182-4/+6
| | | | | | | Also leave some room for more 802.11 types. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vcan: whitespace fixesOliver Hartkopp2008-12-181-10/+10
| | | | | Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ppp_generic - use idr technique instead of cardmapsCyrill Gorcunov2008-12-171-135/+48Star
| | | | | | | | | Use idr technique instead of own implemented cardmaps. It saves us a number of lines and gives an ability to use library functions. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Fix namespace collision with FLOW_CTRL_{TX,RX}David S. Miller2008-12-173-60/+60
| | | | | | | | | | | | These are now defined in linux/mii.h and the bnx2x driver defines different values which are shared with hardware data structures. So add a "BNX2X_" prefix to these macro names. Based upon a report from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2: Don't redefine FLOW_CTRL_{RX,TX}.David S. Miller2008-12-171-3/+0Star
| | | | | | They are provided generically by linux/mii.h now. Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2: Update version to 1.9.0.Michael Chan2008-12-171-3/+3
| | | | | | | And fix the 5716S pci_device_id entry to point to the proper string. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2: Rename MSI-X vectors.Michael Chan2008-12-172-2/+4
| | | | | | | | Change MSI-X vector names to "ethx-%d". 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>
* drivers/net/hamradio: Move a dereference below a NULL testJulia Lawall2008-12-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | In each case, if the NULL test is necessary, then the dereference should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T; expression E; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* phylib: Remove unnecessary "reset" fixups in genphy_setup_forcedAndy Fleming2008-12-171-17/+0Star
| | | | | | | | | | | genphy_setup_forced hasn't actually reset the PHY for a long time, but a comment to that effect remained in the code, so code continued to act as if it *had* reset the PHY, and called the necessary fixup functions to respond to a PHY reset. With no reset, those functions are no longer needed, so we remove them. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Make all BD status writes 32-bitDai Haruki2008-12-172-25/+31
| | | | | | | | | | | | Whenever we want to update the status field in a BD, we usually want to update the length field, too. By combining them into one 32-bit field, we reduce the number of stores to memory shared with the controller, and we eliminate the need for order-enforcement, as the length and "READY" bit are now updated atomically at the same time. Signed-off-by: Dai Haruki <Dai.Haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Add macros for stepping through BDsAndy Fleming2008-12-172-18/+15Star
| | | | | | | | | | | | | | This code is based strongly on code from Dai Haruki <Dai.Haruki@freescale.com>. The gianfar Buffer Descriptors are arranged in a circular array, the end of which is denoted by setting the "WRAP" bit in the descriptor. However, the software knows the end of the ring because it knows how many descriptors are there. Rather than check each descriptor for whether the WRAP bit is set, use pointer math to determine where the next BD is. This is also useful for when we want to look at BDs other than the very next one (for Scatter-Gather). Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Remove unused gfar_add_fcb() function parameterDai Haruki2008-12-171-4/+4
| | | | | | | | - Also, use cacheable_memzero instead of memset for performance reasons. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Enable padding and Optimize the frame prepended bytes handlingDai Haruki2008-12-171-46/+41Star
| | | | | | | | | | | | The eTSEC can prepend up to 32 bytes to a received frame, usually for the purpose of aligning the IP address to a word boundary, so this turns it on. While we're in there, make the handling of the pre-frame bytes (padding and Frame Control Block) cleaner. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Fix VLAN HW feature related frame/buffer size calculation.Dai Haruki2008-12-172-19/+26
| | | | | | | | Optimize the VLAN checking logic as well. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Fix eTSEC configuration procedureDai Haruki2008-12-172-13/+15
| | | | | | | | | | | | Fix some bugs in the ethtool configuration functions: * gfar_clean_rx_ring should not be called with interrupts disabled. * Update last transmission time to avoid tx timeout. * Delete redundant NETIF_F_IP_CSUM check in gfar_start_xmit * Use netif_tx_lock_bh when reconfiguring the tx csum Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Optimize interrupt coalescing configurationDai Haruki2008-12-173-38/+40
| | | | | | | | | | Store the interrupt coalescing values in the form in which they will be written to the interrupt coalescing registers. This puts a little overhead into the ethtool configuration, and takes it out of the interrupt handler Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Convert gianfar to an of_platform_driverAndy Fleming2008-12-1742-424/+1217
| | | | | | | | | | | Does the same for the accompanying MDIO driver, and then modifies the TBI configuration method. The old way used fields in einfo, which no longer exists. The new way is to create an MDIO device-tree node for each instance of gianfar, and create a tbi-handle property to associate ethernet controllers with the TBI PHYs they are connected to. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Use gfar_halt to stop DMA in gfar_probeAndy Fleming2008-12-171-13/+1Star
| | | | | | | | | gfar_halt does everything we want to do there, including disabling TX/RX. It also doesn't unnecessarily enable DMA if it's already stopped. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tlan: Remove broken support for big buffersSakari Ailus2008-12-171-134/+77Star
| | | | | | | | The big rx/tx buffer support is broken and unlikely to be very useful as such. Remove it. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-12-173-9/+17
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/enc28j60.c
| * tlan: Fix pci memory unmappingSakari Ailus2008-12-171-4/+9
| | | | | | | | | | | | | | | | | | Fix pci unmapping problem introduced by commit id 8953f1282793882a5444924f7a273dc72a43d0a3 "tlan: Fix small (< 64 bytes) datagram transmissions". Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
| * enc28j60: use netif_rx_ni() to deliver RX packetsBaruch Siach2008-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | The enc28j60 driver reads incoming packets in the process (workqueue) context, not in a tasklet or the interrupt context. Thus, we should use netif_rx_ni() to deliver those packets to the networking layer, instead of netif_rx(). This way incoming packets don't wait in the incoming queue for the next IRQ to be serviced. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tlan: Fix small (< 64 bytes) datagram transmissionsSakari Ailus2008-12-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | The TLAN chip does not support tranmissions smaller than 64 bytes. Smaller transfers need to be padded up to that size. This was broken by commit id 41873e9aff0632d80c74380d58a89e8d420151bd ("tlan: get rid of padding buffer"). <URL:http://bugzilla.kernel.org/show_bug.cgi?id=11754> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netfilter: ctnetlink: fix missing CTA_NAT_SEQ_UNSPECPablo Neira Ayuso2008-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an inconsistency in nfnetlink_conntrack.h that I introduced myself. The problem is that CTA_NAT_SEQ_UNSPEC is missing from enum ctattr_natseq. This inconsistency may lead to problems in the message parsing in userspace (if the message contains the CTA_NAT_SEQ_* attributes, of course). This patch breaks backward compatibility, however, the only known client of this code is libnetfilter_conntrack which indeed crashes because it assumes the existence of CTA_NAT_SEQ_UNSPEC to do the parsing. The CTA_NAT_SEQ_* attributes were introduced in 2.6.25. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ipv6: fix the outgoing interface selection order in udpv6_sendmsg()Yang Hongyang2008-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.When no interface is specified in an IPV6_PKTINFO ancillary data item, the interface specified in an IPV6_PKTINFO sticky optionis is used. RFC3542: 6.7. Summary of Outgoing Interface Selection This document and [RFC-3493] specify various methods that affect the selection of the packet's outgoing interface. This subsection summarizes the ordering among those in order to ensure deterministic behavior. For a given outgoing packet on a given socket, the outgoing interface is determined in the following order: 1. if an interface is specified in an IPV6_PKTINFO ancillary data item, the interface is used. 2. otherwise, if an interface is specified in an IPV6_PKTINFO sticky option, the interface is used. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ipv6: fix the return interface index when get it while no message is receivedYang Hongyang2008-12-161-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When get receiving interface index while no message is received, the the value seted with setsockopt() should be returned. RFC 3542: Issuing getsockopt() for the above options will return the sticky option value i.e., the value set with setsockopt(). If no sticky option value has been set getsockopt() will return the following values: - For the IPV6_PKTINFO option, it will return an in6_pktinfo structure with ipi6_addr being in6addr_any and ipi6_ifindex being zero. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ipv6: Add IPV6_PKTINFO sticky option support to setsockopt()Yang Hongyang2008-12-162-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three reasons for me to add this support: 1.When no interface is specified in an IPV6_PKTINFO ancillary data item, the interface specified in an IPV6_PKTINFO sticky optionis is used. RFC3542: 6.7. Summary of Outgoing Interface Selection This document and [RFC-3493] specify various methods that affect the selection of the packet's outgoing interface. This subsection summarizes the ordering among those in order to ensure deterministic behavior. For a given outgoing packet on a given socket, the outgoing interface is determined in the following order: 1. if an interface is specified in an IPV6_PKTINFO ancillary data item, the interface is used. 2. otherwise, if an interface is specified in an IPV6_PKTINFO sticky option, the interface is used. 2.When no IPV6_PKTINFO ancillary data is received,getsockopt() should return the sticky option value which set with setsockopt(). RFC 3542: Issuing getsockopt() for the above options will return the sticky option value i.e., the value set with setsockopt(). If no sticky option value has been set getsockopt() will return the following values: 3.Make the setsockopt implementation POSIX compliant. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: Refactor full duplex flow control resolutionSteve Glendinning2008-12-165-92/+33Star
| | | | | | | | | | | | | | | | | | | | | | | | These 4 drivers have identical full duplex flow control resolution functions. This patch changes them all to use one common function. The function in question decides whether a device should enable TX and RX flow control in a standard way (IEEE 802.3-2005 table 28B-3), so this should also be useful for other drivers. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>