mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
libata: export ata_port port_no attribute via /sys
While registering host controller track port number based upon number of ports available on the controller, export port_no attribute through /sys. This patch is needed by udev for composing persistent links in /dev/disk/by-path. /sys/devices/pci0000:00/0000:00:1f.2/ata8/ata_port/ata8 total 0 lrwxrwxrwx. 1 root root 0 Mar 6 12:43 device -> ../../../ata8 -r--r--r--. 1 root root 4096 Mar 6 12:43 idle_irq -r--r--r--. 1 root root 4096 Mar 6 12:43 nr_pmp_links -r--r--r--. 1 root root 4096 Mar 6 12:43 port_no drwxr-xr-x. 2 root root 0 Mar 6 12:42 power lrwxrwxrwx. 1 root root 0 Mar 6 12:41 subsystem -> ../../../../../../class/ata_port -rw-r--r--. 1 root root 4096 Mar 6 12:40 uevent 1 Signed-off-by: David Milburn <dmilburn@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
f722406faa
commit
e628dc999e
3 changed files with 8 additions and 3 deletions
|
@ -746,6 +746,7 @@ struct ata_port {
|
|||
/* Flags that change dynamically, protected by ap->lock */
|
||||
unsigned int pflags; /* ATA_PFLAG_xxx */
|
||||
unsigned int print_id; /* user visible unique port ID */
|
||||
unsigned int local_port_no; /* host local port num */
|
||||
unsigned int port_no; /* 0 based port no. inside the host */
|
||||
|
||||
#ifdef CONFIG_ATA_SFF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue