aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/aacraid.h
diff options
context:
space:
mode:
authorSalyzyn, Mark <mark_salyzyn@adaptec.com>2007-07-17 14:01:28 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 12:17:48 -0400
commit88e2f98e1b3eb27ae708daa3b37dd50f3f06c952 (patch)
tree766559a83169ef322c1dd3ea293ef42e8cc7833b /drivers/scsi/aacraid/aacraid.h
parent9ad5204d68a3b48b92907d88d1c28d33fde6ba2a (diff)
[SCSI] aacraid: add vpd to inquiry
Report VPD inquiry page 0x80 with an unique array creation serial number (CUID). When an array is created, the metadata stored on the physical drives gets an unique serial number. This serial number remains constant through array morphing or migration to other controllers. This patch is a forward port and modification to survive morphing and migration operations, of a similar piece of (un-attributed author) code added to the SLES10 SP1 aacraid driver. To test the results of the patch, observe that /dev/disk/by-id/ entries will show up for the arrays resulting from the udev rules. Also, as per the udev rules, 'scsi_id -g -x -a -s /block/sd? -d /dev/sd?' will report the ID_SERIAL as constructed from the inquiry data. It was reported to me that the 'ADPT' leading the serial number was bad form, that the inquiry vendor field was enough to differentiate the storage uniquely. Subsequent search found that another Adaptec AAC based driver reported the 8 hex serial number only without such adornments, so dropped ADPT to match. Resubmitting the patch with this alteration. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r--drivers/scsi/aacraid/aacraid.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index f1d3b66af87..400d03403cd 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1567,6 +1567,20 @@ struct aac_get_name_resp {
1567 u8 data[16]; 1567 u8 data[16];
1568}; 1568};
1569 1569
1570#define CT_CID_TO_32BITS_UID 165
1571struct aac_get_serial {
1572 __le32 command; /* VM_ContainerConfig */
1573 __le32 type; /* CT_CID_TO_32BITS_UID */
1574 __le32 cid;
1575};
1576
1577struct aac_get_serial_resp {
1578 __le32 dummy0;
1579 __le32 dummy1;
1580 __le32 status; /* CT_OK */
1581 __le32 uid;
1582};
1583
1570/* 1584/*
1571 * The following command is sent to shut down each container. 1585 * The following command is sent to shut down each container.
1572 */ 1586 */