summaryrefslogtreecommitdiff
path: root/sys/dev/dpt
AgeCommit message (Collapse)Author
2018-10-22Retire dpt(4)Warner Losh
Marked as gone in 12 and not relevant since the early 90s. No sightings in nycbug's dmesg database. Relnotes: yes Notes: svn path=/head/; revision=339569
2018-01-29Tag the current round of deprecated drivers.Warner Losh
Differential Revision: https://reviews.freebsd.org/D13818 Notes: svn path=/head/; revision=328523
2017-11-27sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
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
2017-02-16Remove EISA support from dpt. Remove known EISA models fromWarner Losh
dpt.4. Remove EISA-only bits from dpt_scsi.c. Notes: svn path=/head/; revision=313835
2017-01-05In the same vein as r311350, fix whitespace in handling of XPT_PATH_INQ inRavi Pokala
several more drivers. Sponsored by: Panasas Notes: svn path=/head/; revision=311351
2017-01-04Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)Alan Somers
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
2016-05-03sys/dev: minor spelling fixes.Pedro F. Giffuni
Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
2015-03-22Remove MAXBSIZE use from drivers where it has nothing to do.Alexander Motin
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
2014-11-21Prevent overflow issues in timeout processingSteven Hartland
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
2014-11-13Remove dpt_isa.c and commented out references to it. It was never connectedJohn Baldwin
to the build in either sys/conf/files* or sys/modules/dpt/Makefile. Also, it was denoted as "doesn't quite work yet" when the file was initially added (which may account for it never having been hooked up to the build). Notes: svn path=/head/; revision=274480
2014-06-10Don't destroy bus_dma maps created by bus_dmamem_alloc(). In some cases,John Baldwin
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
2013-08-12Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIScott Long
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
2013-04-10options DPT_HANDLE_TIMEOUTS hasn't worked since dpt(4) was converted to CAMSean Bruno
somewhere around svn r39402 to r39234. I don't know of anyone who really wants to test these changes, but they only remove the deprecated code in question. This shreds the driver down a bit and *removes* options from the kernel configs. These don't appear to be referenced in the man page, so no need to check it there. PR: kern/44587 Obtained from: Yahoo! Inc. MFC after: 2 weeks Notes: svn path=/head/; revision=249348
2013-02-12Reform the busdma API so that new types may be added without modifyingKonstantin Belousov
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
2012-10-16Fix build of dpt(4).Sergey Kandaurov
Notes: svn path=/head/; revision=241605
2012-10-15Add locking to the dpt(4) driver and mark it MPSAFE.John Baldwin
- 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. - Remove the global dpt_softcs list and use devclass_get_device() instead. - Use pci_enable_busmaster() rather than frobbing the PCI command register directly. Tested by: no one Notes: svn path=/head/; revision=241593
2012-04-21Fix the following clang warning in dpt(4):Dimitry Andric
sys/dev/dpt/dpt_scsi.c:612:18: error: implicit truncation from 'int' to bitfield changes value from -2 to 2 [-Werror,-Wconstant-conversion] dpt->cache_type = DPT_CACHE_WRITEBACK; ^ ~~~~~~~~~~~~~~~~~~~ by defining DPT_CACHE_WRITEBACK as 2, since dpt_softc::cache_type is an unsigned bitfield. No binary change. MFC after: 1 week Notes: svn path=/head/; revision=234540
2012-03-12Remove comments about creating DMA tags as children of the DMA tags of theirJuli Mallett
parent bus where the code has now been modified to do so. Reviewed by: scottl Notes: svn path=/head/; revision=232882
2012-03-12Convert a number of drivers to obtaining their parent DMA tag from theirScott Long
PCI device attachment. Notes: svn path=/head/; revision=232854
2012-02-26Remove duplicate assignment of CTS_SPI_VALID_SYNC_RATE bitKevin Lo
Notes: svn path=/head/; revision=232185
2010-01-08Get rid of #ident, GCC 4.4 warns about it being deprecated.Edward Tomasz Napierala
OK-ed by: scottl Notes: svn path=/head/; revision=201807
2007-06-17Prepare for future integration between CAM and newbus. xpt_bus_registerScott Long
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
2007-04-15Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willScott Long
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
2007-02-23o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati
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
2007-01-18Wrap the EISA-specific parts of the dpt(4) and si(4) back-ends inMarius Strobl
the newly added DEV_EISA. This is done so that these back-ends can be compiled on platforms not providing in{b,w,l}()/out{b,w,l}() and friends (but may wish to use them together with bus front-ends other than the EISA one). Notes: svn path=/head/; revision=166091
2006-12-11Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.Matt Jacob
PR: 106543 MFC after: 3 days Notes: svn path=/head/; revision=165102
2006-11-022nd and final commit that moves us to CAM_NEW_TRAN_CODEMatt Jacob
as the default. Reviewed by multitudes. Notes: svn path=/head/; revision=163896
2006-10-31The first of 3 major steps to move the CAM layer forward to usingMatt Jacob
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
2006-08-04Commit the results of the typo hunt by Darren Pilgrim.Yaroslav Tykhiy
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
2006-05-16Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp
unnecessary. Notes: svn path=/head/; revision=158651
2005-05-29Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi
and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
2005-04-13Remove unnecessary dpt_free().Matthew N. Dodd
Notes: svn path=/head/; revision=144990
2005-03-05Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh
Notes: svn path=/head/; revision=143161
2005-02-24remove gratuitous null ptr checkSam Leffler
Noticed by: Coverity Prevent analysis tool Notes: svn path=/head/; revision=142357
2005-02-24o nuke duplicate call of dpt_free when dpt_init failsSam Leffler
o nuke gratuitous null ptr check; softc can never be null in this routine Noticed by: Coverity Prevent analysis tool Reviewed by: mdodd Notes: svn path=/head/; revision=142356
2005-01-06Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh
Notes: svn path=/head/; revision=139749
2004-03-17Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
2004-03-17Adjust $FreeBSD$'s.David E. O'Brien
Notes: svn path=/head/; revision=127103
2004-02-21Device megapatch 1/6:Poul-Henning Kamp
Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
2004-01-17- Handle failure of cam_sim_alloc().Matthew N. Dodd
This prevents xpt_bus_register() from dereferencing NULL. - Assign pointer to NULL after cam_sim_free(). Submitted by: Paul Twohey <twohey@CS.Stanford.EDU> Notes: svn path=/head/; revision=124612
2003-09-02Use PCIR_BAR(x) instead of PCIR_MAPS.John Baldwin
Glanced over by: imp, gibbs Tested by: i386 LINT Notes: svn path=/head/; revision=119690
2003-08-24Use __FBSDID().David E. O'Brien
Also some minor style cleanups. Notes: svn path=/head/; revision=119418
2003-08-22Prefer new location of pci include files (which have only been in theWarner Losh
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
2003-07-01Mega busdma API commit.Scott Long
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
2003-06-14Merge common XPT_CALC_GEOMETRY functions into a single convenience function.Nate Lawson
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
2003-05-27Bring back bus_dmasync_op_t. It is now a typedef to an int, though theScott Long
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
2003-04-10I deserve a big pointy hat for having missed all those referencesMaxime Henrion
to bus_dmasync_op_t in my last commit. Notes: svn path=/head/; revision=113350
2003-03-29Remove useless code.Matthew N. Dodd
Notes: svn path=/head/; revision=112796
2003-03-29Don't compile the identify method yet.Matthew N. Dodd
Notes: svn path=/head/; revision=112795
2003-03-29Clean up argument comments for bus_dma_tag_create() calls.Matthew N. Dodd
Notes: svn path=/head/; revision=112782