James,

i tried some sas disks in my system with expander with SES.

seagate and fuji disk can not get the VPD 0x83. and scsi_execute_req
got 0x80002.

but hitachi disk works well.

with lsscsi all disk can get sas address correctly.

so wonder if there is some other way to get the SAS address..

YH

static void ses_match_to_enclosure(struct enclosure_device *edev,
                                   struct scsi_device *sdev)
{
        unsigned char *buf = kmalloc(VPD_INQUIRY_SIZE, GFP_KERNEL);
        int result;
        unsigned char *desc;
        int len;
        struct efd efd = {
                .addr = 0,
        };
        unsigned char cmd[] = {
                INQUIRY,
                1,
                0x83,
                VPD_INQUIRY_SIZE >> 8,
                VPD_INQUIRY_SIZE & 0xff,
                0
        };

        if (!buf)
                return;

        scsi_test_unit_ready(sdev, SD_TIMEOUT, SD_MAX_RETRIES, NULL);

        result = scsi_execute_req(sdev,  cmd, DMA_FROM_DEVICE, buf,
                        VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES);
        if (result) {
                sdev_printk(KERN_INFO, sdev, "ses_match_to_enclosure:
inquiry VPD page 0x83 failed with %x\n", result);
                goto free;
        }
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to