aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth D. Merry <ken@FreeBSD.org>2012-01-26 18:09:28 +0000
committerKenneth D. Merry <ken@FreeBSD.org>2012-01-26 18:09:28 +0000
commite6bd5983ca514f0461cbb095afb3d984ccfedb8f (patch)
treec2ad89d0753322faebda9103d7061f924086269d /sbin
parentab6fe159c86f10dcfeb3c357cbe3326613350f21 (diff)
downloadsrc-e6bd5983ca514f0461cbb095afb3d984ccfedb8f.tar.gz
src-e6bd5983ca514f0461cbb095afb3d984ccfedb8f.zip
Add CAM infrastructure to allow reporting when a drive's long read capacity
data changes. cam_ccb.h: Add a new advanced information type, CDAI_TYPE_RCAPLONG, for long read capacity data. cam_xpt_internal.h: Add a read capacity data pointer and length to struct cam_ed. cam_xpt.c: Free the read capacity buffer when a device goes away. While we're here, make sure we don't leak memory for other malloced fields in struct cam_ed. scsi_all.c: Update the scsi_read_capacity_16() to take a uint8_t * and a length instead of just a pointer to the parameter data structure. This will hopefully make this function somewhat immune to future changes in the parameter data. scsi_all.h: Add some extra bit definitions to struct scsi_read_capacity_data_long, and bump up the structure size to the full size specified by SBC-3. Change the prototype for scsi_read_capacity_16(). scsi_da.c: Register changes in read capacity data with the transport layer. This allows the transport layer to send out an async notification to interested parties. Update the dasetgeom() API. Use scsi_extract_sense_len() instead of scsi_extract_sense(). scsi_xpt.c: Add support for the new CDAI_TYPE_RCAPLONG advanced information type. Make sure we set the physpath pointer to NULL after freeing it. This allows blindly freeing it in the struct cam_ed destructor. sys/param.h: Bump __FreeBSD_version from 1000005 to 1000006 to make it easier for third party drivers to determine that the read capacity data async notification is available. camcontrol.c, mptutil/mpt_cam.c: Update these for the new scsi_read_capacity_16() argument structure. Sponsored by: Spectra Logic
Notes
Notes: svn path=/head/; revision=230590
Diffstat (limited to 'sbin')
-rw-r--r--sbin/camcontrol/camcontrol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index 6116db7a2a5a..0bbb511ed720 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -4232,7 +4232,8 @@ scsireadcapacity(struct cam_device *device, int argc, char **argv,
/*lba*/ 0,
/*reladdr*/ 0,
/*pmi*/ 0,
- &rcaplong,
+ /*rcap_buf*/ (uint8_t *)&rcaplong,
+ /*rcap_buf_len*/ sizeof(rcaplong),
/*sense_len*/ SSD_FULL_SIZE,
/*timeout*/ timeout ? timeout : 5000);