Re: [PATCH v2] libata: export host controller number thru /sys

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

 



On Thu, Jan 17, 2013 at 7:22 PM, David Milburn <dmilburn@xxxxxxxxxx> wrote:

> The port multiplier extends the ATA port with up to 15 additional ports (links),
> so with this patch
>
> ./pci0000:00/0000:00:1e.0/0000:05:01.0/ata1
> ./pci0000:00/0000:00:1e.0/0000:05:01.0/ata1/link1/dev1.0/ata_device
> ./pci0000:00/0000:00:1e.0/0000:05:01.0/ata1/link1/ata_link
> ./pci0000:00/0000:00:1e.0/0000:05:01.0/ata1/link1.0/dev1.0.0/ata_device
> ./pci0000:00/0000:00:1e.0/0000:05:01.0/ata1/link1.0/ata_link
> ./pci0000:00/0000:00:1e.0/0000:05:01.0/ata1/link1.1/dev1.1.0/ata_device
> ./pci0000:00/0000:00:1e.0/0000:05:01.0/ata1/link1.1/ata_link
>
> ata<localport>/link<localport>.<unique port mult port>/dev<localport>.<port mult port>.0/ata_device

@@ -284,7 +284,7 @@ int ata_tport_add(struct device *parent,

        dev->parent = get_device(parent);
        dev->release = ata_tport_release;
-       dev_set_name(dev, "ata%d", ap->print_id);
+       dev_set_name(dev, "ata%d", ap->local_print_id);

> @@ -410,9 +410,9 @@ int ata_tlink_add(struct ata_link *link)
>         dev->parent = get_device(&ap->tdev);
>         dev->release = ata_tlink_release;
>         if (ata_is_host_link(link))
> -               dev_set_name(dev, "link%d", ap->print_id);
> +               dev_set_name(dev, "link%d", ap->local_print_id);

Hmm, multiple controllers will clash with their names here now, right?
The "ata%d"  and "link%d..." devices all show up in /sys/class/ in the
same directories and need a unique name there, now that we start at
every controller with out own counter, right?

We need to prefix the names with the global counter?

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux