#
0f838111 |
| 01-Dec-2023 |
Warner Losh <imp@FreeBSD.org> |
cam: Make cam.h self-contained for userland
We reference FILE * here, but don't include stdio.h. Do so (both of these are in !_KERNEL blocks).
Sponsored by: Netflix
|
Revision tags: release/14.0.0 |
|
#
2ffd30f7 |
| 06-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
cam: Remove left-over sys/cdefs.h in sys/cam
These weren't removed when $FreeBSD$ was removed. They aren't needed and now are a style(9) nonconformity.
Sponsored by: Netflix
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
7af2f2c8 |
| 25-Jul-2023 |
Warner Losh <imp@FreeBSD.org> |
cam: Migrate to modern uintXX_t from u_intXX_t
As per https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html move to the modern uintXX_t.
MFC After: 3 days Sponsored by: Netflix
|
#
774ab87c |
| 21-Jul-2023 |
Warner Losh <imp@FreeBSD.org> |
cam: Add CAM_NVME_STATUS_ERROR error code
Add CAM_NVME_STATUS_ERROR error code. Flag all NVME commands that completed with an error status as CAM_NVME_STATUS_ERROR (a new value) instaead of CAM_REQ_
cam: Add CAM_NVME_STATUS_ERROR error code
Add CAM_NVME_STATUS_ERROR error code. Flag all NVME commands that completed with an error status as CAM_NVME_STATUS_ERROR (a new value) instaead of CAM_REQ_CMP_ERR. This indicates to the upper layers of CAM that the 'cpl' field for nvmeio CCBs is valid and can be examined for error recovery, if desired.
No functional change. nda will still see these as errors, call ndaerror() to get the error recovery action, etc. cam_periph_error will select the same case as before (even w/o the change, though the change makes it explicit).
Sponsored by: Netflix Reviewed by: chuck, mav, jhb Differential Revision: https://reviews.freebsd.org/D41085
show more ...
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
#
757fc666 |
| 16-Apr-2023 |
Warner Losh <imp@FreeBSD.org> |
cam: Include stdbool.h for userland
Sponsored by: Netflix
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
3090d504 |
| 24-Jan-2022 |
Kenneth D. Merry <ken@FreeBSD.org> |
Fix non-printable characters in NVMe model and serial numbers.
The NVMe 1.4 spec simply says that Model and Serial numbers are ASCII strings. Unlike SCSI, it doesn't prohibit non-printable characte
Fix non-printable characters in NVMe model and serial numbers.
The NVMe 1.4 spec simply says that Model and Serial numbers are ASCII strings. Unlike SCSI, it doesn't prohibit non-printable characters or say that the strings should be padded with spaces.
Since 2014, we have had cam_strvis_sbuf(), which gives additional options for handling non-ASCII characters. That behavior hasn't been available for non-sbuf consumers, so users of cam_strvis() were left with having octal ASCII codes inserted.
So, to avoid having garbage or octal chracters in the strings, use cam_strvis_sbuf() to create a new function, cam_strvis_flag(), and re-implement cam_strvis() using cam_strvis_flag().
Now, for the NVMe drives, we can use cam_strvis_flag with the CAM_STRVIS_FLAG_NONASCII_SPC flag. This transforms non-printable characters into spaces.
sys/cam/cam.c: Add a new function, cam_strvis_flag(), that creates an sbuf on the stack with the user's destination buffer, and calls cam_strvis_sbuf() with the given flag argument.
Re-implement cam_strvis() to call cam_strvis_flag with the CAM_STRVIS_FLAG_NONASCII_ESC argument. This should be the equivalent of the old cam_strvis() function, except for the overhead of creating the sbuf and calling sbuf_putc/printf.
sys/cam/cam.h: Declaration for cam_strvis_flag.
sys/cam/nvme/nvme_all.c: In nvme_print_ident, use the NONASCII_SPC flag with cam_strvis_flag().
sys/cam/nvme/nvme_da.c: In ndaregister(), use cam_strvis_flag() with the NONASCII_SPC flag for the disk description and serial number we report to GEOM.
sys/cam/nvme/nvme_xpt.c: In nvme_probe_done(), use cam_strvis_flag with the NONASCII_SPC flag when storing the drive serial number in the CAM EDT.
MFC after: 1 week Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D33973
show more ...
|
Revision tags: release/12.3.0, release/13.0.0 |
|
#
7381bbee |
| 12-Mar-2021 |
Warner Losh <imp@FreeBSD.org> |
cam: Run all XPT_ASYNC ccbs in a dedicated thread
Queue all XPT_ASYNC ccb's and run those in a new cam async thread. This thread is allowed to sleep for things like memory. This should allow us to m
cam: Run all XPT_ASYNC ccbs in a dedicated thread
Queue all XPT_ASYNC ccb's and run those in a new cam async thread. This thread is allowed to sleep for things like memory. This should allow us to make all the registration routines for cam periph drivers simpler since they can assume they can always allocate memory. This is a separate thread so that any I/O that's completed in xpt_done_td isn't held up.
This should fix the panics for WAITOK alloations that are elsewhere in the storage stack that aren't so easy to convert to NOWAIT. Additional future work will convert other allocations in the registration path to WAITOK should detailed analysis show it to be safe.
Reviewed by: chs@, rpokala@ Differential Revision: https://reviews.freebsd.org/D29210
show more ...
|
Revision tags: release/12.2.0 |
|
#
27dcd3d9 |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
cam: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
e6db0f04 |
| 11-Mar-2020 |
Warner Losh <imp@FreeBSD.org> |
Remove redundantly repetitive static __inline forward function declarations.
We typically don't use them elsewhere in the kernel, and they aren't needed here: the actual functions are a few lines aw
Remove redundantly repetitive static __inline forward function declarations.
We typically don't use them elsewhere in the kernel, and they aren't needed here: the actual functions are a few lines away and aren't mutually recursive.
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
bec9534d |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/cam: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
sys/cam: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
Revision tags: release/10.4.0 |
|
#
531c2d7a |
| 24-Jul-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r320180
|
#
bca9d05f |
| 23-Jul-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r319973 through 321382.
|
Revision tags: release/11.1.0 |
|
#
d2043ca3 |
| 14-Jul-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r320573 through r320970.
|
#
6df06cd6 |
| 10-Jul-2017 |
Warner Losh <imp@FreeBSD.org> |
Opt files are included with single quotes.
|
#
2828dafc |
| 10-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r308227 through r308490.
|
#
28323add |
| 09-Nov-2016 |
Bryan Drewery <bdrewery@FreeBSD.org> |
Fix improper use of "its".
Sponsored by: Dell EMC Isilon
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
1ffe5851 |
| 29-Apr-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/cam: spelling fixes in comments.
No functional change.
|
Revision tags: release/10.3.0, release/10.2.0 |
|
#
416ba5c7 |
| 22-Jun-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with HEAD (r280229-r284686).
|
#
76aeda8a |
| 20-Jun-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r284188 through r284643.
|
#
dad2fb7e |
| 15-Jun-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
5672fac9 |
| 09-Jun-2015 |
Kenneth D. Merry <ken@FreeBSD.org> |
Add support for reading MAM attributes to camcontrol(8) and libcam(3).
MAM is Medium Auxiliary Memory and is most commonly found as flash chips on tapes.
This includes support for reading attribute
Add support for reading MAM attributes to camcontrol(8) and libcam(3).
MAM is Medium Auxiliary Memory and is most commonly found as flash chips on tapes.
This includes support for reading attributes and decoding most known attributes, but does not yet include support for writing attributes or reporting attributes in XML format.
libsbuf/Makefile: Add subr_prf.c for the new sbuf_hexdump() function. This function is essentially the same function.
libsbuf/Symbol.map: Add a new shared library minor version, and include the sbuf_hexdump() function.
libsbuf/Version.def: Add version 1.4 of the libsbuf library.
libutil/hexdump.3: Document sbuf_hexdump() alongside hexdump(3), since it is essentially the same function.
camcontrol/Makefile: Add attrib.c.
camcontrol/attrib.c: Implementation of READ ATTRIBUTE support for camcontrol(8).
camcontrol/camcontrol.8: Document the new 'camcontrol attrib' subcommand.
camcontrol/camcontrol.c: Add the new 'camcontrol attrib' subcommand.
camcontrol/camcontrol.h: Add a function prototype for scsiattrib().
share/man/man9/sbuf.9: Document the existence of sbuf_hexdump() and point users to the hexdump(3) man page for more details.
sys/cam/scsi/scsi_all.c: Add a table of known attributes, text descriptions and handler functions.
Add a new scsi_attrib_sbuf() function along with a number of other related functions that help decode attributes.
scsi_attrib_ascii_sbuf() decodes ASCII format attributes.
scsi_attrib_int_sbuf() decodes binary format attributes, and will pass them off to scsi_attrib_hexdump_sbuf() if they're bigger than 8 bytes.
scsi_attrib_vendser_sbuf() decodes the vendor and drive serial number attribute.
scsi_attrib_volcoh_sbuf() decodes the Volume Coherency Information attribute that LTFS writes out.
sys/cam/scsi/scsi_all.h: Add a number of attribute-related structure definitions and other defines.
Add function prototypes for all of the functions added in scsi_all.c.
sys/kern/subr_prf.c: Add a new function, sbuf_hexdump(). This is the same as the existing hexdump(9) function, except that it puts the result in an sbuf.
This also changes subr_prf.c so that it can be compiled in userland for includsion in libsbuf.
We should work to change this so that the kernel hexdump implementation is a wrapper around sbuf_hexdump() with a statically allocated sbuf with a drain. That will require a drain function that goes to the kernel printf() buffer that can take a non-NUL terminated string as input. That is because an sbuf isn't NUL-terminated until it is finished, and we don't want to finish it while we're still using it.
We should also work to consolidate the userland hexdump and kernel hexdump implemenatations, which are currently separate. This would also mean making applications that currently link in libutil link in libsbuf.
sys/sys/sbuf.h: Add the prototype for sbuf_hexdump(), and add another copy of the hexdump flag values if they aren't already defined.
Ideally the flags should be defined in one place but the implemenation makes it difficult to do properly. (See above.)
Sponsored by: Spectra Logic Corporation MFC after: 1 week
show more ...
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
#
9f3d45b6 |
| 08-Feb-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from HEAD
|