- Timestamp:
- 11/22/08 07:01:20 (15 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libffado-2.0/src/libieee1394/ieee1394service.cpp
r1432 r1451 63 63 , m_pCTRHelper ( new CycleTimerHelper( *this, IEEE1394SERVICE_CYCLETIMER_DLL_UPDATE_INTERVAL_USEC ) ) 64 64 , m_have_new_ctr_read ( false ) 65 , m_filterFCPResponse ( false ) 65 66 , m_pWatchdog ( new Util::Watchdog() ) 66 67 { … … 92 93 IEEE1394SERVICE_CYCLETIMER_HELPER_PRIO ) ) 93 94 , m_have_new_ctr_read ( false ) 95 , m_filterFCPResponse ( false ) 94 96 , m_pWatchdog ( new Util::Watchdog() ) 95 97 { … … 822 824 unsigned char *data) 823 825 { 826 static struct sFcpBlock fcp_block_last; 827 824 828 fb_quadlet_t *data_quads = (fb_quadlet_t *)data; 825 829 #ifdef DEBUG … … 857 861 FCP_MASK_SUBUNIT_AND_OPCODE(first_quadlet), 858 862 FCP_MASK_SUBUNIT_AND_OPCODE(CondSwapFromBus32(m_fcp_block.request[0]))); 863 } else if(m_filterFCPResponse && (memcmp(fcp_block_last.response, data, length) == 0)) { 864 // This is workaround for the Edirol FA-101. The device tends to send more than 865 // one responde to one request. This seems to happen when discovering 866 // function blocks and looks very likely there is a race condition in the 867 // device. The workaround here compares the just arrived FCP responde 868 // to the last one. If it is the same as the previously one then we 869 // just ignore it. The downside of this approach is, we cannot issue 870 // the same FCP twice. 871 debugWarning("Received duplicate FCP response. Ignore it\n"); 859 872 } else { 860 873 m_fcp_block.response_length = (length + sizeof(quadlet_t) - 1) / sizeof(quadlet_t); 861 874 memcpy(m_fcp_block.response, data, length); 875 if (m_filterFCPResponse) { 876 memcpy(fcp_block_last.response, data, length); 877 } 862 878 m_fcp_block.status = eFS_Responded; 863 879 } … … 919 935 920 936 return (split_timeout_hi & 7) * 1000000 + (split_timeout_low >> 19) * 125; 937 } 938 939 void 940 Ieee1394Service::setFCPResponseFiltering(bool enable) 941 { 942 m_filterFCPResponse = enable; 921 943 } 922 944