RE: [PATCH 4/4] cdx: add sysfs for subsystem, class and revision

From: Gangurde, Abhijit
Date: Wed Jul 12 2023 - 09:24:14 EST


[AMD Official Use Only - General]

> > RPU provides subsystem_vendor, subsystem_device, class and revision
> > info of the device.
>
> What is "RPU"?

RPU is the remote processor on which firmware runs(controller). Will update the patch description in v2.

>
> > Use the Subsystem vendor id, device id and class
> > to match the cdx device. Subsystem vendor and device combination
> > can be used to identify the card. This identification would be useful
> > for cdx device driver for card specific operations.
>
> Why aren't you binding devices to drivers based on this like all other
> bus types do?

We are using similar binding to match the device to driver. Would update the patch description in v2.

<snip>

> > /**
> > * struct cdx_ops - Callbacks supported by CDX controller.
> > @@ -84,6 +99,10 @@ struct cdx_controller {
> > * @cdx: CDX controller associated with the device
> > * @vendor: Vendor ID for CDX device
> > * @device: Device ID for CDX device
> > + * @subsystem_vendor: Subsystem Vendor ID for CDX device
> > + * @subsystem_device: Subsystem Device ID for CDX device
> > + * @class: Class for the CDX device
> > + * @revision: Revision of the CDX device
> > * @bus_num: Bus number for this CDX device
> > * @dev_num: Device number for this device
> > * @res: array of MMIO region entries
> > @@ -101,6 +120,10 @@ struct cdx_device {
> > struct cdx_controller *cdx;
> > u16 vendor;
> > u16 device;
> > + u16 subsystem_vendor;
> > + u16 subsystem_device;
> > + u32 class;
>
> What endian are these attributes? Please be specific for all of them
> (also for vendor and device, right?)
>

Will update this in v2.

Thanks,
Abhijit