Skip to content

Commit

Permalink
rapidio: add definitions of Component Tag fields
Browse files Browse the repository at this point in the history
Add definition of the unique device identifier field in the component tag.
 RIO_CTAG_UDEVID does not take all 32 bits of the component tag value to
allow future extensions to the component tag use.

Selected size of the RIO_CTAG_UDEVID field (17 bits) is sufficient to
accommodate maximum number of endpoints in large RIO network (16-bit id)
plus switches.

Signed-off-by: Alexandre Bounine <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: Matt Porter <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Thomas Moll <[email protected]>
Cc: Micha Nelissen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexandre Bounine authored and torvalds committed Jan 13, 2011
1 parent ded0578 commit e653692
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rapidio/rio.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ int rio_inb_pwrite_handler(union rio_pw_msg *pw_msg)
u32 err_status, em_perrdet, em_ltlerrdet;
int rc, portnum;

rdev = rio_get_comptag(pw_msg->em.comptag, NULL);
rdev = rio_get_comptag((pw_msg->em.comptag & RIO_CTAG_UDEVID), NULL);
if (rdev == NULL) {
/* Device removed or enumeration error */
pr_debug("RIO: %s No matching device for CTag 0x%08x\n",
Expand Down
10 changes: 10 additions & 0 deletions include/linux/rio.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@

#define RIO_PW_MSG_SIZE 64

/*
* A component tag value (stored in the component tag CSR) is used as device's
* unique identifier assigned during enumeration. Besides being used for
* identifying switches (which do not have device ID register), it also is used
* by error management notification and therefore has to be assigned
* to endpoints as well.
*/
#define RIO_CTAG_RESRVD 0xfffe0000 /* Reserved */
#define RIO_CTAG_UDEVID 0x0001ffff /* Unique device identifier */

extern struct bus_type rio_bus_type;
extern struct device rio_bus;
extern struct list_head rio_devices; /* list of all devices */
Expand Down

0 comments on commit e653692

Please sign in to comment.