Add SPDX identifiers to linux_ptrace.c and cfumass.c.MFC after: 2 weeks
Do pass removing some write-only variables from the kernel.This reduces noise when kernel is compiled by newer GCC versions,such as one used by external toolchain ports.Reviewed by: kib, andrew(
Do pass removing some write-only variables from the kernel.This reduces noise when kernel is compiled by newer GCC versions,such as one used by external toolchain ports.Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial)Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c)Differential Revision: https://reviews.freebsd.org/D10385
show more ...
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.
Implement use of multiple transfers per I/O.This change removes limitation of single S/G list entry and limitation onmaximal I/O size, using multiple data transfers per I/O if needed. Alsoit rem
Implement use of multiple transfers per I/O.This change removes limitation of single S/G list entry and limitation onmaximal I/O size, using multiple data transfers per I/O if needed. Alsoit removes code duplication between send and receive paths, which are nowcompletely equal.
Use ctl_queue_sense() to implement sense data reporting.USB MS BBB transport does not support autosense, so we have to queue anysense data back to CTL for later fetching via REQUEST SENSE.
Update kern_data_resid according to r312291.This now mandatory for correct operation.
Add USB Mass Storage CTL frontend. This makes it possiblefor USB OTG-capable hardware to implement device side of USBMass Storage, ie pretend it's a flash drive. It's configuredin the same way a
Add USB Mass Storage CTL frontend. This makes it possiblefor USB OTG-capable hardware to implement device side of USBMass Storage, ie pretend it's a flash drive. It's configuredin the same way as other CTL frontends, using ctladm(8)or ctld(8). Differently from usfs(4), all the configurationcan be done without rebuilding the kernel.Testing and review is welcome. Right now I'm still moving,and I don't have access to my test environment, so I'm somewhatreluctant to making larger changes to this code; on the otherhand I don't want to let it sit on Phab until my testing setupis back, because I want to get it into 11.1-RELEASE.Reviewed by: emaste (cursory), wblock (man page)MFC after: 2 weeksRelnotes: yesSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D8787
Improve USB polling mode by not locking any mutexes, asserting anymutexes or using any callouts when active.Trying to lock a mutex when KDB is active or the scheduler is stoppedcan result in infi
Improve USB polling mode by not locking any mutexes, asserting anymutexes or using any callouts when active.Trying to lock a mutex when KDB is active or the scheduler is stoppedcan result in infinite wait loops. The same goes for calling calloutrelated functions which in turn lock mutexes.If the USB controller at which a USB keyboard is connected is idlewhen KDB is entered, polling the USB keyboard via USB will alwayssucceed. Else polling may fail depending on which state the USBsubsystem and USB interrupt handler is in. This is unavoidable unlessKDB can wait for USB interrupt threads to complete before stalling theCPU(s).Tested by: Bruce Evans <[email protected]>MFC after: 4 weeks
dev/usb: minor spelling fixes in comments.No functional change.Reviewed by: hselasky
Create a USB_PNP_INFO and use it to export the existing PNPtables. Some drivers needed some slight re-arrangement of declarationsto accommodate this. Change the USB pnp tables slightly to allowbet
Create a USB_PNP_INFO and use it to export the existing PNPtables. Some drivers needed some slight re-arrangement of declarationsto accommodate this. Change the USB pnp tables slightly to allowbetter compatibility with the system by moving linux driver info fromstart of each entry to the end. All other PNP tables in the systemhave the per-device flags and such at the end of the elements ratherthat at the beginning.Differential Review: https://reviews.freebsd.org/D3458
Use define instead of constant.Submitted by: Dmitry Luhtionov <[email protected]>
Make a bunch of USB debug SYSCTLs tunable, so that their value(s) canbe set before the USB device(s) are probed.
Pull in r267961 and r267973 again. Fix for issues reported will follow.
Revert r267961, r267973:These changes prevent sysctl(8) from returning proper output,such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1
Revert r267961, r267973:These changes prevent sysctl(8) from returning proper output,such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
Extend the meaning of the CTLFLAG_TUN flag to automatically check ifthere is an environment variable which shall initialize the SYSCTLduring early boot. This works for all SYSCTL types both statica
Extend the meaning of the CTLFLAG_TUN flag to automatically check ifthere is an environment variable which shall initialize the SYSCTLduring early boot. This works for all SYSCTL types both statically anddynamically created ones, except for the SYSCTL NODE type and SYSCTLswhich belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added tobe used in the case a tunable sysctl has a custom initialisationfunction allowing the sysctl to still be marked as a tunable. Thekernel SYSCTL API is mostly the same, with a few exceptions for somespecial operations like iterating childrens of a static/extern SYSCTLnode. This operation should probably be made into a factored outcommon macro, hence some device drivers use this. The reason forchanging the SYSCTL API was the need for a SYSCTL parent OID pointerand not only the SYSCTL parent OID list pointer in order to quicklygenerate the sysctl path. The motivation behind this patch is to avoidparameter loading cludges inside the OFED driver subsystem. Instead ofadding special code to the OFED driver subsystem to post-load tunablesinto dynamically created sysctls, we generalize this in the kernel.Other changes:- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"to "hw.pcic.intr_mask".- Removed redundant TUNABLE statements throughout the kernel.- Some minor code rewrites in connection to removing not neededTUNABLE statements.- Added a missing SYSCTL_DECL().- Wrapped two very long lines.- Avoid malloc()/free() inside sysctl string handling, in case it iscalled to initialize a sysctl from a tunable, hence malloc()/free() isnot ready when sysctls from the sysctl dataset are registered.- Bumped FreeBSD version to indicate SYSCTL API change.MFC after: 2 weeksSponsored by: Mellanox Technologies
Adjust various SCSI drivers to handle either a 32-bit or 64-bit lun_id_t,mostly by adjustments to debugging printf() format specifiers. For highnumbered LUNs, also switch to printing them in hex as
Adjust various SCSI drivers to handle either a 32-bit or 64-bit lun_id_t,mostly by adjustments to debugging printf() format specifiers. For highnumbered LUNs, also switch to printing them in hex as per SAM-5.MFC after: 2 weeks
Clear correct data structure.MFC after: 1 weekApproved by: re (hrs)
Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arraysReviewed by: cognetApproved by: cognet
Modify the FreeBSD USB kernel code so that it can be compiled directlyinto the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systemsor embedded platforms. This is also useful for out
Modify the FreeBSD USB kernel code so that it can be compiled directlyinto the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systemsor embedded platforms. This is also useful for out of the system compilationof the FreeBSD USB stack for various purposes. The USB kernel files cannow optionally include a global header file which should include all neededdefinitions required to compile the FreeBSD USB stack. When the global USBheader file is included, no other USB header files will be included bydefault.Add new file containing the USB stack configuration for theFreeBSD loader build.Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now allUSB files follow the same style.Use cases: - console in loader via USB - loading kernel via USBDiscussed with: Hiroki Sato, hrs @ EuroBSDCon
Do not pretend to have autosense data when no such data is available.Make umass return an error code if SCSI sense retrieval requesthas failed. Make sure scsi_error_action honors SF_NO_RETRY andS
Do not pretend to have autosense data when no such data is available.Make umass return an error code if SCSI sense retrieval requesthas failed. Make sure scsi_error_action honors SF_NO_RETRY andSF_NO_RECOVERY in all cases, even if it cannot parse sense bytes.Reviewed by: hselasky (umass), scottl (cam)
Freeze device queue before returning errors to CAM. This is requiredfor proper error recovery, including keeping original request order.Reviewed by: hselasky
Fix more regression issue after r244503.usbd_transfer_setup() does not set a default length for USB transfers.Only the number of frames is automatically setup.MFC after: 1 week
Make sure all USB drivers allocate buffer memorythrough the USB API and/or busdma.The following assumptions have been made:umass - buffers passed from CAM/SCSI layer are OKnetwork - mbufs are OK
Make sure all USB drivers allocate buffer memorythrough the USB API and/or busdma.The following assumptions have been made:umass - buffers passed from CAM/SCSI layer are OKnetwork - mbufs are OK.Some other nits while at it.MFC after: 1 weekSuggested by: imp
Add support for throttling UMASS.Mostly useful for debugging purposes.MFC after: 1 week
Add the UQ_MSC_NO_PREVENT_ALLOW quirk to handle devices that do not supportthe 'PREVENT/ALLOW MEDIUM REMOVAL' SCSI command. An example of such adevice is the STmicro ST72682. We send the SCSI comma
Add the UQ_MSC_NO_PREVENT_ALLOW quirk to handle devices that do not supportthe 'PREVENT/ALLOW MEDIUM REMOVAL' SCSI command. An example of such adevice is the STmicro ST72682. We send the SCSI command for every open andclose, which can result in a significant amount of spam on the consoleduring boot.Reviewed by: hps@
1234