summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx
Commit message (Collapse)AuthorAgeFilesLines
* Replace all calls to minor() with dev2unit().ed2008-09-271-3/+3
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Make mlxcontrol work with more than one system drive:sepotvin2008-09-121-1/+1
| | | | | | | | | | | | | - When searching for the next system drive, return the next one instead of always returning the first one. - Plug fd lead and make sure that the MLX_NEXT_CHILD ioctl is called on the controller fd, not the disk's one. While there, fix a cut-n-pase error in a warning. Reviewed by: jhb Approved by: kan (mentor) MFC after: 1 month
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | 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@
* Add missing parenthesis around error handling code upon attachingcsjp2005-07-301-1/+2
| | | | | | | | | | mlx devices. This fixes an issue where mlx device drives fail to be detected at system boot. This is a RELENG_6 candidate. Submitted by: oliver PR: kern/84163
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-292-4/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* plug resource leaksam2005-03-311-2/+4
| | | | | Submitted by: mdodd Noticed by: Coverity Prevent analysis tool
* fix potential null ptr derefsam2005-03-311-1/+1
| | | | Noticed by: Coverity Prevent analysis tool
* avoid null ptr derefsam2005-03-311-1/+1
| | | | Noticed by: Coverity Prevent analysis tool
* Don't call mlx_free() i mlx_attach() in case of failure. Doing sophk2005-03-262-10/+1
| | | | | | in mlx_attach_pci() is much cleaner. Inspired by: Coverity
* If mlx_attach() returns an error, don't free sc again.das2005-03-181-3/+1
| | | | | Spotted by: Ted Unangst using the Coverity Prevent static analysis tool Reviewed by: scottl
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* Don't use PAGE_SIZE to calculate controller-specific attributes.scottl2004-11-252-2/+3
| | | | | | PR: kern/21220 Submitted by: Dennis Lindroos MFC After: 1 week
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-5/+5
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-302-0/+2
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-172-4/+8
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Change another pointer name that was missed in the previous commit.scottl2004-03-011-1/+1
| | | | Spotted by: njl
* Check and free the actual pointer the was used in a malloc instead ofscottl2004-03-011-2/+2
| | | | | | checking and freeing a different pointer that may or may not have been assigned the same value. This should fix panics under load that were recently reported.
* Don't free meo until we're finished using it.cperciva2004-02-221-1/+1
| | | | | Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor), scottl
* Device megapatch 4/6:phk2004-02-211-1/+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.
* Device megapatch 1/6:phk2004-02-211-2/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* Change the disk(9) API in order to make device removal more robust.phk2004-02-182-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Prepare for locking mlx(4) by cleaning up the use of busdma. No realscottl2003-09-022-155/+243
| | | | functional changes should result from this.
* Use __FBSDID().obrien2003-08-242-3/+6
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-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.
* Don't provide a mutex in the S/G list dma tag since it will never be defered.scottl2003-08-091-7/+9
| | | | Fix some nearby style.
* Mega busdma API commit.scottl2003-07-012-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-013-3/+6
| | | | | | | | 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.
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-085-12/+2
| | | | | | | | 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/+5
| | | | | | | | | | | | | 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)
* Chase the musical variable names.jhb2003-02-251-2/+2
| | | | | Pointy hat to: jhb Reported by: des
* Limit the maximum I/O size to 8 pages for version 2 controllers. Thisjhb2003-02-251-4/+8
| | | | | | fixes problems with some mlx(4) cards in Alpha machines. Reviewed by: msmith (ages ago)
* Fix a small fat-finger: s/mlxd/mxld/.jhb2003-02-251-1/+1
| | | | Reported by: Bob Willcox <bob@immure.com>
* NO_GEOM cleanup:phk2003-02-253-43/+21
| | | | | Move to "struct disk*" centric API. Retire major #131 (mlxd)
* 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.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* use __packed.alfred2002-09-231-16/+16
|
* (This commit touches about 15 disk device drivers in a very consistentphk2002-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.
* Make FreeBSD "struct disklabel" agnostic, step 311 of 723:phk2002-09-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixed printf format errors in previous commit. %llu is no more suitablebde2002-03-181-2/+4
| | | | | | | | | | | | than %u for printing signed 64-bit types. It fails on different machines, and has the wrong signdness. Fixed old printf format error on the same line. %u is not suitable for printing 32-bit types on all machines. "Fixed" format printf error in previous commit. This file is not formatted in KNF. Partially restore bug for bug compatibility: indent the printf args too much, but don't format them for 160-column terminals.
* Formats that print the block number need to be changed from %u toimp2002-03-181-2/+2
| | | | %llu due to recent changes in bio_pblkno's type.
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-102-3/+3
| | | | also don't use ANSI string concatenation.
* KSE Milestone 2julian2001-09-123-10/+11
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Fix some signed/unsigned integer confusion, and add bounds checking ofkris2001-09-101-0/+2
| | | | | | | | arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks
* Driver modifications consistent with my other drivers to facilitatemsmith2001-06-255-41/+115
| | | | | | the use of a single set of sources across 4.x and 5.x branches. No significant code changes.
* Fix warning: 193: warning: label `done' defined but not usedpeter2001-06-151-1/+0
|
* Make the disk mini-layer check for and handle zero-length transfersphk2001-05-061-4/+0
| | | | instead of the underlying drivers.
* Actually biofinish(struct bio *, struct devstat *, int error) is more generalphk2001-05-061-2/+1
| | | | | | than the bioerror(). Most of this patch is generated by scripts.
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-262-3/+0
| | | | the bit-bucket.
* Turn on interrupt-entropy harvesting for all/any mass storage devicesmarkm2001-03-011-1/+1
| | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
OpenPOWER on IntegriCloud