[PATCH v6 7/7] cdx: add device attributes

Nipun Gupta nipun.gupta at amd.com
Fri Jan 27 03:17:45 PST 2023



On 1/26/2023 10:25 PM, Randy Dunlap wrote:
> Hi--
> 
> On 1/26/23 02:46, Nipun Gupta wrote:
>> diff --git a/Documentation/ABI/testing/sysfs-bus-cdx b/Documentation/ABI/testing/sysfs-bus-cdx
>> index 8c2425fdb6d9..69bdbc891743 100644
>> --- a/Documentation/ABI/testing/sysfs-bus-cdx
>> +++ b/Documentation/ABI/testing/sysfs-bus-cdx
>> @@ -10,3 +10,47 @@ Description:
>>                   For example::
>>
>>                  # echo 1 > /sys/bus/cdx/rescan
>> +
>> +What:                /sys/bus/cdx/devices/.../vendor
>> +Date:                January 2023
>> +Contact:     nipun.gupta at amd.com
>> +Description:
>> +             Vendor ID for this CDX device. Vendor ID is 16 bit
>> +             identifier which is specific to the device manufacturer.
>> +             Combination of Vendor ID and Device ID identifies a device.
>> +
>> +What:                /sys/bus/cdx/devices/.../device
>> +Date:                January 2023
>> +Contact:     nipun.gupta at amd.com
>> +Description:
>> +             Device ID for this CDX device. Device ID is a 16 bit
>> +             identifier to identify a device type within the range
>> +             of a device manufacturer.
>> +             Combination of Vendor ID and Device ID identifies a device.
>> +
>> +What:                /sys/bus/cdx/devices/.../reset
>> +Date:                January 2023
>> +Contact:     nipun.gupta at amd.com
>> +Description:
> 
> Reads better without "would":
> 
>> +             Writing a non-zero value to this file would reset the CDX> +            device. On resetting the device, the corresponding driver
>> +             would be notified twice, once before the device is being
>> +             reset, and again after the reset has been complete.
> 
> 
>                  Writing a non-zero value to this file resets the CDX
>                  device. On resetting the device, the corresponding driver
>                  is notified twice, once before the device is being
>                  reset, and again after the reset has been complete.
> 
>> +
>> +                For example::
>> +
>> +               # echo 1 > /sys/bus/cdx/.../reset
>> +
>> +What:                /sys/bus/cdx/devices/.../remove
>> +Date:                January 2023
>> +Contact:     tarak.reddy at amd.com
>> +Description:
>> +             Writing a non-zero value to this file would remove the
>> +             corrosponding device from the CDX bus. If the device is
>> +             to be reconfigured in the Hardware, the device can be
>> +             removed, so that the device driver does not access the
>> +             device while it is being reconfigured.
> 
> and: (also fix typo of corresponding)

Thanks for the review. Will fix and update these.

Regards
Nipun

> 
>                  Writing a non-zero value to this file removes the
>                  corresponding device from the CDX bus. If the device is
>                  to be reconfigured in the Hardware, the device can be
>                  removed, so that the device driver does not access the
>                  device while it is being reconfigured.
> 
>> +
>> +             For example::
>> +
>> +               # echo 1 > /sys/bus/cdx/devices/.../remove
> 
> --
> ~Randy



More information about the linux-arm-kernel mailing list