Tag the current round of deprecated drivers.Differential Revision: https://reviews.freebsd.org/D13818
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
show more ...
Remove EISA support from dpt. Remove known EISA models fromdpt.4. Remove EISA-only bits from dpt_scsi.c.
In the same vein as r311350, fix whitespace in handling of XPT_PATH_INQ inseveral more drivers.Sponsored by: Panasas
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq arefixed-length strings. AFAICT the only place they're read is insbin/c
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq arefixed-length strings. AFAICT the only place they're read is insbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.However, the kernel doesn't null-terminate them. A bunch of copy-pasted codeuses strncpy to write them, and doesn't guarantee null-termination. For atleast 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actuallyoverflows. You can see the result by doing "camcontrol negotiate da0 -v".This change null-terminates those fields everywhere they're set in thekernel. It also shortens a few strings to ensure they'll fit within the16-character field.PR: 215474Reported by: CoverityCID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187CID: 1010035 1010036 1010042 1010041 1010040 1010039Reviewed by: imp, sephe, slmMFC after: 4 weeksSponsored by: Spectra Logic CorpDifferential Revision: https://reviews.freebsd.org/D9037Differential Revision: https://reviews.freebsd.org/D9038
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
Remove MAXBSIZE use from drivers where it has nothing to do.In some cases limits are just not needed, in others -- DFLTPHYS is theright constant to use instead.MFC after: 1 month
Prevent overflow issues in timeout processingPreviously, any timeout value for which (timeout * hz) will overflow thesigned integer, will give weird results, since callout(9) routines willconvert
Prevent overflow issues in timeout processingPreviously, any timeout value for which (timeout * hz) will overflow thesigned integer, will give weird results, since callout(9) routines willconvert negative values of ticks to '1'. For unsigned integer overflow wewill get sufficiently smaller timeout values than expected.Switch from callout_reset, which requires conversion to int based ticksto 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<[email protected]> back in 5 Aug 2011 which used a macro to help avoidthe overlow.Differential Revision: https://reviews.freebsd.org/D1157Reviewed by: mav, davideMFC after: 1 monthSponsored by: Multiplay
Remove dpt_isa.c and commented out references to it. It was never connectedto the build in either sys/conf/files* or sys/modules/dpt/Makefile. Also,it was denoted as "doesn't quite work yet" when
Remove dpt_isa.c and commented out references to it. It was never connectedto 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).
Don't destroy bus_dma maps created by bus_dmamem_alloc(). In some cases,don't create a map before calling bus_dmamem_alloc() (such maps wereleaked). It is believed that the extra destroy of the m
Don't destroy bus_dma maps created by bus_dmamem_alloc(). In some cases,don't create a map before calling bus_dmamem_alloc() (such maps wereleaked). It is believed that the extra destroy of the map was generallyharmless since bus_dmamem_alloc() often uses special maps for whichbus_dmamap_destroy() is a no-op (e.g. on x86).Reviewed by: scottl
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIcommand register. The lazy BAR allocation code in FreeBSD sometimesdisables this bit when it detects a range conflict, and w
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIcommand register. The lazy BAR allocation code in FreeBSD sometimesdisables this bit when it detects a range conflict, and will re-enableit on demand when a driver allocates the BAR. Thus, the bit is no longera reliable indication of capability, and should not be checked. Thisresults in the elimination of a lot of code from drivers, and also givesthe opportunity to simplify a lot of drivers to use a helper API to setthe busmaster enable bit.This changes fixes some recent reports of disk controllers and theirassociated drives/enclosures disappearing during boot.Submitted by: jhbReviewed by: jfv, marius, achadd, achimMFC after: 1 day
options DPT_HANDLE_TIMEOUTS hasn't worked since dpt(4) was converted to CAMsomewhere around svn r39402 to r39234.I don't know of anyone who really wants to test these changes, but theyonly remove
options DPT_HANDLE_TIMEOUTS hasn't worked since dpt(4) was converted to CAMsomewhere around svn r39402 to r39234.I don't know of anyone who really wants to test these changes, but theyonly remove the deprecated code in question. This shreds the driver down abit and *removes* options from the kernel configs.These don't appear to be referenced in the man page, so no need to check itthere.PR: kern/44587Obtained from: Yahoo! Inc.MFC after: 2 weeks
Reform the busdma API so that new types may be added without modifyingevery architecture's busdma_machdep.c. It is done by unifying thebus_dmamap_load_buffer() routines so that they may be called
Reform the busdma API so that new types may be added without modifyingevery architecture's busdma_machdep.c. It is done by unifying thebus_dmamap_load_buffer() routines so that they may be called from MIcode. The MD busdma is then given a chance to do any final processingin the complete() callback.The cam changes unify the bus_dmamap_load* handling in cam drivers.The arm and mips implementations are updated to track virtualaddresses for sync(). Previously this was done in a type specificway. Now it is done in a generic way by recording the list ofvirtuals 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 <[email protected]>)
Fix build of dpt(4).
Add locking to the dpt(4) driver and mark it MPSAFE.- 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
Add locking to the dpt(4) driver and mark it MPSAFE.- 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
Fix the following clang warning in dpt(4): 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->cach
Fix the following clang warning in dpt(4): 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 anunsigned bitfield. No binary change.MFC after: 1 week
Remove comments about creating DMA tags as children of the DMA tags of theirparent bus where the code has now been modified to do so.Reviewed by: scottl
Convert a number of drivers to obtaining their parent DMA tag from theirPCI device attachment.
Remove duplicate assignment of CTS_SPI_VALID_SYNC_RATE bit
Get rid of #ident, GCC 4.4 warns about it being deprecated.OK-ed by: scottl
Prepare for future integration between CAM and newbus. xpt_bus_registernow takes a device_t to be the parent of the bus that is being created.Most SIMs have been updated with a reasonable argument
Prepare for future integration between CAM and newbus. xpt_bus_registernow 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 exceptionsjust pass NULL for now. This argument isn't used yet and the newbusintegration likely won't be ready until after 7.0-RELEASE.
Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willuse to synchornize and protect all data objects that are used for thatSIM. Drivers that are not yet MPSAFE register Giant a
Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willuse to synchornize and protect all data objects that are used for thatSIM. Drivers that are not yet MPSAFE register Giant and operate asusual. RIght now, no drivers are MPSAFE, though a few will be changedin 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 tobe recompiled.
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()o add an int return code to all fast handlerso retire INTR_FAST/IH_FASTFor more info: http://docs.freebsd.org
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()o add an int return code to all fast handlerso retire INTR_FAST/IH_FASTFor more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-currentReviewed by: manyApproved by: re@
Wrap the EISA-specific parts of the dpt(4) and si(4) back-ends inthe newly added DEV_EISA. This is done so that these back-ends canbe compiled on platforms not providing in{b,w,l}()/out{b,w,l}() an
Wrap the EISA-specific parts of the dpt(4) and si(4) back-ends inthe newly added DEV_EISA. This is done so that these back-ends canbe compiled on platforms not providing in{b,w,l}()/out{b,w,l}() andfriends (but may wish to use them together with bus front-ends otherthan the EISA one).
Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.PR: 106543MFC after: 3 days
12345