#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
280347 |
|
22-Mar-2015 |
mav |
Remove MAXBSIZE use from drivers where it has nothing to do.
In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead.
MFC after: 1 month
|
#
267992 |
|
28-Jun-2014 |
hselasky |
Pull in r267961 and r267973 again. Fix for issues reported will follow.
|
#
267985 |
|
27-Jun-2014 |
gjb |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
|
#
267961 |
|
27-Jun-2014 |
hselasky |
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel.
Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks Sponsored by: Mellanox Technologies
|
#
267446 |
|
13-Jun-2014 |
jhb |
Add missing calls to bus_dmamap_unload() when freeing static DMA allocations.
Reviewed by: scottl
|
#
254263 |
|
12-Aug-2013 |
scottl |
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit.
This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot.
Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
|
#
239939 |
|
31-Aug-2012 |
scottl |
Essentially revert r239912. The amr_periodic function hadn't been armed in over 10 years and was dead code; the previous revision exposed it as such to CLANG. The solution is to cull the whole thing.
|
#
239912 |
|
30-Aug-2012 |
jhb |
Use callout(9) rather than timeout(9). Note that the periodic timer in amr(4) is never started, so this should be even more of a NOP than normal.
|
#
232854 |
|
12-Mar-2012 |
scottl |
Convert a number of drivers to obtaining their parent DMA tag from their PCI device attachment.
|
#
232255 |
|
28-Feb-2012 |
kevlo |
Fix checks for error return from amr_sglist_map() and amr_ccb_map()
|
#
227843 |
|
22-Nov-2011 |
marius |
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
|
#
174544 |
|
12-Dec-2007 |
scottl |
Rewrite the DMA code paths from being an impenitrable maze of special cases to a much saner and simplier unified code path. Along the way, fix various CAM nits and bugs so that the passthrough works correctly for all cases.
|
#
174185 |
|
02-Dec-2007 |
scottl |
Fix a typo that was hidden by AMR_DEBUG.
|
#
166901 |
|
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to 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@
|
#
165102 |
|
11-Dec-2006 |
mjacob |
Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.
PR: 106543 MFC after: 3 days
|
#
157586 |
|
08-Apr-2006 |
scottl |
After further review and discussion, partially revert the previous commit. The real problem was that ioctl handlers needed to call amr_wait_command() with the list lock held. This not only solves the completion race, it also prevents bounce buffer corruption that could arise from amr_start() being called without the proper locks held.
Discussed with: ps MFC After: 3 days
|
#
157585 |
|
08-Apr-2006 |
ps |
Close a pesky race where after checking the BUSY flag in amr_wait_command, the completion of the command can occur before tsleep is called and the command ends up blocking forever since the wakeup has already been called.
Submitted by: ups
|
#
155317 |
|
04-Feb-2006 |
imp |
Use void * for pointer rather than u_int8_t *, since it doesn't matter. Well it does for type punning warnings.
|
#
155223 |
|
02-Feb-2006 |
ps |
Enable 64bit SGL's on PERC 4/DC
|
#
153409 |
|
14-Dec-2005 |
scottl |
Mega update to the LSI MegaRAID driver:
1. Implement a large set of ioctl shims so that the Linux management apps from LSI will work. This includes infrastructure to support adding, deleting and rescanning arrays at runtime. This is based on work from Doug Ambrosko, heavily augmented by LSI and Yahoo.
2. Implement full 64-bit DMA support. Systems with more than 4GB of RAM can now operate without the cost of bounce buffers. Cards that cannot do 64-bit DMA will automatically revert to using bounce buffers. This option can be forced off by setting the 'hw.amr.force_sg32" tunable in the loader. It should only be turned off for debugging purposes. This work was sponsored by Yahoo.
3. Streamline the command delivery and interrupt handler paths after much discussion with Dell and LSI. The logic now closely matches the intended design, making it both more robust and much faster. Certain i/o failures under heavy load should be fixed with this.
4. Optimize the locking. In the interrupt handler, the card can be checked for completed commands without any locks held, due to the handler being implicitely serialized and there being no need to look at any shared data. Only grab the lock to return the command structure to the free pool. A small optimization can still be made to collect all of the completions together and then free them together under a single lock.
Items 3 and 4 significantly increase the performance of the driver. On an LSI 320-2X card, transactions per second went from 13,000 to 31,000 in my testing with these changes. However, these changes are still fairly experimental and shouldn't be merged to 6.x until there is more testing.
Thanks to Doug Ambrosko, LSI, Dell, and Yahoo for contributing towards this.
|
#
152119 |
|
06-Nov-2005 |
scottl |
Remove spl markers from AMR.
MFC After: 3 days
|
#
148850 |
|
08-Aug-2005 |
scottl |
Complete the removal of __FreeBSD_version checks from the amr driver. The driver had advanced enough over the years that direct sharing of code with FreeBSD 4.x was in no way possible anymore.
|
#
146734 |
|
29-May-2005 |
nyan |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
#
143164 |
|
05-Mar-2005 |
imp |
Use BUS_PROBE_DEFAULT for pci probe return value
|
#
140688 |
|
23-Jan-2005 |
scottl |
Add support for the LSI 320-2E PCI-Express controller. Fix a couple of bugs in the ioctl handler. Update the LSI copyrights for these.
Obtained from: LSI, Corp
|
#
140340 |
|
16-Jan-2005 |
scottl |
Lock the AMR driver: - Introduce the amr_io_lock to control access to command queues, bio queues, and the hardware. - Eliminate the taskqueue and do all completion processing in the ithread. - Assign a static slot number to each command instead of doing a linear search for free slots each time a command is needed. - Modify the interrupt handler to more closely match what Linux does, for safety.
|
#
139749 |
|
05-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
#
138422 |
|
05-Dec-2004 |
scottl |
Fix a number of bugs and significantly alter the command execution path to properly support bounce buffers and resource shortages. This allows the driver to work properly and reliably with more than 4GB of RAM. Of the three data paths that exist in the driver, (block, CAM, ioctl), the ioctl path has not been well tested with these changes due to difficulty with finding an application that uses it that actually works.
Sponsored by: The FreeBSD Foundation and FreeBSD Systems, Inc.
|
#
133706 |
|
14-Aug-2004 |
ambrisko |
Add new PCI device ID for PERC4/DI.
|
#
129879 |
|
30-May-2004 |
phk |
Add missing <sys/module.h> includes
|
#
127135 |
|
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
#
119690 |
|
02-Sep-2003 |
jhb |
Use PCIR_BAR(x) instead of PCIR_MAPS.
Glanced over by: imp, gibbs Tested by: i386 LINT
|
#
119418 |
|
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
#
119277 |
|
22-Aug-2003 |
imp |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
#
117126 |
|
01-Jul-2003 |
scottl |
Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please let me know right away.
Reviewed by: tmm, gibbs
|
#
112946 |
|
01-Apr-2003 |
phk |
Use bioq_flush() to drain a bio queue with a specific error code. Retain the mistake of not updating the devstat API for now.
Spell bioq_disksort() consistently with the remaining bioq_*().
#include <geom/geom_disk.h> where this is more appropriate.
|
#
111979 |
|
08-Mar-2003 |
phk |
Centralize the devstat handling for all GEOM disk device drivers in geom_disk.c.
As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
|
#
107756 |
|
11-Dec-2002 |
emoore |
(1) Problem: PANIC when loading/unloading driver as module. This also fix's issue kern/45713. Fix - polling was implemented incorrectly for adapter enquiry and adapter flush. (2) Problem: PANIC when unloading driver as module. Fix - device nodes are not destroyed for amr0, and amrd* when driver is unloaded (3) Problem: PANIC from loading driver when 3ware adapter present, error message "Warning "amrd is usurping twed's bmaj" Fix - put #idef freebsd version < 500000 for bmaj -1 -> amrd_cdevsw (4) Problem: warnings in driver when compiling with DAMR_DEBUG param enabled in Makefile Fix - fix the warnings so driver can compile when -Werror is present in Makefile.
Approved by: jhb MFC: 7 days
|
#
107141 |
|
21-Nov-2002 |
emoore |
Added support for DELL Perc4/DI.
Reviewed by: ps Approved by: jhb MFC after: 5 days
|
#
106225 |
|
30-Oct-2002 |
emoore |
amr.c, amr_cam.c, amrreg.h, amrvar.h: - added support for 12/16 byte cdb's, effecting CAM branch only ( non-disk support )
amrreg.h: - increased number of scatter gather elements from 16 to 26.
amr_pci.c: - amr_pci_free(), incorrect bus tag meant for 'amr_mailbox_dmat' was being freed
all: - copyright change requested by scottl
Reviewed by: ps,scottl MFC after: 1 week
|
#
105419 |
|
18-Oct-2002 |
emoore |
(1) added LSI Logic copyright, and legal line 3 in license, and string changes for "LSILogic" (2) enabled non-disk support through CAM interface (3) HA_INQ (a) enabled tagged queuing (b) disable reset during driver loading (b) renamed BSDi string to LSI (4) disabled detecting disk devices during SCSI INQUIRY (5) changed dcdb single element sglist to send one entire buffer chunk (6) nsgelem not set in sglist (7) ap_data_transfer_length not set for dcdb (8) changed "struct thread" to "d_thread_t" for compatibliity { xxx_open, xxx_close, xxx_ioctl } (9) miscellaneous compatiblity fixes (10) bug fix for 0x0409/0x1000 card (11) added compiling amr_cam.c in sys/conf/files (12) added compiling amr_cam.c in sys/modules/amr/Makefile
Reviewed by:ps MFC after:1 week 1 week
|
#
102633 |
|
30-Aug-2002 |
gibbs |
Add IDs for upcoming LSI U320 products that use the MegaRAID interface.
Adjust format of one comment so it doesn't wrap at 80 columns. Submitted by: "Moore, Eric Dean" <emoore@lsil.com>
|
#
89055 |
|
08-Jan-2002 |
msmith |
Staticise the amr devclass.
|
#
73280 |
|
01-Mar-2001 |
markm |
Turn on interrupt-entropy harvesting for all/any mass storage devices I could find. I have no doubt missed a couple.
Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
|
#
70285 |
|
22-Dec-2000 |
msmith |
Probe generic i960 devices for the old AMI signature as well as the current one, in order to support adapters with older firmware.
Submitted by: "Prasanth S." <prasanths@ami.co.in>
|
#
67782 |
|
28-Oct-2000 |
msmith |
Return -10 from the PCI probe to allow room for an updated driver to override one built into the kernel.
|
#
65245 |
|
30-Aug-2000 |
msmith |
Major update to the AMI MegaRAID driver.
- New support for 40LD firmware found in Series 475 and 471 adapters. - Better support for 8LD firmware adapters - Ioctl passthrough interface for userland utilities. - Improved error handling and queueing. - Several bugfixes (including the 'still open' shutdown bug and closing some small race conditions). - Zone-style command allocator, reducing memory wasted under heavy load conditions. - CAM interface (disabled and not fully working) for SCSI passthrough access to non-disk devices
Thanks to AMI for supplying a pile of new adapters and various other help in making this happen.
|
#
60041 |
|
05-May-2000 |
phk |
Separate the struct bio related stuff out of <sys/buf.h> into <sys/bio.h>.
<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes.
Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data.
Still a few bogus uses of struct buf to track down.
Repocopy by: peter
|
#
59391 |
|
19-Apr-2000 |
phk |
Remove ~25 unneeded #include <sys/conf.h> Remove ~60 unneeded #include <sys/malloc.h>
|
#
58883 |
|
31-Mar-2000 |
msmith |
Update to latest working version.
- Add periodic status monitoring routine. Currently just detects lost commands, further functionality pending data from AMI. Add some new commands states; WEDGED (never coming back) and LATE (for when a command that wasmarked as WEDGED comes bacj,
- Remove a number of redundant efforts to poll the card for completed commands. This is what interrupt handlers are for.
- Limit the maximum number of outstanding I/O transactions. It seems that some controllers report more than they can really handle, and exceding this limit can cause the controller to lock up.
- Don't use 'wait' mode for anything where the controller might not be able to generate interrupts. (Keep the 'wait' mode though sa it will become useful when we start taking userspace commands.
- Use a similar atomic locking trategy to the Mylex driver to prevent some reentrancy problems.
- Correctly calculate the block count for non-whoile-bloch transfers (actually illegal).
- Use the dsik device's si_drv1 field instead of b_driver1 in the buf struct to pass the driver identifier arond.
- Rewrite amr_start and amr_done() along the lines of the Mylex driver in order to improve robustnes.
- Always force the PCI busmaster bit on.
|
#
51974 |
|
07-Oct-1999 |
msmith |
This is a driver for the AMI MegaRAID family of controllers. It all of the AMI PCI controllers using the 8LD firmware interface (40LD firmware will be supported as soon as I have hardware to test with).
These controllers are rebadged by Dell as the PERC, as well as by HP and possibly other vendors.
|