summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update MAINTAINERS entries for IXP4xx and WAN network drivers.Krzysztof Hałasa2008-12-221-1/+6
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* WAN: Add IXP4xx HSS HDLC driver.Krzysztof Hałasa2008-12-223-0/+1365
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* IXP4xx: Add ethtool support to Ethernet driver.Krzysztof Hałasa2008-12-221-0/+45
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* IXP4xx: Add PHYLIB MII ioctl to the Ethernet driver.Krzysztof Hałasa2008-12-221-1/+3
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* IXP4xx: Add PHYLIB support to Ethernet driver.Krzysztof Hałasa2008-12-222-100/+96Star
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* IXP4xx: Make the Ethernet driver use built-in netdev stats.Krzysztof Hałasa2008-12-221-16/+8Star
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* IXP4xx: Silence section mismatch warning in Ethernet driver.Krzysztof Hałasa2008-12-221-3/+3
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* IXP4xx: clear IRQ stat in qmgr_disable_irq().Krzysztof Hałasa2008-12-221-0/+1
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* IXP4xx: check for queue being empty in qmgr_release_queue().Krzysztof Hałasa2008-12-221-0/+4
| | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* ucc_geth: Remove UGETH_FILTERING dead codeAnton Vorontsov2008-12-192-266/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code appears to be dead: nobody call these functions, plus build breaks when UGETH_FILTERING is enabled: ucc_geth.c:1848: warning: 'struct enet_addr' declared inside parameter list ucc_geth.c:1848: warning: its scope is only this definition or declaration, which is probably not what you want ucc_geth.c: In function 'ugeth_82xx_filtering_get_match_addr_in_hash': ucc_geth.c:1856: error: dereferencing pointer to incomplete type ucc_geth.c:1874: error: dereferencing pointer to incomplete type ucc_geth.c:1877: warning: return from incompatible pointer type ucc_geth.c: At top level: ucc_geth.c:1885: warning: 'struct enet_addr' declared inside parameter list ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_hash': ucc_geth.c:1894: error: dereferencing pointer to incomplete type ucc_geth.c:1909: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type ucc_geth.c:1909: warning: assignment from incompatible pointer type ucc_geth.c:1918: error: dereferencing pointer to incomplete type ucc_geth.c: At top level: ucc_geth.c:1928: warning: 'struct enet_addr' declared inside parameter list ucc_geth.c: In function 'ugeth_82xx_filtering_clear_addr_in_hash': ucc_geth.c:1947: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type ucc_geth.c:1947: warning: assignment from incompatible pointer type ucc_geth.c:1954: error: dereferencing pointer to incomplete type ucc_geth.c: At top level: ucc_geth.c:2060: warning: 'struct enet_addr' declared inside parameter list ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_paddr': ucc_geth.c:2064: error: dereferencing pointer to incomplete type ucc_geth.c:2073: error: dereferencing pointer to incomplete type ucc_geth.c:2075: warning: passing argument 2 of 'hw_add_addr_in_paddr' from incompatible pointer type make[2]: *** [ucc_geth.o] Error 1 The code is there since the driver was merged, and nobody seem to be interested in fixing or actually using it. If we ever want the filtering support, we can always revert the patch and fix it, but so far it just draws reader's attention. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Fix IO memory (un)mapping codeAnton Vorontsov2008-12-191-3/+12
| | | | | | | | | | The driver doesn't check ioremap() return value, and doesn't free the remapped memory. This patch fixes it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Cleanup repetitive ucc_geth_memclean() callsAnton Vorontsov2008-12-191-30/+1Star
| | | | | | | | | | No need to call ucc_geth_memclean() so many times, just check for errors in ucc_geth_open(), and call ucc_geth_stop() in case of errors. The ucc_geth_stop() may be called anytime and will do the right thing. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Fix IRQ freeing code in ucc_geth_open()Anton Vorontsov2008-12-191-9/+8Star
| | | | | | | | | | | | open() routine calls stop() in case of errors, the function will try to free the requested IRQ. But we don't know if it was actually requested, so the code might issue bogus free_irq(0, dev) call. Fix this by rearranging the code so that now request_irq() is the last call in the open() routine, and move free_irq() into the close(). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Fix TX watchdog timeout handlingAnton Vorontsov2008-12-192-8/+30
| | | | | | | | | | | | | | | | | | | | | | The timeout handling code is currently broken in several ways: - It calls stop() (which frees all the memory and IRQ), and then calls startup() (which won't re-request IRQ, neither it will re-init the Fast UCC structure). - It calls these routines from the softirq context, which is wrong, since stop() calls free_irq() (which might sleep) and startup() allocates things with GFP_KERNEL. - It won't soft-reset the PHY. We need the PHY reset for at least MPC8360E-MDS boards with Marvell 88E1111 PHY, the PHY won't recover from timeouts w/o the reset. So the patch fixes these problems by implementing the workqueue for the timeout handling, and there we fully re-open the device via close() and open() calls. The close/open paths do the right things, and I can see that the driver actually survive the timeouts. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Fix endless loop in stop_{tx,rx} routinesAnton Vorontsov2008-12-191-3/+6
| | | | | | | | | | | | | | | | Currently the routines wait for the various bits w/o an assumption that bits may never get set. When timeouts happen I see that these bits never get set and so the routines hang the kernel. With this patch we'll wait the graceful stop for 100 ms, and then will simply exit. There is nothing* we can do about that, but it's OK since we'll do full reset later. * Well, actually, there is also not-graceful variant for the TX stop, but specs says that we never should use it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: Stop scaring users with "treason uncloaked!"Matt Mackall2008-12-191-2/+2
| | | | | | | | The original message was unhelpful and extremely alarming to our poor users, despite its charm. Make it less frightening. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* NIU: Implement discard counters, optimizeJesper Dangaard Brouer2008-12-191-1/+3
| | | | | | | | | | Optimize the lightly loaded case, by only synchronizing discards stats when qlen > 10 indicate potential for drops. Notice Robert Olsson might disagree with this patch. Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* NIU: Implement discard counters, info/debug statements.Jesper Dangaard Brouer2008-12-191-0/+6
| | | | | | | | Discard packet counter debug statements that can be turned on at runtime by users to assist debugging of the driver code. Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* NIU: Implement discard countersJesper Dangaard Brouer2008-12-191-0/+51
| | | | | | | | | | | | | | | | | | | | | | | Implementing discard counters for the NIU driver turned out to be more complicated than first assumed. The discard counters for the NIU neptune chip are only 16-bit (even though this is a 64-bit chip). These 16-bit counters can overflow quickly, especially considering this is a 10Gbit/s ethernet card. The overflow indication bit is, unfortunatly, not usable as the counter value does not wrap, but remains at max value 0xFFFF. Resulting in lost counts until the counter is reset. The read and reset scheme also poses a problem. Both in theory and in practice counters can be lost in between reading nr64() and clearing the counter nw64(). For this reason, the number of counter clearings nw64() is limited/reduced. On the fast-path the counters are only syncronized once it exceeds 0x7FFF. When read by userspace, its syncronized fully. Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* enc28j60: reduce the number of spi transfers in enc28j60_set_bank()Baruch Siach2008-12-191-7/+23
| | | | | | | | | | | | | | | | | | | | A major source of overhead in the enc28j60 driver is the SPI transfers. Each SPI transfer entails two kernel thread context switches. One major source of SPI transfers is the enc28j60_set_bank() functions which runs before every register access. This patch reduces the number of SPI transfers that enc28j60_set_bank() performs in two ways: 1. removes unnecessary bank switch for the registers that are present in all banks 2. when switching from banks 0 or 3 to banks 1 or 2 (i.e. only one bit changes) enc28j60_set_bank() does only one SPI transfer instead of two According to my tests these changes reduce the number of SPI transfers in about 25%. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
* 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>