Archived
14
0
Fork 0
Commit graph

35 commits

Author SHA1 Message Date
Ajit Khaparde
500ca9ba24 be2net: remove usage of be_pci_func
When PCI functions are virtuialized in applications by assigning PCI
functions to VM (PCI passthrough), the be2net driver in the VM sees a

different function number. So, use of PCI function number in any
calculation will break existing code. This patch takes care of it.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-08 10:45:27 -08:00
Ajit Khaparde
9772a43170 be2net: Bump the driver version number
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 17:11:54 -08:00
Ajit Khaparde
91992e446c be2net: Maintain tx and rx counters in driver
For certain skews of the BE adapter, H/W Tx and Rx
counters could be common for more than one interface.
Add Tx and Rx counters in the adapter structure
(to maintain stats on a per interfae basis).

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 17:11:53 -08:00
Ajit Khaparde
294aedcf87 be2net: update copyright dates
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 17:11:53 -08:00
Sathya Perla
7a1e9b2059 be2net: don't rearm mcc cq when device is not open
When an MCC cmd is issued (via a netdev/ethtool op)
while the device is not open, the MCC CQ gets processed but the EQ
is not processed (as isr is not registered.) This can cause the EQ
to become full. So, while the device is not open, CQ must not be re-armed
to prevent EQ entries.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:39 -08:00
Sathya Perla
cf588477a3 be2net: implement EEH pci error recovery handlers
The code has been tested on IBM pSeries server.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:49:51 -08:00
Ajit Khaparde
35ecf03c83 be2net: change the driver description
Since the driver is supporting multiple generations of the ASIC
remove ASIC generation information from the driver description.
This information is displayed by modinfo.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:59 -08:00
Ajit Khaparde
82903e4bfc be2net: fix to limit max vlans supported in certain skews
In certain skews the ASIC can support only 16 vlans per interface.
Once the limit is crossed, the ASIC is programmed in vlan promiscuous mode.
Switch off the vlan promiscuous mode once the number of vlans
falls back to the max vlans supported.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:59 -08:00
Ajit Khaparde
e254f6ecae be2net: remove unused pci device id
We are not going to use this device id.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:57 -08:00
Ajit Khaparde
7b139c83c5 be2net: Bug fix to support newer generation of BE ASIC
Bug fix in be2net for newer generation of BladeEngine ASIC.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-28 05:54:18 -08:00
Sarveshwar Bandi
16c0214590 be2net: Bug fix to return correct values in ethtool get_settings.
Changes to return correct values for transceiver and supported in
ethtool get_settings function.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 20:58:14 -08:00
Ajit Khaparde
3454f83583 be2net: Bump up the driver version number
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-03 13:17:56 -08:00
Ajit Khaparde
71d8d1b58a be2net: Support for WoL using magic packet after suspend.
Add support for WOL using Magic Packet after suspend is done.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-03 12:39:21 -08:00
Ajit Khaparde
0dffc83e5b be2net: fix unnecessary access to hardware to get link, port info
Every time while doing ethtool->get_settings we are accessing
the hardware to get link status and port information.
This is not necessary.  We now use the cached copy for this info
and update it when the link status changes.

From: Suresh R <sureshr@serverengines.com>

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:50:26 -08:00
Ajit Khaparde
b7b83ac39a be2net: Add be_rx_polls counter
Add be_rx_polls to count number of times NAPI called rx poll function.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:50:26 -08:00
Sathya Perla
e7b909a68c be2net: support configuration of 64 multicast addresses instead of 32
To send upto 64 addresses in the multicast-set cmd, the non-embeeded cmd format
that provides for a bigger buffer is used instead of an embedded format.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-23 10:44:18 -08:00
David S. Miller
d0e1e88d6e Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/can/usb/ems_usb.c
2009-11-08 23:00:54 -08:00
Ajit Khaparde
9e90c96113 be2net: fix to set proper flow control on resume
If be2 goes into suspend after a user changes the flow control settings,
we are not programming them back after resume. This patch takes care of it.
We now get the flow control settings before going to suspend mode and
then apply them during resume.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-06 20:26:03 -08:00
Ajit Khaparde
12d7ea2c5a be2net: Add support for next generation of BladeEngine device.
Add new PCI ids to support next generation of BladeEngine device.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-16 18:02:12 -07:00
Ajit Khaparde
78122a52b3 be2net: Get rid of net_device_stats from adapter.
adapter doesnot need to maintain a copy of net_device_stats.
Use the one already available in net_device. This patch takes care of the same.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 03:11:20 -07:00
Ajit Khaparde
dcb9b5648a be2net: Workaround to fix a bug in Rx Completion processing.
vtp bit in RX completion descriptor could be wrongly set in
some skews of BladEngine.  Ignore this  bit if vtm is not set.
Resending because the previous patch was against net-next tree.
This patch is against the net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-30 21:58:22 -07:00
Sathya Perla
b31c50a7f9 be2net: fix some cmds to use mccq instead of mbox
All cmds issued to BE after the creation of mccq must now use the mcc-q
(and not mbox) to avoid a hw issue that results in mbox poll timeout.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-17 10:30:13 -07:00
Ajit Khaparde
84517482e1 be2net: Changes to support flashing of the be2 network adapter
Changes to support flashing of the be2 network adapter using the
request_firmware() & ethtool infrastructure. The trigger to flash the device
will come from ethtool utility. The driver will invoke request_firmware()
to start the flash process. The file containing the flash image is expected
to be available in /lib/firmware/

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-07 01:56:38 -07:00
Stephen Hemminger
0fc0b732ea netdev: drivers should make ethtool_ops const
No need to put ethtool_ops in data, they should be const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-02 01:03:33 -07:00
Sathya Perla
eec368fb3c be2net: remove pci_func field from be_adapter struct
pci function is available as PCI_FUNC(pdev->devfn); no need for a
separate field.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-01 23:06:26 -07:00
Sathya Perla
8788fdc2a5 be2net: get rid of be_ctrl_info struct/abstraction
Currently only the be_ctrl_info struct ptr (instead of adapter) is
 passed to all the routines in be_cmds.c. Instead pass be_adapter
ptr to allow access to all its fields. Merge the contents of struct be_ctrl_info
into be_adapter. The resulting code is simpler.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-01 23:06:20 -07:00
Ajit Khaparde
5be93b9a86 be2net: Add GRO support to the be2net driver. LRO is not supported anymore.
This patch removes support for INET_LRO and switches over to GRO.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-23 18:00:59 -07:00
Ajit Khaparde
bd46cb6cf1 be2net: Fix to avoid a crash seen on PPC with LRO and Jumbo frames.
While testing the driver on PPC, we ran into a crash with LRO, Jumbo frames.
With CONFIG_PPC_64K_PAGES configured (a default in PPC), MAX_SKB_FRAGS drops to 3 and we were crossing the array limits on skb_shinfo(skb)->frags[].
Now we coalesce the frags from the same physical page into one slot in
skb_shinfo(skb)->frags[] and go to the next index when the frag is from

different physical page.

This patch is against the net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-28 17:34:25 -07:00
Sathya Perla
a8f447bda3 be2net: receive asynchronous link status notifications from BE
Rcv and process ansync link status notifications from BE instead of polling
 for link status in the be_worker thread.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-19 00:18:42 -07:00
Sathya Perla
24307eef74 be2net: cleanup multicast_set cmd to avoid mc_list copy
Cleanup multicast_set method to avoid an extra copy of mc_list
 and unwanted promiscuos sets to BE.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-19 00:18:41 -07:00
Sathya Perla
5fb379ee67 be2net: Add MCC queue mechanism for BE cmds
Currenlty all cmds use the blocking MCC mbox to post cmds. An mbox cmd is protected
via a spin_lock(cmd_lock) and not spin_lock_bh() as it is undesirable
to disable BHs while a blocking mbox cmd is in progress (and take long to finish.)
This can lockup a cmd in progress in process context. Instead cmds that may be
called in BH context must use the MCC queue to post cmds. The cmd completions
are rcvd in a separate completion queue and the events are placed in the tx-event
queue.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-19 00:18:39 -07:00
Ajit Khaparde
c4ca237431 be2net: add two new pci device ids to pci device table
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-18 15:38:55 -07:00
Sathya Perla
4097f663cb be2net: cleanup rx/tx rate calculations
Hi, Pls accept this patch to cleanup rx/tx rate calculations as follows:
- check for jiffies wraparound
- remove typecast of a denominator
- do rate calculation only in workqueue context periodically

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-24 16:40:13 -07:00
Sathya Perla
ea1dae11e0 be2net: replenish when posting to rx-queue is starved in out of mem conditions
This is a patch to replenish the rx-queue when it is in a starved
state (due to out-of-mem conditions)

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-19 23:56:20 -07:00
Sathya Perla
6b7c5b947c net: Add be2net driver.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:32:22 -07:00