summaryrefslogtreecommitdiffstats
path: root/sys/dev/sym
Commit message (Collapse)AuthorAgeFilesLines
* Don't try and negotiate sync mode if either period or offset are zero.mjacob2013-02-251-17/+24
| | | | | | PR: kern/163064 Partially Submitted by: Peter <pmc@citylink.dinoex.sub.org> MFC after: 1 month
* Reform the busdma API so that new types may be added without modifyingkib2013-02-121-43/+7
| | | | | | | | | | | | | | | | | | | | | every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback. The cam changes unify the bus_dmamap_load* handling in cam drivers. The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map. Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
* Use better arm memory barrierimp2013-01-111-1/+2
|
* Clang complains about the comparision of fak < 0 always beingimp2013-01-101-1/+0
| | | | | | false. It is right. Delete it because on the next line we catch all 'negative' cases with the test > 2, since 'negative' numbers are just really big unsigned numbers and we do an identical action.
* Add memory barrier macros for ARMgonzo2012-12-131-0/+2
|
* Revert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for usermarius2012-07-191-2/+2
| | | | | | | | | | | | | data introduced in r236061. Using that flag doesn't make that much sense on this case as the DMA maps using it are also created during sym_pci_attach(). Moreover, due to the maxsegsz parameter used, doing so may exhaust the bounce pages pool on architectures requiring bounce pages. [1] While at it, use a slightly more appropriate maxsegsz parameter. PR: 169526 Submitted by: Mike Watters [1] MFC after: 3 days
* Fix a braino in r236469; the number of DMA tags required for handlingmarius2012-06-142-8/+6
| | | | | | | | | | MAXPHYS should be based on PAGE_SIZE rather than SYM_CONF_DMA_BOUNDARY. While at it, reuse the SYM_CONF_MAX_SG macro for specifying the maximum number of DMA tags so sym(4) itself doesn't size memory beyond what's required for handling MAXPHYS. PR: 168928 MFC after: 3 days
* Take advantage of nitems().marius2012-06-021-4/+1
| | | | MFC after: 3 days
* Remove extraneous empty lines.marius2012-05-261-32/+0
| | | | MFC after: 3 day
* - When creating the DMA tag for user data, don't ask for more segmentsmarius2012-05-262-39/+29
| | | | | | | | | | | | | | than required for handling MAXPHYS and report the resulting maximum I/O size to CAM instead of implicitly limiting it to DFLTPHYS. - Move the variables of sym_action2() out of nested scope as required by style(9) and remove extraneous curly braces. - Replace a magic value for PCIR_COMMAND with the appropriate macro. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Tested with a HBA donated by wilko. MFC after: 3 days
* Merge from r225950:marius2011-10-071-5/+9
| | | | | | Set the sense residual properly. Reviewed by: ken
* More spelling fixes.marius2011-04-222-2/+2
| | | | Submitted by: N.J. Mann
* - Correct spelling. [1]marius2011-04-224-17/+13
| | | | | | - Remove variables which are unused besides initialization. [2] Submitted by: brucec [1], Christoph Mallon [2]
* Fix typos - remove duplicate "the".brucec2011-02-212-2/+2
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* - On sparc64 obtain the initiator ID from the Open Firmware device treemarius2010-04-271-4/+9
| | | | | in order to match what the PROM built-in driver uses. - Remove some no longer used includes.
* While certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010)se2009-10-311-1/+1
| | | | | | | | | | | | | | | | | | do support 64bit addresses, the current SCRIPTS code supports only 32bit addresses causing data corruption for buffer addresses >4GB. This problem affects 64bit machines with more than 4GB RAM or amd64 with 4GB and memory hole remapping. Work-around this problem with a bus_dma tag that requests bounce-buffers for addresses >4GB. This causes some overhead, but given the maximum SCSI bus speed of 160MB/s compared, the effect should hardly be noticeable. The problem was reported by Mike Watters (mike at mwatters net) who also verified that this fix cures the problem. Since this change is a NOOP on systems with less than 4GB RAM and fixes data corruption (in RAM and on disk) on systems with more than 4GB, I hope that this change is accepted for 8.0. MFC after: 3 days (pending approval)
* Use xpt_register_async() in order to remove code duplication.marius2008-10-141-7/+3
| | | | MFC after: 1 month
* Allow 53C1010 without NVRAM to negotiate Ultra-3.marius2008-08-071-0/+2
| | | | MFC after: 3 days
* - Const'ify firmware and lookup-tables.marius2008-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.
* - Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9)marius2008-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
* - Use NULL instead of 0 for pointers.marius2008-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.
* Fix Symbios driver on amd64: Since amd64 has 64 bit pointers but the samese2007-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
* Fix various compilation warnings for gcc-4.2.mjacob2007-06-231-1/+1
| | | | Approved by: re (bruce)
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-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.
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-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.
* Fix typo in comment.thomas2007-03-051-3/+3
|
* 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@
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-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...).
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-116/+0
| | | | | | as the default. Reviewed by multitudes.
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-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
* Remove various bits of conditional Alpha code and fixup a few comments.jhb2006-05-121-2/+0
|
* FreeBSD has had endian conversion macros for a long time. Axe the customscottl2005-12-051-46/+2
| | | | | | macros in this driver. MFC After: 3 days
* Use a compile-time detection of 64-bit addressing so that thisru2005-12-041-11/+8
| | | | | | compiles on 32-bit machines. Reported by: ale
* Fix -Wundef.ru2005-12-041-8/+11
|
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-10/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* eliminate double free when sym_cam_attach failssam2005-03-261-2/+7
| | | | Noticed by: Coverity Prevent analysis tool
* Use BUS_PROBE_DEFAULTimp2005-03-061-1/+2
|
* avoid null ptr derefsam2005-02-251-3/+4
| | | | | Noticed by: Coverity Prevent analysis tool Reviewed by: scottl
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-066-6/+6
|
* Attempt to fix Symbios driver on amd64. The private memory allocationse2005-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).
* Make it depend on PCI as well.mjacob2004-09-101-0/+1
| | | | Submitted by: Stefan eSSer
* Make sym depend, as a module, on cam.mjacob2004-09-101-0/+1
| | | | Submitted by:"Norikatsu Shigemura" <nork@FreeBSD.org>
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-8/+8
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* unifdef old interface support out to prevent false positives.imp2003-12-071-524/+0
| | | | Suggested by: jeffr, obrien, and others
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-4/+4
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-241-2/+3
| | | | 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.
* Remove extraneous semicolons. They are already provided bydds2003-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
* Mega busdma API commit.scottl2003-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
* Add amd64 support.peter2003-06-261-1/+1
|
OpenPOWER on IntegriCloud