summaryrefslogtreecommitdiffstats
path: root/sys/dev/twe
Commit message (Collapse)AuthorAgeFilesLines
* Replace all calls to minor() with dev2unit().ed2008-09-271-2/+2
| | | | | | | | | | | | | | | 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
* Add missing \n.brueffer2008-02-121-1/+1
| | | | | | | PR: 120341 Submitted by: CyberLeo <cyberleo@cyberleo.net> Approved by: rwatson (mentor), aradford@amcc.com MFC after: 3 days
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+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@
* Normalize a significant number of kernel malloc type names:rwatson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-1/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Use correct flags for bus_dma_tag_create().scottl2005-03-061-4/+4
|
* Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnimp2005-03-011-1/+1
| | | | | BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up.
* Undoing recent changes to make 3ware's i386 tools work on amd64, since there arevkashyap2005-02-172-59/+0
| | | | now amd64 versions of CLI and 3DM2 available.
* Fix crashdumps on twe. The twe_immediate_request() path was not onlyscottl2005-02-082-12/+25
| | | | | | | | | | | | copying data to a temporary buffer before the I/O, but also copying that temporary buffer back to the original data location after the I/O. When you're dumping kernel heap and stack and protected pages, this is very very bad. A belated thanks to Robert Watson for donating hardware for this (and future) work. MFC after: 3 days
* Recognize the 32-bit form of the twe binary passthrough ioctl()s so thatpeter2004-12-172-0/+59
| | | | | | | there is some hope for the 32-bit management utilities to run. I've used the cli successfully, but 3dm2 doesn't work for other reasons. Of course, a native binary of the 3dm2 and cli would be much better, but that doesn't exist.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-5/+5
| | | | Bump __FreeBSD_version accordingly.
* Fix for a problem seen only on 6xxx series controllers, where-in thevkashyap2004-06-113-8/+17
| | | | | | | | | driver tries to submit the same request repeatedly, on finding the controller cmd queue to be full. Submitted by:ps, vkashyap Reviewed by:re Approved by:re
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* 1. Fixed potential problem that would cause out-of-order requests in ↵vkashyap2004-05-123-11/+7
| | | | | | | | | | twe_startio. 2. Changed version. Submitted by: scottl Reviewed by: vkashyap Approved by: re
* 1. Better handle a return value of EINPROGRESS from bus_dmamap_load.vkashyap2004-03-253-22/+38
| | | | | | | 2. Check for bad return value from twe_map_request in places where there was no checking. Reviewed by: ps
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+4
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Check that twed_sc is non-NULL before dereferencing it, not after.cperciva2004-02-221-2/+2
| | | | | Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor)
* Fix off-by-one error: sc->twe_drive is an array of TWE_MAX_UNITS elements.cperciva2004-02-221-1/+1
| | | | | Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor)
* 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.
* Device megapatch 1/6:phk2004-02-212-3/+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-181-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* After extensive QA cycles at 3ware, bring the driver in-line with all theps2003-12-027-158/+184
| | | | | | | | | | | | | | | | | | | | | issues which they found and asked to be changed so 3ware can offcially support the driver. Summary of the most significant changes: - TWE_OVERRIDE is no longer supported - If twe_getparam failed, bogus data would be returned to the caller - Cache the device unit in the twe_drive structure to aid debugging - Add the 3ware driver version. - Proper return error codes for many functions. - Track the minimum queue length statistics - 4.x compat: use the cached unit number from the twe_drive structure instead of the the cached si_drv2. 3ware found that after many loads and unloads that si_drv2 became corrupted. This did not happen in -current. Submitted by: Vinod Kashyap (with modifications by me) Approved by: re (rwatson)
* Correct the structure packing.ps2003-11-061-14/+14
| | | | Reported by: Vinod Kashyap <vkashyap@3WARE.com>
* 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 tsleep on NULLps2003-08-191-2/+2
|
* Oops.. Some debugging code snuck in here.ps2003-08-121-1/+1
| | | | Requeue the request if the controller is busy.
* Fix the busdma support in twe to support EINPROGRESS and enable it forps2003-08-124-111/+249
| | | | use with PAE kernels.
* Properly support the 3ware generic API.ps2003-08-057-96/+190
| | | | | | | | | | | - Build SGL's for ATA_PASSTHROUGH commands - Fallback to using the sgl_offset when the opcode is unknown for building SGL's/ - Add ioctl calls for adding and removing units. - Define previously undefined AEN's - Allocate memory for the ioctl payload in multiples of 512bytes. MFC after: 1 week
* Mega busdma API commit.scottl2003-07-011-0/+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
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-0/+1
| | | | | | | | 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.
* Fix a bug I introduced by overlooking the fact that "unit number" canphk2003-03-152-1/+2
| | | | | | be one of several things in this driver. Spotted & Tested by: alfred
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-082-11/+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)
* Use canonical format for cdevsw initialization.phk2003-03-021-13/+13
|
* NO_GEOM cleanup:phk2003-02-252-39/+18
| | | | | Move to new "struct disk *" centric API. Retire major #147 (twed)
* Use DISKFLAG_OPEN rather than maintaining our own flag.phk2003-02-221-23/+2
| | | | Use nullclose() rather than now empty twed_close().
* NO_GEOM cleanup:phk2003-02-211-4/+8
| | | | | | | | | | | | | 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.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Update to new crashdump apips2003-02-071-39/+2
|
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Fix instances of macros with improperly parenthasized arguments.alfred2002-11-091-4/+4
| | | | Verified by: md5
* Be consistent about functions being static.phk2002-10-161-1/+1
| | | | Spotted by: FlexeLint.
* use __packed.alfred2002-09-231-14/+14
|
* (This commit touches about 15 disk device drivers in a very consistentphk2002-09-201-12/+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.
* Replace (ab)uses of "NULL" where "0" is really meant.archie2002-08-221-1/+1
|
* Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanlypeter2002-05-241-0/+1
| | | | again.
* Here follows the new kernel dumping infrastructure.phk2002-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
* Update for the 6.9 firmware family (6xxx controllers), as well as formsmith2002-03-075-20/+132
| | | | | | | | | the upcoming 7.4 family (7xxx controllers). - improved error reporting and handling - more diagnostic output - add extra command packet definitions - merge sources again with -stable
* Fix some unused warnings. One function is only used ifpeter2002-02-271-0/+8
| | | | TWE_SHUTDOWN_NOTIFICATION is defined, the other two are never used.
OpenPOWER on IntegriCloud