summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* In 'fixit mode' running "fsck /dev/ad0s1a" typically complains that itkensmith2008-01-227-0/+14
| | | | | | | | | | | | | | | | can't find fsck_4.2bsd because there was no fstab file saying what filesystem type it is looking at so it got the filesystem type from the disk's label. When that fails admins who haven't been in this situation before are most likely to try "fsck -t ufs /dev/ad0s1a" because ufs is the type used in fstab files on working systems but that also fails complaining it can't find fsck_ufs. This just sets it up so /stand in the MFS image (/sbin is a symlink to /stand) includes hard links pointing fsck_4.2bsd and fsck_ufs to fsck_ffs which is what is present in /sbin on installed systems. Prodded by: obrien MFC after: 1 day
* Cleanup after last commit (remove undefined variables).ru2008-01-221-7/+1
|
* Xref flopen.3 which references this manual page.trhodes2008-01-221-1/+2
| | | | PR: 112650
* Quick note on how to disable malloc debugging in the top entry in this file.trhodes2008-01-221-1/+2
| | | | | | PR: 83621 Submitted by: Scott Robbins <scottro@nyc.rr.com> (original version) Reviewed by: imp
* The config-recursive target is not run during the normal install process, movetrhodes2008-01-221-6/+8
| | | | | | | | | | it down to where it belongs. Document 'all-depends-list' target and bump doc date. PR: 119519 Submitted by: Yuri Pankov <yuri.pankov@gmail.com> Reviewed by: flz
* Repeat iostat header after rows-3 instead of a hardcoded 20.keramida2008-01-221-3/+71
| | | | | | | | | | | | | Use ioctl() to get the window size in iostat(8), and force a new header to be prepended to the output every time the current window size changes. Change the number of lines before each header to `rows - 3' when the terminal is resized, so that the full terminal length can be used for output lines. PR: bin/119705 Submitted by: keramida Approved by: maxim MFC after: 2 weeks
* Small fixes.brueffer2008-01-221-2/+2
|
* Make -l always have the SUSv2 meaning of "check links."kientzle2008-01-222-30/+11
| | | | | | | | GNU tar changed -l to match SUSv2 a couple of years ago, so bsdtar no longer needs to pander to this particular GNUism. Thanks to: Debian maintainers MFC after: 7 days
* Understand newly introduced "ASCII" encodingache2008-01-222-0/+3
|
* Add a rather basic man page for the coda kernel module.rwatson2008-01-212-0/+83
| | | | MFC after: 3 days
* During PREINIT, when giving the interface the address 0.0.0.0, do it as anbrooks2008-01-211-1/+1
| | | | | | | alias to avoid distrubing other addresses. PR: bin/119255 Submitted by: Jaakko Heinonen <jh at saunalahti dot fi>
* Introduce new encoding: "ASCII"ache2008-01-214-1/+191
| | | | | It differs from default C/POSIX "NONE" mainly by stricter 8bit check for mb*towc*/wc*tomb* family, returning EILSEQ
* Note that the punch_fw option does not work in securelevel 3 and Xref init.8.trhodes2008-01-211-1/+6
| | | | | | Bump .Dd. PR: 41807
* Note what options are only for DDS drives.trhodes2008-01-211-4/+4
| | | | PR: 35608
* Note change in the supported upgrade path. Prior to this 5.3-releaseimp2008-01-211-0/+8
| | | | | | | | | and newer were supported upgrade paths to -current. After today's commits, 6.0-RELEASE and newer is supported for jumping to current. Make that clear in the UPDATING entry. For the pedants out there, upgrading from FreeBSD_version 600029 and newer should still work. This represents a point from May 29, 2005 forward. The prior date was October 16th 2004.
* Put "coda_rdwr: Internally Opening" printf generated by in-kernel writesrwatson2008-01-211-0/+2
| | | | | | | | to files, such as ktrace output, under CODA_VERBOSE. Otherwise, each such call to VOP_WRITE() results in a kernel printf. MFC after: 3 days Obtained from: NetBSD
* Replace references to VOP_LOCK() w/o LK_RETRY to vn_lock() with LK_RETRY,rwatson2008-01-211-14/+4
| | | | | | | avoiding extra error handling, or in some cases, missing error handling. MFC after: 3 days Discussed with: kib
* Document the 'maintainer' target.brueffer2008-01-211-1/+3
| | | | | | PR: 119699 Submitted by: Warren Block <wblock@wonkity.com> MFC after: 3 days
* Remove 5.x and 6.x cruft - source upgrades to RELENG_8 from versions priorobrien2008-01-212-33/+0
| | | | to RELENG_7 are not supported.
* Adjust paths for EDITOR and PAGER environment variables in the fixitkensmith2008-01-211-2/+2
| | | | | | | | | | | | | | | | shell. This would break them for floppy based fixit mode which still seems to use /stand except that vi(1) and more(1) don't exist in /stand on the fixit floppy so it really doesn't matter what these settings are there. These paths work for CD-based fixit mode. This is just "temporary" and on its way to 7.0-REL. I'm too chicken to make what is probably the correct adjustment this close to release. It seems /mnt2 is just a symbolic link, and stuff really gets mounted as /dist. Adjusting paths to that for 8.X is probably the right thing to do and I'll try that after 7.0 is done. Noticed by: gallatin MFC after: 1 day
* Fix cutoffs. This is just a cleanup and an optimization for unusualbde2008-01-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cases which are used mainly by regression tests. As usual, the cutoff for tiny args was not correctly translated to float precision. It was 2**-54 but 2**-24 works. It must be about 2**-precision, since the error from approximating log(1+x) by x is about the same as |x|. Exhaustive testing shows that 2**-24 gives perfect rounding in round-to-nearest mode. Similarly for the cutoff for being small, except this is not used by so many other functions. It was 2**-29 but 2**-15 works. It must be a bit smaller than sqrt(2**-precision), since the error from approximating log(1+x) by x-x*x/2 is about the same as x*x. Exhaustive testing shows that 2**-15 gives a maximum error of 0.5052 ulps in round-to-nearest-mode. The algorithm for the general case is only good for 0.8388 ulps, so this is sufficient (but it loses slightly on i386 -- then extra precision gives 0.5032 ulps for the general case). While investigating this, I noticed that optimizing the usual case by falling into a middle case involving a simple polynomial evaluation (return x-x*x/2 instead of x here) is not such a good idea since it gives an enormous pessimization of tinier args on machines for which denormals are slow. Float x*x/2 is denormal when |x| ~< 2**-64 and x*x/2 is evaluated in float precision, so it can easily be denormal for normal x. This is even more interesting for general polynomial evaluations. Multiplying out large powers of x is normally a good optimization since it reduces dependencies, but it creates denormals starting with quite large x.
* Add copyrights.ru2008-01-212-0/+52
| | | | PR: 119136
* Fix build.yongari2008-01-211-2/+2
|
* sf(4) should work on all archs now, remove it from here.brueffer2008-01-211-1/+0
|
* Document two new sysctl variables, dev.sf.%d.int_mod and dev.sf.%d.stats.yongari2008-01-211-1/+19
| | | | | | | Xref vlan(4). Touchd Dd. Reviewed by: brueffer
* Uncomment sf(4), sf(4) should work on all architectures.yongari2008-01-211-1/+1
|
* sf(4) gained VLAN_MTU support.yongari2008-01-211-1/+2
| | | | Touch Dd.
* Overhaul sf(4) to make it run on all architectures and implementyongari2008-01-212-965/+2122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | checksum offoload by downloading AIC-6915 firmware. Changes are o Header file cleanup. o Simplified probe logic. o s/u_int{8,16,32}_t/uint{8,16,32}_t/g o K&R -> ANSI C. o In register access function, added support both memory mapped and IO space register acccess. The function will dynamically detect which method would be choosed. o sf_setperf() was modified to support strict-alignment architectures. o Use SF_MII_DATAPORT instead of hardcoded value 0xffff. o Added link state/speed, duplex changes handling task q. The task q is also responsible for flow control settings. o Always hornor link up/down state reported by mii layers. The link state information is used in sf_start() to determine whether we got a valid link. o Added experimental flow-control setup. It was commented out but will be activated once we have flow-cotrol infrastructure in mii layer. o Simplify IFF_UP/IFCAP_POLLING and IFF_PROMISC handling logic. Rx filter always honors promiscuous mode. o Implemented suspend/resume methods. o Reorganized Rx filter routine so promiscuous mode changes doesn't require interface re-initialization. o Reimplemnted driver probe routine such that it looks for matching device from supported hardware list table. This change will help to add newer hardware revision to the driver. o Use ETHER_ADDR_LEN instead of hardcoded value. o Prefer memory space register mapping over I/O space as the hardware requires lots of register access to get various consumer/producer index. Failing to get memory space mapping, sf(4) falls back to I/O space mapping. Use of memory space register mapping requires somewhat large memory space(512K), though. o Switch to simpler bus_{read,write}_{1,2,4}. o Use PCIR_BAR macro to get BARs. o Program PCI cache line size if the cache line size was set to 0 and enable PCI MWI. o Add a new sysctl node 'dev.sf.N.stats' that shows various MAC counters for Rx/Tx statistics. o Add a sysctl node to configure interrupt moderation timer. The timer defers interrupts generation until time specified in timer control register is expired. The value in the timer register is in units of 102.4us. The allowable range for the timer is 0 - 31 (0 ~ 3.276ms). The default value is 1(102.4us). Users can change the timer value with dev.sf.N.int_mod sysctl(8) variable/loader(8) tunable. o bus_dma(9) conversion - Enable 64bit DMA addressing. - Enable 64bit descriptor format support. - Apply descriptor ring alignment requirements(256 bytes alignment). - Apply Rx buffer address alignment requirements(4 bytes alignment). - Apply 4GB boundary restrictions(Tx/Rx ring and its completion ring should live in the same 4GB address space.) - Set number of allowable number of DMA segments to 16. In fact, AIC-6915 doesn't have a limit for number of DMA segments but it would be waste of Tx descriptor resource if we allow more than 16. - Rx/Tx side bus_dmamap_load_mbuf_sg(9) support. - Added alignment fixup code for strict-alignment architectures. - Added endianness support code in Tx/Rx descriptor access. With these changes sf(4) should work on all platforms. o Don't set if_mtu in device attach, it's handled in ether_ifattach. o Use our own callout to drive watchdog timer. o Enable VLAN oversized frames and announce sf(4)'s VLAN capability to upper layer. o In sf_detach(), remove mtx_initialized KASSERT as it's not possible to get there without initialzing the mutex. Also mark that we're about to detaching so active bpf listeners do not panic the system. o To reduce PCI register access cycles, Rx completion ring is directly scanned instead of reading consumer/producer index registers. In theory, Tx completion ring also can be directly scanned. However the completion ring is composed of two types completion(1 for Tx done and 1 and DMA done). So reading producer index via register access would be more safer way to detect the ring wrap-around. o In sf_rxeof(), don't use m_devget(9) to align recevied frames. The alignment is required only for strict-alignment architectures and now the alignment is handled by sf_fixup_rx() if required. The removal of the copy operation in fast path should increase Rx performance a lot on non-strict-alignemnt architectures such as i386 and amd64. o In sf_newbuf(), don't set descriptor valid bit as sf(4) is programmed to run with normal mode. In normal mode, the valid bit have no meaning. The valid bit should be used only when the hardware uses polling(prefetch) mode. The end of descriptor queue bit could be used if needed, but sf(4) relys on auto-wrapping of hardware on 256 descriptor queue entries so both valid and descriptor end bit are not used anymore. o Don't disable generation of Tx DMA completion as said in datasheet and use the Tx DMA completion entry instead of relying on Tx done completion entry. Also added additional Tx completion entry type check in Tx completion handler. o Don't blindly reset watchdog timer in sf_txeof(). sf(4) now unarm the the watchdog only if there are no active Tx descriptors in Tx queue. o Don't manually update various counters in driver, instead, use built-in MAC statistic registers to update them. The statistic registers are updated in every second. o Modified Tx underrun handlers to increase the threshold value in units of 256 bytes. Previously it used to increase 16 bytes at a time which seems to take too long to stabalize whenever Tx underrun occurrs. o In interrupt handler, additional check for the interrupt is performed such that interrupts only for this device is allowed to process descriptor rings. Because reading SF_ISR register clears all interrtups, nuke writing to a SF_ISR register. o Tx underrun is abonormal condition and SF_ISR_ABNORMALINTR includes the interrupt. So there is no need to inspect the Tx underrun again in main interrupt loop. o Don't blindly reinitialize hardware for abnormal interrupt condition. sf(4) reintializes the hardware only when it encounters DMA error which requires an explicit hardware reinitialization. o Fix a long standing bug that incorrectly clears MAC statistic registers in sf_init_locked. o Added strict-alignment safe way of ethernet address reprogramming as IF_LLADDR may return unaligned address. o Move sf_reset() to sf_init_locked in order to always reset the hardware to a known state prior to configuring hardware. o Set default Rx DMA, Tx DMA paramters as shown in datasheet. o Enable PCI busmaster logic and autopadding for VLAN frames. o Rework sf_encap. - Previously sf(4) used to type 0 of Tx descriptor with padding enabled to store driver private data. Emebedding private data structures into descriptors is bad idea as the structure size would be different between 64bit and 32bit architectures. The type 0 descriptor allows fixed number of DMA segments in a descriptor format and provides relatively simple interface to manage multi-fragmented frames. However, it wastes lots of Tx descriptors as not all frames are fragmented as the number of allowable segments in a descriptor. - To overcome the limitation of type 0 descriptor, switch to type 2 descriptor which allows 64bit DMA addressing and can handle unliumited number of fragmented DMA segments. The drawback of type 2 descriptor is in its complexity in managing descriptors as driver should handle the end of Tx ring manually. - Manually set Tx desciptor queue end mark and record number of used descriptors to reclaim used descriptors in sf_txeof(). o Rework sf_start. - Honor link up/down state before attempting transmission. - Because sf(4) uses only one of two Tx queues, use low priority queue instead of high one. This will remove one shift operation in each Tx kick command. - Cache last produder index into softc such that subsequenet Tx operation doesn't need to access producer index register. o Rewrote sf_stats_update to include all available MAC statistic counters. o Employ AIC-6915 firmware from Adaptec and implement firmware download routine and TCP/UDP checksum offload. Partial checksum offload support was commented out due to the possibility of firmware bug in RxGFP. The firmware can strip VLAN tag in Rx path but the lack of firmware assistance of VLAN tag insertion in transmit side made it useless on FreeBSD. Unlike checksum offload, FreeBSD requires both Tx/Rx hardware VLAN assistance capability. The firmware may also detect wakeup frame and can wake system up from states other than D0. However, the lack of wakeup support form D3cold state keep me from adding WOL capability. Also detecting WOL frame requires firmware support but it's not yet known to me whether the firmware can process the WOL frame. o Changed *_ADDR_HIADDR to *_ADDR_HI to match other definitions of registers. o Added definitioan to interrupt moderation related constants. o Redefined SF_INTRS to include Tx DMA done and DMA errors. Removed Tx done as it's not needed anymore. o Added definition for Rx/Tx DMA high priority threshold. o Nuked unused marco SF_IDX_LO, SF_IDX_HI. o Added complete MAC statistic register definition. o Modified sf_stats structure to hold all MAC statistic regiters. o Nuke various driver private padding data in Tx/Rx descriptor definition. sf(4) no longer requires private padding. Also remove unused padding related definitions. This greatly simplifies descriptor manipulation on 64bit architectures. o Becase we no longer pad driver private data into descriptor, remove deprecated/not-applicable comments for padding. o Redefine Rx/Tx desciptor status. sf(4) doesn't use bit fileds anymore to support endianness. Tested by: bruffer (initial version)
* It seems that the firmware for TxGFP does not work at all. I couldyongari2008-01-211-0/+1
| | | | | | | | | | | | | | | | | | be wrong but I couldn't find a way to make it work. In addition, the number of TxGFP instruction does not match the firmware image size, so I guess something was wrong when Adaptec generated the TxGFP firmware from their DDK. According to datasheet, normally, the first GFP instruction would be opcode C, WaitForStartOfFrame, to synchronize checksumming with incoming frame. But the first instruction in TxGFP firmware was opcode 1, BrToImmIfTrue, so it could not process checksum correctly, I guess. Checking for RxGFP firmware also indicates the first instruction should be opcode C. Since the number of instructions in TxGFP firmware lacks exactly one instruction, I prepended the opcode C to TxGFP firmware image. With this change, the resulting image size perfectly matches with the nummber of instructions and Tx checksum offload seems to work without problems.
* Import AIC-6915 firmware for GFP from Adaptec.yongari2008-01-212-0/+235
| | | | | | Special thanks to bruffer to send the firmware image to me. Submitted by: gibbs via bruffer
* sf(4) was repocopied to src/sys/dev/sf.yongari2008-01-212-2663/+0
|
* Improve kernel NAT support in rc.firewallrafan2008-01-212-1/+10
| | | | | | | | | | - Allow IP in firewall_nat_interface, just like natd_interface - Allow additional configuration parameters passed to ipfw via firewall_nat_flags - Document firewall_nat_* in defaults/rc.conf Tested by: Albert B. Wang <abwang at gmail.com> MFC after: 1 month
* Update file list and Makefile after repocopying sf(4) fromyongari2008-01-212-2/+2
| | | | src/sys/pci to src/sys/dev.
* Forced commit to note that sf(4) was repocopied from sys/pciyongari2008-01-211-1/+1
| | | | and modified for its new location.
* updates for additional chip supportsam2008-01-211-10/+47
| | | | | Submitted by: "J.R. Oldroyd" <jr@opal.com> MFC after: 2 weeks
* Regenerate.rwatson2008-01-209-15/+15
|
* Use audit events AUE_SHMOPEN and AUE_SHMUNLINK with new system callsrwatson2008-01-202-4/+4
| | | | | shm_open() and shm_unlink(). More auditing will need to be done for these calls to capture arguments properly.
* When printing process file descriptor lists, show a type of 'h' forrwatson2008-01-201-0/+4
| | | | POSIX shared memory descriptors.
* Export a type for POSIX SHM file descriptors via kern.proc.filedesc asrwatson2008-01-202-0/+5
| | | | | used by procstat, or SHM descriptors will show up as type unknown in userspace.
* Correct the commented out debugging printf()s in REPLACE and NEXT macros.bz2008-01-201-2/+8
| | | | | | ip6_sprintf() needs a buffer as first argument these days. MFC after: 2 weeks
* o Fix ipfw(8) command line parser bug: "ipfw nat 1 config if" ↵maxim2008-01-201-0/+2
| | | | | | | | requires an argument. PR: bin/119815 Submitted by: Dierk Sacher MFC after: 1 week
* Oops, when merging from the float version to the double versions, don'tbde2008-01-201-1/+1
| | | | | | | | | forget to translate "float" to "double". ucbtest didn't detect the bug, but exhaustive testing of the float case relative to the double case eventually did. The bug only affects args x with |x| ~> 2**19*(pi/2) on non-i386 (i386 is broken in a different way for large args).
* Remove the float version of the kernel of arg reduction for pi/2, sincebde2008-01-191-198/+0
| | | | | | | it should never have existed and it has not been used for many years (floats are reduced faster using doubles). All relevant changes (just the workaround for broken assignment) have been merged to the double version.
* Re-enable pcpu caching by default make sysctl R/Wkmacy2008-01-192-2/+2
|
* Do an ordinary assignment in STRICT_ASSIGN() except for floats untilbde2008-01-191-2/+6
| | | | | | | | | there is a problem with non-floats (when i386 defaults to extra precision). This essentially restores yesterday's behaviour for doubles on i386 (since generic rint() isn't used and everywhere else assumed working assignment), but for arches that use the generic rint() it finishes restoring some of 1995's behaviour (don't waste time doing unnecessary store/load).
* Correct the visibility macro surrounding SIGSYS.das2008-01-191-1/+1
| | | | Submitted by: Andriy Gapon <avg@icyb.net.ua>
* Use STRICT_ASSIGN() for exp2f() and exp2() instead of a volatilebde2008-01-192-4/+5
| | | | | | | | | | | | | | | | | | | variable hack for exp2f() only. The volatile variable had a surprisingly large cost for exp2f() -- 19 cycles or 15% on i386 in the worst case observed. This is only partly explained by there being several references to the variable, only one of which benefited from it being volatile. Arches that have working assignment are likely to benefit even more from not having any volatile variable. exp2() now has a chance of working with extra precision on i386. exp2() has even more references to the variable, so it would have been pessimized more by simply declaring the variable as volatile. Even the temporary volatile variable for STRICT_ASSIGN costs 5-10% on i386, (A64) so I will change STRICT_ASSIGN() to do an ordinary assignment until i386 defaults to extra precision.
* Use STRICT_ASSIGN() for _kernel_rem_pio2f() and _kernel_rem_pio2f()bde2008-01-192-7/+10
| | | | | | | | | | | | instead of a volatile cast hack for the float version only. The cast hack broke with gcc-4, but this was harmless since the float version hasn't been used for a few years. Merge from the float version so that the double version has a chance of working on i386 with extra precision. See k_rem_pio2f.c rev.1.8 for the original hack. Convert to _FBSDID().
* Remove unused oldhash definition from Coda namecache.rwatson2008-01-191-5/+0
| | | | MFC after: 3 days
* Use STRICT_ASSIGN() for log1pf() and log1p() instead of a volatile castbde2008-01-192-8/+10
| | | | | | | | | | | | | | hack for log1pf() only. The cast hack broke with gcc-4, resulting in ~1 million errors of more than 1 ulp, with a maximum error of ~1.5 ulps. Now the maximum error for log1pf() on i386 is 0.5034 ulps again (this depends on extra precision), and log1p() has a chance of working with extra precision. See s_log1pf.c 1.8 for the original hack. (It claims only 62343 large errors). Convert to _FBSDID(). Another thing broken with gcc-4 is the static const hack used for rcsids.
OpenPOWER on IntegriCloud