[SLOF] [PATCH slof] usb-host: Do not override USB node name

Alexey Kardashevskiy aik at ozlabs.ru
Wed Sep 4 17:17:41 AEST 2019



On 04/09/2019 17:04, Thomas Huth wrote:
> On 03/09/2019 05.29, Alexey Kardashevskiy wrote:
>> QEMU creates nodes for PCI devices and preserves the node names with
>> one exception for USB hosts; this fixes it.
>>
>> Fixes: be9b2fa44c73 ("pci: Use QEMU created PCI device nodes")
>> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
>> ---
>>
>> David, this is how we loose QEMU's "usb-xhci@" nodename.
>> I am very curious now how it ever worked without an 's' in front
>> of " usb".
> 
> " usb" is pretty much the same as s" usb" ... the only difference
> between '"' and 's"' is that you can encode characters via hex numbers
> in the string, e.g. try:
> 
> " hello "(61) world" type
> 
> See OF1275 page 102 for details.


yeah found this much later, I always used s" and was so surprised :)

> 
>> ---
>>   slof/fs/usb/dev-hci.fs | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/slof/fs/usb/dev-hci.fs b/slof/fs/usb/dev-hci.fs
>> index 5fb25b8b6b4e..685280ce3de0 100644
>> --- a/slof/fs/usb/dev-hci.fs
>> +++ b/slof/fs/usb/dev-hci.fs
>> @@ -20,7 +20,7 @@ VALUE usb_type \ USB type
>>   
>>   \ Open Firmware Properties
>>   device-type
>> -" usb" 2dup device-name
>> +s" usb"
>>   
>>   rot
>>   VALUE usb_num                           \ controller number
>>
> 
> Reviewed-by: Thomas Huth <thuth at redhat.com>


Thanks!


-- 
Alexey


More information about the SLOF mailing list