aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/buslogic
Commit message (Collapse)AuthorAgeFilesLines
* Remove bt(4) driverWarner Losh2018-10-224-3649/+0
| | | | | | | | | | | | | The buslogic scsi driver has been tagged as gone in 12 for some time now. Remove it. The nycbug dmesg database shows only one sighting in 6 for this driver. It was very popular in the early days of the project, but that popularity seems to have died by 2004 when the nycbug database started up. Relnotes: yes Notes: svn path=/head/; revision=339568
* Tag the current round of deprecated drivers.Warner Losh2018-01-291-0/+1
| | | | | | | Differential Revision: https://reviews.freebsd.org/D13818 Notes: svn path=/head/; revision=328523
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-274-0/+8
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* sys/dev: Replace zero with NULL for pointers.Pedro F. Giffuni2017-02-201-2/+2
| | | | | | | | | | | Makes things easier to read, plus architectures may set NULL to something different than zero. Found with: devel/coccinelle MFC after: 3 weeks Notes: svn path=/head/; revision=313982
* Remove dead mentions of CAM target mode APIs from drivers.Alexander Motin2017-02-191-4/+0
| | | | | | | This makes grepping kernel for target mode implementation much easier. Notes: svn path=/head/; revision=313949
* Remove EISA support from Buslogic (bt) cards. Remove known models formWarner Losh2017-02-164-385/+2
| | | | | | | | man page. Tweak comments to not refer to EISA scenarios now that it is no longer supported. Remove unused enum. Notes: svn path=/head/; revision=313837
* Remove Micro Channel Architecture support. Of the commonly availableWarner Losh2017-02-151-341/+0
| | | | | | | | | | | | | | machines, only a few 486 machines that used it, and those haven't had enough memory to run FreeBSD for quite some time (often limited to 16MB). Not to be confused with the Machine Check Architecture, which is still very much alive and used (and untouched by this commit). No Objection From: arch@ Notes: svn path=/head/; revision=313783
* Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)Alan Somers2017-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v". This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field. PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 Reviewed by: imp, sephe, slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9037 Differential Revision: https://reviews.freebsd.org/D9038 Notes: svn path=/head/; revision=311305
* s/struct device */device_t/gAdrian Chadd2016-05-041-1/+1
| | | | | | | Submitted by: kmacy Notes: svn path=/head/; revision=299049
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-032-5/+5
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* Remove MAXBSIZE use from drivers where it has nothing to do.Alexander Motin2015-03-221-1/+1
| | | | | | | | | | In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead. MFC after: 1 month Notes: svn path=/head/; revision=280347
* Prevent overflow issues in timeout processingSteven Hartland2014-11-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Previously, any timeout value for which (timeout * hz) will overflow the signed integer, will give weird results, since callout(9) routines will convert negative values of ticks to '1'. For unsigned integer overflow we will get sufficiently smaller timeout values than expected. Switch from callout_reset, which requires conversion to int based ticks to callout_reset_sbt to avoid this. Also correct isci to correctly resolve ccb timeout. This was based on the original work done by Eygene Ryabinkin <rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid the overlow. Differential Revision: https://reviews.freebsd.org/D1157 Reviewed by: mav, davide MFC after: 1 month Sponsored by: Multiplay Notes: svn path=/head/; revision=274819
* Don't destroy bus_dma maps created by bus_dmamem_alloc(). In some cases,John Baldwin2014-06-101-2/+0
| | | | | | | | | | | | don't create a map before calling bus_dmamem_alloc() (such maps were leaked). It is believed that the extra destroy of the map was generally harmless since bus_dmamem_alloc() often uses special maps for which bus_dmamap_destroy() is a no-op (e.g. on x86). Reviewed by: scottl Notes: svn path=/head/; revision=267340
* Fix memory and references leak due to unfreed path.Alexander Motin2013-10-221-1/+3
| | | | | | | Coverity CID: 1109815 Notes: svn path=/head/; revision=256893
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIScott Long2013-08-121-12/+7
| | | | | | | | | | | | | | | | | | | | command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day Notes: svn path=/head/; revision=254263
* Reform the busdma API so that new types may be added without modifyingKonstantin Belousov2013-02-121-61/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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>) Notes: svn path=/head/; revision=246713
* Add locking to the bt(4) driver and mark it MPSAFE.John Baldwin2012-10-156-137/+130
| | | | | | | | | | | | | | - Use device_printf() and device_get_unit() instead of storing the unit number in the softc. - Remove use of explicit bus space handles and tags. - Return an errno value from bt_eisa_attach() if an error occurs rather than -1. - Use BUS_PROBE_DEFAULT rather than 0. Tested by: no one Notes: svn path=/head/; revision=241592
* Correct double "the the"Eitan Adler2012-09-141-1/+1
| | | | | | | | Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=240518
* Remove comments about creating DMA tags as children of the DMA tags of theirJuli Mallett2012-03-121-1/+0
| | | | | | | | | parent bus where the code has now been modified to do so. Reviewed by: scottl Notes: svn path=/head/; revision=232882
* Convert a number of drivers to obtaining their parent DMA tag from theirScott Long2012-03-121-1/+1
| | | | | | | PCI device attachment. Notes: svn path=/head/; revision=232854
* Remove some always-true comparisons.John Baldwin2011-01-181-1/+1
| | | | | | | Submitted by: clang via rdivacky Notes: svn path=/head/; revision=217538
* 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
* 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-115-0/+7
| | | | | | | | 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-59/+0
| | | | | | | | | as the default. Reviewed by multitudes. Notes: svn path=/head/; revision=163896
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-294-12/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-064-4/+4
| | | | Notes: svn path=/head/; revision=139749
* #include <isa/isavar.h> instead of <i386/isa/isa_dma.h>Poul-Henning Kamp2004-09-151-1/+1
| | | | Notes: svn path=/head/; revision=135260
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-301-0/+1
| | | | Notes: svn path=/head/; revision=129879
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-174-20/+12
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Use PCIR_BAR(x) instead of PCIR_MAPS.John Baldwin2003-09-021-2/+2
| | | | | | | | Glanced over by: imp, gibbs Tested by: i386 LINT Notes: svn path=/head/; revision=119690
* Remove merge conflict that I didn't notice as it was in the middle of aDavid E. O'Brien2003-08-251-5/+0
| | | | | | | | | comment and thus compiled. Submitted by: bde Notes: svn path=/head/; revision=119451
* Use __FBSDID().David E. O'Brien2003-08-245-6/+19
| | | | | | | 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-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=119277
* Fixed wrong function names in the error message that was translated toBruce Evans2003-07-261-3/+3
| | | | | | | | C in rev.1.32 so that it doesn't take 2 commits for all branches to fix this message. Notes: svn path=/head/; revision=118052
* Mega busdma API commit.Scott Long2003-07-015-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 /* FALLTHROUGH */Poul-Henning Kamp2003-05-312-7/+7
| | | | | | | | | Remove break after return Found by: FlexeLint Notes: svn path=/head/; revision=115555
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though theScott Long2003-05-271-2/+2
| | | | | | | | | | | BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'. Approved by: re (bmah) Notes: svn path=/head/; revision=115343
* 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
* Clean up argument comments for bus_dma_tag_create() calls.Matthew N. Dodd2003-03-295-83/+126
| | | | Notes: svn path=/head/; revision=112782
* Consolidate MIN/MAX macros into one place (param.h).Alfred Perlstein2003-02-021-4/+0
| | | | | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=110232
* Add some band-aid casts to quiet warnings. This driver still assumesJohn Baldwin2002-11-061-1/+1
| | | | | | | | that sizeof(int) == sizeof(void *) == 4. However, it also seems that the hardware assumes this. Notes: svn path=/head/; revision=106521
* Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in thePeter Wemm2002-10-094-4/+4
| | | | | | | | '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
* Remove #if 0'ed abuse of NPCIPeter Wemm2002-07-211-3/+0
| | | | Notes: svn path=/head/; revision=100430
* Use ANSI C string contatenation instead of a multi-line string literal.John Baldwin2001-12-131-4/+4
| | | | | | | Reported by: gcc30 Notes: svn path=/head/; revision=87797
* The EXTENDED_GEOMETRY flag is really bit 7. This affects >2GB drives.Peter Wemm2001-08-261-1/+1
| | | | | | | | PR: 29454 Submitted by: Rob Manchester <rmanches@vmware.com> Notes: svn path=/head/; revision=82365
* Add code, imperfect though it may be, for CAM_NEW_TRAN_CODE compilation.Matt Jacob2001-07-041-11/+115
| | | | Notes: svn path=/head/; revision=79175
* Turn on interrupt-entropy harvesting for all/any mass storage devicesMark Murray2001-03-011-1/+1
| | | | | | | | | | 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
* Classify all EISA cards with major firmware revions '2' as 742As.Justin T. Gibbs2000-11-133-3/+22
| | | | | | | | | | | | | | | | | | This allows us to successfully attach early Storage Dimension cards. Allocate mailboxes for the 742A bellow the 16MB limit. Although these cards seem to be able to deal with all other types of data anywhere in a 32bit address space, 24bit addresses are required for mailboxes. bt_eisa.c: Add device IDs for all Storage Dimension products I could find from their web site. Thanks to Ted Mittelstaed for loaning me the equipment to diagnose and fix these problems. Notes: svn path=/head/; revision=68661