aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-04-14drivers: net: use skb_headlen()Eric Dumazet15-30/+30
replaces (skb->len - skb->data_len) occurrences by skb_headlen(skb) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-14virtio_net: Fix mis-merge.David S. Miller1-1/+0
Pointed out by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-14Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller7-8/+16
Conflicts: drivers/net/pcmcia/smc91c92_cs.c drivers/net/virtio_net.c
2010-04-14tun: orphan an skb on txMichael S. Tsirkin1-0/+4
The following situation was observed in the field: tap1 sends packets, tap2 does not consume them, as a result tap1 can not be closed. This happens because tun/tap devices can hang on to skbs undefinitely. As noted by Herbert, possible solutions include a timeout followed by a copy/change of ownership of the skb, or always copying/changing ownership if we're going into a hostile device. This patch implements the second approach. Note: one issue still remaining is that since skbs keep reference to tun socket and tun socket has a reference to tun device, we won't flush backlog, instead simply waiting for all skbs to get transmitted. At least this is not user-triggerable, and this was not reported in practice, my assumption is other devices besides tap complete an skb within finite time after it has been queued. A possible solution for the second issue would not to have socket reference the device, instead, implement dev->destructor for tun, and wait for all skbs to complete there, but this needs some thought, probably too risky for 2.6.34. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Yan Vugenfirer <yvugenfi@redhat.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-14stmmac: updated the drv module versionGiuseppe CAVALLARO1-1/+1
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-14stmmac: fix vlan support setupGiuseppe CAVALLARO2-5/+5
Moved STMMAC_VLAN_TAG_USED from stmmac.h to common.h header because it is used within the device and descriptor cores. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-14stmmac: get the descriptor structure from platformGiuseppe CAVALLARO2-4/+9
Output for chip that uses the Enhanced descriptors: [snip] STMMAC driver: platform registration... done! DWMAC1000 - user ID: 0x10, Synopsys ID: 0x33 Enhanced descriptor structure no valid MAC address;please, use ifconfig or nwhwconfig! eth0 - (dev. name: stmmaceth - id: 0, IRQ #134 IO base addr: 0xfd110000) STMMAC MII Bus: probed [snip] Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-14stmmac: fix Transmit FIFO flush operationGiuseppe CAVALLARO6-13/+12
Fix the Transmit FIFO flush operation; it was disabled while reworking the descriptor structures. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-14stmmac: rework normal and enhanced descriptorsGiuseppe CAVALLARO12-584/+627
Currently the driver assumes that the mac10/100 can only use the normal descriptor structure and the gmac can only use the enhanced structures. This patch removes the descriptor's code from the dma files and adds two new files just for handling the normal and enhanced descriptors. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-14stmmac: split core and dma for the mac10/100Giuseppe CAVALLARO4-200/+234
The patch splits core and dma parts for the mac10/100 device. This was already done for the GMAC device. It should make more flexible the driver to support other chips. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13forcedeth: fix tx limit2 flag checkAyaz Abdulla1-1/+1
This is a fix for bug 572201 @ bugs.debian.org This patch fixes the TX_LIMIT feature flag. The previous logic check for TX_LIMIT2 also took into account a device that only had TX_LIMIT set. Reported-by: Stephen Mulcahu <stephen.mulcahy@deri.org> Reported-by: Ben Huchings <ben@decadent.org.uk> Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13be2net: clarify promiscuous cmd with a commentSathya Perla1-0/+4
The promiscous cmd config code gives an impression that setting a port to promisc mode will unset the other port. This is not the case and is clarified with a comment. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13drivers: net: last_rx eliminationEric Dumazet7-9/+0
Network drivers do not have to update last_rx, unless they need it for their private use. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13Fix some #includes in CAN drivers (rebased for net-next-2.6)Hans J. Koch13-13/+0
In the current implementation, CAN drivers need to #include <linux/can.h> _before_ they #include <linux/can/dev.h>, which is both ugly and unnecessary. Fix this by including <linux/can.h> in <linux/can/dev.h> and remove the #include <linux/can.h> lines from drivers. Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13bcm63xx_enet: do not overwrite ENET_CTL_REG valueFlorian Fainelli1-1/+3
bcm_enet_hw_preinit will correctly set values in ENET_CTL_REG for internal or external MII operations, however, bcm_enet_open will blindly overwrite the ENET_CTL_REG register value and thus we will loose any changes to it that were made in bcm_enet_hw_preinit, rendering external MII operations non-working. This would lead to the driver not being able to check for link availability on external PHY setups, and thus we would never get to sending packets because link was down from the driver side. This was completely un-noticed because all boards out there but BCM6338-based ones use internal phy on their enet0 interface. Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13PHY: fix typo in bcm63xx PHY driver tableFlorian Fainelli1-1/+1
Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13chelsio: Fix build warning.David S. Miller1-1/+1
GCC warns that: drivers/net/chelsio/sge.c:463:11: warning: operation on 's->port' may be undefined Better to eliminate the side effects in the calculation and express what was intended here. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13smc91c92_cs: define multicast_table as unsigned charKen Kawasaki1-7/+6
smc91c92_cs: * define multicast_table as unsigned char * remove unnecessary "#ifndef final_version" Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13e1000e: stop cleaning when we reach tx_ring->next_to_useTerry Loftin1-0/+2
Tx ring buffers after tx_ring->next_to_use are volatile and could change, possibly causing a crash. Stop cleaning when we hit tx_ring->next_to_use. Signed-off-by: Terry Loftin <terry.loftin@hp.com> Acked-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>
2010-04-13igb: restrict WoL for 82576 ET2 Quad Port Server AdapterStefan Assmann2-0/+2
Restrict Wake-on-LAN to first port on 82576 ET2 quad port NICs, as it is only supported there. Signed-off-by: Stefan Assmann <sassmann@redhat.com> Acked-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>
2010-04-13e1000e: use static params to save stack spaceJesse Brandeburg1-8/+8
used a modified checkstack to get the 56 number (normally checkstack wouldn't show this low a value) checkstack before: 0x0000012f e1000e_check_options [e1000e]: 272 after: 0x0000012f e1000e_check_options [e1000e]: 56 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13igb: modify register test for i350 to reflect read only bits in RDLEN/TDLENAlexander Duyck1-4/+4
The registers for RDLEN/TDLEN on i350 have the first 7 bits as read only. This is a change from previous hardware in which it was only the first 4 bits that were read only. 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>
2010-04-13myri10ge: use the DMA state API instead of the pci equivalentsFUJITA Tomonori1-22/+22
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Andrew Gallatin <gallatin@myri.com> Cc: Brice Goglin <brice@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13qlge: use the DMA state API instead of the pci equivalentsFUJITA Tomonori2-33/+33
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13cxgb3: use the DMA state API instead of the pci equivalentsFUJITA Tomonori1-10/+10
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13chelsio: use the DMA state API instead of the pci equivalentsFUJITA Tomonori1-25/+25
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13qla3xxx: use the DMA state API instead of the pci equivalentsFUJITA Tomonori2-36/+36
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: use the DMA state API instead of the pci equivalentsFUJITA Tomonori2-22/+22
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Matt Carlson <mcarlson@broadcom.com> Cc: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: Update version to 3.110Matt Carlson1-2/+2
This patch updates the tg3 version to 3.110. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: Remove function errors flagged by checkpatchMatt Carlson1-9/+9
This patch removes the following checkpatch errors: * return is not a function, parentheses are not required * space prohibited between function name and open parenthesis '(' Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: Unify max pkt size preprocessor constantsMatt Carlson2-3/+2
The maximum packet size that gets programmed into the standard producer ring control block is directly related to the packet size used to allocate packet buffers. This patch removes the redundant preprocessor constant. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: Re-inline VLAN tags when appropriateMatt Carlson1-11/+33
The tg3 driver is written so that VLAN tagged packets can be accepted, even if CONFIG_VLAN_8021Q or CONFIG_VLAN_8021Q_MODULE is not defined. (Think raw interfaces.) If the device has ASF support enabled, the firmware requires the driver to enable VLAN tag stripping. If VLAN tagging is not explicitly supported by the kernel and ASF is enabled, the driver will have to reinject the VLAN tag back into the packet stream. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: Optimize rx double copy testMatt Carlson2-10/+27
On a PCIX bus, the 5701 has a bug which requires the driver to double copy all rx packets. The rx code uses the rx_offset device member as a flag to determine if this workaround should take effect. The following patch will modify the rx_offset member such that this test will become less clear. The patch starts by integrating the workaround check into the packet length check. It rounds out the implementation by relaxing the workaround restrictions if the platform has efficient unaligned accesses. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: Reduce 57765 core clock when link at 10MbpsMatt Carlson1-0/+5
This patch reduces the core clock to 6.25MHz when operating at 10Mbps link speed. This is needed to prevent a bug that will ultimately cause transmits to cease. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: Set card 57765 card reader MRRS to 1024BMatt Carlson2-0/+3
This patch sets the Maximum Read Request Size for the card reader function to 1024 bytes to prevent an SD controller lockup. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13tg3: Disable CLKREQ in L2Matt Carlson2-0/+16
This patch disables CLKREQ in L2 to workaround a chipset bug. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13gianfar: Add hardware TX timestamping supportManfred Rudigier2-20/+101
If a packet has the skb_shared_tx->hardware flag set the device is instructed to generate a TX timestamp and write it back to memory after the frame is transmitted. During the clean_tx_ring operation the timestamp will be extracted and copied into the skb_shared_hwtstamps struct of the skb. TX timestamping is enabled by setting the tx_type to something else than HWTSTAMP_TX_OFF with the SIOCSHWTSTAMP ioctl command. It is only supported by eTSEC devices. Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13gianfar: Add hardware RX timestamping supportManfred Rudigier2-5/+66
The device is configured to insert hardware timestamps into all received packets. The RX timestamps are extracted from the padding alingment bytes during the clean_rx_ring operation and copied into the skb_shared_hwtstamps struct of the skb. This extraction only happens if the rx_filter was set to something else than HWTSTAMP_FILTER_NONE with the SIOCSHWTSTAMP ioctl command. Hardware timestamping is only supported for eTSEC devices. To indicate device support the new FSL_GIANFAR_DEV_HAS_TIMER flag was introduced. Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13Add non-Virtex5 support for LL TEMAC driverJohn Linn3-38/+115
This patch adds support for using the LL TEMAC Ethernet driver on non-Virtex 5 platforms by adding support for accessing the Soft DMA registers as if they were memory mapped instead of solely through the DCR's (available on the Virtex 5). The patch also updates the driver so that it runs on the MicroBlaze. The changes were tested on the PowerPC 440, PowerPC 405, and the MicroBlaze platforms. Signed-off-by: John Tyner <jtyner@cs.ucr.edu> Signed-off-by: John Linn <john.linn@xilinx.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13net: ll_temac: remove virt_to_bus callJohn Linn1-3/+1
The virt_to_bus call should not be used any longer as it's considered illegal. The driver has the physical address of the buffer in the descriptor such that it's not necessary anyway. Signed-off-by: John Linn <john.linn@xilinx.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13r6040: use (dev|netdev)_<level> macros helpersFlorian Fainelli1-14/+13
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13can: Add esd board support to plx_pci CAN driverMatthias Fuchs2-12/+145
This patch adds support for SJA1000 based PCI CAN interface cards from electronic system design gmbh. Some changes have been done on the common code: - esd boards must not have the 2nd local interupt enabled (PLX9030/9050) - a new path for PLX9056/PEX8311 chips has been added - new plx9056 reset function has been implemented - struct plx_card_info got a reset function entry In detail the following additional boards are now supported: CAN-PCI/200 (PCI) CAN-PCI/266 (PCI) CAN-PMC266 (PMC module) CAN-PCIe/2000 (PCI Express) CAN-CPCI/200 (Compact PCI, 3U) CAN-PCI104 (PCI104) Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-12virtio_net: missing sg_init_tableShirley Ma1-0/+2
Add missing sg_init_table for sg_set_buf in virtio_net which induced in defer skb patch. Reported-by: Thomas Müller <thomas@mathtm.de> Tested-by: Thomas Müller <thomas@mathtm.de> Signed-off-by: Shirley Ma <xma@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-11Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller449-186/+531
Conflicts: drivers/net/stmmac/stmmac_main.c drivers/net/wireless/wl12xx/wl1271_cmd.c drivers/net/wireless/wl12xx/wl1271_main.c drivers/net/wireless/wl12xx/wl1271_spi.c net/core/ethtool.c net/mac80211/scan.c
2010-04-11Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller445-117/+377
2010-04-09Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6David S. Miller1-4/+9
2010-04-08iwlwifi: need check for valid qos packet before freeWey-Yi Guy1-4/+9
For 4965, need to check it is valid qos frame before free, only valid QoS frame has the tid used to free the packets. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08vxge: Version update.Sreenivasa Honnur1-2/+2
- Version update. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@exar.com>
2010-04-08vxge: Pass correct number of VFs value to pci_sriov_enable().Sreenivasa Honnur3-12/+71
- max_config_dev loadable parameter is set to 0xFF by default. Pass correct number of VFs value to pci_sriov_enable() if max_config_dev is set to its default value. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-08vxge: Allow driver load for all enumerated pci functions.Sreenivasa Honnur1-2/+4
- Allow all instances of the driver be loaded when multiple pci functions are enumerated. The max_config_dev driver loadable option limits the driver load instances if required. The X3100's function configuration of single/multi function, SR and MR IOV allows the user to select the number of pci functions. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>