Commit 1228713
committed
ata: libata-core: Reuse available ata_port print_ids
Currently, the ata_port print_ids are increased indefinitely, even when
there are lower ids available.
E.g. on first boot you will have ata1-ata6 assigned.
After a rmmod + modprobe, you will instead have ata7-ata12 assigned.
Move to use the ida_alloc() API, such that print_ids will get reused.
This means that even after a rmmod + modprobe, the ports will be assigned
print_ids ata1-ata6.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240703184418.723066-18-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>1 parent 1c1fbb8 commit 1228713
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
5463 | 5463 | | |
5464 | 5464 | | |
5465 | 5465 | | |
| 5466 | + | |
5466 | 5467 | | |
5467 | 5468 | | |
5468 | 5469 | | |
5469 | 5470 | | |
5470 | 5471 | | |
5471 | 5472 | | |
5472 | 5473 | | |
5473 | | - | |
| 5474 | + | |
| 5475 | + | |
| 5476 | + | |
| 5477 | + | |
| 5478 | + | |
| 5479 | + | |
5474 | 5480 | | |
5475 | 5481 | | |
5476 | 5482 | | |
| |||
5504 | 5510 | | |
5505 | 5511 | | |
5506 | 5512 | | |
| 5513 | + | |
5507 | 5514 | | |
5508 | 5515 | | |
5509 | 5516 | | |
| |||
0 commit comments