Commit 6975ddd1 authored by 's avatar

Fixed napatech device closing.


git-svn-id: file:///home/svn/mapi/trunk@1487 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 4f21671e
......@@ -163,6 +163,10 @@ int mapidrv_delete_device(int devid)
}
if(i->napatechhandle != NULL) {
if((result = NTCI_StopPacketFeed(i->napatechhandle, i->packetfeedhandle)) != NTCI_ERRCODE_SUCCESS) {
DEBUG_CMD(Debug_Message("napatechdrv: mapidrv_delete_device; Failed to stop packet feed! (%i)\n", result));
}
if((result = NTCI_DestroyPacketFeed(i->napatechhandle, i->packetfeedhandle)) != NTCI_ERRCODE_SUCCESS) {
DEBUG_CMD(Debug_Message("napatechdrv: mapidrv_delete_device; Failed to destroy packet feed! (%i)\n", result));
}
......@@ -459,9 +463,13 @@ mapidrv_create_flow (int devid, int fd, char **devtype)
switch (data3.AdapterCard.dwInfoType) {
case 1:
if((uint16_t)((data3.AdapterCard.u.InfoType1.qwFpgaId>>8)&0xFF) >= 32) {
if(system("grep \"#disableMultiFeed\" /opt/napatech/config/default.cfg > /dev/null") != 0) {
if(system("grep disableMultiFeed /opt/napatech/config/default.cfg | grep 0 > /dev/null") == 0) {
if((uint16_t)((data3.AdapterCard.u.InfoType1.qwFpgaId>>8)&0xFF) == 32) {
if(system("grep \"disableMultiFeed\" /opt/napatech/config/default.cfg > /dev/null") == 0) {
if(system("grep \"#disableMultiFeed\" /opt/napatech/config/default.cfg > /dev/null") != 0) {
if(system("grep disableMultiFeed /opt/napatech/config/default.cfg | grep 0 > /dev/null") == 0) {
channelsBitmask = 0;
}
} else {
channelsBitmask = 0;
}
} else {
......@@ -470,9 +478,13 @@ mapidrv_create_flow (int devid, int fd, char **devtype)
}
break;
case 2:
if((uint16_t)((data3.AdapterCard.u.InfoType2.qwFpgaId>>8)&0xFF) >= 32) {
if(system("grep \"#disableMultiFeed\" /opt/napatech/config/default.cfg > /dev/null") != 0) {
if(system("grep disableMultiFeed /opt/napatech/config/default.cfg | grep 0 > /dev/null") == 0) {
if((uint16_t)((data3.AdapterCard.u.InfoType2.qwFpgaId>>8)&0xFF) == 32) {
if(system("grep \"disableMultiFeed\" /opt/napatech/config/default.cfg > /dev/null") == 0) {
if(system("grep \"#disableMultiFeed\" /opt/napatech/config/default.cfg > /dev/null") != 0) {
if(system("grep disableMultiFeed /opt/napatech/config/default.cfg | grep 0 > /dev/null") == 0) {
channelsBitmask = 0;
}
} else {
channelsBitmask = 0;
}
} else {
......@@ -597,7 +609,7 @@ mapidrv_create_flow (int devid, int fd, char **devtype)
{
DEBUG_CMD(Debug_Message("ERROR: pthread_create failed"));
return DAGDRV_PTHR_ERR; // TODO
}
}
}
DEBUG_CMD(Debug_Message("napatechdrv: mapidrv_create_flow_; i->napatechhandle: %d; i->packetfeedhandle: %d", i->napatechhandle, i->packetfeedhandle));
......
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