Commit 9edbc30
rapidio: update enumerator registration mechanism
Update enumeration/discovery method registration mechanism to allow
loading enumeration/discovery methods before all mports are registered.
Existing statically linked RapidIO subsystem expects that all available
RapidIO mport devices are initialized and registered before the
enumeration/discovery method is registered. Switching to loadable mport
device drivers creates situation when mport device driver can be loaded
after enumeration/discovery method is attached (e.g., loadable mport
driver in a system with statically linked RapidIO core and enumerator).
This also will happen in a system with hot-pluggable RapidIO controllers.
To remove the dependency on the initialization/registration order this
patch introduces enumeration/discovery registration mechanism that
supports arbitrary registration order of mports and enumerator/discovery
methods.
The following registration rules are implemented:
- only one enumeration/discovery method can be registered for given mport ID
(including RIO_MPORT_ANY);
- when new enumeration/discovery methods tries to attach to the registered mport
device, method with matching mport ID will replace a default method previously
registered for given mport (if any);
- enumeration/discovery method with target ID=RIO_MPORT_ANY will be attached
only to mports that do not have another enumerator attached to them;
- when new mport device is registered with RapidIO subsystem, registration
routine searches for the enumeration/discovery method with the best matching
mport ID;
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent e6161d6 commit 9edbc30
File tree
5 files changed
+164
-48
lines changed- drivers/rapidio
- include/linux
5 files changed
+164
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
| 1165 | + | |
1165 | 1166 | | |
1166 | 1167 | | |
1167 | 1168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | 289 | | |
291 | 290 | | |
292 | 291 | | |
| |||
300 | 299 | | |
301 | 300 | | |
302 | 301 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 302 | + | |
318 | 303 | | |
319 | 304 | | |
320 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
1602 | 1603 | | |
1603 | 1604 | | |
1604 | 1605 | | |
1605 | | - | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
1606 | 1611 | | |
1607 | | - | |
1608 | | - | |
1609 | 1612 | | |
1610 | | - | |
1611 | | - | |
| 1613 | + | |
1612 | 1614 | | |
1613 | 1615 | | |
1614 | 1616 | | |
1615 | 1617 | | |
1616 | | - | |
| 1618 | + | |
| 1619 | + | |
1617 | 1620 | | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
1624 | | - | |
| 1621 | + | |
1625 | 1622 | | |
1626 | | - | |
1627 | | - | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
1628 | 1626 | | |
1629 | | - | |
1630 | | - | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
1631 | 1638 | | |
1632 | 1639 | | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
1633 | 1673 | | |
1634 | 1674 | | |
1635 | 1675 | | |
| |||
1639 | 1679 | | |
1640 | 1680 | | |
1641 | 1681 | | |
1642 | | - | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
1643 | 1685 | | |
1644 | 1686 | | |
1645 | | - | |
| 1687 | + | |
| 1688 | + | |
1646 | 1689 | | |
1647 | | - | |
| 1690 | + | |
1648 | 1691 | | |
1649 | 1692 | | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1650 | 1699 | | |
1651 | 1700 | | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
1658 | 1711 | | |
1659 | | - | |
| 1712 | + | |
1660 | 1713 | | |
1661 | 1714 | | |
1662 | 1715 | | |
1663 | 1716 | | |
1664 | 1717 | | |
1665 | 1718 | | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
1666 | 1757 | | |
1667 | 1758 | | |
1668 | 1759 | | |
| |||
1691 | 1782 | | |
1692 | 1783 | | |
1693 | 1784 | | |
1694 | | - | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
1695 | 1789 | | |
1696 | 1790 | | |
1697 | 1791 | | |
| |||
1710 | 1804 | | |
1711 | 1805 | | |
1712 | 1806 | | |
1713 | | - | |
| 1807 | + | |
1714 | 1808 | | |
| 1809 | + | |
| 1810 | + | |
1715 | 1811 | | |
1716 | 1812 | | |
1717 | 1813 | | |
| |||
1725 | 1821 | | |
1726 | 1822 | | |
1727 | 1823 | | |
1728 | | - | |
| 1824 | + | |
1729 | 1825 | | |
1730 | 1826 | | |
1731 | 1827 | | |
| |||
1751 | 1847 | | |
1752 | 1848 | | |
1753 | 1849 | | |
1754 | | - | |
1755 | 1850 | | |
1756 | 1851 | | |
| 1852 | + | |
1757 | 1853 | | |
1758 | 1854 | | |
1759 | 1855 | | |
| |||
1784 | 1880 | | |
1785 | 1881 | | |
1786 | 1882 | | |
| 1883 | + | |
| 1884 | + | |
1787 | 1885 | | |
1788 | 1886 | | |
1789 | 1887 | | |
| |||
1792 | 1890 | | |
1793 | 1891 | | |
1794 | 1892 | | |
| 1893 | + | |
1795 | 1894 | | |
1796 | 1895 | | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1797 | 1909 | | |
| 1910 | + | |
| 1911 | + | |
1798 | 1912 | | |
1799 | 1913 | | |
1800 | 1914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
468 | 469 | | |
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
| 473 | + | |
472 | 474 | | |
473 | 475 | | |
474 | 476 | | |
475 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
476 | 491 | | |
477 | 492 | | |
478 | 493 | | |
| |||
0 commit comments