aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ida/ida.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove now-redundant calls to device_delete_childrenJohn Baldwin2025-01-021-3/+0
| | | | | | | Earlier calls to bus_generic_detach now take care of deleting children. Differential Revision: https://reviews.freebsd.org/D47962
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-061-1/+1
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-251-1/+1
| | | | Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Create wrapper for Giant taken for newbusWarner Losh2021-12-101-2/+2
| | | | | | | | | | | Create a wrapper for newbus to take giant and for busses to take it too. bus_topo_lock() should be called before interacting with newbus routines and unlocked with bus_topo_unlock(). If you need the topology lock for some reason, bus_topo_mtx() will provide that. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D31831
* ida: Use ida lock instead of Giant for bus_dma allocationWarner Losh2021-09-301-1/+1
| | | | | | | | It looks like a reference to Giant was overloooked when jhb made this MPSAFE in 6b5b57ae9f8f. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31841
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Resolve LINT linking issue by renaming ida_init() to ida_setup(). TheHans Petter Selasky2016-05-111-1/+1
| | | | | | | | | | ida_init() symbol name is now taken for use by the LinuxKPI. Reported by: emaste @ Discussed with: mav @ Notes: svn path=/head/; revision=299471
* Remove MAXBSIZE use from drivers where it has nothing to do.Alexander Motin2015-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 Notes: svn path=/head/; revision=280347
* Rework the DMA handling in ida(4) and add locking to make this driverJohn Baldwin2012-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 Notes: svn path=/head/; revision=239740
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-291-2/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Test for NULL before use.Matthew N. Dodd2005-04-131-12/+11
| | | | | | | Submitted by: sam (Coverity) Notes: svn path=/head/; revision=145024
* Add KASSERT() to warn against NULL deref.Matthew N. Dodd2005-04-131-0/+1
| | | | | | | Submitted by: sam (Coverity) Notes: svn path=/head/; revision=145023
* Whitespace cleanup.Matthew N. Dodd2005-04-131-17/+17
| | | | Notes: svn path=/head/; revision=144991
* Add a callout to dump card status on command queue timeouts.Matthew N. Dodd2004-12-141-1/+44
| | | | Notes: svn path=/head/; revision=138853
* Reformat arguments bus_dma_tag_create().Matthew N. Dodd2004-12-141-15/+30
| | | | Notes: svn path=/head/; revision=138851
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-1/+1
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Device megapatch 4/6:Poul-Henning Kamp2004-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. Notes: svn path=/head/; revision=126080
* Add a per controller IOCTL interface.Matthew N. Dodd2004-01-151-1/+118
| | | | Notes: svn path=/head/; revision=124540
* Insure values of adapter structure members are in correct byte order.Matthew N. Dodd2004-01-151-6/+7
| | | | Notes: svn path=/head/; revision=124538
* Handle "Bad Command List" errors.Matthew N. Dodd2004-01-121-0/+3
| | | | | | | | No error status is returned by the adapter so set CMD_REJECTED so that ida_done() will DTRT. Notes: svn path=/head/; revision=124449
* Remove comments that no longer apply.Matthew N. Dodd2004-01-121-4/+0
| | | | Notes: svn path=/head/; revision=124447
* - Initialize qcb flags in ida_construct_qcb() with respect to DMA direction.Matthew N. Dodd2004-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(). Notes: svn path=/head/; revision=124423
* Use __FBSDID().David E. O'Brien2003-08-241-2/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Mega busdma API commit.Scott Long2003-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 Notes: svn path=/head/; revision=117126
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though theScott Long2003-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) Notes: svn path=/head/; revision=115343
* I deserve a big pointy hat for having missed all those referencesMaxime Henrion2003-04-101-3/+3
| | | | | | | to bus_dmasync_op_t in my last commit. Notes: svn path=/head/; revision=113350
* Use bioq_flush() to drain a bio queue with a specific error code.Poul-Henning Kamp2003-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. Notes: svn path=/head/; revision=112946
* Including <sys/stdint.h> is (almost?) universally only to be able to usePoul-Henning Kamp2003-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. Notes: svn path=/head/; revision=112367
* Centralize the devstat handling for all GEOM disk device driversPoul-Henning Kamp2003-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. Notes: svn path=/head/; revision=111979
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).Dag-Erling Smørgrav2003-03-021-1/+1
| | | | Notes: svn path=/head/; revision=111748
* NO_GEOM cleanup:Poul-Henning Kamp2003-02-231-0/+1
| | | | | | | | | Move ida driver to "struct disk *" centric api. Retire major number 109. Notes: svn path=/head/; revision=111337
* Use [u]intmax_t and %j instead of long long and %ll to better fix warningsJohn Baldwin2002-11-071-1/+2
| | | | | | | | | I fixed earlier. Requested by: mux, jake Notes: svn path=/head/; revision=106591
* Cast a bus_addr_t to a long long to make printf happy.John Baldwin2002-11-061-1/+1
| | | | Notes: svn path=/head/; revision=106536
* No need to conditionalize on pci being in the kernel for thisWarner Losh2002-03-201-4/+0
| | | | Notes: svn path=/head/; revision=92820
* Add crashdump support.Jonathan Lemon2001-02-261-19/+23
| | | | | | | Tested by: ps Notes: svn path=/head/; revision=73113
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-2/+2
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* The DEC version of the Smart controller has its configuration informationJonathan Lemon2000-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. Notes: svn path=/head/; revision=63934
* Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp2000-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 Notes: svn path=/head/; revision=60041
* Remove unneeded #include <sys/kernel.h>Poul-Henning Kamp2000-04-291-1/+0
| | | | Notes: svn path=/head/; revision=59760
* - Fix a problem with the cdevsw struct that prevented the kernel fromMatthew N. Dodd2000-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 Notes: svn path=/head/; revision=59485
* Complete the bio/buf divorce for all code below devfs::strategyPoul-Henning Kamp2000-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 Notes: svn path=/head/; revision=59249
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.Poul-Henning Kamp2000-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. Notes: svn path=/head/; revision=58934
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp2000-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. Notes: svn path=/head/; revision=58345
* Add support for older EISA compaq cards and newer Smart 4200 cards.Jonathan Lemon2000-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 Notes: svn path=/head/; revision=57828
* Remove the 'ivars' arguement to device_add_child() andMatthew N. Dodd1999-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 Notes: svn path=/head/; revision=54073
* Removal of sys/device.hNick 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. Notes: svn path=/head/; revision=51957
* Fix various trivial warnings from LINTPoul-Henning Kamp1999-08-281-0/+2
| | | | Notes: svn path=/head/; revision=50523