aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sym
Commit message (Collapse)AuthorAgeFilesLines
* Use xpt_register_async() in order to remove code duplication.Marius Strobl2008-10-141-7/+3
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=183895
* Allow 53C1010 without NVRAM to negotiate Ultra-3.Marius Strobl2008-08-071-0/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=181399
* - Const'ify firmware and lookup-tables.Marius Strobl2008-05-155-53/+53
| | | | | | | | | | - Obsolete redundant inst_name and unit members of struct sym_hcb. - Fix three more NULL vs. 0 confusions. - Use device_set_softc(9) to tell the bus layer that this driver allocates a instance of struct sym_hcb itself. Notes: svn path=/head/; revision=179029
* - Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9)Marius Strobl2008-04-241-118/+155
| | | | | | | | | | | | | | | | | | in order to get rid of bus space handle and tag in struct sym_hcb. - Remove unused members related to bus addresses in struct sym_hcb. - sym(4) takes care of allocating an instance of struct sym_hcb itself so don't let newbus allocate it as an unused softc also. - Add basic MPSAFE locking. This includes changing the sym(4) CCBs to be allocated up-front instead of on demand as needed. Besides making these allocations more likely to succeed, this also solves the problem of calling bus_dmamap_create(9) with the SIM mutex held. Reviewed by: scottl MFC after: 1 month Notes: svn path=/head/; revision=178468
* - Use NULL instead of 0 for pointers.Marius Strobl2008-04-241-587/+579
| | | | | | | | | | | - Remove superfluous returns in functions returning void. - In sym_alloc_lcb_tags() return directly instead of jumping to a label which just returns. - Fix some spelling in comments. - Remove trailing whitespace. Notes: svn path=/head/; revision=178466
* Fix Symbios driver on amd64: Since amd64 has 64 bit pointers but the sameStefan Eßer2007-07-201-12/+17
| | | | | | | | | | | | | | | | | | | | | | | 4KB pages as i386, data structures that just fit in one page on i386 (and on 64 bit architectures with 8KB pages) can be distributed over two pages on amd64. This is a porblem in the case of the Symbios driver, since the SCRIPTS engine in the SCSI chip operates on physical addresses and needs physically contiguous memory. Earlier patches used contigmalloc on amd64, but this version replaces part of a structure by a pointer to that data. In order to not introduce an extra indirection for other architectures, the change has been made conditional on __amd64__. Earlier attempts to repair this problem are removed (i.e. the macros that made amd64 use contigmalloc). The fix was submitted by Jan Mikkelsen and modified by me to only affect amd64. PR: 89550 Submitted by: janm at transactionware dot com (Jan Mikkelsen) Approved by: re (Hiroki Sato) MFC after: 2 weeks Notes: svn path=/head/; revision=171524
* Fix various compilation warnings for gcc-4.2.Matt Jacob2007-06-231-1/+1
| | | | | | | Approved by: re (bruce) Notes: svn path=/head/; revision=170996
* Prepare for future integration between CAM and newbus. xpt_bus_registerScott Long2007-06-171-1/+1
| | | | | | | | | | 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/+1
| | | | | | | | | | | | | | 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
* Fix typo in comment.Thomas Quinot2007-03-051-3/+3
| | | | Notes: svn path=/head/; revision=167248
* 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
* Change the remainder of the drivers for DMA'ing devices enabled in theMarius Strobl2007-01-211-5/+1
| | | | | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...). Notes: svn path=/head/; revision=166165
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEMatt Jacob2006-11-021-116/+0
| | | | | | | | | as the default. Reviewed by multitudes. Notes: svn path=/head/; revision=163896
* Commit the results of the typo hunt by Darren Pilgrim.Yaroslav Tykhiy2006-08-042-2/+2
| | | | | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week Notes: svn path=/head/; revision=160964
* Remove various bits of conditional Alpha code and fixup a few comments.John Baldwin2006-05-121-2/+0
| | | | Notes: svn path=/head/; revision=158471
* FreeBSD has had endian conversion macros for a long time. Axe the customScott Long2005-12-051-46/+2
| | | | | | | | | macros in this driver. MFC After: 3 days Notes: svn path=/head/; revision=153145
* Use a compile-time detection of 64-bit addressing so that thisRuslan Ermilov2005-12-041-11/+8
| | | | | | | | | compiles on 32-bit machines. Reported by: ale Notes: svn path=/head/; revision=153085
* Fix -Wundef.Ruslan Ermilov2005-12-041-8/+11
| | | | Notes: svn path=/head/; revision=153072
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-291-10/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* eliminate double free when sym_cam_attach failsSam Leffler2005-03-261-2/+7
| | | | | | | Noticed by: Coverity Prevent analysis tool Notes: svn path=/head/; revision=144147
* Use BUS_PROBE_DEFAULTWarner Losh2005-03-061-1/+2
| | | | Notes: svn path=/head/; revision=143168
* avoid null ptr derefSam Leffler2005-02-251-3/+4
| | | | | | | | Noticed by: Coverity Prevent analysis tool Reviewed by: scottl Notes: svn path=/head/; revision=142515
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-066-6/+6
| | | | Notes: svn path=/head/; revision=139749
* Attempt to fix Symbios driver on amd64. The private memory allocationStefan Eßer2005-01-011-0/+10
| | | | | | | | | | | | | | | | | function provided by the driver limits allocations to the page size, i.e. 4KB on i385 and 8KB on typical 64 bit processors. Since amd64 has 64 bit pointers, but only 4KB pages, an array of pointers that just fits into one page on all the other processors, does require 2 pages on amd64. In order to make this driver useful on amd64, the allocation unit has been increased to 2 pages on amd64 and contigmalloc() is used instead of malloc(). All other processor types are unaffected by this change. This modification has only been compile-tested on amd64, yet, but should just work (FLW). Notes: svn path=/head/; revision=139545
* Make it depend on PCI as well.Matt Jacob2004-09-101-0/+1
| | | | | | | Submitted by: Stefan eSSer Notes: svn path=/head/; revision=135041
* Make sym depend, as a module, on cam.Matt Jacob2004-09-101-0/+1
| | | | | | | Submitted by:"Norikatsu Shigemura" <nork@FreeBSD.org> Notes: svn path=/head/; revision=135040
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-8/+8
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* unifdef old interface support out to prevent false positives.Warner Losh2003-12-071-524/+0
| | | | | | | Suggested by: jeffr, obrien, and others Notes: svn path=/head/; revision=123218
* Use PCIR_BAR(x) instead of PCIR_MAPS.John Baldwin2003-09-021-4/+4
| | | | | | | | Glanced over by: imp, gibbs Tested by: i386 LINT Notes: svn path=/head/; revision=119690
* Use __FBSDID().David E. O'Brien2003-08-241-2/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119420
* 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=119287
* Remove extraneous semicolons. They are already provided byDiomidis Spinellis2003-08-051-4/+4
| | | | | | | | | | | the macro definition, and cause the generation of syntactically incorrect code that gcc happens to accept. Reviewed by: schweikh (mentor) MFC after: 4 weeks Notes: svn path=/head/; revision=118472
* Mega busdma API commit.Scott Long2003-07-011-2/+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 Notes: svn path=/head/; revision=117126
* Add amd64 support.Peter Wemm2003-06-261-1/+1
| | | | Notes: svn path=/head/; revision=116857
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.Nate Lawson2003-06-141-22/+1
| | | | | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. Looked over by: scottl Notes: svn path=/head/; revision=116351
* 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
* Consolidate MIN/MAX macros into one place (param.h).Alfred Perlstein2003-02-021-7/+0
| | | | | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=110232
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-011-2/+2
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-303-4/+4
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
* Fix instances of macros with improperly parenthasized arguments.Alfred Perlstein2002-11-091-2/+2
| | | | | | | Verified by: md5 Notes: svn path=/head/; revision=106696
* Be consistent about functions being static.Poul-Henning Kamp2002-10-161-6/+6
| | | | | | | Spotted by: FlexeLint. Notes: svn path=/head/; revision=105215
* Move the new byte order function prototypes from <sys/param.h> toMike Barcroft2002-04-261-0/+1
| | | | | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD. Notes: svn path=/head/; revision=95533
* Fix some gcc-3.1+ warnings:Peter Wemm2002-03-191-0/+2
| | | | | | | | warning: deprecated use of label at end of compound statement umass.c:2626:46: multi-line string literals are deprecated Notes: svn path=/head/; revision=92732
* Comment tokens after #undef <macroname> and #endif.John Baldwin2001-12-131-4/+4
| | | | | | | Reported by: gcc30 Notes: svn path=/head/; revision=87796
* Submitted by:David E. O'BrienGerard Roudier2001-11-241-4/+4
| | | | | | | | | | | MFC after:3 days - Add memory barrier definition for sparc64. Patch sent by David E. O'Brien, approved by maintainer. - Fix an endianization error of a bus physical address used from SCRIPTS that made the driver fail on big endian machines as sparc64. Notes: svn path=/head/; revision=86850
* MFC after: 0 daysGerard Roudier2001-11-117-8/+8
| | | | Notes: svn path=/head/; revision=86266
* s/adress/address/Kris Kennaway2001-07-231-1/+1
| | | | | | | | Inspired by: OpenBSD MFC After: 1 week Notes: svn path=/head/; revision=80203
* Submitted by: Chip Salzenberg <chip@perlsupport.com>.Gerard Roudier2001-07-011-2/+5
| | | | | | | | | | | | MFC after: 5 days - Mask GPCNTL against 0x1c (was 0xfc) for the reading of the NVRAM. This ensures LEDC bit will not be set on 896 and later chips. Submitted by Chip Salzenberg <chip@perlsupport.com>. - Add probe for Tekram 390 U2B/U2W SCSI (53C895) LED handling. Submitted by Chip Salzenberg <chip@valinux.com> Notes: svn path=/head/; revision=79042
* Correctly initialize free_ccbq so that if we fail to attach (as isMatt Jacob2001-04-091-9/+8
| | | | | | | | | | possible for some systems where the device is there, but the BIOS hasn't allocated memory resources for it), we don't panic. Submitted by: Gerard Roudier Notes: svn path=/head/; revision=75329
* Add #if'ed support for the future option CAM_NEW_TRAN_CODE.Gerard Roudier2001-03-241-57/+236
| | | | Notes: svn path=/head/; revision=74755