How to create 2 port entry in /dev folder using R.M.

Hi All,
I am using seimens 82532 chip, which has two ports and i need to write driver for accessing both ports of chip. Resource manager can be used to create an entry as /dev/Port1 . So that application can access the driver by opening /dev/Port1.
But my problem is, How to create an entry for /dev/Port2??? Is it possible to call resmgr_attach() two times in single resource manager as shown below

pathID = resmgr_attach (dpp, &rattr, PORT_A, _FTYPE_ANY, 0, &connect_funcs, &io_funcs, &ioattr);

pathID = resmgr_attach (dpp, &rattr, PORT_B, _FTYPE_ANY, 0,
&connect_funcs, &io_funcs, &ioattr);

yes but you can`t use the same attribute.

So i need to use another variable for R.M. attr. Currently following setting for attr is used

memset (&rattr, 0, sizeof (rattr)); /* using the defaults for rattr */
rattr.nparts_max = 10;

As per your comment following code will work without any problem,

memset (&rattr_A, 0, sizeof (rattr_A)); /* using the defaults for rattr */
rattr_A.nparts_max = 10;

memset (&rattr_B, 0, sizeof (rattr_B)); /* using the defaults for rattr */
rattr_B.nparts_max = 10;

pathID = resmgr_attach (dpp, &rattr_A, PORT_A, _FTYPE_ANY, 0,
&connect_funcs, &io_funcs, &ioattr);
pathID = resmgr_attach (dpp, &rattr_B, PORT_B, _FTYPE_ANY, 0,
&connect_funcs, &io_funcs, &ioattr);

Please correct, if i am wrong???

Looks good, why don’t you just try it ;-)