aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-12-08Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/net/wireless/ath/ath9k/ar9003_eeprom.c net/llc/af_llc.c
2010-12-08driver/net/benet: fix be_cmd_multicast_set() memcpy bugJoe Jin1-1/+1
Regarding benet be_cmd_multicast_set() function, now using netdev_for_each_mc_addr() helper for mac address copy, but when copying to req->mac[] did not increase of the index. Cc: Sathya Perla <sathyap@serverengines.com> Cc: Subbu Seetharaman <subbus@serverengines.com> Cc: Sarveshwar Bandi <sarveshwarb@serverengines.com> Cc: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: Joe Jin <joe.jin@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-06be2net: Handle out of buffer completions for lancerSathya Perla2-21/+38
If Lancer chip does not have posted RX buffers, it posts an RX completion entry with the same frag_index as the last valid completion. The Error bit is also set. In BE, a flush completion is indicated with a zero value for num_rcvd in the completion. Such completions don't carry any data and are not processed. This patch refactors code to handle both cases with the same code. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-06be2net: FW init cmd fix for lancerSathya Perla1-19/+8
Lancer can use the same pattern as BE to indicate a driver load to the FW. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-06be2net: Fix be_dev_family_check() return value checkSathya Perla1-1/+1
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-06net: Fix too optimistic NETIF_F_HW_CSUM featuresMichał Mirosław1-2/+4
NETIF_F_HW_CSUM is a superset of NETIF_F_IP_CSUM+NETIF_F_IPV6_CSUM, but some drivers miss the difference. Fix this and also fix UFO dependency on checksumming offload as it makes the same mistake in assumptions. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-27be2net: adding support for Lancer family of CNAsSathya Perla5-92/+301
Key changes are: - EQ ids are not assigned consecutively in Lancer. So, fix mapping of MSIx vector to EQ-id. - BAR mapping and some req locations different for Lancer. - TCP,UDP,IP checksum fields must be compulsorily set in TX wrb for TSO in Lancer. - CEV_IST reg not present in Lancer; so, peek into event queue to check for new entries - cq_create and mcc_create cmd interface is different for Lancer; handle accordingly Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-19be2net: Fix to avoid firmware update when interface is not open.Sarveshwar Bandi1-0/+6
Since interrupts are enabled only when open is called on the interface, Attempting a firmware update operation when interface is down could lead to partial success or failure of operation. This fix fails the request if netif_running is false. Signed-off-by: Sarveshwar Bandi <Sarveshwar.Bandi@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-27be2net: Schedule/Destroy worker thread in probe()/remove() rather than open()/close()Somnath Kotur1-4/+18
When async mcc compls are rcvd on an i/f that is down (and so interrupts are disabled) they just lie unprocessed in the compl queue.The compl queue can eventually get filled up and cause the BE to lock up.The fix is to use be_worker to reap mcc compls when the i/f is down.be_worker is now launched in be_probe() and canceled in be_remove(). Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-25be2net: Fix CSO for UDP packetsSomnath Kotur1-12/+8
We're setting skb->ip_summed to CHECKSUM_NONE for all non-TCP pkts, making the stack recompute checksum.This is a bug for UDP pkts for which cso must be used. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-25be2net: Call netif_carier_off() after register_netdev()Somnath Kotur1-1/+1
Calling netif_carrier_off before register_netdev was causing the network interface to miss a linkwatch pending event leading to an inconsistent state if the link is not up when interface is initialized.This is now invoked after register_netdev. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-24benet: make be_poll_rx localstephen hemminger1-1/+1
Only used in one file. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-24benet: remove dead codestephen hemminger3-41/+0
The following code and data are defined but never used in current driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-21be2net: Changes to use only priority codes allowed by f/wSomnath Kotur4-10/+106
Changes to use one of the priority codes allowed by CNA f/w for NIC traffic from host. The driver gets the bit map of the priority codes allowed for host traffic through a asynchronous message from the f/w that the driver subscribes to. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-21vlan: Don't check for vlan group before vlan_tx_tag_present.Jesse Gross1-4/+3
Many (but not all) drivers check to see whether there is a vlan group configured before using a tag stored in the skb. There's not much point in this check since it just throws away data that should only be present in the expected circumstances. However, it will soon be legal and expected to get a vlan tag when no vlan group is configured, so remove this check from all drivers to avoid dropping the tags. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-21vlan: Rename VLAN_GROUP_ARRAY_LEN to VLAN_N_VID.Jesse Gross2-2/+2
VLAN_GROUP_ARRAY_LEN is simply the number of possible vlan VIDs. Since vlan groups will soon be more of an implementation detail for vlan devices, rename the constant to be descriptive of its actual purpose. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-03be2net: add multiple RX queue supportSathya Perla5-363/+526
This patch adds multiple RX queue support to be2net. There are upto 4 extra rx-queues per port into which TCP/UDP traffic can be hashed into. Some of the ethtool stats are now displayed on a per queue basis. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-26drivers/net: return operator cleanupEric Dumazet1-2/+2
Change "return (EXPR);" to "return EXPR;" return is not a function, parentheses are not required. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller6-36/+30
Conflicts: net/mac80211/main.c
2010-09-03be2net: remove a BUG_ON in be_cmds.cAjit Khaparde1-4/+2
Async notifications other than link status are possible in certain configurations. Remove the BUG_ON in the mcc completion processing path. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-03be2net: fix a bug in UE detection logicAjit Khaparde3-26/+10
The ONLINE registers can return 0xFFFFFFFF on more than one occassion. On systems that care, reading these registers could lead to problems. So the new code decides that the ASIC has encountered and error by reading the UE_STATUS_LOW/HIGH registers. AND them with the mask values and a non-zero result indicates an error. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-03be2net: fix net-snmp error because of wrong packet statsAjit Khaparde4-6/+18
Wrong packet statistics for multicast Rx was causing net-snmp error messages every 15 seconds. Instead of picking the multicast stats from hardware, now maintain it in the driver itself. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-02drivers/net: avoid some skb->ip_summed initializationsEric Dumazet1-1/+1
fresh skbs have ip_summed set to CHECKSUM_NONE (0) We can avoid setting again skb->ip_summed to CHECKSUM_NONE in drivers. Introduce skb_checksum_none_assert() helper so that we keep this assertion documented in driver sources. Change most occurrences of : skb->ip_summed = CHECKSUM_NONE; by : skb_checksum_none_assert(skb); Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25be2net: stats for packets received due to internal switching in ASIC.Ajit Khaparde1-0/+3
Counters for packets received due to internal switching are already available. This change will start displaying them in ethtool -S Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25be2net: fix to dynamically generate MAC Address for VFsAjit Khaparde2-0/+68
The BE ASIC/firmware doesnot reserve and assign MAC address for VFs. This results in the VF interfaces being created with MAC Address 0. The code change proposed takes the MAC address of PF to generate a seed. MAC Address for VFs are assigned incrementally starting from the seed. These addresses are programmed in the ASIC by the PF and the VF driver queries for the MAC address during its probe. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24be2net: get rid of be_get_stats()Eric Dumazet1-6/+0
drivers can avoid implementing ndo_get_stats method if using netdevice stats structure. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-04Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits) Documentation: update broken web addresses. fix comment typo "choosed" -> "chosen" hostap:hostap_hw.c Fix typo in comment Fix spelling contorller -> controller in comments Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault fs/Kconfig: Fix typo Userpace -> Userspace Removing dead MACH_U300_BS26 drivers/infiniband: Remove unnecessary casts of private_data fs/ocfs2: Remove unnecessary casts of private_data libfc: use ARRAY_SIZE scsi: bfa: use ARRAY_SIZE drm: i915: use ARRAY_SIZE drm: drm_edid: use ARRAY_SIZE synclink: use ARRAY_SIZE block: cciss: use ARRAY_SIZE comment typo fixes: charater => character fix comment typos concerning "challenge" arm: plat-spear: fix typo in kerneldoc reiserfs: typo comment fix update email address ...
2010-07-30be2net: fix to avoid sending get_stats request if one is already being processed.Ajit Khaparde3-1/+5
GET_STATS request uses the same memory region as the response. If a new request for get stats is fired before the response for the previous get_stats request is received, the response will corrupt the new request, causing the f/w to misbehave. Signed-off-by: Somnath K <somnathk@serverengines.com> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-30be2net: change to show correct physical link statusAjit Khaparde1-1/+2
link status is wrongly displayed under certain circumstances. This change fixes it. Signed-off-by: Somnath K <somnathk@serverengines.com> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-30be2net: add code to dump registers for debugAjit Khaparde5-0/+140
when the BE device becomes unresponsive, dump the registers to help debugging Signed-off-by: Somnath K <somnathk@serverengines.com> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-30be2net: fix to correctly know if driver needs to run for a VF or a PFAjit Khaparde1-2/+3
Move be_check_sriov_fn_type to appropriate place to correctly determine if the be2net driver needs to work as a VF driver or a PF driver. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: bump the driver version numberAjit Khaparde1-1/+1
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: variable name changesAjit Khaparde4-8/+8
This patch changes names of some variables. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: supress printing error when mac query fails for VFAjit Khaparde1-1/+2
When a virtual function driver in initialized, the network mac query command can fail. Skip display of error message in that case. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: code to support tx rate configuration on virtual functionsAjit Khaparde4-1/+78
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: add vlan support for sriov virtual functionsAjit Khaparde2-8/+47
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: add support to get vf configAjit Khaparde2-13/+47
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: change to call pmac_del only if necessaryAjit Khaparde2-2/+5
If a mac address has not been configured for a VF, there is no need to call be_cmd_pmac_del. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-10be2net: Patch to determine if function is VF while running in guest OS.Sarveshwar Bandi2-1/+12
When driver is loaded in guest OS, the pci variables is_virtfn and is_physfn are both set to 0. This change uses registers in controller to determine the same. Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-01be2net: changes to properly provide phy detailsAjit Khaparde4-14/+104
be2net driver is currently not showing correct phy details in certain cases. This patch fixes it. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-30be2net: memory barrier fixes on IBM p7 platformSathya Perla2-0/+9
The ibm p7 architecure seems to reorder memory accesses more aggressively than previous ppc64 architectures. This requires memory barriers to ensure that rx/tx doorbells are pressed only after memory to be DMAed is written. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16be2net: enable ipv6 tso supportAjit Khaparde2-3/+5
Add ipv6 support to the be2net driver. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16Merge branch 'master' into for-nextJiri Kosina3-12/+35
2010-06-16fix typos concerning "management"Uwe Kleine-König1-1/+1
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-06-06Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/net/sfc/net_driver.h drivers/net/sfc/siena.c
2010-06-01be2net: convert hdr.timeout in be_cmd_loopback_test() to le32Sathya Perla1-1/+1
The current code fails on ppc as hdr.timeout is not being converted to le32. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-01be2net: replace udelay() with schedule_timeout() in mbox pollingSathya Perla1-6/+5
As mbox polling is done only in process context, it is better to use schedule_timeout() instead of udelay(). Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-01be2net: cleanup in case of error in be_open()Sathya Perla1-46/+49
This patch adds cleanup code (things like unregistering irq, disabling napi etc) to be_open() when an error occurs inside the routine. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-29be2net: remove superfluous externsDan Carpenter1-2/+2
This fixes some sparse warnings: drivers/net/benet/be_cmds.c:1503:12: warning: function 'be_cmd_enable_magic_wol' with external linkage has definition drivers/net/benet/be_cmds.c:1668:12: warning: function 'be_cmd_get_seeprom_data' with external linkage has definition Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Sarveshwar Bandi <sarveshwarb@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-29be2net: add unlock on error pathDan Carpenter1-2/+5
The unlock accidentally got removed from the error path in dd131e76e5: "be2net: Bug fix to avoid disabling bottom half during firmware upgrade." Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Sarveshwar Bandi <sarveshwarb@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>