* [PATCH linux dev-4.7] drivers/fsi: Change hub sysfs name
@ 2017-02-28 18:07 Christopher Bostic
2017-03-02 0:29 ` Joel Stanley
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Bostic @ 2017-02-28 18:07 UTC (permalink / raw)
To: joel; +Cc: Christopher Bostic, openbmc
Use the slave's master ID as the ID for the hub master.
Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
---
drivers/fsi/fsi-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
index 542544e..b9573c5 100644
--- a/drivers/fsi/fsi-core.c
+++ b/drivers/fsi/fsi-core.c
@@ -437,7 +437,7 @@ static int fsi_slave_scan(struct fsi_slave *slave)
return -ENOMEM;
device_initialize(&hub->dev);
- dev_set_name(&hub->dev, "hub@%02x", hub->master.idx);
+ dev_set_name(&hub->dev, "hub@%02x", slave->master->idx);
hub->dev.release = hub_master_release;
rc = device_add(&hub->dev);
if (rc)
--
1.8.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH linux dev-4.7] drivers/fsi: Change hub sysfs name
2017-02-28 18:07 [PATCH linux dev-4.7] drivers/fsi: Change hub sysfs name Christopher Bostic
@ 2017-03-02 0:29 ` Joel Stanley
2017-03-02 20:10 ` Christopher Bostic
0 siblings, 1 reply; 4+ messages in thread
From: Joel Stanley @ 2017-03-02 0:29 UTC (permalink / raw)
To: Christopher Bostic; +Cc: OpenBMC Maillist
On Wed, Mar 1, 2017 at 4:37 AM, Christopher Bostic
<cbostic@linux.vnet.ibm.com> wrote:
> Use the slave's master ID as the ID for the hub master.
I don't know enough about how the driver works to know if this is the
right thing to do. Is it fixing a bug? Why was the old value wrong?
Cheers,
Joel
>
> Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
> ---
> drivers/fsi/fsi-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
> index 542544e..b9573c5 100644
> --- a/drivers/fsi/fsi-core.c
> +++ b/drivers/fsi/fsi-core.c
> @@ -437,7 +437,7 @@ static int fsi_slave_scan(struct fsi_slave *slave)
> return -ENOMEM;
>
> device_initialize(&hub->dev);
> - dev_set_name(&hub->dev, "hub@%02x", hub->master.idx);
> + dev_set_name(&hub->dev, "hub@%02x", slave->master->idx);
> hub->dev.release = hub_master_release;
> rc = device_add(&hub->dev);
> if (rc)
> --
> 1.8.2.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH linux dev-4.7] drivers/fsi: Change hub sysfs name
2017-03-02 0:29 ` Joel Stanley
@ 2017-03-02 20:10 ` Christopher Bostic
2017-03-02 20:53 ` Eddie James
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Bostic @ 2017-03-02 20:10 UTC (permalink / raw)
To: Joel Stanley; +Cc: OpenBMC Maillist
On 3/1/17 6:29 PM, Joel Stanley wrote:
> On Wed, Mar 1, 2017 at 4:37 AM, Christopher Bostic
> <cbostic@linux.vnet.ibm.com> wrote:
>> Use the slave's master ID as the ID for the hub master.
> I don't know enough about how the driver works to know if this is the
> right thing to do. Is it fixing a bug? Why was the old value wrong?
>
Hi Joel,
Yes this is fixing a bug. Before this fix both hub masters detected
-one on first p9, other on second p9, are assigned the name "hub@00".
The duplicate name causes a kernel warning to console. With this change
each hub master is named uniquely by using the ID of its upstream fsi
master.
Thanks,
Chris
> Cheers,
>
> Joel
>
>> Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
>> ---
>> drivers/fsi/fsi-core.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
>> index 542544e..b9573c5 100644
>> --- a/drivers/fsi/fsi-core.c
>> +++ b/drivers/fsi/fsi-core.c
>> @@ -437,7 +437,7 @@ static int fsi_slave_scan(struct fsi_slave *slave)
>> return -ENOMEM;
>>
>> device_initialize(&hub->dev);
>> - dev_set_name(&hub->dev, "hub@%02x", hub->master.idx);
>> + dev_set_name(&hub->dev, "hub@%02x", slave->master->idx);
>> hub->dev.release = hub_master_release;
>> rc = device_add(&hub->dev);
>> if (rc)
>> --
>> 1.8.2.2
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH linux dev-4.7] drivers/fsi: Change hub sysfs name
2017-03-02 20:10 ` Christopher Bostic
@ 2017-03-02 20:53 ` Eddie James
0 siblings, 0 replies; 4+ messages in thread
From: Eddie James @ 2017-03-02 20:53 UTC (permalink / raw)
To: Christopher Bostic, Joel Stanley; +Cc: OpenBMC Maillist
Looks good to me.
Acked-by: Eddie James <eajames@linux.vnet.ibm.com>
On 03/02/2017 02:10 PM, Christopher Bostic wrote:
>
>
> On 3/1/17 6:29 PM, Joel Stanley wrote:
>> On Wed, Mar 1, 2017 at 4:37 AM, Christopher Bostic
>> <cbostic@linux.vnet.ibm.com> wrote:
>>> Use the slave's master ID as the ID for the hub master.
>> I don't know enough about how the driver works to know if this is the
>> right thing to do. Is it fixing a bug? Why was the old value wrong?
>>
> Hi Joel,
>
> Yes this is fixing a bug. Before this fix both hub masters detected
> -one on first p9, other on second p9, are assigned the name "hub@00".
> The duplicate name causes a kernel warning to console. With this
> change each hub master is named uniquely by using the ID of its
> upstream fsi master.
>
> Thanks,
> Chris
>> Cheers,
>>
>> Joel
>>
>>> Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
>>> ---
>>> drivers/fsi/fsi-core.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
>>> index 542544e..b9573c5 100644
>>> --- a/drivers/fsi/fsi-core.c
>>> +++ b/drivers/fsi/fsi-core.c
>>> @@ -437,7 +437,7 @@ static int fsi_slave_scan(struct fsi_slave *slave)
>>> return -ENOMEM;
>>>
>>> device_initialize(&hub->dev);
>>> - dev_set_name(&hub->dev, "hub@%02x",
>>> hub->master.idx);
>>> + dev_set_name(&hub->dev, "hub@%02x",
>>> slave->master->idx);
>>> hub->dev.release = hub_master_release;
>>> rc = device_add(&hub->dev);
>>> if (rc)
>>> --
>>> 1.8.2.2
>>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-02 20:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 18:07 [PATCH linux dev-4.7] drivers/fsi: Change hub sysfs name Christopher Bostic
2017-03-02 0:29 ` Joel Stanley
2017-03-02 20:10 ` Christopher Bostic
2017-03-02 20:53 ` Eddie James
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.