summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_ccb.h
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2003-04-30 00:35:22 +0000
committerken <ken@FreeBSD.org>2003-04-30 00:35:22 +0000
commit3c97032a19ab84c02e1c713a4ac1be1fcfbd98dc (patch)
treec02c49de4d73800f6904f6926dce054d9209a7e0 /sys/cam/cam_ccb.h
parentc761300afad34d68194be31c4e0de85401fc3513 (diff)
downloadFreeBSD-src-3c97032a19ab84c02e1c713a4ac1be1fcfbd98dc.zip
FreeBSD-src-3c97032a19ab84c02e1c713a4ac1be1fcfbd98dc.tar.gz
Add support to CAM for devices with more than 2^32 blocks. (2TB if you're
using 512 byte blocks). cam_ccb.h: Bump up volume_size and cylinders in ccb_calc_geometry to 64 bits and 32 bits respectively, so we can hold larger device sizes. cylinders would overflow at about 500GB. Bump CAM_VERSION for this change. Note that this will require a recompile of all applications that talk to the pass(4) driver. scsi_all.c: Add descriptions for READ/WRITE(16), update READ/WRITE(12) descriptions, add descriptions for SERVICE ACTION IN/OUT. Add a new function, scsi_read_capacity_16(), that issues the read capacity service action. (Necessary for arrays larger than 2^32 sectors.) Update scsi_read_write() to use a 64 bit LBA and issue READ(16) or WRITE(16) if necessary. NOTE the API change. This should be largely transparnet to most userland applications at compile time, but will break binary compatibility. The CAM_VERSION bump, above, also serves the purpose of forcing a recompile for any applications that talk to CAM. scsi_all.h: Add 16 byte READ/WRITE structures, structures for 16 byte READ CAPACITY/SERVICE ACTION IN. Add scsi_u64to8b() and scsi_8btou64. scsi_da.c: The da(4) driver probe now has two stages for devices larger than 2TB. If a standard READ CAPACITY(10) returns 0xffffffff, we issue the 16 byte version of read capacity to determine the true array capacity. We also do the same thing in daopen() -- use the 16 byte read capacity if the device is large enough. The sysctl/loader code has also been updated to accept 16 bytes as a minimum command size.
Diffstat (limited to 'sys/cam/cam_ccb.h')
-rw-r--r--sys/cam/cam_ccb.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h
index 706bbf9..1df01ce 100644
--- a/sys/cam/cam_ccb.h
+++ b/sys/cam/cam_ccb.h
@@ -488,7 +488,7 @@ struct ccb_dev_match {
/*
* Definitions for the path inquiry CCB fields.
*/
-#define CAM_VERSION 0x14 /* Hex value for current version */
+#define CAM_VERSION 0x15 /* Hex value for current version */
typedef enum {
PI_MDP_ABLE = 0x80, /* Supports MDP message */
@@ -789,8 +789,8 @@ struct ccb_trans_settings {
struct ccb_calc_geometry {
struct ccb_hdr ccb_h;
u_int32_t block_size;
- u_int32_t volume_size;
- u_int16_t cylinders;
+ u_int64_t volume_size;
+ u_int32_t cylinders;
u_int8_t heads;
u_int8_t secs_per_track;
};
OpenPOWER on IntegriCloud