aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ida
Commit message (Collapse)AuthorAgeFilesLines
* Rework the DMA handling in ida(4) and add locking to make this driverJohn Baldwin2012-08-275-176/+275
| | | | | | | | | | | | | | | | | | 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
* Convert a number of drivers to obtaining their parent DMA tag from theirScott Long2012-03-121-1/+1
| | | | | | | PCI device attachment. Notes: svn path=/head/; revision=232854
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-3/+1
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=227843
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-232-2/+2
| | | | | | | | | | | | | | | | 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@ Notes: svn path=/head/; revision=166901
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-294-7/+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
* Define additional commands.Matthew N. Dodd2005-04-131-0/+15
| | | | | | | Obtained from: Linux Notes: svn path=/head/; revision=144992
* Whitespace cleanup.Matthew N. Dodd2005-04-135-33/+33
| | | | Notes: svn path=/head/; revision=144991
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-051-1/+1
| | | | Notes: svn path=/head/; revision=143160
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Add a callout to dump card status on command queue timeouts.Matthew N. Dodd2004-12-142-1/+48
| | | | Notes: svn path=/head/; revision=138853
* Modify ida_v3_done() to treat FIFO status of -1 as FIFO empty (0).Matthew N. Dodd2004-12-141-1/+7
| | | | | | | | This is what ida_v4_done() does and seems to be necessary with some firmware versions on v3 devices. Notes: svn path=/head/; revision=138852
* Reformat arguments bus_dma_tag_create().Matthew N. Dodd2004-12-142-21/+45
| | | | Notes: svn path=/head/; revision=138851
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-162-2/+2
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-303-0/+3
| | | | Notes: svn path=/head/; revision=129879
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-172-8/+8
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* 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
* Change the disk(9) API in order to make device removal more robust.Poul-Henning Kamp2004-02-182-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=125975
* Add a per controller IOCTL interface.Matthew N. Dodd2004-01-153-1/+142
| | | | Notes: svn path=/head/; revision=124540
* - Add comments.Matthew N. Dodd2004-01-152-34/+188
| | | | | | | | | - Add more command defines and data structures. - Re-organize struct ida_drive_info to factor out struct ida_drive_info which will be used elsewhere. Notes: svn path=/head/; revision=124539
* Insure values of adapter structure members are in correct byte order.Matthew N. Dodd2004-01-151-6/+7
| | | | Notes: svn path=/head/; revision=124538
* Initialize drive device_t in softc.Matthew N. Dodd2004-01-131-0/+1
| | | | Notes: svn path=/head/; revision=124500
* style(9): single tab after #define.Matthew N. Dodd2004-01-134-67/+67
| | | | Notes: svn path=/head/; revision=124471
* 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 PCIR_BAR(x) instead of PCIR_MAPS.John Baldwin2003-09-021-2/+2
| | | | | | | | Glanced over by: imp, gibbs Tested by: i386 LINT Notes: svn path=/head/; revision=119690
* Use __FBSDID().David E. O'Brien2003-08-243-6/+9
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Prefer new location of pci include files (which have only been in theWarner Losh2003-08-221-2/+2
| | | | | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD. Notes: svn path=/head/; revision=119280
* Initialize bp->bio_driver1 in idad_strategy().Matthew N. Dodd2003-08-081-0/+1
| | | | | | | | | | | Removed by accident in 1.38. This fixes the trap 12 everyone was seeing in ida_construct_qcb(). PR: kern/53245 Notes: svn path=/head/; revision=118678
* Mega busdma API commit.Scott Long2003-07-013-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-014-4/+8
| | | | | | | | | | | 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-085-13/+1
| | | | | | | | | | | 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-234-66/+18
| | | | | | | | | Move ida driver to "struct disk *" centric api. Retire major number 109. Notes: svn path=/head/; revision=111337
* Fix the detach code to actually detach the disk instance createdPoul-Henning Kamp2003-02-231-5/+1
| | | | | | | during attach. Notes: svn path=/head/; revision=111336
* Remove a goto the very next statement.Poul-Henning Kamp2003-02-231-3/+0
| | | | Notes: svn path=/head/; revision=111335
* NO_GEOM cleanup:Poul-Henning Kamp2003-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. Notes: svn path=/head/; revision=111220
* Update to new crashdump APIPaul Saab2003-02-071-38/+9
| | | | Notes: svn path=/head/; revision=110483
* 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
* use __packed.Alfred Perlstein2002-09-231-3/+3
| | | | Notes: svn path=/head/; revision=103870
* (This commit touches about 15 disk device drivers in a very consistentPoul-Henning Kamp2002-09-201-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.) If struct disklabel is the messenger: kill the messenger. Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead. Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels. Once that is clear, <sys/disk.h> which is included in the drivers no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in, the few places that needs them, have gotten explicit #includes for them. The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it. This concludes (modulus any mistakes) the series of disklabel related commits. I belive it all amounts to a NOP for all the rest of you :-) Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103714
* Here follows the new kernel dumping infrastructure.Poul-Henning Kamp2002-03-311-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caveats: The new savecore program is not complete in the sense that it emulates enough of the old savecores features to do the job, but implements none of the options yet. I would appreciate if a userland hacker could help me out getting savecore to do what we want it to do from a users point of view, compression, email-notification, space reservation etc etc. (send me email if you are interested). Currently, savecore will scan all devices marked as "swap" or "dump" in /etc/fstab _or_ any devices specified on the command-line. All architectures but i386 lack an implementation of dumpsys(), but looking at the i386 version it should be trivial for anybody familiar with the platform(s) to provide this function. Documentation is quite sparse at this time, more to come. Details: ATA and SCSI drivers should work as the dump formatting code has been removed. The IDA, TWE and AAC have not yet been converted. Dumpon now opens the device and uses ioctl(DIOCGKERNELDUMP) to set the device as dumpdev. To implement the "off" argument, /dev/null is used as the device. Savecore will fail if handed any options since they are not (yet) implemented. All devices marked "dump" or "swap" in /etc/fstab will be scanned and dumps found will be saved to diskfiles named from the MD5 hash of the header record. The header record is dumped in readable format in the .info file. The kernel is not saved. Only complete dumps will be saved. All maintainer rights for this code are disclaimed: feel free to improve and extend. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=93496
* No need to conditionalize on pci being in the kernel for thisWarner Losh2002-03-202-6/+0
| | | | Notes: svn path=/head/; revision=92820
* Fix a signed bug in the crashdump code for systems with > 2GB of ram.Paul Saab2001-11-131-1/+1
| | | | | | | Reviewed by: peter Notes: svn path=/head/; revision=86313