summaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge/vxge-main.c
Commit message (Collapse)AuthorAgeFilesLines
* net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko2010-02-121-3/+3
| | | | | | | | | | | This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2010-01-101-4/+4
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/benet/be_cmds.h include/linux/sysctl.h
| * vxge: use pci_dma_mapping_error to test return valueDenis Kirjanov2010-01-101-1/+1
| | | | | | | | | | | | | | | | pci_dma_mapping_error should be used to test return value of pci_map_single or pci_map_page. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * vxge: use DMA_BIT_MASK instead of plain values.Denis Kirjanov2009-12-251-3/+3
| | | | | | | | | | | | | | Use DMA_BIT_MASK instead of plain values. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan2010-01-071-1/+1
| | | | | | | | | | | | | | | | Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section in every case. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | drivers/net/vxge/vxge-main.c: use %pM to show MAC addresshartleys2010-01-071-4/+2
|/ | | | | | | | Use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: Move && and || to end of previous lineJoe Perches2009-12-031-3/+3
| | | | | | | | | | | | | | Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Configure the number of transmit descriptors per packet to ↵Sreenivasa Honnur2009-10-281-2/+3
| | | | | | | | | | MAX_SKB_FRAGS + 1. - Configure the number of transmit descriptors per packet to MAX_SKB_FRAGS + 1. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Allow multiple functions with INTA.Sreenivasa Honnur2009-10-061-56/+36
| | | | | | | | | | - Allow multiple functions with INTA. - Removed the condition to allow only one vpath with INTA - Ensure that the alarm bit in titan_mask_all_int register is cleared when driver exits. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Check if FCS stripping is disabled by the firmware.Sreenivasa Honnur2009-10-061-0/+9
| | | | | | | | | | | | | - Added a function to check if FCS stripping is disabled by the firmware, if it is not disabled fail driver load. - By default FCS stripping is disabled by the firmware. With this assumption driver decrements the indicated packet length by 4 bytes(FCS length). - This patch ensures that FCS stripping is disabled during driver load time. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Update driver_config->vpath_per_dev for each function in probe.Sreenivasa Honnur2009-10-061-1/+2
| | | | | | | | | | | - Update driver_config->vpath_per_dev for each function in probe. - vpath_per_device specifies number of vpaths supported for each function/device. The current code was updating vpath_per_device only for physical device, however this has to be updated for each function also in case of a MF(Multi function) device. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* trivial: remove unnecessary semicolonsJoe Perches2009-09-211-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* drivers: Kill now superfluous ->last_rx storesEric Dumazet2009-09-021-2/+0
| | | | | | | | | | The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Neil Horman <nhorman@txudriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: convert bulk of drivers to netdev_tx_tStephen Hemminger2009-09-011-1/+1
| | | | | | | | | | | | In a couple of cases collapse some extra code like: int retval = NETDEV_TX_OK; ... return retval; into return NETDEV_TX_OK; Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: prefetch skb->dataBenjamin LaHaise2009-08-051-1/+5
| | | | | | | | | | | | This patch implements prefetching of skb->data from a copy of the pointer in the descriptor (which is already in the L1 cache at this point). This improves netperf rx performance (netperf -L 0,0 -c -H 192.168.254.2 -- -M 131072 -m 131072) by 4.9% on a P4 Xeon host. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: prefetch RxD descriptorsBenjamin LaHaise2009-08-051-0/+1
| | | | | | | | | | | | This patch prefetches RxD descriptors which helps to lower the latency of a cache miss in vxge_hw_ring_rxd_next_completed. This lowers the % of CPU time used by vxge_hw_ring_rxd_next_completed() where the descriptor is accessed in profiling netperf on a P4 Xeon from 1.5% to 1.0%. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: fix pktgen hangs (don't abuse skb->cb[])Benjamin LaHaise2009-08-051-25/+28
| | | | | | | | | | | | | | | | | | This patch fixes a case in the transmit completion code which was resulting in pktgen hanging at the end of a run. The cause is due to the fact that the ->cb[] area of an skb cannot be used in a network driver's transmit path, as that area belongs to the network protocol. Pktgen hangs, as it sends out the same packet multiple times, and vxge's use of this area of the skb for a temporary list can only add the packet to the temporary list once (while it may be on the queue many times). The fix is to remove this abuse of skb->cb[]. Instead, skb pointers are placed into a temporary stack array, and then free outside of the tx lock. This retains the smp optimization of doing dev_kfree_skb() outside of the tx lock. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: don't drop frame on tx queue fullBenjamin LaHaise2009-08-051-0/+6
| | | | | | | | | | | The vxge driver will drop a packet in its transmit function if the number of TxDs available hits 0. Instead of doing that, simply stop the transmit queue when transmitting a packet with the last available TxD. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: return PCI_ERS_RESULT_DISCONNECT on permanent failureDean Nelson2009-08-011-0/+3
| | | | | | | | | PCI drivers that implement the struct pci_error_handlers' error_detected callback should return PCI_ERS_RESULT_DISCONNECT if the state passed in is pci_channel_io_perm_failure. This patch fixes the issue for vxge. Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Printing the function's configured mode of operationSreenivasa Honnur2009-07-051-0/+21
| | | | | | | | - Printing the function's configured mode of operation. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Disable fcs stripping.Sreenivasa Honnur2009-07-051-4/+6
| | | | | | | | | | | | | | | - Disable fcs stripping. The minimum frame size that can be received by the hardware is 57 Bytes. A 64 Byte Ethernet frame with the vlan tag and fcs stripped will result in a 56 Byte frame which will lock up the receive engine. The work around is to disable fcs stripping in the hardware which is done with a firmware upgrade. The fixes are - 1. Ensure that the correct firmware version is used. 2. Decrement the indicated packet length of the receive packet by 4 bytes (FCS length). Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Fixes in isr routineSreenivasa Honnur2009-07-051-10/+12
| | | | | | | | | | | | - Fixes in isr routine Fixed crash with INTA mode during driver unload. Pass hldev to request_irq instead of vdev. Fixed Traffic failure with GRO in INTA mode. Pass the correct napi context to gro functions. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Removed the code to bounds check the mss valueSreenivasa Honnur2009-07-051-5/+0
| | | | | | | | | - Removed the code to bounds check the mss value. The hardware does bounds checking and will not allow an oversized mss to lockup the transmit path. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: check for card status before continuing in device closeSreenivasa Honnur2009-07-051-0/+3
| | | | | | | | | - Fixed the crash in rmmod after vpath open failed when trying to change mtu. We should check for card status before continuing in device close. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Fixed memory leak by freeing memory allocated for device_configSreenivasa Honnur2009-07-051-0/+1
| | | | | | | | - Fixed memory leak by freeing memory allocated for device_config. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Removed ioremap of unused bar addresses and their referencesSreenivasa Honnur2009-07-051-25/+9
| | | | | | | | | | - Removed ioremap of bar1 address Driver needs only bar0 address for register access - Removed references to bar1 and bar2 addresses Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy2009-07-051-2/+2
| | | | | | | | | | | This patch is the result of an automatic spatch transformation to convert all ndo_start_xmit() return values of 0 to NETDEV_TX_OK. Some occurences are missed by the automatic conversion, those will be handled in a seperate patch. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Enable SRIOV support in the driver.Sivakumar Subramani2009-06-171-0/+13
| | | | | | | | | | | | | | | - Enabled SRIOV support in the driver. - Call __vxge_hw_verify_pci_e_info() for the PF only. This function verifies the negotiated link width and current link speed in the Link Status Register (offset 12h) which are reserved fields for VFs as per the SRIOV specification, section 3.5.8. - Implemented David Miller's comment to remove the #ifdef CONFIG_PCI_IOV as these intefaces have NOP versions declared when the defintion is not set. Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: dont update dev->trans_start in 10GB driversEric Dumazet2009-05-291-2/+4
| | | | | | | | | | | | | | | | | Followup of commits 9d21493b4beb8f918ba248032fefa393074a5e2b and 08baf561083bc27a953aa087dd8a664bb2b88e8e (net: tx scalability works : trans_start) (net: txq_trans_update() helper) Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Multi queue drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers (vxge & tehuti) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: should include tcp.hAlexander Beregalov2009-04-041-0/+1
| | | | | | | | | | | | Fix this build error: drivers/net/vxge/vxge-main.c: In function 'vxge_get_vpath_no': drivers/net/vxge/vxge-main.c:695: error: dereferencing pointer to incomplete type ... Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Neterion: New driver: Main entry pointsRamkrishna Vepa2009-04-021-0/+4502
This patch implements all the driver entry point functions. - Definition of all module loadable paramters. - Implementation of all driver entry point functions. - Changes in this submission - - Fixed compilation error when enabling debug statements - Fixed few warnings when CONFIG_PCI_MSI is not defined - Removed unnecessary volatile variables - Removed compare_ether_addr as it causes unaligned memory access on the sparc64 platform. - Changes in previous submissions - - As per Stephen Hemminger's comments removed the following loadable parameters - gro, rx_& tx max_indicate_pkts, exec_mode, rx & tx pause_enable, tx_steering_type and intr_type. - Added Device ID definition in vxge-main.h instead of include/linux/pci_ids.h file - Reported by David Miller - Incorporated following review comments from Ben Hutchings - NAPI is always enabled (no option to turn it OFF). - Loadable parameters rx_steering_type: This loadable option is removed. ring_blocks: This loadable option is removed. The driver default settings work well in most if not all cases. Another patch to configure these parameters with ethtool will be released in the future. - LRO has been deprecated in favour of GRO - Bill Fink & Dave Miller's comment - Fixed sparse warnings - Reported by Andi Kleen - Removed unused variables Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud