aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/dpt
Commit message (Collapse)AuthorAgeFilesLines
...
* - Track resources in our softc.Matthew N. Dodd2003-03-295-127/+278
| | | | | | | | | | | | | - Sanitize dpt_alloc(). - Add helper functions for resource alloc/release. - Add detach method. - Relocate definition of devclass_t. - Move some debugging output behind bootverbose. - Implement an identify method for ISA devices but don't use it right now. Notes: svn path=/head/; revision=112780
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-2/+2
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-2/+2
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Correct typo.Greg Lehey2003-01-161-1/+1
| | | | | | | | Submitted by: Alan Day <alan@alanday.com> MFC after: 2 weeks Notes: svn path=/head/; revision=109395
* Use bus_addr_t instead of u_int32_t in functions to convert betweenJohn Baldwin2002-11-061-3/+3
| | | | | | | physical and virtual addresses. Notes: svn path=/head/; revision=106527
* Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in thePeter Wemm2002-10-093-3/+3
| | | | | | | | 'int nsegments' argument to bus_dma_tag_create(). ~0ul does not fit in an int on machines with 64 bit longs. Notes: svn path=/head/; revision=104710
* Fix a couple of bogus enums.Mike Smith2002-01-081-4/+4
| | | | Notes: svn path=/head/; revision=89056
* This file is a 2.2 vintage pre-CAM file of no current value.Poul-Henning Kamp2001-11-061-861/+0
| | | | Notes: svn path=/head/; revision=86127
* o dpt_control.c is not compiled into the system (commented out inRobert Watson2001-11-051-6/+6
| | | | | | | | | conf/files) and as a result appears to have been missed in the bulk KSE update of drivers. This change replaces references to proc with thread. It has not been compile-tested. Notes: svn path=/head/; revision=86103
* Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp2001-03-261-1/+0
| | | | | | | the bit-bucket. Notes: svn path=/head/; revision=74810
* Turn on interrupt-entropy harvesting for all/any mass storage devicesMark Murray2001-03-013-3/+6
| | | | | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl. Notes: svn path=/head/; revision=73280
* Fix typo: compatability -> compatibility.Jeroen Ruigrok van der Werven2001-02-061-1/+1
| | | | | | | Compatability is not an existing english word. Notes: svn path=/head/; revision=72093
* Convert all users of fldoff() to offsetof(). fldoff() is badPoul-Henning Kamp2000-10-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde Notes: svn path=/head/; revision=67708
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Allow the DPT pci attachment to share IRQ'sPeter Wemm2000-08-261-1/+2
| | | | | | | Submitted by: Jonathan Chen <jon@spock.org> Notes: svn path=/head/; revision=65120
* Fix some warnings. Here are more part-time volatiles - ie: data thatPeter Wemm2000-08-071-3/+3
| | | | | | | | lives in memory and is sometimes busmastered to/from the controller. I believe these are all ok. Notes: svn path=/head/; revision=64355
* Use correct register values. This one was in aic7xxx and advansys too.Peter Wemm2000-05-281-1/+1
| | | | Notes: svn path=/head/; revision=61037
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-261-7/+7
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-231-7/+7
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp2000-05-051-0/+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 <sys/buf.h> includes.Poul-Henning Kamp2000-04-181-1/+0
| | | | | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes. Notes: svn path=/head/; revision=59368
* Use correct offset into register window.Matthew N. Dodd2000-04-071-1/+2
| | | | | | | Noticed by: Manfred Antar <mantar@pacbell.net> Notes: svn path=/head/; revision=59079
* - Convert dpt_pci.c to newbus.Matthew N. Dodd2000-04-076-454/+428
| | | | | | | | | | | | | | | | - Add support for ISA based DPT adapters (this doesn't quite work yet). - Sync dpt_eisa.c with my local copy. - Simplify how EISA IDs are matched. - Prototype. - Formatting nits. - Conform to how I do things in dpt_pci.c/dpt_isa.c. - Modify dpt_scsi.c:dpt_alloc() to DTRT with newbus. - Add some comments to dpt_scsi.c:dpt_pio_get_conf(). - Add additional check to dpt_scsi.c:dpt_get_conf(). - Add some useful error messages to dpt_scsi.c:dpt_init(). Notes: svn path=/head/; revision=59078
* Remove #include "eisa.h" and #if NEISA > 0 as it's only ever compiledPeter Wemm2000-01-291-4/+0
| | | | | | | if NEISA is > 0 as guaranteed by config. Notes: svn path=/head/; revision=56827
* Pre 4.0 tidy up.Peter Wemm2000-01-141-1/+1
| | | | | | | | | | | | | | | Collect together the components of several drivers and export eisa from the i386-only area (It's not, it's on some alphas too). The code hasn't been updated to work on the Alpha yet, but that can come later. Repository copies were done a while ago. Moving these now keeps them in consistant place across the 4.x series as the newbusification progresses. Submitted by: mdodd Notes: svn path=/head/; revision=55953
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-2/+2
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* Switch over to the new location in sys/dev/dpt.Matthew N. Dodd1999-10-091-1/+1
| | | | | | | Fix a forgotten #include Notes: svn path=/head/; revision=52044
* - Implement a simple PIO driven function for retreiving the onboardMatthew N. Dodd1999-10-094-101/+137
| | | | | | | | | | | | | | | | configuration information from a DPT card at a given port. This is needed by the ISA bus front end (still to come) and the EISA bus front end (which hasn't ever worked). - Blow away dpt_eisa.h as the information it contains does not justify an additional file. - Convert dpt_eisa.c to use the onboard config instead of trying to read the EISA configuration registers. Notes: svn path=/head/; revision=52042
* Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp1999-09-251-5/+0
| | | | | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags Notes: svn path=/head/; revision=51658
* $Id$ -> $FreeBSD$Peter Wemm1999-08-287-7/+7
| | | | Notes: svn path=/head/; revision=50477
* Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp1999-08-232-11/+2
| | | | | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev(). Notes: svn path=/head/; revision=50254
* Clean up after removing sys/eventhandler.h from sys/systm.h at the lastMike Smith1999-08-211-1/+2
| | | | | | | | minute. This should cover all of the missed cases (and should let LINT build again). Notes: svn path=/head/; revision=50135
* Implement a new generic mechanism for attaching handler functions toMike Smith1999-08-211-5/+6
| | | | | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green Notes: svn path=/head/; revision=50107
* Properly set the alignment argument to bus_dma_tag_create(). If weJustin T. Gibbs1999-08-163-8/+8
| | | | | | | don't care about the alignment, set it to 1, meaning single byte alignment. Notes: svn path=/head/; revision=49860
* Move the specification of EDGE/LEVEL triggered interrupts toMatthew N. Dodd1999-08-012-12/+14
| | | | | | | | | | | | | | | | | | | | eisa_add_intr() which now takes an additional arguement (one of EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE). The flag RR_SHAREABLE has no effect when passed to bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as the eisa_alloc_resource() call (bus_alloc_resource method) now deals with this flag directly, depending on the device ivars. This change does nothing more than move all the 'shared = inb(foo + iobsse)' nonesense to the device probe methods rather than the device attach. Also, print out 'edge' or 'level' in the IRQ announcement message. Reviewed by: dfr Notes: svn path=/head/; revision=49360
* Simplify cdevsw registration.Poul-Henning Kamp1999-05-311-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up. Notes: svn path=/head/; revision=47640
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-05-301-6/+22
| | | | | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors. Notes: svn path=/head/; revision=47625
* I'm told by the PR author that this page_size increment was inJordan K. Hubbard1999-05-131-2/+1
| | | | | | | the wrong place; back it out. Notes: svn path=/head/; revision=47096
* During probe, the page lockdown code in dpt_control.c does someJordan K. Hubbard1999-05-111-2/+4
| | | | | | | | | | | | | | | | bad math: it does not handle page-boundary conditions, and will not end up mapping all of the requested addresses. This will cause a panic: page fault during probe on some systems. I have a machine that will panic every time (when using the dpt driver) on kernel probe when there are 5 drives installed. When there are 4 drives, it is fine. Fix is to always allocate/deallocate an extra page. There is also a bonus splx() fix on an early error return. Submitted by: Mark J. Taylor <mtaylor@cybernet.com> PR: 9367 Notes: svn path=/head/; revision=47009
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:Peter Wemm1999-05-091-5/+1
| | | | | | | | | | | #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.) Notes: svn path=/head/; revision=46813
* Move the declaration of the interrupt type from the driver structureDoug Rabson1999-05-081-3/+2
| | | | | | | to the BUS_SETUP_INTR call. Notes: svn path=/head/; revision=46743
* Add a number of interrelated CAM feature enhancements and bug fixes.Kenneth D. Merry1999-05-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: These changes will require recompilation of any userland applications, like cdrecord, xmcd, etc., that use the CAM passthrough interface. A make world is recommended. camcontrol.[c8]: - We now support two new commands, "tags" and "negotiate". - The tags commands allows users to view the number of tagged openings for a device as well as a number of other related parameters, and it allows users to set tagged openings for a device. - The negotiate command allows users to enable and disable disconnection and tagged queueing, set sync rates, offsets and bus width. Note that not all of those features are available for all controllers. Only the adv, ahc, and ncr drivers fully support all of the features at this point. Some cards do not allow the setting of sync rates, offsets and the like, and some of the drivers don't have any facilities to do so. Some drivers, like the adw driver, only support enabling or disabling sync negotiation, but do not support setting sync rates. - new description in the camcontrol man page of how to format a disk - cleanup of the camcontrol inquiry command - add support in the 'devlist' command for skipping unconfigured devices if -v was not specified on the command line. - make use of the new base_transfer_speed in the path inquiry CCB. - fix CCB bzero cases cam_xpt.c, cam_sim.[ch], cam_ccb.h: - new flags on many CCB function codes to designate whether they're non-immediate, use a user-supplied CCB, and can only be passed from userland programs via the xpt device. Use these flags in the transport layer and pass driver to categorize CCBs. - new flag in the transport layer device matching code for device nodes that indicates whether a device is unconfigured - bump the CAM version from 0x10 to 0x11 - Change the CAM ioctls to use the version as their group code, so we can force users to recompile code even when the CCB size doesn't change. - add + fill in a new value in the path inquiry CCB, base_transfer_speed. Remove a corresponding field from the cam_sim structure, and add code to every SIM to set this field to the proper value. - Fix the set transfer settings code in the transport layer. scsi_cd.c: - make some variables volatile instead of just casting them in various places - fix a race condition in the changer code - attach unless we get a "logical unit not supported" error. This should fix all of the cases where people have devices that return weird errors when they don't have media in the drive. scsi_da.c: - attach unless we get a "logical unit not supported" error scsi_pass.c: - for immediate CCBs, just malloc a CCB to send the user request in. This gets rid of the 'held' count problem in camcontrol tags. scsi_pass.h: - change the CAM ioctls to use the CAM version as their group code. adv driver: - Allow changing the sync rate and offset separately. adw driver - Allow changing the sync rate and offset separately. aha driver: - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs. ahc driver: - Allow setting offset and sync rate separately bt driver: - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs. NCR driver: - Fix the ultra/ultra 2 negotiation bug - allow setting both the sync rate and offset separately Other HBA drivers: - Put code in to set the base_transfer_speed field for XPT_GET_TRAN_SETTINGS CCBs. Reviewed by: gibbs, mjacob (isp), imp (aha) Notes: svn path=/head/; revision=46581
* Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn'tPeter Wemm1999-04-241-1/+5
| | | | | | | hurt the driver portability to 3.x too much for where drivers are shared. Notes: svn path=/head/; revision=46024
* Implement an EISA new-bus framework. The old driver probe mechanismPeter Wemm1999-04-181-98/+92
| | | | | | | | | | | | had a quirk that made a shim rather hard to implement properly and it was just easier to convert the drivers in one go. The changes to the buslogic driver go beyond just this - the whole driver was new-bus'ed including pci and isa. I have only tested the EISA part of this so far. Submitted by: Doug Rabson <dfr@nlsystems.com> Notes: svn path=/head/; revision=45791
* Error check is not necessary - this function cannot fail in thisEivind Eklund1998-12-221-8/+4
| | | | | | | | | context. Noted by: gibbs Notes: svn path=/head/; revision=42018
* Better error checking and more complete struct initialization.Eivind Eklund1998-12-221-5/+13
| | | | | | | Reviewed by: Simon Shapiro <shimon@simon-shapiro.org> Notes: svn path=/head/; revision=41996
* probe function changed from returning char * to const char *.Matthew Dillon1998-12-141-3/+3
| | | | Notes: svn path=/head/; revision=41771
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-071-4/+3
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()Archie Cobbs1998-12-041-2/+3
| | | | | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com> Notes: svn path=/head/; revision=41514
* -Wunused cleanup.Justin T. Gibbs1998-10-151-9/+3
| | | | | | | Submitted by: Poul-Henning Kamp <phk@freebsd.org> Notes: svn path=/head/; revision=40419