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 ...
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
Remove remaining 4.x compat shims. No resulting changes (verified bymd5).
- Explicitly call twe_done() to poll the hardware when looping in twe_start() to simulate the behavior on 4.x where the driver dropped spl to allow interrupts to run to free up space in the comma
- Explicitly call twe_done() to poll the hardware when looping in twe_start() to simulate the behavior on 4.x where the driver dropped spl to allow interrupts to run to free up space in the command queue. Be careful to only poll if we are going to make at least one more attempt to queue the current command. Also, when polling, be careful to not call twe_startio() to queue more commands to avoid recursion.- Move the buffer for formatting AEN messages into the softc instead of using a single driver-wide static buffer.Requested by: scottl (1)Tested by: Mike Tancsa @ Sentex
Add locking to the twe(4) driver and make it MPSAFE:- Add per-controller configuration (sx) and I/O (mutex) locks. The configuration lock protects the relationship of volumes and drives while t
Add locking to the twe(4) driver and make it MPSAFE:- Add per-controller configuration (sx) and I/O (mutex) locks. The configuration lock protects the relationship of volumes and drives while the I/O lock protects access to the controller's registers and the main I/O path.- Remove some checks for M_WAITOK malloc()'s failing.- Remove the explicit bus space tag/handle from the softc and use bus_*() rather than bus_space_*().- Reuse the existing new-bus sysctl context instead of creating a new one.- Remove compat shims for FreeBSD 4.x.- Use pci_enable_busmaster() rather than doing it by hand, and rely on bus_alloc_resource() to enable PCI I/O decoding.Tested by: Mike Tancsa mike sentex netReviewed by: scottl (partially)MFC after: 1 month
Convert a number of drivers to obtaining their parent DMA tag from theirPCI device attachment.
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel- While at it, use DEVMETHOD_END. Discussed with: jhb- Also while at it, use __FBSDID.
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.This means that their use is restricted to a single C file.
Teach twe driver to report array stripe size to GEOM.
Change the command argument to ioctl routines to u_long to avoidtruncating the command to 32bit on 64bit archs where int is 32bit(ie. amd64).Approved by: scottlApproved by: ed (mentor, implicit)
Temporarily revert the new-bus locking for 8.0 release. It will bereintroduced after HEAD is reopened for commits by re@.Approved by: re (kib), attilio
Make the newbus subsystem Giant free by adding the new newbus sxlock.The newbus lock is responsible for protecting newbus internIal structures,device states and devclass flags. It is necessary to h
Make the newbus subsystem Giant free by adding the new newbus sxlock.The newbus lock is responsible for protecting newbus internIal structures,device states and devclass flags. It is necessary to hold it when allsuch datas are accessed. For the other operations, softc locking shouldensure enough protection to avoid races.Newbus lock is automatically held when virtual operations on the deviceand bus are invoked when loading the driver or when the suspend/resumetake place. For other 'spourious' operations trying to access/modifythe newbus topology, newbus lock needs to be automatically acquired anddropped.For the moment Giant is also acquired in some key point (modules subsystem)in order to avoid problems before the 8.0 release as module handlers couldmake assumptions about it. This Giant locking should go just afterthe release happens.Please keep in mind that the public interface can be expanded in orderto provide more support, if there are really necessities at some pointand also some bugs could arise as long as the patch needs a bit offurther testing.Bump __FreeBSD_version in order to reflect the newbus lock introduction.Reviewed by: ed, hps, jhb, imp, mav, scottlNo answer by: ariff, thompsa, yongariTested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com>Sponsored by: Yahoo! IncorporatedApproved by: re (ksmith)
We no longer need to use d_thread_t, migrate to struct thread *.
Use si_drv1 instead of dev2unit() in twe(4) and twa(4)Reviewed by: scottl
Replace all calls to minor() with dev2unit().After I removed all the unit2minor()/minor2unit() calls from the kernelyesterday, I realised calling minor() everywhere is quite confusing.Character d
Replace all calls to minor() with dev2unit().After I removed all the unit2minor()/minor2unit() calls from the kernelyesterday, I realised calling minor() everywhere is quite confusing.Character devices now only have the ability to store a unit number, nota minor number. Remove the confusion by using dev2unit() everywhere.This commit could also be considered as a bug fix. A lot of drivers callminor(), while they should actually be calling dev2unit(). In -CURRENTthis isn't a problem, but it turns out we never had any problem reportsrelated to that issue in the past. I suspect not many people connectmore than 256 pieces of the same hardware.Reviewed by: kib
Add missing \n.PR: 120341Submitted by: CyberLeo <[email protected]>Approved by: rwatson (mentor), [email protected]MFC after: 3 days
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@
Normalize a significant number of kernel malloc type names:- Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat.- Remove punctuation that i
Normalize a significant number of kernel malloc type names:- Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat.- Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters.- Disambiguate some collisions by adding subsystem prefixes to some memory types.- Generally prefer lower case to upper case.- If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases.Not all instances were caught in this change, so more work is required tofinish this conversion. Similar changes are required for UMA zone names.
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386and amd64. The optimization is a trivial on recent machines.Reviewed by: -arch (imp, marcel, dfr)
Use correct flags for bus_dma_tag_create().
Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnBUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vxboth support so that xl will snarf them on up.
Undoing recent changes to make 3ware's i386 tools work on amd64, since there arenow amd64 versions of CLI and 3DM2 available.
Fix crashdumps on twe. The twe_immediate_request() path was not onlycopying data to a temporary buffer before the I/O, but also copying thattemporary buffer back to the original data location afte
Fix crashdumps on twe. The twe_immediate_request() path was not onlycopying data to a temporary buffer before the I/O, but also copying thattemporary buffer back to the original data location after the I/O. Whenyou're dumping kernel heap and stack and protected pages, this is veryvery bad.A belated thanks to Robert Watson for donating hardware for this (and future)work.MFC after: 3 days
Recognize the 32-bit form of the twe binary passthrough ioctl()s so thatthere is some hope for the 32-bit management utilities to run. I've usedthe cli successfully, but 3dm2 doesn't work for othe
Recognize the 32-bit form of the twe binary passthrough ioctl()s so thatthere is some hope for the 32-bit management utilities to run. I've usedthe cli successfully, but 3dm2 doesn't work for other reasons. Of course,a native binary of the 3dm2 and cli would be much better, but that doesn'texist.
1234