mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
rapidio: change endpoint device name format
Change endpoint device name format to use a component tag value instead of device destination ID. RapidIO specification defines a component tag to be a unique identifier for devices in a network. RapidIO switches already use component tag as part of their device name and also use it for device identification when processing error management event notifications. Forming an endpoint's device name using its component tag instead of destination ID allows to keep sysfs device directories unchanged in case if a routing process dynamically changes endpoint's destination ID as a result of route optimization. This change should not affect any existing users because a valid device destination ID always should be obtained by reading "destid" attribute and not by parsing device name. This patch also removes switchid member from struct rio_switch because it simply duplicates the component tag and does not have other use than in device name generation. Signed-off-by: Alexandre Bounine <[email protected]> Cc: Matt Porter <[email protected]> Cc: Li Yang <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Andre van Herk <[email protected]> Cc: Micha Nelissen <[email protected]> Cc: Stef van Os <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ed5edee2f8
commit
6ca40c2565
2 changed files with 2 additions and 5 deletions
|
|
@ -433,7 +433,6 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
|
|||
/* If a PE has both switch and other functions, show it as a switch */
|
||||
if (rio_is_switch(rdev)) {
|
||||
rswitch = rdev->rswitch;
|
||||
rswitch->switchid = rdev->comp_tag & RIO_CTAG_UDEVID;
|
||||
rswitch->port_ok = 0;
|
||||
spin_lock_init(&rswitch->lock);
|
||||
rswitch->route_table = kzalloc(sizeof(u8)*
|
||||
|
|
@ -446,7 +445,7 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
|
|||
rdid++)
|
||||
rswitch->route_table[rdid] = RIO_INVALID_ROUTE;
|
||||
dev_set_name(&rdev->dev, "%02x:s:%04x", rdev->net->id,
|
||||
rswitch->switchid);
|
||||
rdev->comp_tag & RIO_CTAG_UDEVID);
|
||||
|
||||
if (do_enum)
|
||||
rio_route_clr_table(rdev, RIO_GLOBAL_TABLE, 0);
|
||||
|
|
@ -459,7 +458,7 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
|
|||
rio_enable_rx_tx_port(port, 0, destid, hopcount, 0);
|
||||
|
||||
dev_set_name(&rdev->dev, "%02x:e:%04x", rdev->net->id,
|
||||
rdev->destid);
|
||||
rdev->comp_tag & RIO_CTAG_UDEVID);
|
||||
}
|
||||
|
||||
rio_attach_device(rdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue