summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade our copy of llvm/clang to 3.0 release. Release notes can bedim2011-12-0936-1026/+1433
| | | | | | found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html MFC after: 1 week
* Typo.kib2011-12-091-1/+1
| | | | MFC after: 3 days
* Typo.kib2011-12-091-1/+1
| | | | MFC after: 3 days
* Added jimharris.jimharris2011-12-091-0/+1
|
* - Add a test for PR 151758.jhb2011-12-091-26/+54
| | | | | | | | | | | | | - While here, make this compile and work on non-i386: - Use CMSG_SPACE(), CMSG_LEN(), and CMSG_FIRSTHDR() instead of ignoring padding between 'struct cmsghdr' and control message payloads. - Don't initialize the control message before calling recvmsg(). Instead, check that we get a valid control message on return from recvmsg(). - Use errx() instead of err() for some errors that don't report failures that set errno. Requested by: kib (1)
* After r228293, et(4) supports altq(4).yongari2011-12-092-2/+4
|
* Announce flow control ability to PHY driver and enable RX flowyongari2011-12-092-4/+27
| | | | | | | | | | | | | | | | control. Controller does not automatically generate pause frames based on number of available RX buffers so it's very hard to know when driver should generate XON frame in time. The only mechanism driver can detect low number of RX buffer condition is ET_INTR_RXRING0_LOW or ET_INTR_RXRING1_LOW interrupt. This interrupt is generated whenever controller notices the number of available RX buffers are lower than pre-programmed value( ET_RX_RING0_MINCNT and ET_RX_RING1_MINCNT register). This scheme does not provide a way to detect when controller sees enough number of RX buffers again such that efficient generation of XON/XOFF frame is not easy. While here, add more flow control related register definition.
* Remove unnecessary definition of ET_PCIR_BAR. Controller supportyongari2011-12-092-10/+3
| | | | | | I/O memory only. While here, use pci_set_max_read_req(9) rather than directly manipulating PCIe device control register.
* The vfs.zfs.txg.timeout sysctl can be safely modified at run time.pjd2011-12-091-1/+1
| | | | MFC after: 1 week
* Do not disable interrupt without knowing whether the raisedyongari2011-12-092-18/+24
| | | | | | | | | | | | | | | | | | | interrupt is ours. Note, interrupts are automatically ACKed when the status register is read. Add RX/TX DMA error to interrupt handler and do full controller reset if driver happen to encounter these errors. There is no way to recover from these DMA errors without controller reset. Rename local variable name intrs with status to enhance readability. While I'm here, rename ET_INTR_TXEOF and ET_INTR_RXEOF to ET_INTR_TXDMA and ET_INTR_RXDMA respectively. These interrupts indicate that a frame is successfully DMAed to controller's internal FIFO and they have nothing to do with EOF(end of frame). Driver does not need to wait actual end of TX/RX of a frame(e.g. no need to wait the end signal of TX which is generated when a frame in TX FIFO is emptied by MAC). Previous names were somewhat confusing.
* Explicitly use curthread while manipulating td_fpop during last closejhb2011-12-091-3/+7
| | | | | | | | | | | | | of a devfs file descriptor in devfs_close_f(). The passed in td argument may be NULL if the close was invoked by garbage collection of open file descriptors in pending control messages in the socket buffer of a UNIX domain socket after it was closed. PR: kern/151758 Submitted by: Andrey Shidakov andrey shidakov ru Submitted by: Ruben van Staveren ruben verweg com Reviewed by: kib MFC after: 2 weeks
* Move cpu_set_upcall(newtd, td) up before the first call ofpho2011-12-091-2/+2
| | | | | | | | thread_free(newtd). This to avoid a possible page fault in cpu_thread_clean() as seen on amd64 with syscall fuzzing. Reviewed by: kib MFC after: 1 week
* sbuf_data() hasn't returned NULL for overflowed buffers since r71721.jh2011-12-091-6/+2
|
* - Fix markup.jh2011-12-091-3/+4
| | | | - Remove trailing whitespace.
* Update du(1):gjb2011-12-092-45/+53
| | | | | | | | | | | | | | - Sort arguments alphabetically where appropriate - '-B blocksize' is not mutually exclusive of '-h|-k|-m' - Mention '-t' in synopsis - Other wording improvements - Update usage() output to reflect the new synopsis [1] - Other miscellaneous improvements PR: 162438 Submitted by: arundel Reviewed by: Benjamin Kaduk (kaduk ! mit.edu), jhb[1] (original version) MFC after: 1 week
* As of r226865, daily_scrub_zfs_default_threshold is 35 days; documentgjb2011-12-081-2/+2
| | | | | | | | | | accordingly. PR: 162890 Submitted by: Oliver Hartmann (ohartman ! mail.zedat.fu-berlin.de) Patch by: Niclas Zeising (niclas.zeising ! gmail.com) MFC after: 1 week X-Need-MFC: r226865
* Add myself as new committer: add PGP key and announce..pfg2011-12-081-0/+1
| | | | Approved by: jhb (mentor)
* Some mdoc(7) style and typo fixes to zfs(8).mm2011-12-081-36/+39
| | | | | Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> MFC after: 3 days
* Pull up vendor changes to mdoc(7).ru2011-12-085-45/+171
|
* Make berase() work on platforms whose kernel lacks DIOCGDELETE ioctl.rmh2011-12-081-5/+48
| | | | Approved by: kib (mentor)
* - Add support for Support SEAGATE DAT Scopion 130eadler2011-12-081-0/+4
| | | | | | | PR: kern/141934 Submitted by: HASHI Hiroaki <hashiz@stenmark.meridiani.jp> Approved by: sbruno@ MFC after: 1 week
* - Fix ktrace leakage if error is seteadler2011-12-081-1/+1
| | | | | | | PR: kern/163098 Submitted by: Loganaden Velvindron <loganaden@devio.us> Approved by: sbruno@ MFC after: 1 month
* - set progname for use in usage()eadler2011-12-081-0/+1
| | | | | | | PR: bin/162908 Submitted by: Oleg Ginzburg <olevole@olevole.ru> Approved by: sbruno@ MFC after: 3 days
* Disable all clocks and put PHY into COMA before entering intoyongari2011-12-072-2/+21
| | | | | | suspend state. This will save more power. On resume, make sure to enable all clocks. While I'm here, if controller is not fast ethernet, enable gigabit PHY.
* Consistently use a tab character instead of using either a space oryongari2011-12-072-372/+372
| | | | | | | | tab after #define. While I'm here consistently use capital letters when it uses hexadecimal notation. No functional changes.
* Protect SIOCSIFMTU ioctl handler with driver lock.yongari2011-12-071-3/+7
| | | | | | | | Don't blindly re-initialize controller whenever MTU is changed. Now, reinitializing is done only when driver is running. While here, remove unnecessary assignment of error value since it was already initialized to 0.
* Implement hardware MAC statistics counter. Counters could beyongari2011-12-073-4/+283
| | | | | queried with dev.et.%d.stats sysctl node where %d is an instance of device.
* Rework link state tracking and TX/RX MAC configuration.yongari2011-12-072-106/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Do not report link status if driver is not running. o TX/RX MAC configuration should be done with resolved speed, duplex and flow control after establishing a link so it can't be done in driver initialization routine. Move the configuration to miibus_statchg callback which will be called whenever any link state change is detected. At this moment, flow-control is not enabled yet mainly because I was not able to set correct flow control parameters to generate TX pause frames. o Now TX/RX MAC is enabled only when a valid link is detected. Rearragnge hardware initialization routine a bit to leave enabling MAC to miibus_statchg callback. In order to that, TX/RX DMA engine is enabled in et_init_locked(). o Introduce ET_FLAG_LINK flag to track current link state. o Introduce ET_FLAG_FASTETHER flag to mark whether controller is fast ethernet. This flag is checked in miibus_statchg callback to know whether PHY established a valid link. o In et_stop(), TX/RX MAC is explicitly disabled instead of relying on et_reset(). And move et_reset() from et_stop() to controller initialization. Controler reset is not required here and it would also clear critial registers(i.e station address, RX filter configuration, WOL etc) that are required to make WOL work. o Switching to current media is done in et_init_locked() after setting IFF_DRV_RUNNING flag. This should ensure reliable auto-negotiation/manual link establishment. o In et_start_locked(), check whether driver got a valid link before trying to send frames. o Remove checking a link in et_tick() as this is done by miibus_statchg callback.
* As per das@'s suggestion, s/__noreturn/_Noreturn/, since the latter is antheraven2011-12-072-8/+8
| | | | | | | | identifier reserved for the implementation in C99 and earlier so there is no sensible reason for introducing yet another reserved identifier when we could just use the one C1x uses. Approved by: brooks (mentor)
* Some fixes to the man pages for [at_]quick_exit(3)theraven2011-12-072-12/+17
| | | | | Reviewed by: pluknet Approved by: dim (mentor)
* Make it possible to use the debug versions of std::map and std::multimapdim2011-12-072-4/+0
| | | | | | | | | | | | | | | | | with clang, by removing two unneeded using declarations. Otherwise, you would get errors similar to: /usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename' using _Base::value_compare; ^ N.B.: Take care when you actually use the debug versions of any libstdc++ header. They are more likely to contain problems, because they are exercised far less often, and since the standard library complexity guarantees don't always apply anymore, compile times can drastically increase. MFC after: 2 weeks
* Remove et_enable_intrs(), et_disable_intrs() functions andyongari2011-12-071-24/+11
| | | | | | | | manipulation of interrupt register access is done through CSR_WRITE_4 macro. Also add disabling interrupt into et_reset() because we want interrupt disabled state after controller reset. While I'm here slightly change interrupt handler to be more readable one.
* Controller does not require TX start command for every frame. Soyongari2011-12-072-10/+30
| | | | | | | | | | | | | | | | | | | | | send a single TX command after setting up all TX frames. This removes unnecessary register accesses and bus_dmamap_sync(9) calls. et(4) uses TX interrupt moderation so it's possible to have TX buffers that were already transmitted but waiting for TX completion interrupt. If the number of available TX descriptor is less then 1/3 of total TX descriptor, try reclaiming first to get enough free TX descriptors before setting up TX descriptors. After r228325, et_txeof() no longer tries to send frames after reclaiming TX buffers. That change was made to give more chance to transmit frames in main interrupt handler since we can still send frames in interrupt handler with RX interrupt. So right before exiting interrupt hander, after enabling interrupt, try to send more frames. This gives slightly better performance numbers. While I'm here reduce number of spare TX descriptors from 8 to 4. Controller does not require reserved TX descriptors, it was just to reduce TX overhead. After r228325, driver has much lower TX overhead so it does not make sense to reserve 8 TX descriptors.
* Overhaul bus_dma(9) usage in et(4) and clean up TX/RX path. Thisyongari2011-12-072-615/+579
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change should make et(4) work on any architectures. o Remove m_getl inline function and replace it with stanard mbuf interfaces. Previous code tried to minimize code duplication but this came from incorrect use of common DMA tag. Driver may be still use a common RX allocation handler with additional structure changes but I don't see much point to do that it would make it hard to understand the code. o Remove DragonflyBSD specific constant EVL_ENCAPLEN, use ETHER_VLAN_ENCAP_LEN instead. o Add bunch of new RX status definition. It seems controller supports RX checksum offloading but I was not able to make the feature work yet. Currently driver checks whether recevied frame is good one or not. o Avoid a typedef ending in '_t' as style(9) says. o Controller has no restriction on DMA address space, so there is no reason to limit the DMA address to 32bit. Descriptor rings, status blocks and TX/RX buffers now use full 64bit DMA addressing. o Allocate DMA memory shared between host and controller as coherent. o Create 3 separate DMA tags to be used as TX, mini RX ring and stanard RX ring. Previously it created a single DMA tag and it was used to all three rings. o et(4) does not support jumbo frame at this moment and I still don't quite understand how jumbo frame works on this controller so use two RX rings to handle small sized frame and normal sized frame respectively. The mini RX ring will be used to receive frames that are less than or equal to 127 bytes. The second RX ring is used to receive frames that are not handled by the first RX ring. If jumbo frame support is implemented, driver may have to choose better RX scheme by letting the second RX ring handle jumbo frames. This scheme will mimic Broadcom's efficient jumbo frame handling feature. However RAM buffer size(16KB) of the controller is too small to hold 2 jumbo frames, if 9KB jumbo frame is used, I'm not sure how good performance would it have. o In et_rxeof(), make sure to check whether controller received good frame or not. Passing corrupted frame to upper layer is bad idea. o If driver receives a bad frame or driver fails to allocate RX buffer due to resource shortage condition, reuse previously loaded DMA map for RX buffer instead of unloading/loading RX buffer again. o et_init_tx_ring() never fails so change return type to void. o In watchdog handler, show TX DMA write back status of errored frame which could be used as a clue to debug watchdog timeout. o Add missing bus_dmamap_sync() in various places such that et(4) should work with bounce buffers(e.g. PAE). o TX side bus_dmamap_load_mbuf_sg(9) support. o RX side bus_dmamap_load_mbuf_sg(9) support. o Controller has no DMA alignment limit in RX buffer so use m_adj(9) in RX buffer allocation to make IP header align on 2 bytes boundary. Otherwise it would trigger unaligned access error in upper layer on strict alignment architectures. One of down side of controller is it provides limited set of RX buffer length like most Intel controllers. This is not problem at this moment because driver does not support jumbo frame yet but it may require alignment fixup code to support jumbo frame on strict alignment architectures. o In et_txeof(), don't zero TX descriptors for transmitted frames. TX descriptors don't need write access after transmission. Driver sets IFF_DRV_OACTIVE when the number of available TX descriptors are less than or equal to ET_NSEG_SPARE. Make sure to clear IFF_DRV_OACTIVE only when the number of available TX descriptor is greater than ET_NSEG_SPARE.
* Eliminate stale numbers from a comment.alc2011-12-071-5/+2
|
* style(9) cleanups.theraven2011-12-071-10/+7
| | | | Approved by: brooks (mentor)
* Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add atheraven2011-12-079-6/+226
| | | | | | | | | | | | | | | | __noreturn macro and modify the other exiting functions to use it. The __noreturn macro, unlike __dead2, must be used BEFORE the function. This is in line with the C and C++ specifications that place _Noreturn (c1x) and [[noreturn]] (C++11) in front of the functions. As with __dead2, this macro falls back to using the GCC attribute. Unfortunately, clang currently sets the same value for the C version macro in C99 and C1x modes, so these functions are hidden by default. At some point before 10.0, I need to go through the headers and clean up the C1x / C++11 visibility. Reviewed by: brooks (mentor)
* Fix double free.glebius2011-12-071-1/+0
| | | | | PR: kern/163089 Submitted by: Herbie Robinson <Herbie.Robinson stratus.com>
* - Match GNU behavior of exit codegabor2011-12-073-6/+5
| | | | | | | | - Rename variable that has a different meaning now PR: bin/162930 Submitted by: Jan Beich <jbeich@tormail.net> MFC after: 1 week
* The NOTE_COPY should have been named NOTE_FFCOPY from the veryru2011-12-071-2/+2
| | | | | | beginning. Submitted by: Igor Sysoev
* Eliminate the possibility of 32-bit arithmetic overflow in the calculationalc2011-12-071-4/+4
| | | | | | | | | | of vm_kmem_size that may occur if the system administrator has specified a vm.vm_kmem_size tunable value that exceeds the hard cap. PR: 162741 Submitted by: Adam McDougall Reviewed by: bde@ MFC after: 3 weeks
* Fix a very special case when SIOCAIFADDR supplies mask of 0.0.0.0,glebius2011-12-061-5/+6
| | | | don't overwrite the mask with autoguessing based on classes.
* MK_CTF is not defined when kmod.mk is used with old bsd.own.mk.fjoe2011-12-061-1/+1
|
* Don't support OpenLDAP during lib32 build.ume2011-12-061-1/+1
|
* Force linker error when created shared library contains a relocationkib2011-12-062-2/+8
| | | | | | | | | against text. Provide the override switch to turn off the strict behaviour. Apparently, openssl libcrypto needs it due to assembler code not being PIC. Discussed with: bf MFC after: 2 weeks
* Most users of pipe(2) do not call fstat(2) on the returned pipe descriptors.kib2011-12-061-9/+28
| | | | | | | | | | | Optimize for the case, by lazily allocating the pipe inode number at the fstat(2) time. If alloc_unr(9) returns failure, do not fail fstat(2), since uses of inode numbers are even rare then fstat(2), but provide zero inode forever. Note that alloc_unr() failure is unlikely due to total number of pipes in the system limited by the number of file descriptors. Based on the submission by: gianni MFC after: 2 weeks
* Mention that Cold Presence Detection feature used for hot-plug detectionmav2011-12-061-4/+4
| | | | when interface power management is enabled.
* Correct some bInterval USB template descriptor values.hselasky2011-12-064-10/+10
| | | | MFC after: 3 days
* Fix compile warning when using clang to compile the code.hselasky2011-12-061-1/+1
| | | | | Submitted by: arundel @ MFC after: 3 days
* Really protect kern.proc.ps_strings sysctls with p_candebug(). Thistrociny2011-12-061-1/+1
| | | | | | | was intended to be in r228288. Spotted by: many MFC after: 1 week
OpenPOWER on IntegriCloud