Re: [REGRESSION] changes to driver_override parsing broke DPDK script

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

 



On Wed, 10 Aug 2022 08:54:36 +0300
Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote:

> >> The script is sending single nul character to remove override
> >> and that no longer works.  
> 
> The sysfs API clearly states:
> "and
>  may be cleared with an empty string (echo > driver_override)."
> Documentation/ABI/testing/sysfs-bus-pci
> 
> Sending other data and expecting the same result is not conforming to
> API. Therefore we have usual example of some undocumented behavior which
> user-space started relying on and instead using API, user-space expect
> that undocumented behavior to be back.
> 
> Yay! I wonder what is the point to even describe the ABI if user-space
> can simply ignore it?
> 
> Best regards,
> Krzysztof

The code that does this in the python script is relatively old.
The writing of null was introduced back in 2017 by:

commit 720b7a058260dfd6ae0fcce956bfe44c18681499
Author: Guduri Prathyusha <gprathyusha@xxxxxxxxxxxxxxxxxx>
Date:   Wed Apr 26 19:22:19 2017 +0530

    usertools: fix device binding with kernel tools
    
    The following sequence of operation gives error in binding devices
    1) Bind a device using dpdk-devbind.py
    2) Unbind the device using kernel tools(/sys/bus/pci/device/driver/unbind)
    3) Bind the device using kernel tools(/sys/bus/pci/driver/new_id and
    /sys/bus/pci/driver/bind)
    
    The bind failure was due to cached driver name in 'driver_override'.
    Fix it by writing 'null' to driver_override just after binding a
    device so that any method of binding/unbinding can be used.
    
    Fixes: 2fc350293570 ("usertools: use optimized driver override scheme to bind")
    
    Reported-by: Lijuan A Tu <lijuanx.a.tu@xxxxxxxxx>
    Signed-off-by: Guduri Prathyusha <gprathyusha@xxxxxxxxxxxxxxxxxx>



[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