Commit graph android_kernel_sony_sdm845/drivers/net/chelsio
Message SHA1
annotate chelsio
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Al Viro   authored and   David S. Miller   commited 2008-01-28 15:10:29 -08:00
ac390c60a8
drivers/net/chelsio/: #if 0 unused functions
This patch #if 0's the following unused functions:
- espi.c:t1_espi_set_misc_ctrl()
- sge.c:t1_sched_set_max_avail_bytes()
- sge.c:t1_sched_set_drain_bits_per_us()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Adrian Bunk   authored and   David S. Miller   commited 2008-01-28 15:03:59 -08:00
68d579fb93
drivers/net/chelsio: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Joe Perches   authored and   David S. Miller   commited 2008-01-28 15:03:54 -08:00
3106752768
cxgb - revert file mode changes.
revert inavertant file mode changes

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Divy Le Ray   authored and   Jeff Garzik   commited 2007-12-04 14:52:58 -05:00
4c14fe91d0
cxgb - fix stats
Fix MAC stats accounting.
Fix get_stats.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Divy Le Ray   authored and   Jeff Garzik   commited 2007-12-01 16:32:31 -05:00
e0348b9ae5
cxgb - fix NAPI
netif_rx_complete() should be called only
when work_done < budget.

Signed-off-by: Divy Le ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Divy Le Ray   authored and   Jeff Garzik   commited 2007-12-01 16:32:31 -05:00
445cf803ca
cxgb - fix T2 GSO
The patch ensures that a GSO skb has enough headroom
to push an encapsulating cpl_tx_pkt_lso header.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Divy Le Ray   authored and   Jeff Garzik   commited 2007-12-01 16:32:31 -05:00
7832ee034b
[CHELSIO]: Fix skb->dev setting.
eth_type_trans() now sets skb->dev.  Access skb->def after it gets
set.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Divy Le Ray   authored and   David S. Miller   commited 2007-11-15 15:06:32 -08:00
7de6af0f23
chelsio: sparse warning fixes (old cxgb2)
Fix problems detected by sparse:
1. whole chunk of MAC code was for defined and never used
2. hook for running ext intr in workqueue wasn't being used

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   David S. Miller   commited 2007-10-10 16:55:28 -07:00
33a85aa1c9
[netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_count
These have been superceded by the new ->get_sset_count() hook.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jeff Garzik   authored and   David S. Miller   commited 2007-10-10 16:51:45 -07:00
b9f2c0440d
[ETHTOOL] Provide default behaviors for a few ethtool sub-ioctls
For the operations
	get-tx-csum
	get-sg
	get-tso
	get-ufo
the default ethtool_op_xxx behavior is fine for all drivers, so we
permit op==NULL to imply the default behavior.

This provides a more uniform behavior across all drivers, eliminating
ethtool(8) "ioctl not supported" errors on older drivers that had
not been updated for the latest sub-ioctls.

The ethtool_op_xxx() functions are left exported, in case anyone
wishes to call them directly from a driver-private implementation --
a not-uncommon case.  Should an ethtool_op_xxx() helper remain unused
for a while, except by net/core/ethtool.c, we can un-export it at a
later date.

[ Resolved conflicts with set/get value ethtool patch... -DaveM ]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jeff Garzik   authored and   David S. Miller   commited 2007-10-10 16:51:17 -07:00
88d3aafdae
[NET]: Nuke SET_MODULE_OWNER macro.
It's been a useless no-op for long enough in 2.6 so I figured it's time to
remove it.  The number of people that could object because they're
maintaining unified 2.4 and 2.6 drivers is probably rather small.

[ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Ralf Baechle   authored and   David S. Miller   commited 2007-10-10 16:51:13 -07:00
10d024c1b2
[NET]: Make NAPI polling independent of struct net_device objects.
Several devices have multiple independant RX queues per net
device, and some have a single interrupt doorbell for several
queues.

In either case, it's easier to support layouts like that if the
structure representing the poll is independant from the net
device itself.

The signature of the ->poll() call back goes from:

	int foo_poll(struct net_device *dev, int *budget)

to

	int foo_poll(struct napi_struct *napi, int budget)

The caller is returned the number of RX packets processed (or
the number of "NAPI credits" consumed if you want to get
abstract).  The callee no longer messes around bumping
dev->quota, *budget, etc. because that is all handled in the
caller upon return.

The napi_struct is to be embedded in the device driver private data
structures.

Furthermore, it is the driver's responsibility to disable all NAPI
instances in it's ->stop() device close handler.  Since the
napi_struct is privatized into the driver's private data structures,
only the driver knows how to get at all of the napi_struct instances
it may have per-device.

With lots of help and suggestions from Rusty Russell, Roland Dreier,
Michael Chan, Jeff Garzik, and Jamal Hadi Salim.

Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.

[ Ported to current tree and all drivers converted.  Integrated
  Stephen's follow-on kerneldoc additions, and restored poll_list
  handling to the old style to fix mutual exclusion issues.  -DaveM ]

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Stephen Hemminger   authored and   David S. Miller   commited 2007-10-10 16:47:45 -07:00
bea3348eef
network drivers: eliminate unneeded kill_vid code
Many drivers had code that did kill_vid, but they weren't doing vlan
filtering. With new API the stub is unneeded unless device sets
NETIF_F_HW_VLAN_FILTER.

Bad habit: I couldn't resist fixing a couple of nearby style things
in acenic, and forcedeth.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2007-06-03 11:44:20 -04:00
25805dcf9d
chelsio parenthesis fix
Hello,

	Balanance parenthesis in chelsio header file.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/chelsio/suni1x10gexp_regs.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Mariusz Kozlowski   authored and   Jeff Garzik   commited 2007-05-24 17:37:00 -04:00
294cf1b880
chelsio: use const for virtual functions
There are several uses of _ops structure in this driver that
can be converted to const.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2007-04-28 11:00:56 -04:00
459e536b1d
chelsio: use C99 style initialization
Convert some initialized structures to C99 style.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2007-04-28 11:00:56 -04:00
4c247db114
chelsio: remove unused code for 1G boards
Some code for Chelsio 1G boards was put in the driver
based on the vendor version (minus TOE). Well some of those board
versions are only supported with TOE on the vendor driver, so additional
dead code was added.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2007-04-28 11:00:55 -04:00
4d2b8f66b8
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>

Arnaldo Carvalho de Melo   authored and   David S. Miller   commited 2007-04-25 22:28:29 -07:00
27d7ff46a3
[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Arnaldo Carvalho de Melo   authored and   David S. Miller   commited 2007-04-25 22:28:23 -07:00
d626f62b11
[SK_BUFF]: Introduce tcp_hdr(), remove skb->h.th
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Arnaldo Carvalho de Melo   authored and   David S. Miller   commited 2007-04-25 22:25:26 -07:00
aa8223c7bb
[SK_BUFF]: Introduce arp_hdr(), remove skb->nh.arph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Arnaldo Carvalho de Melo   authored and   David S. Miller   commited 2007-04-25 22:25:12 -07:00
d0a92be05e
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Arnaldo Carvalho de Melo   authored and   David S. Miller   commited 2007-04-25 22:25:10 -07:00
eddc9ec53b
[SK_BUFF]: Introduce skb_network_offset()
For the quite common 'skb->nh.raw - skb->data' sequence.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Arnaldo Carvalho de Melo   authored and   David S. Miller   commited 2007-04-25 22:24:58 -07:00
bbe735e424
[ETH]: Make eth_type_trans set skb->dev like the other *_type_trans
One less thing for drivers writers to worry about.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Arnaldo Carvalho de Melo   authored and   David S. Miller   commited 2007-04-25 22:24:30 -07:00
4c13eb6657
[VLAN]: Avoid a 4-order allocation.
This patch splits the vlan_group struct into a multi-allocated struct. On
x86_64, the size of the original struct is a little more than 32KB, causing
a 4-order allocation, which is prune to problems caused by buddy-system
external fragmentation conditions.

I couldn't just use vmalloc() because vfree() cannot be called in the
softirq context of the RCU callback.

Signed-off-by: Dan Aloni <da-x@monatomic.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Dan Aloni   authored and   David S. Miller   commited 2007-03-02 20:44:51 -08:00
5c15bdec5c
chelsio: Fix non-NAPI compile
Chelsio without NAPI enabled has been broken (won't compile) since
3de00b89 ("chelsio: NAPI speed improvement"):

    drivers/net/chelsio/sge.c: In function `t1_interrupt`:
    drivers/net/chelsio/sge.c:1716: error: `Q` undeclared (first use in this function)

The change below seems to add back in the declaration and
initialization of `Q` that was removed by mistake, and at least makes
the driver compile for me, although I have no hardware and hence no
way to test whether this actually works.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Roland Dreier   authored and   Jeff Garzik   commited 2007-02-27 04:27:13 -05:00
54d3e56820
git-netdev-all: chelsio fix
Cc: "Sunil Naidu" <akula2.shark@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Andrew Morton   authored and   Jeff Garzik   commited 2007-02-05 16:58:49 -05:00
b9662d0e9c
chelsio: more rx speedup
Cleanup receive processing some more:
   * do the reserve padding of skb during setup
   * don't pass constants to get_packet
   * do smart prefetch of skb
   * make copybreak a module parameter

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2007-02-05 16:58:47 -05:00
24a427cf76
chelsio: NAPI speed improvement
Speedup and cleanup the receive processing by eliminating the
mmio read and a lock round trip.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2007-02-05 16:58:46 -05:00
3de00b8958
chelsio: tabulate the update of the statistic counters
Let's try to avoid some code duplication.

- cxgb2
  The data are contiguous. Use plain memcpy.

- ixf1010/pm3393/vsc7326
  The cast of &mac->stats to (u64 *) is not wonderful but it is not clear
  if it is worth to add an ad-hoc union under the struct cmac_statistics.

vsc7326_reg.h suggests that more statistics could be available.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Francois Romieu   authored and   Jeff Garzik   commited 2007-02-05 16:58:43 -05:00
834324687d
chelsio: misc cleanups in sge
- duplicated code in sge::free_cmdQ_buffers ;
- NET_IP_ALIGN is already defined in (included) <linux/skbuff.h> ;
- pci_alloc_consistent() returns void * ;
- pci_alloc_consistent() returns a zeroed chunk of memory ;
- early return in restart_tx_queues.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Francois Romieu   authored and   Jeff Garzik   commited 2007-02-05 16:58:43 -05:00
3e0f75be52
chelsio: useless test in cxgb2::remove_one
pci_get_drvadata() is necessarily distinct from NULL if
cxgb2::init_one succeeded. cxgb2::remove_one is solely
issued through the PCI device callback.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Francois Romieu   authored and   Jeff Garzik   commited 2007-02-05 16:58:43 -05:00
47cbe6f47d
chelsio: useless curly braces
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Francois Romieu   authored and   Jeff Garzik   commited 2007-02-05 16:58:43 -05:00
d7487421b6
chelsio: spaces, tabs and friends
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Francois Romieu   authored and   Jeff Garzik   commited 2007-02-05 16:58:43 -05:00
356bd1460d
chelsio: the return statement is not a function
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Francois Romieu   authored and   Jeff Garzik   commited 2007-02-05 16:58:43 -05:00
b7d58394e6
chelsio: move return, break and continue statements on their own line
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Francois Romieu   authored and   Jeff Garzik   commited 2007-02-05 16:58:43 -05:00
c697f83e8c
chelsio: error path fix
Fix handling of allocation failure.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2007-01-09 02:24:37 -05:00
ab3b1c7e82
[PATCH] chelsio: working NAPI
This driver tries to enable/disable NAPI at runtime, but
does so in an unsafe manner, and the NAPI interrupt handling is
a mess. Replace it with a compile time selected NAPI implementation.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-11 09:51:07 -05:00
7fe26a60e0
WorkQueue: Fix up arch-specific work items where possible
Fix up arch-specific work items where possible to use the new work_struct and
delayed_work structs.

Three places that enqueue bits of their stack and then return have been marked
with #error as this is not permitted.

Signed-Off-By: David Howells <dhowells@redhat.com>

David Howells   commited 2006-12-05 19:36:26 +00:00
6d5aefb8ea
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/infiniband/core/iwcm.c
	drivers/net/chelsio/cxgb2.c
	drivers/net/wireless/bcm43xx/bcm43xx_main.c
	drivers/net/wireless/prism54/islpci_eth.c
	drivers/usb/core/hub.h
	drivers/usb/input/hid-core.c
	net/core/netpoll.c

Fix up merge failures with Linus's head and fix new compilation failures.

Signed-Off-By: David Howells <dhowells@redhat.com>

David Howells   commited 2006-12-05 14:37:56 +00:00
4c1ac1b491
[PATCH] chelesio: transmit locking (plus bug fix).
If transmit lock is contended on, then push return code back
and retry at higher level.

Bugfix: If buffer is reallocated because of lack of headroom
and the send is blocked, then drop packet. This is necessary
because caller would end up requeuing a freed skb.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:50 -05:00
cabdfb373a
[PATCH] chelsio: statistics improvement
Cleanup statistics management:
 * Get rid of duplicate or unused statistics
 * Convert high volume stats to per-cpu and 64 bit

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:50 -05:00
56f643c28c
[PATCH] chelsio: add MSI support
Using MSI can avoid sharing IRQ and associated overhead.
Tested on PCI-X.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:50 -05:00
325dde4891
[PATCH] chelsio: use standard CRC routines
Replace driver crc calculation with existing library.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:49 -05:00
57834ca152
[PATCH] chelsio: cleanup pm3393 code
Replace macro with function for updating RMON values

Cleanups:
	* remove unused enum's
	* Fix comment format

Signed-off-by: Stephen HEmminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:49 -05:00
a7377a50b8
[PATCH] chelsio: add 1G swcixw aupport
Add support for 1G versions of Chelsio devices.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:49 -05:00
352c417ddb
[PATCH] chelsio: add support for other 10G boards
Add support for other versions of the 10G Chelsio boards.
This is basically a port of the vendor driver with the
TOE features removed.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:49 -05:00
f1d3d38af7
[PATCH] chelsio: remove unused mutex
This mutex is unused in current (non TOE) code.

Signed-off-by: Stephen Hemminger<shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:49 -05:00
415294ecbb
[PATCH] chelsio: use kzalloc
Use kzalloc in several places.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Stephen Hemminger   authored and   Jeff Garzik   commited 2006-12-02 00:24:49 -05:00
1270266cf9