Re: [PATCH 2/3] lpd: marvell: handle non-unique/duplicate location codes
Mauricio Faria de Oliveira <[email protected]> Tue, 8 Nov 2016 11:28:03 -0200
| Newsgroups | gmane.linux.tools.diag.devel |
|---|---|
| Message-ID | <[email protected]> |
On 11/08/2016 09:02 AM, Vasant Hegde wrote:
>> This could cause an user to specify a device by location code, and have
>> the wrong device identified; if the service operation is a hotplug/pull
>> the disk, that error would cause serious problems.
>>
>> Even though this might be a problem that requires a fix elsewhere, it's
>
> I'd prefer to fix at the source (avoid duplicate loc code) instead of
> having workaround. But given the implications, I'm ok to accept this patch.
Thanks; that helps for now.
> But who is creating these dup location codes? lsvpd tools or sysfs
> (kernel/DT) ?
Taking a look now, it seems to be lsvpd, which handles it as SCSI disks
(with Bus, Target, and LUN numbers).
DeviceTreeCollector::buildSCSILocCode()
...
val << "-B" << bus->dataValue << "-T" << target->dataValue
<< "-L" << lun->dataValue;
...
And from lsvpd:
# lsvpd --list=sdj
<...>
*DS -SCSI Disk Drive
<...>
*MF ATA
<...>
*YL -B0-T0-L0
I can try to come up w/ a patch for it later on. If you want to tackle
it yourself, just let me know.
--
Mauricio Faria de Oliveira
IBM Linux Technology Center
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi