summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac
Commit message (Collapse)AuthorAgeFilesLines
* Change the disk(9) API in order to make device removal more robust.phk2004-02-183-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fall back to INTR_MPSAFE if INTR_FAST registration fails.scottl2004-02-091-2/+8
| | | | PR: kern/62276
* Remove the use of AACQ_COMPLETE here since there is no longer a completionscottl2004-02-071-3/+0
| | | | queue.
* Do some small cleanups to comments and remove AACQ_COMPLETE definitions sincescottl2004-02-073-7/+4
| | | | the completion queue is long-gone.
* Remove the hack of lowering AAC_MAX_FIB now that the root cause of thescottl2004-02-071-1/+1
| | | | problem was found.
* If a command has to be deferred because there are no more resources for itscottl2004-02-071-9/+11
| | | | | | | | | | | on the card, unmap it first. This allows it to be picked up properly when the queue gets kicked again. This was the root problem for the lost command (i.e. stuck in getblk/vinvalb) problem. While here, panic if commands don't map correctly instead of just silently ignoring the problem and dropping command. Also slow down the dynamic allocation of new commands. It should be safe to go back into the aac waters. Thanks to everyone who suffered through this and provided good feedback.
* Reduce AAC_MAX_FIBS to work around some yet-unidentified bugs in thescottl2004-02-071-1/+1
| | | | | | | | handling of resources shortages. The driver is now so fast that it can completely fill all 512 slots on the card, but for some reason only 511 slots are being allocated. Anything that tries to go into the 512th slot gets silently lost. Both bugs need to be fixed at a later date, but this should fix the reports of hangs in getblk and vinvalb.
* - Broaden the scope of locking in aac_command_thread() again to catch somescottl2004-02-071-11/+17
| | | | | | | | | edge cases in the loop. - Try to grab a command before dequeueing the bio from the bioq. The old behaviour of requeuing deferred bios to the end of the bioq is arguably wrong. This should be fixed in the future to check the bioq head without automatically dequeueing the bio.
* Add an #ifdef _KERNEL so that this file can be used from userland.scottl2004-02-071-1/+2
|
* Make LINT compile on amd64peter2004-02-061-2/+2
|
* Take the plunge and make this driver be INTR_FAST. This re-arranges thescottl2004-01-303-61/+55
| | | | | | | | | interrupt handler so that no locks are needed, and schedules the command completion routine with a taskqueue_fast. This also corrects the locking in the command thread and removes the need for operation flags. Simple load tests show that this is now considerably faster than FreeBSD 4.x in the SMP case when multiple i/o tasks are running.
* Temporary workaround for aac_cam to deal with CAM requiring Giant. Thisscottl2003-12-031-1/+9
| | | | | | should fix the panics on boot with newer Adaptec RAID cards. Approved by: re (rwatson)
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-11-091-1/+1
| | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current
* Remove a bogus PCI ID entry.scottl2003-11-011-2/+0
|
* Change all SYSCTLS which are readonly and have a related TUNABLEsilby2003-10-211-1/+1
| | | | | from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide more useful error messages.
* Fix a couple of bugs with AIF handling:scottl2003-10-172-14/+19
| | | | | | | | | | - Correct the logic for the AIF array index pointers so that correct slot is always looked at. - Copy the full FIB payload size when copying AIF's, not just the first 64 bytes. Thanks to Mirapoint, Inc, for pointing these problems out and offering a solution.
* Eliminate the use of a statically assign major number for the aac device.scottl2003-09-291-3/+0
|
* Correctly wrap the producer queue index when dequeuing commands. This wasn'tscottl2003-09-161-1/+5
| | | | | | | | | | a problem for command responses since we rarely ever filled the queue. However, adapter-initiated commands have a much smaller queue and could tickle this bug. It's possible that this might fix the recently reported problems with the aac-2120s, though I haven't been able to reproduce the problem locally. MFC-After: 1 day
* Use PCIR_BAR() instead of a magic offset.scottl2003-09-091-1/+1
|
* Commands submitted through the management interface won't have scatter/scottl2003-09-011-0/+2
| | | | | gather lists. Stop ignoring them and instead call the callback directly. This unbreaks the management interface.
* If ~ chars were pennies, I'd be pennyless. This should fix all of thescottl2003-09-011-2/+3
| | | | 'command not in queue' panics. Also fix a nearby style problem.
* Use __FBSDID().obrien2003-08-246-12/+18
| | | | Also some minor style cleanups.
* Prefer the new location of dev/pci/pci*.h.imp2003-08-221-2/+2
|
* Fix build by correcting a wrong cast.mux2003-08-201-1/+1
|
* Make aac(4) compile cleanly on 64-bit machines. The code was already 64-bitscottl2003-08-193-18/+20
| | | | | safe, but some (unneeded and/or harmless) downcasts were generating warnings. The driver still is not endian-clean.
* Consistently use the BSD u_int and u_short instead of the SYSV uint andjhb2003-08-071-1/+1
| | | | | | | ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c)
* Handle the EINPROGRESS case of bus_dmamap_load() for data buffers.scottl2003-07-092-49/+54
|
* Fix a missing } that got dropped from the last commit.scottl2003-07-091-0/+1
|
* Add a new quirk for cards that incorrectly interpret the amount of memoryscottl2003-07-093-3/+12
| | | | in the system. This might also have a small performance gain.
* Mega busdma API commit.scottl2003-07-012-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixing some glaring problems with aac_disk_dump().scottl2003-06-191-2/+18
| | | | | | | | | | - Mark that it cannot handle greater than 4GB of RAM at this time. Fixing that will come later. Fail any attempts to dump above thati limit. - If a call to aac_disk_dump() needs to be split into multiple i/o's, increment the virtual offset after each i/o instead of just dumping the same offset over and over again. - Bail out if bus_dmamap_load() returns an error. Error recovery is likely not possible.
* When scanning for changed containers, don't assume that the controllerscottl2003-06-031-7/+10
| | | | | | | will respond in a sane manner. Thanks to Petri Helenius <pete@he.iki.fi> for spotting this and pestering me to fix it.
* Add support for the upcoming 2410SA card.scottl2003-05-301-0/+2
| | | | Approved by: re (telecon)
* Don't pass pointers to kernel data structures through 32-bit fieldsscottl2003-04-281-13/+51
| | | | | | as 64-bit architectures won't like this. Use virtual array indexes instead. This *should* allow the driver to work on 64-bit platforms, though it's still not endian clean.
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-013-3/+4
| | | | | | | | 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.
* Include <sys/conf.h> rather than trusting <sys/disk.h> to do so.phk2003-04-011-0/+1
|
* Add the ability to send 64-bit scatter/gather elements to aac cards. Thisscottl2003-03-301-39/+78
| | | | | | | is enabled when both the size of bus_addr_t > 4 and the card claims support. Don't wake up the kthread to allocate more commands if we know that we've already allocated the max number of commands.
* Begin support for 64-bit address support and workarounds for newer cards:scottl2003-03-265-107/+212
| | | | | | | | | | | | | | | | | - Add data structuress for doing 64-bit scatter/gather - Move busdma tag creations around so that only the parent is created in aac_pci.c. - Retrieve the capabilities word from the firmware before setting up command structures and tags. This allows the driver to decide whether to do 64-bit commands, and if work-arounds are needed for systems with >2GB of RAM. - Only enable the SCSI passthrough if it's enabled in the capabilities word in the firmware. This should fix problems with the 2120S and 2200S cards in systems with more than 2GB of RAM. Full 64-bit support is forthcoming. MFC-After: 1 week
* Now that bus_dmamem_alloc() handles its Giant mutex requirements itself,scottl2003-03-131-2/+0
| | | | don't bother doing the same in the code that calls it.
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-086-14/+0
| | | | | | | | 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.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+6
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* The aac driver has evolved enough over the last few months that it noscottl2003-03-015-126/+15
| | | | | longer resembles the 4.x version very much. Garbage collect the legacy bits.
* Bring aac out from under Giant:scottl2003-02-264-18/+46
| | | | | | | | | | | | | | - the mutex aac_io_lock protects the main codepaths which handle queues and hardware registers. Only one acquire/release is done in the top-half and the taskqueue. This mutex also applies to the userland command path and CAM data path. - Move the taskqueue to the new Giant-free version. - Register the disk device with DISKFLAG_NOGIANT so the top-half processing runs without Giant. - Move the dynamic command allocator to the worker thread to avoid locking issues with bus_dmamem_alloc(). This gives about 20% improvement in most of my benchmarks.
* Introduce a new taskqueue that runs completely free of Giant, and inscottl2003-02-261-1/+1
| | | | | | | turns runs its tasks free of Giant too. It is intended that as drivers become locked down, they will move out of the old, Giant-bound taskqueue and into this new one. The old taskqueue has been renamed to taskqueue_swi_giant, and the new one keeps the name taskqueue_swi.
* Use BUS_SPACE_MAXADDR_32BIT in the DMA tag where needed. Before the recentscottl2003-02-261-2/+2
| | | | fix to BUS_SPACE_MAXADDR, we were probably bouncing quite a bit =-(
* Move to 'struct disk*' APIscottl2003-02-263-50/+26
| | | | Submitted by: phk
* NO_GEOM cleanup:phk2003-02-211-3/+5
| | | | | | | | | | | | | Retire the "d_dump_t" and use the "dumper_t" type instead. Dumper_t takes a void * as first arg which is more general than the dev_t taken by d_dump_t. (Remember: we could have net-dumpers if somebody wrote us one!) Define the convention for GEOM controlled disk devices to be that the first argument to the dumper function is the struct disk pointer. Change device drivers accordingly.
* NO_GEOM cleanup:phk2003-02-211-1/+1
| | | | | | | | Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes. This enables drivers to ignore the (now) bogus dev_t which disk_create() returns.
* On detach, don't remove the child from our list of children unless it hasscottl2003-02-201-1/+1
| | | | successfully detached.
* The completion queue is no longer used, so nuke its associated codescottl2003-02-202-4/+0
| | | | and data structures.
OpenPOWER on IntegriCloud