aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mxge
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug which could lead to receive side lockup when WC is disabled.Andrew Gallatin2007-03-271-0/+1
| | | | | | | | | | When submitting rx buffers and not using WC fifo, always replace the invalid DMA address with the real one, otherwise allocation failures could lead to the invalid DMA address being given to the NIC, and that would cause the receive side to lockup. Notes: svn path=/head/; revision=167942
* Update mxge's firmware from a fairly old version (1.4.6) to the mostAndrew Gallatin2007-03-082-1721/+1959
| | | | | | | | | | | | recent version (1.4.12). Firmware changelogs are available on Myricom's web site at: http://www.myri.com/scs/CHANGES/CHANGES.myri10ge-firmware Sponsored by: Myricom Inc. Notes: svn path=/head/; revision=167345
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Work around a firmware bug where broadcast frames would be incorrectlyAndrew Gallatin2007-02-212-5/+27
| | | | | | | | | | treated as multicast frames and filtered, but when only when "adopting" running firmware. By "adopting", I mean using pre-existing firmware loaded from eeprom at PCI reset, rather than firmware loaded by the driver. Notes: svn path=/head/; revision=166875
* Cleanup and document the implementation of firmware(9) based onLuigi Rizzo2007-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a version that i posted earlier on the -current mailing list, and subsequent feedback received. The core of the change is just in sys/firmware.h and kern/subr_firmware.c, while other files are just adaptation of the clients to the ABI change (const-ification of some parameters and hiding of internal info, so this is fully compatible at the binary level). In detail: - reduce the amount of information exported to clients in struct firmware, and constify the pointer; - internally, document and simplify the implementation of the various functions, and make sure error conditions are dealt with properly. The diffs are large, but the code is really straightforward now (i hope). Note also that there is a subtle issue with the implementation of firmware_register(): currently, as in the previous version, we just store a reference to the 'imagename' argument, but we should rather copy it because there is no guarantee that this is a static string. I realised this while testing this code, but i prefer to fix it in a later commit -- there is no regression with respect to the past. Note, too, that the version in RELENG_6 has various bugs including missing locks around the module release calls, mishandling of modules loaded by /boot/loader, and so on, so an MFC is absolutely necessary there. I was just postponing it until this cleanup to avoid doing things twice. MFC after: 1 week Notes: svn path=/head/; revision=166756
* - Add 99% of a callout based watchdog. The remaining 1% is waitingAndrew Gallatin2007-01-312-30/+168
| | | | | | | | | | | | | | | | | for pci_cfg_restore() to be exported. It was tested using a hackily accessed pci_cfg_restore(). - Add ifmedia_removeall() to mxge_detach() in order to stop leaking an ifaddr - Fix a small acounting bug introduced by the locking code shuffle which could cause spurious watchdog resets now that we have a watchdog. Sponsored by: Myricom Notes: svn path=/head/; revision=166373
* destroy busdma maps even if they are NULL, so as to avoid leakingAndrew Gallatin2007-01-311-18/+16
| | | | | | | busdma tags. Notes: svn path=/head/; revision=166371
* Abandon using sleepable locks in favor of mutexes for mxge's if_ioctlAndrew Gallatin2007-01-312-72/+83
| | | | | | | | | | locking in preparation for adding a watchdog handler (callouts must not use sleepable locks). This required shuffling memory and interrupt allocation to the attach routine rather than if_ioctl so as to avoid potential sleeps while bringing up the interface. Notes: svn path=/head/; revision=166370
* Minor updates:Andrew Gallatin2007-01-302-3/+20
| | | | | | | | | | - initialize ifq_drv_maxlen correctly - mark the interface as jumbo capable - keep stats on the number of times the hw transmit queue filled and was restarted. Notes: svn path=/head/; revision=166345
* Fix mxge_submit_8rx() to behave like the comments says it does,Andrew Gallatin2006-11-291-1/+3
| | | | | | | and ensure that it copies at most 32 bytes at a time. Notes: svn path=/head/; revision=164751
* Fix transposition of width and value arguments to pci_config_write()Andrew Gallatin2006-11-221-1/+1
| | | | | | | | | when setting up the read request size. Pointed out by: kmacy Notes: svn path=/head/; revision=164520
* Initialization bugfixes and enhancements:Andrew Gallatin2006-11-222-6/+51
| | | | | | | | | | | | | | - Fix bug preventing adoption of running firmware - Set PCIe max read request size to 4KB - Read PCIe link width from config space - Assume aligned completions from the southbridge ports of intel E5000 chips - Use aligned firmware when link width is x4 or less - Add hw.mxge.force_firmware tunable to allow user to force selection of aligned (or unaligned) firmware Notes: svn path=/head/; revision=164513
* Added MSI support.Andrew Gallatin2006-11-211-12/+34
| | | | | | | Sponsored by: Myricom Inc. Notes: svn path=/head/; revision=164472
* Fix a driver bug which could result in frames MHLEN or (MHLEN - 1) bytesAndrew Gallatin2006-10-171-2/+2
| | | | | | | | | | | long being DMA'ed 2 (or 1) bytes past the end of the mbuf and corrupting random kernel memory. I had forgotten about the 2 bytes of implict padding the firmware assumes. Sponsored by: Myricom Inc. Notes: svn path=/head/; revision=163467
* - Updated to the latest myri10ge firmwareAndrew Gallatin2006-09-155-1478/+1882
| | | | | | | | | | | | | | - Added support for multicast filtering, now that the firmware supports it. Note that this is not yet tested, as multicast seems to panic -current (even w/o mxge loaded) - Added workaround to cope with different irq data struct size on pre-multicast firmware which can found running on nics. - Added Intel E5000 PCIe chipsets to list providing aligned completions. - Replaced various magic constants with #defines, now that they are defined in the firmware headers. Notes: svn path=/head/; revision=162328
* - Added TSO support. This entailed increasing the number of send descriptorsAndrew Gallatin2006-09-152-23/+229
| | | | | | | | | | | | | | | | in the transmit busdma tag, so I moved the segment list off the stack. - Fixed transmit routine to ensure it doesn't read past the end of an mbuf when parsing headers. - Corrected handling of odd length segments. Setting MXGEFW_FLAGS_ALIGN_ODD is required only when offloading the checksum of that frame. Sponsored by: Myricom Inc. Notes: svn path=/head/; revision=162322
* Copy the link-layer address from our ifnet pointer at reset timeAndrew Gallatin2006-08-041-0/+3
| | | | | | | so that the mac address can be overridden. Notes: svn path=/head/; revision=160973
* - add read only sysctl to indicate if write-combining was enabledAndrew Gallatin2006-08-011-1/+7
| | | | | | | | - enable mxge_dummy_rdma() right after reset, and make sure to disable when detaching the driver. Notes: svn path=/head/; revision=160876
* Firmware loading improvements:Andrew Gallatin2006-07-171-13/+95
| | | | | | | | | | | | - Copy ethernet firmware down in small chunks so as to avoid bugs in early versions of the bootstrap firmware. - Attempt to "adopt" the running firmware if we cannot load a suitable firmware image via firmware(9). - Separate firmware validation into its own routine, and check the major/minor driver/firmware ABI version. Notes: svn path=/head/; revision=160456
* Much to my surprise, IFQ_DRV_DEQUEUE() can return a null mbuf even ifAndrew Gallatin2006-06-141-13/+11
| | | | | | | | | | | !IFQ_DRV_IS_EMPTY(). Taking this into account, I re-structured the transmit routine so as to avoid adding another if/then in the critical path. Thanks to brueffer for showing my how to test with altq/pf. Notes: svn path=/head/; revision=159623
* Replace a sc->ifp->if_snd.ifq_drv_maxlen with IFQ_SET_MAXLEN(),Andrew Gallatin2006-06-141-1/+2
| | | | | | | | | and call IFQ_SET_READY(). Submitted by: brueffer Notes: svn path=/head/; revision=159621
* Update the mxge driver.Andrew Gallatin2006-06-145-1694/+1995
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update the firmware to the latest released firmware (1.4.3), which corresponds to the firmware in the latest shipping drivers from Myricom. This firmware fixes several bugs in the firmware's PCI-e implementation, and it also changes the driver/firmware interface: o TSO was added, and changed the format of the transmit descriptors. o The firmware no longer counts transmits descriptors, but frames. So the driver needs to keep a count of the number of frames sent. o The weird interrupt strategy changed to a normal receive return ring. This ring is much bigger, and we may be able to support DEVICE_POLLING. o Myricom's header files changed the name of firmware related #define's and enums (s/_MCP_/FW_). - Stopped spamming the console with lots of printfs unless mxge_verbose (or bootverbose) is set. - Made additional information available via sysctl, including the results of a PCI-e DMA benchmark run at device reset. - Decreased the excessively long timeouts when sending commands from 2 seconds to 20ms. Sponsored by: Myricom Inc. Notes: svn path=/head/; revision=159612
* - Complete the myri10ge -> mxge name change by doing a mechanicalAndrew Gallatin2006-06-133-440/+422
| | | | | | | | | s/myri10ge/mxge/g replacement in the myri10ge files. A few contuation lines were joined because of the regained columns. - Hook the mxge driver back to the build. Notes: svn path=/head/; revision=159571
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-161-1/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* 10GbE mode driver and binary firmware for Myricom's PCI-express NICs.Andrew Gallatin2006-02-196-0/+4336
More info regarding these nics can be found at http://www.myri.com. Please note that the files sys/dev/myri10ge/{mcp_gen_header.h,myri10ge_mcp.h} are internally shared between all our drivers (solaris, macosx, windows, linux, etc). I'd like to keep these files unchanged, so I can just import newer versions of them when the firmware API/ABI changes. This means I'm stuck with some of the crazy-long #define names, and possibly non-style(9) characteristics of these files. Many thanks to mlaier for doing firmware(9) just as I needed it, and to scottl for his helpful review. Reviewed by: scottl, glebius Sponsored by: Myricom Inc. Notes: svn path=/head/; revision=155852