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 references to EISA support in mlx. The driver never supportedthe EISA cards and EISA bus support is being removed.
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
sys/dev: extend use of the howmany() macro when available.We have a howmany() macro in the <sys/param.h> header that isconvenient to re-use as it makes things easier to read.
sys/dev: use our nitems() macro when it is avaliable through param.h.No functional change, only trivial cases are done in this sweep,Drivers that can get further enhancements will be done independ
sys/dev: use our nitems() macro when it is avaliable through param.h.No functional change, only trivial cases are done in this sweep,Drivers that can get further enhancements will be done independently.Discussed in: freebsd-current
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
Add missing calls to bus_dmamap_unload() when freeing static DMAallocations.Reviewed by: scottl
Remove FreeBSD 4.x compat shims. Verified by md5.
Add locking to mlx(4) to make it MPSAFE along with some other fixes:- Use callout(9) rather than timeout(9).- Add a mutex as an I/O lock that protects the adapter and is used for the I/O path.-
Add locking to mlx(4) to make it MPSAFE along with some other fixes:- Use callout(9) rather than timeout(9).- Add a mutex as an I/O lock that protects the adapter and is used for the I/O path.- Add an sx lock as a configuration lock that protects the relationship of configured volumes.- Freeze the request queue when a DMA load is deferred with EINPROGRESS and unfreeze the queue when the DMA callback is invoked.- Explicitly poll the hardware while waiting to submit a command to allow completed commands to free up slots in the command ring.- Remove driver-wide 'initted' variable from mlx_*_fw_handshake() routines. That state should be per-controller instead. Add it as an argument since the first caller knows when it is the first caller.- Remove explicit bus_space tag/handle and use bus_*() rather than bus_space_*().- Move duplicated PCI device ID probing into a mlx_pci_match() routine.- Don't check for PCIM_CMD_MEMEN (the PCI bus will enable that when allocating the resource) and use pci_enable_busmaster() rather than manipulating the register directly.Tested by: no one despite multiple requests (hope it works)
Correct a typo.Reported by: Sascha Wildner <swildner dragonflybsd org>Reviewed by: scottlMFC after: 3 days
Convert a number of drivers to obtaining their parent DMA tag from theirPCI device attachment.
Remove unused variable count.This variable is initialized but not used.
- 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.
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)
Separate the parallel scsi knowledge out of the core of the XPT, andmodularize it so that new transports can be created.Add a transport for SATAAdd a periph+protocol layer for ATAAdd a driver
Separate the parallel scsi knowledge out of the core of the XPT, andmodularize it so that new transports can be created.Add a transport for SATAAdd a periph+protocol layer for ATAAdd a driver for AHCI-compliant hardware.Add a maxio field to CAM so that drivers can advertise their maxI/O capability. Modify various drivers so that they are insulatedfrom the value of MAXPHYS.The new ATA/SATA code supports AHCI-compliant hardware, and will overridethe classic ATA driver if it is loaded as a module at boot time or compiledinto the kernel. The stack now support NCQ (tagged queueing) for increasedperformance on modern SATA drives. It also supports port multipliers.ATA drives are accessed via 'ada' device nodes. ATAPI drives areaccessed via 'cd' device nodes. They can all be enumerated and manipulatedvia camcontrol, just like SCSI drives. SCSI commands are not translated totheir ATA equivalents; ATA native commands are used throughout the entirestack, including camcontrol. See the camcontrol manpage for furtherdetails. Testing this code may require that you update your fstab, andpossibly modify your BIOS to enable AHCI functionality, if available.This code is very experimental at the moment. The userland ABI/API haschanged, so applications will need to be recompiled. It may changefurther in the near future. The 'ada' device name may also change asmore infrastructure is completed in this project. The goal is toeventually put all CAM busses and devices until newbus, allowing forinteresting topology and management options.Few functional changes will be seen with existing SCSI/SAS/FC drivers,though the userland ABI has still changed. In the future, transportsspecific modules for SAS and FC may appear in order to better supportthe topologies and capabilities of these technologies.The modularization of CAM and the addition of the ATA/SATA modules ismeant to break CAM out of the mold of being specific to SCSI, letting itgrow to be a framework for arbitrary transports and protocols. It alsoallows drivers to be written to support discrete hardware withoutjeopardizing the stability of non-related hardware. While only an AHCIdriver is provided now, a Silicon Image driver is also in the works.Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardwareis possible and encouraged. Help with new transports is also encouraged.Submitted by: scottl, mavApproved by: re
Convert mlx(4) and mly(4) to si_drv1 instead of dev2unit().
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
Make mlxcontrol work with more than one system drive:- When searching for the next system drive, return the next one instead of always returning the first one.- Plug fd lead and make sure that th
Make mlxcontrol work with more than one system drive:- When searching for the next system drive, return the next one instead of always returning the first one.- Plug fd lead and make sure that the MLX_NEXT_CHILD ioctl is called on the controller fd, not the disk's one.While there, fix a cut-n-pase error in a warning.Reviewed by: jhbApproved by: kan (mentor)MFC after: 1 month
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@
Add missing parenthesis around error handling code upon attachingmlx devices. This fixes an issue where mlx device drives fail to bedetected at system boot.This is a RELENG_6 candidate.Submitte
Add missing parenthesis around error handling code upon attachingmlx devices. This fixes an issue where mlx device drives fail to bedetected at system boot.This is a RELENG_6 candidate.Submitted by: oliverPR: kern/84163
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)
plug resource leakSubmitted by: mdoddNoticed by: Coverity Prevent analysis tool
fix potential null ptr derefNoticed by: Coverity Prevent analysis tool
avoid null ptr derefNoticed by: Coverity Prevent analysis tool
1234