#
259065 |
|
07-Dec-2013 |
gjb |
- Copy stable/10 (r259064) to releng/10.0 as part of the 10.0-RELEASE cycle. - Update __FreeBSD_version [1] - Set branch name to -RC1
[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so start releng/10.0 at '100' so the branch is started with a value ending in zero.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
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.
|
#
210570 |
|
28-Jul-2010 |
mdf |
Fix clang warning on empty statement.
Reviewed by: rdivacky, zml Approved by: zml (mentor)
|
#
184573 |
|
02-Nov-2008 |
scottl |
Move the CAM passthrough code into a true module so that it doesn't have to be compiled into the main AMR driver. It's code that is nice to have but not required for normal operation, and it is reported to cause problems for some people.
|
#
175622 |
|
24-Jan-2008 |
scottl |
Many improvements that have been collected over time:
- Improve error handling for load operations. - Fix a memory corruption bug when using certain linux management apps. - Allocate all commands up front to avoid OOM deadlocks later on.
|
#
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.
|
#
158267 |
|
03-May-2006 |
ambrisko |
Make amr_linux work as a module by avoiding calling amr_linux_ioctl_int from the amr_linux. This simplifies the amr_linux shim and puts the smarts into amr.c.
I tested this with 2 amr controllers in one box. It seems to work okay with them.
|
#
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
|
#
155222 |
|
02-Feb-2006 |
ps |
- Move the command setup from amr_start1 into the card specific submit routines. - Add or replace cpu_spinwait() with DELAY(1) to a few of the busy loops when reading from the controller to work around firmware bugs which can crash the controller.
|
#
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
|
#
148841 |
|
07-Aug-2005 |
scottl |
Remove a stale __FreeBSD_version check.
|
#
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.
|
#
139952 |
|
10-Jan-2005 |
dwhite |
Free the shared devq last since CAM expects it to be there if xpt_alloc_device() gets called, which can happen during detach in certain situations. Fixes module unload.
MFC after: 3 days
|
#
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.
|
#
131394 |
|
01-Jul-2004 |
ps |
Use a separate flag when doing a kernel coredump when polling for completion instead of abusing the interrupt enable flag.
|
#
130585 |
|
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
#
125975 |
|
18-Feb-2004 |
phk |
Change the disk(9) API in order to make device removal more robust.
Previously the "struct disk" were owned by the device driver and this gave us problems when the device disappared and the users of that device were not immediately disappearing.
Now the struct disk is allocate with a new call, disk_alloc() and owned by geom_disk and just abandonned by the device driver when disk_create() is called.
Unfortunately, this results in a ton of "s/\./->/" changes to device drivers.
Since I'm doing the sweep anyway, a couple of other API improvements have been carried out at the same time:
The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to DISKFLAG_NEEDSGIANT
A version number have been added to disk_create() so that we can detect, report and ignore binary drivers with old ABI in the future.
Manual page update to follow shortly.
|
#
120988 |
|
10-Oct-2003 |
ps |
crashdump support.
Some bits by: Rajesh Prabhakaran <rajeshpr@lsil.com>
|
#
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.
|
#
111441 |
|
24-Feb-2003 |
phk |
NO_GEOM cleanup:
Move to new "struct disk *" centered API".
OK'ed by: emoore
|
#
111250 |
|
22-Feb-2003 |
phk |
Use the standard DISKFLAG_OPEN instead of implementing our own. Use noclose() instead now that our close method is empty.
|
#
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
|
#
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
|
#
103675 |
|
20-Sep-2002 |
phk |
Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.
Drop the by now entirely useless struct disklabel argument.
Add a flag argument for new-line termination.
Fix a couple of printf-format-casts to %j instead of %l.
Correctly print the name of all bio commands.
Move the function from subr_disklabel.c to subr_disk.c, and from <sys/disklabel.h> to <sys/disk.h>.
Use the new disk_err() throughout, #include <sys/disk.h> as needed.
Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.
Remove unused disklabel members of softc for aac, amr and mlx, which seem to originally have been intended for diskerr() use, but which only rotted and got Copy&Pasted at least two times to many.
Sponsored by: DARPA & NAI Labs.
|
#
89055 |
|
08-Jan-2002 |
msmith |
Staticise the amr devclass.
|
#
87599 |
|
10-Dec-2001 |
obrien |
Update to C99, s/__FUNCTION__/__func__/, also don't use ANSI string concatenation.
|
#
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.
|
#
60938 |
|
26-May-2000 |
jake |
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen.
Requested by: msmith and others
|
#
60833 |
|
23-May-2000 |
jake |
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk Reviewed by: phk Approved by: mdodd
|
#
59249 |
|
15-Apr-2000 |
phk |
Complete the bio/buf divorce for all code below devfs::strategy
Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case.
CCD not converted yet, casts to struct buf (still safe)
atapi-cd casts to struct buf to examine B_PHYS
|
#
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.
|
#
58496 |
|
23-Mar-2000 |
msmith |
Fix detection of the card-ready-for-command state. Use an ultimate timeout closer to the 1-second value that AMI use in their Linux driver, and mark the mailbox structures as volatile so that gcc doesn't over-optimise access to them.
This should fix the "controller wedged" bug.
Submitted by: Brian Dean <brdean@unx.sas.com>
|
#
52543 |
|
26-Oct-1999 |
msmith |
Change the queueing model used by the controller to drastically reduce the time spent at splbio(). We now avoid it unless we are actually manipulating the command queues themselves. This doesn't improve performance noticeably, but should improve concurrency somewhat.
|
#
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.
|