freebsd-dev/sys/dev/usb
Konstantin Belousov cd85379104 Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from
MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.

Make b_pages[] array in struct buf flexible.  Size b_pages[] for buffer
cache buffers exactly to atop(maxbcachebuf) (currently it is sized to
atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1.
The +1 for pbufs allow several pbuf consumers, among them vmapbuf(),
to use unaligned buffers still sized to maxphys, esp. when such
buffers come from userspace (*).  Overall, we save significant amount
of otherwise wasted memory in b_pages[] for buffer cache buffers,
while bumping MAXPHYS to desired high value.

Eliminate all direct uses of the MAXPHYS constant in kernel and driver
sources, except a place which initialize maxphys.  Some random (and
arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted
straight.  Some drivers, which use MAXPHYS to size embeded structures,
get private MAXPHYS-like constant; their convertion is out of scope
for this work.

Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs,
dev/siis, where either submitted by, or based on changes by mav.

Suggested by: mav (*)
Reviewed by:	imp, mav, imp, mckusick, scottl (intermediate versions)
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D27225
2020-11-28 12:12:51 +00:00
..
controller When doing a USB alternate setting on an USB interface we need to 2020-11-12 09:15:07 +00:00
gadget usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
input Implement the USB_GET_DEVICEINFO ioctl(2) for uhid(4). 2020-10-31 21:53:23 +00:00
misc usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
net ipheth(4): Fix for iOS 14 2020-11-18 19:35:30 +00:00
quirk Add more USB quirks. 2020-11-12 18:24:37 +00:00
serial uplcom: add ATen/Prolific USB-232 Controller D USB ID 2020-11-17 18:28:20 +00:00
storage Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
template usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
video usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
wlan WiFi: fix ieee80211_media_change() callers 2020-09-07 15:35:40 +00:00
ufm_ioctl.h
uftdiio.h
uled_ioctl.h
usb_bus.h
usb_busdma.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_busdma.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_cdc.h
usb_controller.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_core.c
usb_core.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_debug.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many) 2020-02-15 18:52:12 +00:00
usb_debug.h
usb_dev.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_dev.h
usb_device.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_device.h Refresh the USB device strings when a USB device is re-enumerated. 2020-05-11 20:55:04 +00:00
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_fdt_support.c
usb_fdt_support.h
usb_freebsd_loader.h usb(4): Stop checking for failures from malloc(M_WAITOK). 2020-07-22 14:32:47 +00:00
usb_freebsd.h usb(4): Stop checking for failures from malloc(M_WAITOK). 2020-07-22 14:32:47 +00:00
usb_generic.c Implement the USB_GET_DEVICEINFO ioctl(2) for uhid(4). 2020-10-31 21:53:23 +00:00
usb_generic.h Implement the USB_GET_DEVICEINFO ioctl(2) for uhid(4). 2020-10-31 21:53:23 +00:00
usb_handle_request.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hid.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hub_acpi.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hub_private.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hub.c usb_hub: fix whitespace 2020-11-09 23:36:51 +00:00
usb_hub.h
usb_if.m
usb_ioctl.h
usb_lookup.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_mbuf.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_mbuf.h
usb_msctest.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_msctest.h
usb_parse.c
usb_pci.h
usb_pf.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_pf.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00
usb_process.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_process.h
usb_request.c Try a bit harder to get the USB device descriptor in case the initial read fails. 2020-10-08 11:30:22 +00:00
usb_request.h
usb_transfer.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_transfer.h
usb_util.c
usb_util.h
usb.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00
usbdevs uplcom: add ATen/Prolific USB-232 Controller D USB ID 2020-11-17 18:28:20 +00:00
usbdi_util.h
usbdi.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00
usbhid.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00