Commit ed43f44f authored by Alexandre Bounine's avatar Alexandre Bounine Committed by Linus Torvalds

rapidio/tsi721: modify mport name assignment

Modify RapidIO mport device name assignment to include device name of PCIe
side of Tsi721 bridge.  The new name format is intended to provide
definitive reference between RapidIO and PCIe sides of the bridge in
systems with multiple Tsi721 bridges.
Signed-off-by: default avatarAlexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7c4a6106
...@@ -2165,7 +2165,8 @@ static int __devinit tsi721_setup_mport(struct tsi721_device *priv) ...@@ -2165,7 +2165,8 @@ static int __devinit tsi721_setup_mport(struct tsi721_device *priv)
rio_init_dbell_res(&mport->riores[RIO_DOORBELL_RESOURCE], 0, 0xffff); rio_init_dbell_res(&mport->riores[RIO_DOORBELL_RESOURCE], 0, 0xffff);
rio_init_mbox_res(&mport->riores[RIO_INB_MBOX_RESOURCE], 0, 3); rio_init_mbox_res(&mport->riores[RIO_INB_MBOX_RESOURCE], 0, 3);
rio_init_mbox_res(&mport->riores[RIO_OUTB_MBOX_RESOURCE], 0, 3); rio_init_mbox_res(&mport->riores[RIO_OUTB_MBOX_RESOURCE], 0, 3);
strcpy(mport->name, "Tsi721 mport"); snprintf(mport->name, RIO_MAX_MPORT_NAME, "%s(%s)",
dev_driver_string(&pdev->dev), dev_name(&pdev->dev));
/* Hook up interrupt handler */ /* Hook up interrupt handler */
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#define RIO_MAX_MPORTS 8 #define RIO_MAX_MPORTS 8
#define RIO_MAX_MPORT_RESOURCES 16 #define RIO_MAX_MPORT_RESOURCES 16
#define RIO_MAX_DEV_RESOURCES 16 #define RIO_MAX_DEV_RESOURCES 16
#define RIO_MAX_MPORT_NAME 40
#define RIO_GLOBAL_TABLE 0xff /* Indicates access of a switch's #define RIO_GLOBAL_TABLE 0xff /* Indicates access of a switch's
global routing table if it global routing table if it
...@@ -255,7 +256,7 @@ struct rio_mport { ...@@ -255,7 +256,7 @@ struct rio_mport {
*/ */
enum rio_phy_type phy_type; /* RapidIO phy type */ enum rio_phy_type phy_type; /* RapidIO phy type */
u32 phys_efptr; u32 phys_efptr;
unsigned char name[40]; unsigned char name[RIO_MAX_MPORT_NAME];
void *priv; /* Master port private data */ void *priv; /* Master port private data */
#ifdef CONFIG_RAPIDIO_DMA_ENGINE #ifdef CONFIG_RAPIDIO_DMA_ENGINE
struct dma_device dma; struct dma_device dma;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment