aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iir
Commit message (Collapse)AuthorAgeFilesLines
* We no longer need to use d_thread_t, migrate to struct thread *.Warner Losh2009-05-201-3/+3
| | | | Notes: svn path=/head/; revision=192450
* Compare the correct variable against NULL.Christian Brueffer2009-05-141-1/+1
| | | | | | | | | | Reviewed by: scottl Found with: Coverity Prevent(tm) CID: 821 MFC after: 2 weeks Notes: svn path=/head/; revision=192097
* Replace all calls to minor() with dev2unit().Ed Schouten2008-09-271-5/+5
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=183397
* Fix a buffer overflow in the processing of various SCSI commands. This likelyScott Long2008-01-091-26/+42
| | | | | | | | | | | fixes a an great number of weird problems that have been reported with this driver. PR: 119114 Submitted by: Jens Rehsack Notes: svn path=/head/; revision=175197
* Prepare for future integration between CAM and newbus. xpt_bus_registerScott Long2007-06-173-2/+3
| | | | | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE. Notes: svn path=/head/; revision=170872
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willScott Long2007-04-151-1/+2
| | | | | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled. Notes: svn path=/head/; revision=168752
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-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@ Notes: svn path=/head/; revision=166901
* Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.Matt Jacob2006-12-111-0/+2
| | | | | | | | PR: 106543 MFC after: 3 days Notes: svn path=/head/; revision=165102
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEMatt Jacob2006-11-021-21/+0
| | | | | | | | | as the default. Reviewed by multitudes. Notes: svn path=/head/; revision=163896
* The first of 3 major steps to move the CAM layer forward to usingMatt Jacob2006-10-311-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | the CAM_NEW_TRAN_CODE that has been in the tree for some years now. This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have). After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in. This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change. Reviewed by: freebsd-scsi and specific stakeholders Notes: svn path=/head/; revision=163816
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-162-2/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* Big update to the iir driver:Scott Long2006-03-013-170/+169
| | | | | | | | | | | | | | | | | | | | | | | | | - Don't use a common buffer in the softc to store per-command data. Reserve a buffer in the command itself. - Don't allocate DMA memory for the kernel command structures when all you really need is DMA memory for the scratch buffer embedded in them. Instead allocate a slab for the scratch buffers and divide it up as needed. - Call bus_dmamap_unload() at the completion of commands. - Preserve and clear the CAM CCB status flags at completion. - Reorder some low-level command operations to try to close races. - Limit the simq to 32 commands for now. There are some serious problems with the driver under load that are not well understood, so keeping the simq lower helps avoid this. It has been tested at a higher value, but this is a safe value that doesn't show much performance degredation. These changes allow the driver to work reliably with >4GB of memory on i386 and amd64, and also work around deadlocks seen under very high load in certain situations. The work-around is far from ideal, but without and documentation it is hard to know what the right fix is. MFC candidate Notes: svn path=/head/; revision=156139
* Convert iir inlines to ANSI C function declarations.Robert Watson2006-01-211-10/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=154648
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-292-4/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Correct improper permissions on /dev/iir. The earlier permissionsColin Percival2005-05-061-2/+2
| | | | | | | | | of 0644 allowed for people to do Evil Things via ioctl(2). Security: FreeBSD-SA-05:06.iir Notes: svn path=/head/; revision=145947
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-051-2/+2
| | | | Notes: svn path=/head/; revision=143160
* netchild's mega-patch to isolate compiler dependencies into a centralJoerg Wunsch2005-03-021-1/+5
| | | | | | | | | | | | | | | | | | | place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago Notes: svn path=/head/; revision=143063
* Remove a dead vtophys() reference.Scott Long2005-01-311-6/+0
| | | | Notes: svn path=/head/; revision=141077
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-063-3/+3
| | | | Notes: svn path=/head/; revision=139749
* Panic if given a CAM_DATA_PHYS pointer from CAM instead of trying to handle it.Scott Long2004-09-031-14/+2
| | | | | | | | | It makes no sense in a PAE environment and is impossible to handle correctly. This case is also never used right now. This should make the iir(4) driver ready for PAE. Notes: svn path=/head/; revision=134692
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-162-11/+11
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Update from vendor. This also adds support for newer management tools.Scott Long2004-05-193-27/+16
| | | | | | | Submitted by: Achim Leubner Notes: svn path=/head/; revision=129449
* Fix the ioctl types for two ioctls. I'm not sure if the switch was myScott Long2004-03-201-2/+2
| | | | | | | | | | fault or the vendor's fault when I brought in rev 1.5. This allows the 'storcon' utility to work again. Sponsored by: freebsdsystems.com Notes: svn path=/head/; revision=127233
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-3/+3
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* These are changes to allow to use the Intel C/C++ compiler (lang/icc)Tom Rhodes2004-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to build the kernel. It doesn't affect the operation if gcc. Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary. Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c 1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c 1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes) Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc. Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: -arch Submitted by: netchild Notes: svn path=/head/; revision=126891
* 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
* Remove the static major assignment for iir(4).Scott Long2004-02-142-6/+1
| | | | | | | Submitted by: phk (partially) Notes: svn path=/head/; revision=125834
* Update email addresses, copyrights, and tweak the management interface.Scott Long2003-09-264-22/+47
| | | | | | | Submitted by: "Leubner, Achim" <Achim_Leubner@adaptec.com> Notes: svn path=/head/; revision=120477
* Use PCIR_BAR(x) instead of PCIR_MAPS.John Baldwin2003-09-021-1/+1
| | | | | | | | Glanced over by: imp, gibbs Tested by: i386 LINT Notes: svn path=/head/; revision=119690
* Use __FBSDID().David E. O'Brien2003-08-243-7/+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-3/+3
| | | | | | | | 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
* Mega busdma API commit.Scott Long2003-07-012-2/+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
* Import latest changes from the vendor. This also is reported to fix theScott Long2003-04-254-38/+116
| | | | | | | | | | driver at long last! Many thanks to vaidas.damosevicius@if.lt for keeping this issue alive and pursuing Intel for a fix, Intel/ICP for working on the driver, and Sergey Osokin for bringing the original patches up to 5-CURRENT. Notes: svn path=/head/; revision=114001
* I deserve a big pointy hat for having missed all those referencesMaxime Henrion2003-04-101-2/+2
| | | | | | | to bus_dmasync_op_t in my last commit. Notes: svn path=/head/; revision=113350
* 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
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-14/+7
| | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=111815
* Fix cdevsw initialization commit to follow canonical format.Poul-Henning Kamp2003-03-021-1/+1
| | | | Notes: svn path=/head/; revision=111745
* msgPoul-Henning Kamp2003-02-261-15/+0
| | | | Notes: svn path=/head/; revision=111573
* Remove S_IROTH from the make_dev() lines for iir-related devices. ThisRobert Watson2002-12-271-2/+2
| | | | | | | | | | | improves protection consistency with other storage devices (generally root:operator,660). This driver appears not to have an active maintainer. Submitted by: kris Notes: svn path=/head/; revision=108320
* Use [u]intmax_t and %j instead of long long and %ll to better fix warningsJohn Baldwin2002-11-071-2/+3
| | | | | | | | | I fixed earlier. Requested by: mux, jake Notes: svn path=/head/; revision=106591
* Use long long to print out a bus_addr_t again.John Baldwin2002-11-061-2/+2
| | | | Notes: svn path=/head/; revision=106537
* Be consistent about "static" functions: if the function is markedPoul-Henning Kamp2002-09-281-2/+2
| | | | | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512 Notes: svn path=/head/; revision=104094
* Include <sys/ioccom.h> directly, rather than indirectly throughPoul-Henning Kamp2002-09-201-1/+1
| | | | | | | | | <sys/disklabel.h> Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103694
* Don't include <stddef.h> "For offsetof". This is not even wrong inBruce Evans2002-05-131-2/+0
| | | | | | | | | | | | -current, since offsetof() is defined a header under /sys so that system sources don't need to have this wrong include. This bug was only detected because my version of <stddef.h> has some spelling fixes (s/field/member/g) and gcc is now sensitive to the spelling of arg names in macros as required by standards (ISO C90 6.8.3...). Notes: svn path=/head/; revision=96526
* Move the new byte order function prototypes from <sys/param.h> toMike Barcroft2002-04-263-0/+3
| | | | | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD. Notes: svn path=/head/; revision=95533
* Remove __P.Alfred Perlstein2002-03-202-23/+23
| | | | Notes: svn path=/head/; revision=92739
* Add the following functions/macros to support byte order conversions andThomas Moestl2002-02-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike Notes: svn path=/head/; revision=91394
* Add the 'iir' driver, for the Intel Integrated RAID controllers andMike Smith2002-01-204-0/+3577
prior ICP Vortex models. This driver was developed by Achim Leubner of Intel (previously with ICP Vortex) and Boji Kannanthanam of Intel. Submitted by: "Kannanthanam, Boji T" <boji.t.kannanthanam@intel.com> MFC after: 2 weeks Notes: svn path=/head/; revision=89580