pst: clean up empty lines in .c and .h files
Ever since the block layer expanded its command syntax beyond justBIO_READ and BIO_WRITE, we've handled this expanded syntax poorly indrivers when the driver doesn't support a particular command.
Ever since the block layer expanded its command syntax beyond justBIO_READ and BIO_WRITE, we've handled this expanded syntax poorly indrivers when the driver doesn't support a particular command. Do asweep and fix that.Reported by: imp
show more ...
Revert r327828, r327949, r327953, r328016-r328026, r328041:Uses of mallocarray(9).The use of mallocarray(9) has rocketed the required swap to build FreeBSD.This is likely caused by the allocation
Revert r327828, r327949, r327953, r328016-r328026, r328041:Uses of mallocarray(9).The use of mallocarray(9) has rocketed the required swap to build FreeBSD.This is likely caused by the allocation size attributes which put extra pressureon the compiler.Given that most of these checks are superfluous we have to choose betterwhere to use mallocarray(9). We still have more uses of mallocarray(9) buthopefully this is enough to bring swap usage to a reasonable level.Reported by: woschPR: 225197
dev: make some use of mallocarray(9).Focus on code where we are doing multiplications within malloc(9). None ofthese is likely to overflow, however the change is still useful as somestatic checke
dev: make some use of mallocarray(9).Focus on code where we are doing multiplications within malloc(9). None ofthese is likely to overflow, however the change is still useful as somestatic checkers can benefit from the allocation attributes we use formallocarray.This initial sweep only covers malloc(9) calls with M_NOWAIT. No goodreason but I started doing the changes before r327796 and at that time itwas convenient to make sure the sorrounding code could handle NULL values.
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.
Cleanups to pst(4):- Use callout(9) instead of timeout(9).- Don't bother zero'ing the softc.- Destroy mutex on detach.Tested by: no one
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
Convert files to UTF-8
Pass the arguments to mtx_init() in the correct order. There should beno change to the binary because the value of MTX_DEF is zero and thereis a visible function prototype.MFC after: 1 week
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)
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@
Use BUS_PROBE_DEFAULT for pci probe return value
Use the correct type for iop_attach().
Flush the queue of minor fixes to pst.
Convert callers to the new bus_alloc_resource_any(9) API.Submitted by: Mark Santcroos <[email protected]>Reviewed by: imp, dfr, bde
Change the disk(9) API in order to make device removal more robust.Previously the "struct disk" were owned by the device driver and thisgave us problems when the device disappared and the users of
Change the disk(9) API in order to make device removal more robust.Previously the "struct disk" were owned by the device driver and thisgave us problems when the device disappared and the users of that devicewere not immediately disappearing.Now the struct disk is allocate with a new call, disk_alloc() and ownedby geom_disk and just abandonned by the device driver when disk_create()is called.Unfortunately, this results in a ton of "s/\./->/" changes to devicedrivers.Since I'm doing the sweep anyway, a couple of other API improvementshave been carried out at the same time:The Giant awareness flag has been flipped from DISKFLAG_NOGIANT toDISKFLAG_NEEDSGIANTA version number have been added to disk_create() so that we can detect,report and ignore binary drivers with old ABI in the future.Manual page update to follow shortly.
Dont re-arm the timeout twice on a timeout error.The problem with the first timeout still exsists though, but notit doesn't enter a groundbound spin loop :)Found by: Aaron Smith <[email protected]>
Use __FBSDID().Also some minor style cleanups.
Prefer new location of pci include files (which have only been in thetree for two or more years now), except in a few places where there'scode to be compatible with older versions of FreeBSD.
Pull the pst driver out from under GAINT.
Instead of not grapping a request binfinish(ENOMEM) it if malloc fails.
Use bioq_flush() to drain a bio queue with a specific error code.Retain the mistake of not updating the devstat API for now.Spell bioq_disksort() consistently with the remaining bioq_*().#includ
Use bioq_flush() to drain a bio queue with a specific error code.Retain the mistake of not updating the devstat API for now.Spell bioq_disksort() consistently with the remaining bioq_*().#include <geom/geom_disk.h> where this is more appropriate.
Centralize the devstat handling for all GEOM disk device driversin geom_disk.c.As a side effect this makes a lot of #include <sys/devicestat.h>lines not needed and some biofinish() calls can be r
Centralize the devstat handling for all GEOM disk device driversin geom_disk.c.As a side effect this makes a lot of #include <sys/devicestat.h>lines not needed and some biofinish() calls can be reduced tobiodone() again.
NO_GEOM cleanup:Move to "struct disk *" centric API.Add NULL check to a malloc(9) return value.Ok'ed by: sos
12