aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-08-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds1-1/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits) sctp: fix random memory dereference with SCTP_HMAC_IDENT option. sctp: correct bounds check in sctp_setsockopt_auth_key wan: Missing capability checks in sbni_ioctl() e100, fix iomap read qeth: preallocated header account offset qeth: l2 write unicast list to hardware qeth: use -EOPNOTSUPP instead of -ENOTSUPP. ibm_newemac: Don't call dev_mc_add() before device is registered net: don't grab a mutex within a timer context in gianfar forcedeth: fix checksum flag net/usb/mcs7830: add set_mac_address net/usb/mcs7830: new device IDs [netdrvr] smc91x: fix resource removal (null ptr deref) ibmveth: fix bad UDP checksums [netdrvr] hso: dev_kfree_skb crash fix [netdrvr] hso: icon 322 detection fix atl1: disable TSO by default atl1e: multistatement if missing braces igb: remove 82576 quad adapter drivers/net/skfp/ess.c: fix compile warnings ...
2008-08-27myri10ge: update version string to 1.4.3-1.358Brice Goglin1-1/+1
Update myri10ge version string to 1.4.3-1.358. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-23removed unused #include <linux/version.h>'sAdrian Bunk1-1/+0
This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-14myri10ge: myri10ge_fw_name also overrides the rss firmwareBrice Goglin1-1/+5
When myri10ge_fw_name is given, use it to override the rss firmware name as well. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07myri10ge: set 64bits consistent DMA maskBrice Goglin1-0/+1
Set 64bits consistent DMA mask since it improves performance in some cases. No need to check the return value since it is not required for the driver to work. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07myri10ge: update firmware headersBrice Goglin2-6/+48
Update myri10ge firmware headers. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22myri10ge: use ioremap_wcBrice Goglin1-4/+4
Switch to ioremap_wc(). We keep the MTRR code since ioremap_wc() will use UC_MINUS when falling back to uncachable, and thus let the MTRR WC take precedence. Also rename the error path better. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22myri10ge: remove wcfifoBrice Goglin1-51/+3
Remove the wcfifo since it never gave any performance improvement. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-18Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6David S. Miller1-2/+9
Conflicts: Documentation/powerpc/booting-without-of.txt drivers/atm/Makefile drivers/net/fs_enet/fs_enet-main.c drivers/pci/pci-acpi.c net/8021q/vlan.c net/iucv/iucv.c
2008-07-10myri10ge: treat firmware data as constDavid Woodhouse1-2/+9
... which means allocating our own buffer for reading it back. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-10Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/net/tg3.c drivers/net/wireless/rt2x00/rt2x00dev.c net/mac80211/ieee80211_i.h
2008-05-30myri10ge: add Direct Cache Access supportBrice Goglin1-1/+145
Add I/O AT DCA (Direct Cache Access) support. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30myri10ge: add multislices supportBrice Goglin1-242/+442
Add multi-slice/MSI-X support. By default, a single slice (and the normal firmware) are used. To enable msi-x, multi-slice mode, one must load the driver with myri10ge_max_slices set to either -1, or something larger than 1. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30myri10ge: add routines for multislicesBrice Goglin1-0/+256
Add several routines that multislices support will use. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30myri10ge: update driver versionBrice Goglin1-1/+1
Update myri10ge version to 1.3.99-1.347. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-22make myri10ge_get_firmware_capabilities() staticAdrian Bunk1-1/+1
This patch makes the needlessly global myri10ge_get_firmware_capabilities() static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: fix the number of interrupt slotsBrice Goglin1-9/+5
Fix a long-standing bug/misunderstanding between the driver and the firmware. The size of the interrupt queue must be set to the number of rx slots (big + small), and it should never have been a tunable. Setting it too small results in chaos. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: cleanup retrieving of firmware capabilitiesBrice Goglin1-11/+31
Add myri10ge_get_firmware_capabilities() to retrieve TSO6 and interrupt slots capabilities from the firmware. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: move data structures into a single sliceBrice Goglin1-278/+316
To prepare and simplify multislice rx support, add a single slice structure and move some fields in there. No functional change yet. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: fix potential infinite loop in enable_ecrcBrice Goglin1-2/+3
Fix another potential for an infinite loop while looking for the root port in myri10ge_enable_ecrc(). Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: trivial formatting fixBrice Goglin1-1/+4
Add some blank lines to uniformize the code and match the upstream code. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: add barrier in myri10ge_send_cmdBrice Goglin1-1/+3
Add a barrier() in the usleep() loop in myri10ge_send_cmd(). Without the barrier, some mips machine never notices that the firmware has DMA'ed the response. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: report FIBER in ethtool for XFP based NICBrice Goglin1-0/+35
Make ethtool report FIBER for XFP based NIC's port type. Don't bother to poke around and try to find out what is in the XFP cage, since Linux does not have separate media types for -SR -LR, etc. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: properly align scratch buffersBrice Goglin1-2/+2
Properly align scratch buffers when making boot commands. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: increase and fix handoff timeoutBrice Goglin1-2/+2
Increase the handoff timeout to 512ms so as to give the aeluros based NICs sufficient time to handoff without relying on the msleep() being sloppy, and accidentally sleeping way longer than the 20ms we specified in 20 separate 1ms sleeps. Fix typo in the handoff sleep delay, which made it additive, not exponential. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: fix module parameter descriptionsBrice Goglin1-17/+18
Remove useless linebreaks at the end of MODULE_PARM_DESC and fix the description of myri10ge_lro_max_pkts. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13myri10ge: update firmware headersBrice Goglin2-31/+64
Update myri10ge firmware headers. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29Remove duplicated unlikely() in IS_ERR()Hirofumi Nakagawa1-1/+1
Some drivers have duplicated unlikely() macros. IS_ERR() already has unlikely() in itself. This patch cleans up such pointless code. Signed-off-by: Hirofumi Nakagawa <hnakagawa@miraclelinux.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Jeff Garzik <jeff@garzik.org> Cc: Paul Clements <paul.clements@steeleye.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Anton Altaparmakov <aia21@cantab.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Carsten Otte <cotte@de.ibm.com> Cc: Patrick McHardy <kaber@trash.net> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-28annotate myri10geAl Viro1-5/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LENAlejandro Martinez Ruiz1-1/+1
Using ARRAY_SIZE() on arrays of the form array[][K] makes it unnecessary to know the value of K when checking its size. Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-08[NET]: Do not check netif_running() and carrier state in ->poll()David S. Miller1-1/+1
Drivers do this to try to break out of the ->poll()'ing loop when the device is being brought administratively down. Now that we have a napi_disable() "pending" state we are going to solve that problem generically. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-12-05[LRO]: fix lro_gen_skb() alignmentAndrew Gallatin1-0/+1
Add a field to the lro_mgr struct so that drivers can specify how much padding is required to align layer 3 headers when a packet is copied into a freshly allocated skb by inet_lro.c:lro_gen_skb(). Without padding, skbs generated by LRO will cause alignment warnings on architectures which require strict alignment (seen on sparc64). Myri10GE is updated to use this field. Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01Fix myri10ge NAPI oops & warningsAndrew Gallatin1-3/+3
When testing the myri10ge driver with 2.6.24-rc1, I found that the machine crashed under heavy load: Unable to handle kernel paging request at 0000000000100108 RIP: [<ffffffff803cc8dd>] net_rx_action+0x11b/0x184 The address corresponds to the list_move_tail() in netif_rx_complete(): if (unlikely(work == weight)) list_move_tail(&n->poll_list, list); Eventually, I traced the crashes to calling netif_rx_complete() with work_done == budget. From looking at other drivers, it appears that one should only call netif_rx_complete() when work_done < budget. To fix it, I changed the test in myri10ge_poll() so that it refers to to work_done rather than looking at the rx ring status. If work_done is < budget, then that implies we have no more packets to process. Any races will be resolved by the NIC when the write to irq_claim is made. In myri10ge_clean_rx_done(), if we ever exceeded our budget, it would report a work_done one larger than was acutally done. This is because the increment was done in the conditional, so work_done would be incremented regardless of whether or not the test passed or failed. This would lead to the WARN_ON_ONCE(work > weight); warning in net_rx_action triggering. I've moved the increment of work_done inside the loop. Note that this would only be a problem when we had exceeded our budget. Signed off by: Andrew Gallatin <gallatin@myri.com> Andrew Gallatin Myricom Inc Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-18Add missing newlines to some uses of dev_<level> messagesJoe Perches1-1/+2
Found these while looking at printk uses. Add missing newlines to dev_<level> uses Add missing KERN_<level> prefixes to multiline dev_<level>s Fixed a wierd->weird spelling typo Added a newline to a printk Signed-off-by: Joe Perches <joe@perches.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Roland Dreier <rolandd@cisco.com> Cc: Tilman Schmidt <tilman@imap.cc> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Greg KH <greg@kroah.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: James Smart <James.Smart@Emulex.Com> Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-15myri10ge: update driver version to 1.3.2-1.287Brice Goglin1-1/+1
The myri10ge driver is now at version 1.3.2-1.287. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-15myri10ge: add IPv6 TSO supportBrice Goglin1-8/+79
Add support for IPv6 TSO to the myri10ge driver. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-15myri10ge: update firmware headersBrice Goglin1-4/+86
Update myri10ge firmware headers to latest upstream version with TSO6 and RSS support. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-15myri10ge: fix some indentation, white spaces, and commentsBrice Goglin1-6/+5
Fix one comment in myri10ge.c and update indendation and white spaces to match the code generated by indent from upstream CVS. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_countJeff Garzik1-3/+8
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>
2007-10-10[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches1-8/+3
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[ETHTOOL] Provide default behaviors for a few ethtool sub-ioctlsJeff Garzik1-3/+0
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>
2007-10-10[PATCH] drivers/net: remove superfluous memsetMariusz Kozlowski1-1/+0
This patch covers something like this: dev = alloc_*dev(... ... priv = netdev_priv(dev); memset(priv, 0, sizeof(*priv)); The memset() here is superfluous. alloc_netdev() uses kzalloc() to allocate needed memory so there is no need to zero the priv region twice. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[MYRI10GE]: Use LRO.Andrew Gallatin1-1/+108
Singed off by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Make NAPI polling independent of struct net_device objects.Stephen Hemminger1-23/+17
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>
2007-09-19myri10ge: Add support for PCI device id 9Brice Goglin1-0/+3
Add support for new Myri-10G boards with PCI device id 9. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-25myri10ge: update driver version to 1.3.2-1.269Brice Goglin1-1/+1
Update myri10ge driver version to 1.3.2-1.269. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-25myri10ge: use pcie_get/set_readrqBrice Goglin1-26/+6
Based on a patch from Peter Oruba, convert myri10ge to use pcie_get_readrq() and pcie_set_readrq() instead of our own PCI calls and arithmetics. These driver changes incorporate the proposed PCI-X / PCI-Express read byte count interface. Reading and setting those values doesn't take place "manually", instead wrapping functions are called to allow quirks for some PCI bridges. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off by: Peter Oruba <peter.oruba@amd.com> Based on work by Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-14myri10ge: Use the pause counter to avoid a needless device resetBrice Goglin1-7/+18
Use the pause counter to avoid a needless device reset, and print a message telling the admin that our link partner is flow controlling us down to 0 pkts/sec. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-16myri10ge: Remove nonsensical limit in the tx done routineBrice Goglin1-6/+0
Remove nonsensical limit in the tx done routine. Specifically, the loop will always terminate after processing <= 1 rings worth of frames, as the mcp index is not refetched, so the removed conditional could never be true. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10Use is_power_of_2() in myri10ge/myri10ge.cvignesh babu1-1/+2
Replace (n & (n-1)) with is_power_of_2() Signed-off-by: vignesh babu <vignesh.babu@wipro.com> Cc: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>