Commit Graph

246 Commits

Author SHA1 Message Date
Ajit Khaparde c888385a0d be2net: Bump up the version number
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16 11:29:47 -07:00
Ajit Khaparde d2145cde58 be2net: Copyright notice change. Update to Emulex instead of ServerEngines
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16 11:29:46 -07:00
Padmanabh Ratnakar 9ecb42fda6 be2net: Fix UDP packet detected status in RX compl
Status of UDP packet detection not getting populated in RX completion
structure. This is required in csum_passed() routine.

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>
2011-03-15 14:57:09 -07:00
Sathya Perla 2e588f84f2 be2net: changes for BE3 native mode support
So far be2net has been using BE3 in legacy mode. It now checks for native
 mode capability and if available it sets it. In native mode, the RX_COMPL
 structure is different from that in legacy mode.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-14 15:17:09 -07:00
Padmanabh Ratnakar f21b538ced be2net: Add multicast filter capability for Lancer
Lancer requires multicast capability flag set during IFACE_CREATE
for adding multicast filters.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 15:26:58 -08:00
Padmanabh Ratnakar 63fcb27fdc be2net: Disarm CQ and EQ to disable interrupt in Lancer
For Lancer disable interrupts in close by disarming CQs and EQs.
Change the order of calls in be_close to achieve the correct result.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 15:26:58 -08:00
Padmanabh Ratnakar d8a29d3159 be2net: Remove TX Queue stop in close
Remove TX Queue stop in close

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 15:26:57 -08:00
Padmanabh Ratnakar 8b7756ca52 be2net: Change f/w command versions for Lancer
Change f/w command versions for Lancer

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 15:26:57 -08:00
Padmanabh Ratnakar 37eed1cbbd be2net: Add error recovery during load for Lancer
Add error recovery during load for Lancer

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 15:26:56 -08:00
Padmanabh Ratnakar 19fad86f3b be2net: Checksum field valid only for TCP/UDP
L4 checksum field is valid only for TCP/UDP packets in Lancer

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 15:26:56 -08:00
Padmanabh Ratnakar e80d9da651 be2net: Remove ERR compl workaround for Lancer
Workaround added for Lancer in handling RX ERR completion received
when no RX buffers are posted is not needed.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 15:26:55 -08:00
Eric Dumazet 1829b086d1 benet: use GFP_KERNEL allocations when possible
Extend be_alloc_pages() with a gfp parameter, so that we use GFP_KERNEL
allocations instead of GFP_ATOMIC when not running in softirq context.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-03 13:02:30 -08:00
Ajit Khaparde 9e1453c5c5 be2net: use hba_port_num instead of port_num
Use hba_port_num for phy loopback and ethtool phy identification.

From: Suresh R <suresh.reddy@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22 10:26:47 -08:00
Ajit Khaparde 609ff3bb8f be2net: add code to display temperature of ASIC
Add support to display temperature of ASIC via ethtool -S

From: Somnath K <somnath.kotur@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22 10:26:46 -08:00
Ajit Khaparde 3968fa1e58 be2net: fix to ignore transparent vlan ids wrongly indicated by NIC
With transparent VLAN tagging, the ASIC wrongly indicates packets with VLAN ID.
Strip them off in the driver. The VLAN Tag to be stripped will be given to the host
as an async message.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22 10:26:46 -08:00
Ajit Khaparde b2aebe6d81 be2net: variable name change
change occurances of stats_ioctl_sent to stats_cmd_sent

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22 10:26:45 -08:00
Ajit Khaparde 4ee772144f be2net: fixes in ethtool selftest
> add missing separator between items in ethtool self_test array
> fix reporting of test resluts when link is down and
  when selftest command fails.

From: Suresh R <suresh.reddy@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22 10:26:45 -08:00
Ajit Khaparde f6c4bf3e69 be2net: add new counters to display via ethtool stats
New counters:
	> jabber frame stats
	> red drop stats

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-22 10:26:44 -08:00
Ajit Khaparde dcf96f1ff6 be2net: restrict WOL to PFs only.
WOL is not supported for Vrtual Functions.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:49 -08:00
Ajit Khaparde 9b037f3811 be2net: detect a UE even when a interface is down.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:49 -08:00
Ajit Khaparde 7acc2087fa be2net: gracefully handle situations when UE is detected
Avoid accessing the hardware when UE is detected.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:48 -08:00
Ajit Khaparde a4ca055fc3 be2net: fix be_suspend/resume/shutdown
> call pci msix disable in be_suspend
	> call pci msix enable in be_resume
	> stop worker thread in be_suspend
	> start worker thread in be_resume
	> stop worker thread in be_shutdown

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:48 -08:00
Ajit Khaparde fae21a4da5 be2net: pass proper hdr_size while flashing redboot.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:47 -08:00
Ajit Khaparde 60964dd708 be2net: Fix broken priority setting when vlan tagging is enabled.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:47 -08:00
Ajit Khaparde a4b4dfab6c be2net: Allow VFs to call be_cmd_reset_function.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:46 -08:00
Ajit Khaparde f8617e0860 be2net: pass domain numbers for pmac_add/del functions
be_cmd_pmac_add/del functions need to pass domain number to the firmware.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:46 -08:00
Ajit Khaparde 7a2414a50b be2net: For the VF MAC, use the OUI from current MAC address
Currently we are always using the Emulex OUI for a VF MAC address
while generating MAC for a VF.  Use OUI from current MAC instead.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:45 -08:00
Ajit Khaparde 7ab8b0b432 be2net: Cleanup the VF interface handles
The PF needs to cleanup all the interface handles that it created for the VFs.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:45 -08:00
Ajit Khaparde e63193652b be2net: call be_vf_eth_addr_config() after register_netdev
This is to avoid the completion processing for be_vf_eth_addr_config
to consume the link status notification before netdev_register.
Otherwise this causes the PF miss its first link status update.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:44 -08:00
Ajit Khaparde c99ac3e7e4 be2net: Initialize and cleanup sriov resources only if pci_enable_sriov has succeeded.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:44 -08:00
Ajit Khaparde 658681f725 be2net: Use domain id when be_cmd_if_destroy is called.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:43 -08:00
Ajit Khaparde 6bff57a7a6 be2net: endianness fix in be_cmd_set_qos().
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:43 -08:00
Ajit Khaparde 856c40125a be2net: While configuring QOS for VF, pass proper domain id
While configuring QOS for VFs, the VF number should be translated
to domain number correctly.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-11 21:14:42 -08:00
David S. Miller 263fb5b1bf Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/e1000e/netdev.c
2011-02-08 17:19:01 -08:00
Ajit Khaparde e45ff01d3f benet: Avoid potential null deref in be_cmd_get_seeprom_data()
Found by: Jesper Juhl <jj@chaosbits.net>

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-05 17:58:18 -08:00
David S. Miller bd4a6974cc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-02-04 14:28:58 -08:00
Ivan Vecera 2b7bcebf95 be2net: use device model DMA API
Use DMA API as PCI equivalents will be deprecated.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-03 20:49:00 -08:00
Ajit Khaparde 9b6cefd659 be2net: remove netif_stop_queue being called before register_netdev.
It is illegal to call netif_stop_queue before register_netdev.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-01 15:41:59 -08:00
Ajit Khaparde a89e828397 be2net: fix a crash seen during insmod/rmmod test
While running insmod/rmood in a loop, an unnecessary netif_stop_queue
causes the system to crash. Remove the netif_stop_queue call
and netif_start_queue in the link status update path.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-01 15:41:13 -08:00
Joe Perches 215faf9c5f drivers/net/*/: Use static const
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

Signed-off-by: Joe Perches <joe@perches.com>
2010-12-21 02:16:10 -08:00
David S. Miller b4aa9e05a6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/bnx2x/bnx2x.h
	drivers/net/wireless/iwlwifi/iwl-1000.c
	drivers/net/wireless/iwlwifi/iwl-6000.c
	drivers/net/wireless/iwlwifi/iwl-core.h
	drivers/vhost/vhost.c
2010-12-17 12:27:22 -08:00
Ivan Vecera 2984961c38 be2net: use mutex instead of spin lock for mbox_lock
Since the mbox polling uses the schedule_timeout, the mbox_lock should be
a mutex and not a spin lock.
The commit f25b03a replaced udelay() with schedule_timeout() but didn't
change mbox_lock to semaphore or mutex.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-16 14:12:26 -08:00
David S. Miller fe6c791570 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
	net/llc/af_llc.c
2010-12-08 13:47:38 -08:00
Joe Jin 408cc293c2 driver/net/benet: fix be_cmd_multicast_set() memcpy bug
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-08 12:13:43 -08:00
Sathya Perla 6464281161 be2net: Handle out of buffer completions for lancer
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-06 12:59:08 -08:00
Sathya Perla 359a972fae be2net: FW init cmd fix for lancer
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-06 12:59:08 -08:00
Sathya Perla 63657b9c31 be2net: Fix be_dev_family_check() return value check
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-06 12:59:07 -08:00
Michał Mirosław 7903264402 net: Fix too optimistic NETIF_F_HW_CSUM features
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-12-06 12:59:04 -08:00
Sathya Perla fe6d2a38b2 be2net: adding support for Lancer family of CNAs
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-27 17:43:20 -08:00
Sarveshwar Bandi d9efd2af46 be2net: Fix to avoid firmware update when interface is not open.
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-11-19 08:57:19 -08:00