megaraid_sas: direct drive access for smartctl and hdparm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was trying to get some useful SMART Information from the SATA drives connected to my PERC5/i controller, but the PERC had no options for that.
When browsing through the kernel sources I found this:

static int megasas_slave_configure(struct scsi_device *sdev)
{
        /*
         * Don't export physical disk devices to the disk driver.
         *
         * FIXME: Currently we don't export them to the midlayer at all.
         *        That will be fixed once LSI engineers have audited the
         *        firmware for possible issues.
         */
if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && sdev->type == TYPE_DISK)
                return -ENXIO;


I changed the if{ } to:

if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && sdev->type == TYPE_DISK)
        {
                sdev->writeable=1;
                sdev->no_uld_attach=1;
                return 0;
        }


This way I get sgX devices (and no extra sdX devices), which work fine with smartctl 5.37 and hdparm 8.4 . hdparm seems to need kernel 2.6.24 or greater for the pass through to work.

This only is a proof of concept and I have no idea how to implement this correctly.
Regards,
 Jochen Radmacher
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux