Re: [PATCH v3] Add support for PCIe SSD status LED management

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

 



On Mon, 2021-10-04 at 12:41 -0500, stuart hayes wrote:
> 
> 
> On 8/14/2021 1:23 AM, Lukas Wunner wrote:
> > On Fri, Aug 13, 2021 at 05:36:53PM -0400, Stuart Hayes wrote:
> > > +struct mutex drive_status_dev_list_lock;
> > > +struct list_head drive_status_dev_list;
> > 
> > Should be declared static.
> > 
> > > +const guid_t pcie_ssd_leds_dsm_guid =
> > > +       GUID_INIT(0x5d524d9d, 0xfff9, 0x4d4b,
> > > +                 0x8c, 0xb7, 0x74, 0x7e, 0xd5, 0x1e, 0x19, 0x4d);
> > 
> > Same.
> > 
> > > +struct drive_status_led_ops dsm_drive_status_led_ops = {
> > > +       .get_supported_states = get_supported_states_dsm,
> > > +       .get_current_states = get_current_states_dsm,
> > > +       .set_current_states = set_current_states_dsm,
> > > +};
> > 
> > Same.
> > 
> 
> Thank you!
> 
> > > +static void probe_pdev(struct pci_dev *pdev)
> > > +{
> > > +       /*
> > > +        * This is only supported on PCIe storage devices and PCIe ports
> > > +        */
> > > +       if (pdev->class != PCI_CLASS_STORAGE_EXPRESS &&
> > > +           pdev->class != PCI_CLASS_BRIDGE_PCI)
> > > +               return;
> > > +       if (pdev_has_dsm(pdev))
> > > +               add_drive_status_dev(pdev, &dsm_drive_status_led_ops);
> > > +}
> > 
> > Why is &dsm_drive_status_led_ops passed to add_drive_status_dev()?
> > It's always the same argument.
> > 
> 
> Because I hope this will also support NPEM as well, since it is so 
> similar except for using a PCIe extended capability instead of a _DSM
> method. This will make it very easy to add the support... I just don't 
> have any NPEM hardware yet.

I'm interested in helping the infrastructure along so it can be reused
with the CXL memory expander driver. I expect that like most subsystems
PCI does not accept enabling without a user. I.e. the NPEM operations
need to be included to prove out the infrastructure is suitable to
support both LED mechanisms.






[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux