summaryrefslogtreecommitdiffstats
path: root/sys/dev/ida/ida.c
Commit message (Collapse)AuthorAgeFilesLines
* Resolve LINT linking issue by renaming ida_init() to ida_setup(). Thehselasky2016-05-111-1/+1
| | | | | | | ida_init() symbol name is now taken for use by the LinuxKPI. Reported by: emaste @ Discussed with: mav @
* Remove MAXBSIZE use from drivers where it has nothing to do.mav2015-03-221-1/+1
| | | | | | | In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead. MFC after: 1 month
* Rework the DMA handling in ida(4) and add locking to make this driverjhb2012-08-271-137/+251
| | | | | | | | | | | | | | | MPSAFE. - Preallocate a full set of QCBs during attach rather than allocating new ones on demand to avoid allocations in the I/O path. - Remove the explicit bus space tag/handle and use bus_*() on the relevant 'struct resource' instead. - Defer logical drive probing to an intrhook. - Fix ida_detach() to detach and delete child devices (logical drives). - Update the DMA handling to support EINPROGRESS by moving the work to submit a mapped request into the bus_dma callback routine as well as add support for freezing the queue when EINPROGRESS is encountered. Tested by: Marco Steinbach coco executive-computing de
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Test for NULL before use.mdodd2005-04-131-12/+11
| | | | Submitted by: sam (Coverity)
* Add KASSERT() to warn against NULL deref.mdodd2005-04-131-0/+1
| | | | Submitted by: sam (Coverity)
* Whitespace cleanup.mdodd2005-04-131-17/+17
|
* Add a callout to dump card status on command queue timeouts.mdodd2004-12-141-1/+44
|
* Reformat arguments bus_dma_tag_create().mdodd2004-12-141-15/+30
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-1/+1
| | | | Bump __FreeBSD_version accordingly.
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Add a per controller IOCTL interface.mdodd2004-01-151-1/+118
|
* Insure values of adapter structure members are in correct byte order.mdodd2004-01-151-6/+7
|
* Handle "Bad Command List" errors.mdodd2004-01-121-0/+3
| | | | | No error status is returned by the adapter so set CMD_REJECTED so that ida_done() will DTRT.
* Remove comments that no longer apply.mdodd2004-01-121-4/+0
|
* - Initialize qcb flags in ida_construct_qcb() with respect to DMA direction.mdodd2004-01-121-4/+16
| | | | | - Print operation type, if known in hard/soft error message in ida_done(). - NULL qcb struct bio pointer in ida_done().
* Use __FBSDID().obrien2003-08-241-2/+3
| | | | Also some minor style cleanups.
* Mega busdma API commit.scottl2003-07-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though thescottl2003-05-271-3/+3
| | | | | | | | BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'. Approved by: re (bmah)
* I deserve a big pointy hat for having missed all those referencesmux2003-04-101-3/+3
| | | | to bus_dmasync_op_t in my last commit.
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-1/+2
| | | | | | | | 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.
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-181-1/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-081-1/+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.
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-1/+1
|
* NO_GEOM cleanup:phk2003-02-231-0/+1
| | | | | | Move ida driver to "struct disk *" centric api. Retire major number 109.
* Use [u]intmax_t and %j instead of long long and %ll to better fix warningsjhb2002-11-071-1/+2
| | | | | | I fixed earlier. Requested by: mux, jake
* Cast a bus_addr_t to a long long to make printf happy.jhb2002-11-061-1/+1
|
* No need to conditionalize on pci being in the kernel for thisimp2002-03-201-4/+0
|
* Add crashdump support.jlemon2001-02-261-19/+23
| | | | Tested by: ps
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-2/+2
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* The DEC version of the Smart controller has its configuration informationjlemon2000-07-271-7/+14
| | | | | | | stored at a different location in the PCI space, so adjust accordingly. Also, when using more than two smart controllers in one machine, the disks were assigned the wrong drive number; fix this as well.
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-051-1/+1
| | | | | | | | | | | | | | | <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
* Remove unneeded #include <sys/kernel.h>phk2000-04-291-1/+0
|
* - Fix a problem with the cdevsw struct that prevented the kernel frommdodd2000-04-221-2/+2
| | | | | | | | | booting on a RAID volume. - Change 'id_foo' and 'idfoo' to 'idad_foo' and 'idadfoo'. This makes names more consistent with the devices that the code belongs to (more in line with the style used in the amr/mlx driver.) Reviewed by: jlemon
* Complete the bio/buf divorce for all code below devfs::strategyphk2000-04-151-12/+12
| | | | | | | | | | 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
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-021-1/+1
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Add support for older EISA compaq cards and newer Smart 4200 cards.jlemon2000-03-081-41/+57
| | | | | | | | | Change disk names to `idad' to avoid naming conflicts with the controller, and enable the new disk code to pick up the drives. Tested by: david.w.james@bt.com (existing compaq support) Reviewed by: msmith Approved by: jordan
* Remove the 'ivars' arguement to device_add_child() andmdodd1999-12-031-1/+1
| | | | | | | | | | | | | | | | device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function. This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc. Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree. Reviewed by: peter, dfr
* Removal of sys/device.hn_hibma1999-10-051-1/+0
| | | | | | | | | | | | | - Move intrhook stuff into kernel.h - Remove all occurrences of #device <device.h> - Add kernel.h were necessary (nowhere) - delete device.h This file contained the structures for cfdata (old style config) and is no longer used. It was included by most drivers. It confuses the remote debugger as the definition of 'struct device' in device.h is found before the one in bus_private.h.
* Fix various trivial warnings from LINTphk1999-08-281-0/+2
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Properly set the alignment argument to bus_dma_tag_create(). If wegibbs1999-08-161-3/+3
| | | | don't care about the alignment, set it to 1, meaning single byte alignment.
* Compaq Smart RAID driver for -current. Based on the original ida.cjlemon1999-06-241-0/+512
driver by Mark Dawson. This probably needs some work, but is stable enough to boot a RAID-only configuration, and survive `make world'.
OpenPOWER on IntegriCloud