freebsd-dev/sys/cam/ata
Scott Long 5d01277f59 Add infrastructure to the ATA and SCSI transports that supports
using a driver-supplied sbuf for printing device discovery
announcements. This helps ensure that messages to the console
will be properly serialized (through sbuf_putbuf) and not be
truncated and interleaved with other messages. The
infrastructure mirrors the existing xpt_announce_periph()
entry point and is opt-in for now. No content or formatting
changes are visible to the operator other than the new coherency.

While here, eliminate the stack usage of the temporary
announcement buffer in some of the drivers. It's moved to the
softc for now, but future work will eliminate it entirely by
making the code flow more linear. Future work will also address
locking so that the sbufs can be dynamically sized.

The scsi_da, scs_cd, scsi_ses, and ata_da drivers are converted
at this point, other drivers can be converted at a later date.
A tunable+sysctl, kern.cam.announce_nosbuf, exists for testing
purposes but will be removed later.

TODO:
Eliminate all of the code duplication and temporary buffers.  The
old printf-based methods will be retired, and xpt_announce_periph()
will just be a wrapper that uses a dynamically sized sbuf.  This
requires that the register and deregister paths be made malloc-safe,
which they aren't currently.

Sponsored by:	Netflix
2017-04-19 15:04:52 +00:00
..
ata_all.c Add infrastructure to the ATA and SCSI transports that supports 2017-04-19 15:04:52 +00:00
ata_all.h Add infrastructure to the ATA and SCSI transports that supports 2017-04-19 15:04:52 +00:00
ata_da.c Add infrastructure to the ATA and SCSI transports that supports 2017-04-19 15:04:52 +00:00
ata_pmp.c Add label annotations to CAM sysctls. 2016-12-14 12:53:33 +00:00
ata_xpt.c Add infrastructure to the ATA and SCSI transports that supports 2017-04-19 15:04:52 +00:00