1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/sbin/camcontrol
Kenneth D. Merry 7027b9cda4 Change 'camcontrol defects' to first probe a drive to find out how much
defect information it has before grabbing the full defect list.

This works around a bug with some Hitachi drives that generate data overrun
errors when they are asked for more defect data than they have.

The change is done in a spec-compliant way, so it should have no negative
impact on drives that don't have this issue.

This is based on work originally done at Sandvine.

scsi_da.h:	Add a define for the maximum amount of data that can be
		contained in a defect list.

camcontrol.c:	Update the readdefects() function to issue an initial
		command to determine the length of the defect list, and
		then use that length in the request for the full defect
		list.

camcontrol.8:	Add a note that some drives will report 0 defects available
		if you don't request either the PLIST or GLIST.

Submitted by:	Mark Johnston <markjdb@gmail.com> (original version)
MFC after:	3 days
2012-06-22 18:57:06 +00:00
..
camcontrol.8 Change 'camcontrol defects' to first probe a drive to find out how much 2012-06-22 18:57:06 +00:00
camcontrol.c Change 'camcontrol defects' to first probe a drive to find out how much 2012-06-22 18:57:06 +00:00
camcontrol.h Update the 'fwdownload' command to also flash disks connected over an 2012-06-20 00:17:29 +00:00
fwdownload.c Update the 'fwdownload' command to also flash disks connected over an 2012-06-20 00:17:29 +00:00
Makefile Update the 'fwdownload' command to also flash disks connected over an 2012-06-20 00:17:29 +00:00
modeedit.c Fix warning when compiling with gcc46: 2012-01-10 02:59:58 +00:00
progress.c Add progress.c and progress.h, missed in the previous commit to camcontrol. 2012-06-20 04:11:34 +00:00
progress.h Add progress.c and progress.h, missed in the previous commit to camcontrol. 2012-06-20 04:11:34 +00:00
util.c Fix build. 2011-11-25 07:11:02 +00:00