root/trunk/libffado/src/libieee1394/configrom.cpp

Revision 683, 19.3 kB (checked in by ppalmers, 16 years ago)

- fix bug introduced in r673

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2  * Copyright (C) 2005-2007 by Daniel Wagner
3  * Copyright (C) 2005-2007 by Jonathan Woithe
4  * Copyright (C) 2005-2007 by Pieter Palmers
5  *
6  * This file is part of FFADO
7  * FFADO = Free Firewire (pro-)audio drivers for linux
8  *
9  * FFADO is based upon FreeBoB
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License version 2.1, as published by the Free Software Foundation;
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23  * MA 02110-1301 USA
24  */
25
26 #include "configrom.h"
27 #include "ieee1394service.h"
28
29 #include <stdio.h>
30 #include <string.h>
31
32 #include <iostream>
33 #include <iomanip>
34
35 using namespace std;
36
37 IMPL_DEBUG_MODULE( ConfigRom, ConfigRom, DEBUG_LEVEL_NORMAL );
38
39 static int busRead( struct csr1212_csr* csr,
40                     u_int64_t addr,
41                     u_int16_t length,
42                     void* buffer,
43                     void* private_data );
44
45 static int getMaxRom( u_int32_t* bus_info_data,
46                       void* private_data );
47
48 static struct csr1212_bus_ops configrom_csr1212_ops = {
49     busRead,
50     0,
51     0,
52     getMaxRom
53 };
54
55 struct config_csr_info {
56     Ieee1394Service* service;
57     fb_nodeid_t      nodeId;
58 };
59
60 //-------------------------------------------------------------
61
62 ConfigRom::ConfigRom( Ieee1394Service& ieee1394service, fb_nodeid_t nodeId )
63     : Control::Element("ConfigRom")
64     , m_1394Service( &ieee1394service )
65     , m_nodeId( nodeId )
66     , m_avcDevice( false )
67     , m_guid( 0 )
68     , m_vendorName( "" )
69     , m_modelName( "" )
70     , m_vendorId( 0 )
71     , m_modelId( 0 )
72     , m_unit_specifier_id( 0 )
73     , m_unit_version( 0 )
74     , m_isIsoResourceManager( false )
75     , m_isCycleMasterCapable( false )
76     , m_isSupportIsoOperations( false )
77     , m_isBusManagerCapable( false )
78     , m_cycleClkAcc( 0 )
79     , m_maxRec( 0 )
80     , m_nodeVendorId( 0 )
81     , m_chipIdHi( 0 )
82     , m_chipIdLow( 0 )
83     , m_vendorNameKv( 0 )
84     , m_modelNameKv( 0 )
85     , m_csr( 0 )
86 {
87 }
88
89 ConfigRom::ConfigRom()
90     : Control::Element("ConfigRom")
91     , m_1394Service( 0 )
92     , m_nodeId( -1 )
93     , m_avcDevice( false )
94     , m_guid( 0 )
95     , m_vendorName( "" )
96     , m_modelName( "" )
97     , m_vendorId( 0 )
98     , m_modelId( 0 )
99     , m_unit_specifier_id( 0 )
100     , m_unit_version( 0 )
101     , m_isIsoResourceManager( false )
102     , m_isCycleMasterCapable( false )
103     , m_isSupportIsoOperations( false )
104     , m_isBusManagerCapable( false )
105     , m_cycleClkAcc( 0 )
106     , m_maxRec( 0 )
107     , m_nodeVendorId( 0 )
108     , m_chipIdHi( 0 )
109     , m_chipIdLow( 0 )
110     , m_vendorNameKv( 0 )
111     , m_modelNameKv( 0 )
112     , m_csr( 0 )
113 {
114 }
115
116 ConfigRom::~ConfigRom()
117 {
118 }
119
120 bool
121 ConfigRom::operator == ( const ConfigRom& rhs )
122 {
123     return m_guid == rhs.m_guid;
124 }
125
126 bool
127 ConfigRom::compareGUID( const ConfigRom& a, const ConfigRom& b ) {
128     return a.getGuid() > b.getGuid();
129 }
130
131 bool
132 ConfigRom::initialize()
133 {
134      struct config_csr_info csr_info;
135      csr_info.service = m_1394Service;
136      csr_info.nodeId = 0xffc0 | m_nodeId;
137
138      m_csr = csr1212_create_csr( &configrom_csr1212_ops,
139                                  5 * sizeof(fb_quadlet_t),   // XXX Why 5 ?!?
140                                  &csr_info );
141     if (!m_csr || csr1212_parse_csr( m_csr ) != CSR1212_SUCCESS) {
142         debugError( "Could not parse config rom of node %d on port %d\n", m_nodeId, m_1394Service->getPort() );
143         if (m_csr) {
144             csr1212_destroy_csr(m_csr);
145             m_csr = 0;
146         }
147         return false;
148     }
149
150     // Process Bus_Info_Block
151     m_isIsoResourceManager = CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 31;
152     m_isCycleMasterCapable = ( CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 30 ) & 0x1;
153     m_isSupportIsoOperations = ( CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 29 ) & 0x1;
154     m_isBusManagerCapable = ( CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 28 ) & 0x1;
155     m_cycleClkAcc = ( CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 16 ) & 0xff;
156     m_maxRec = ( CSR1212_BE32_TO_CPU( m_csr->bus_info_data[2] ) >> 12 ) & 0xf;
157     m_nodeVendorId = ( CSR1212_BE32_TO_CPU( m_csr->bus_info_data[3] ) >> 8 );
158     m_chipIdHi = ( CSR1212_BE32_TO_CPU( m_csr->bus_info_data[3] ) ) & 0xff;
159     m_chipIdLow = CSR1212_BE32_TO_CPU( m_csr->bus_info_data[4] );
160
161     // Process Root Directory
162     processRootDirectory(m_csr);
163
164     if ( m_vendorNameKv ) {
165         int len = ( m_vendorNameKv->value.leaf.len - 2) * sizeof( quadlet_t );
166         char* buf = new char[len+2];
167         memcpy( buf,
168                 ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_vendorNameKv ),
169                 len );
170
171     while ((buf + len - 1) == '\0') {
172             len--;
173         }
174         // \todo XXX seems a bit strage to do this but the nodemgr.c code does
175         // it. try to figure out why this is needed (or not)
176     buf[len++] = ' ';
177     buf[len] = '\0';
178
179
180         debugOutput( DEBUG_LEVEL_VERBOSE, "Vendor name: '%s'\n", buf );
181         m_vendorName = buf;
182         delete[] buf;
183     }
184     if ( m_modelNameKv ) {
185         int len = ( m_modelNameKv->value.leaf.len - 2) * sizeof( quadlet_t );
186         char* buf = new char[len+2];
187         memcpy( buf,
188                 ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_modelNameKv ),
189                 len );
190     while ((buf + len - 1) == '\0') {
191             len--;
192         }
193         // \todo XXX for edirol fa-66 it seems somehow broken. see above
194         // todo as well.
195     buf[len++] = ' ';
196     buf[len] = '\0';
197
198         debugOutput( DEBUG_LEVEL_VERBOSE, "Model name: '%s'\n", buf);
199         m_modelName = buf;
200         delete[] buf;
201     }
202
203     m_guid = ((u_int64_t)CSR1212_BE32_TO_CPU(m_csr->bus_info_data[3]) << 32)
204              | CSR1212_BE32_TO_CPU(m_csr->bus_info_data[4]);
205
206     if ( m_vendorNameKv ) {
207         csr1212_release_keyval( m_vendorNameKv );
208         m_vendorNameKv = 0;
209     }
210     if ( m_modelNameKv ) {
211         csr1212_release_keyval( m_modelNameKv );
212         m_modelNameKv = 0;
213     }
214     if ( m_csr ) {
215         csr1212_destroy_csr(m_csr);
216         m_csr = 0;
217     }
218     return true;
219 }
220
221 static int
222 busRead( struct csr1212_csr* csr,
223          u_int64_t addr,
224          u_int16_t length,
225          void* buffer,
226          void* private_data )
227 {
228     struct config_csr_info* csr_info = (struct config_csr_info*) private_data;
229
230     int nb_retries = 5;
231
232     while ( nb_retries--
233             && !csr_info->service->read( csr_info->nodeId,
234                                          addr,
235                                          (size_t)length/4,
236                                          ( quadlet_t* )buffer)  )
237     {// failed, retry
238     }
239
240     if (nb_retries > -1) return 0; // success
241     else return -1; // failure
242 }
243
244 static int
245 getMaxRom( u_int32_t* bus_info_data,
246            void* /*private_data*/)
247 {
248     return (CSR1212_BE32_TO_CPU( bus_info_data[2] ) >> 8) & 0x3;
249 }
250
251
252 void
253 ConfigRom::processUnitDirectory( struct csr1212_csr* csr,
254                                  struct csr1212_keyval* ud_kv,
255                                  unsigned int *id )
256 {
257     struct csr1212_dentry *dentry;
258     struct csr1212_keyval *kv;
259     unsigned int last_key_id = 0;
260
261     debugOutput( DEBUG_LEVEL_VERBOSE, "process unit directory:\n" );
262     csr1212_for_each_dir_entry(csr, kv, ud_kv, dentry) {
263     switch (kv->key.id) {
264         case CSR1212_KV_ID_VENDOR:
265         if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) {
266                     debugOutput( DEBUG_LEVEL_VERBOSE,
267                                  "\tvendor_id = 0x%08x\n",
268                                  kv->value.immediate);
269                     m_vendorId = kv->value.immediate;
270         }
271         break;
272
273         case CSR1212_KV_ID_MODEL:
274                 debugOutput( DEBUG_LEVEL_VERBOSE,
275                              "\tmodel_id = 0x%08x\n",
276                              kv->value.immediate);
277                 m_modelId = kv->value.immediate;
278         break;
279
280         case CSR1212_KV_ID_SPECIFIER_ID:
281                 debugOutput( DEBUG_LEVEL_VERBOSE,
282                              "\tspecifier_id = 0x%08x\n",
283                              kv->value.immediate);
284                 m_unit_specifier_id = kv->value.immediate;
285         break;
286
287         case CSR1212_KV_ID_VERSION:
288                 debugOutput( DEBUG_LEVEL_VERBOSE,
289                              "\tversion = 0x%08x\n",
290                              kv->value.immediate);
291                 m_unit_version = kv->value.immediate;
292                 if ( m_unit_specifier_id == 0x0000a02d ) // XXX
293                 {
294                     if ( kv->value.immediate == 0x10001 ) {
295                         m_avcDevice = true;
296                     }
297                 }
298         break;
299
300         case CSR1212_KV_ID_DESCRIPTOR:
301         if (kv->key.type == CSR1212_KV_TYPE_LEAF &&
302             CSR1212_DESCRIPTOR_LEAF_TYPE(kv) == 0 &&
303             CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) == 0 &&
304             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 &&
305             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 &&
306             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0)
307         {
308             switch (last_key_id) {
309             case CSR1212_KV_ID_VENDOR:
310                 csr1212_keep_keyval(kv);
311                             m_vendorNameKv = kv;
312                 break;
313
314             case CSR1212_KV_ID_MODEL:
315                             m_modelNameKv = kv;
316                 csr1212_keep_keyval(kv);
317                 break;
318
319             }
320         } /* else if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) ... */
321         break;
322
323         case CSR1212_KV_ID_DEPENDENT_INFO:
324         if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) {
325             /* This should really be done in SBP2 as this is
326              * doing SBP2 specific parsing. */
327             processUnitDirectory(csr, kv, id);
328         }
329
330         break;
331
332         default:
333         break;
334     }
335     last_key_id = kv->key.id;
336     }
337 }
338
339 void
340 ConfigRom::processRootDirectory(struct csr1212_csr* csr)
341 {
342     unsigned int ud_id = 0;
343     struct csr1212_dentry *dentry;
344     struct csr1212_keyval *kv;
345     unsigned int last_key_id = 0;
346
347     csr1212_for_each_dir_entry(csr, kv, csr->root_kv, dentry) {
348     switch (kv->key.id) {
349         case CSR1212_KV_ID_VENDOR:
350                 debugOutput( DEBUG_LEVEL_VERBOSE,
351                              "vendor id = 0x%08x\n", kv->value.immediate);
352         break;
353
354         case CSR1212_KV_ID_NODE_CAPABILITIES:
355                 debugOutput( DEBUG_LEVEL_VERBOSE,
356                              "capabilities = 0x%08x\n", kv->value.immediate);
357         break;
358
359         case CSR1212_KV_ID_UNIT:
360         processUnitDirectory(csr, kv, &ud_id);
361         break;
362
363         case CSR1212_KV_ID_DESCRIPTOR:
364         if (last_key_id == CSR1212_KV_ID_VENDOR) {
365             if (kv->key.type == CSR1212_KV_TYPE_LEAF &&
366             CSR1212_DESCRIPTOR_LEAF_TYPE(kv) == 0 &&
367             CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) == 0 &&
368             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 &&
369             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 &&
370             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0)
371                     {
372                         m_vendorNameKv = kv;
373             csr1212_keep_keyval(kv);
374             }
375         }
376         break;
377     }
378     last_key_id = kv->key.id;
379     }
380
381 }
382
383 const fb_nodeid_t
384 ConfigRom::getNodeId() const
385 {
386     return m_nodeId;
387 }
388
389 const fb_octlet_t
390 ConfigRom::getGuid() const
391 {
392     return m_guid;
393 }
394
395 const Glib::ustring
396 ConfigRom::getGuidString() const
397 {
398     char* buf;
399     asprintf( &buf, "%08x%08x",
400               ( unsigned int ) ( getGuid() >> 32 ),
401               ( unsigned int ) ( getGuid() & 0xffffffff ) );
402     Glib::ustring result = buf;
403     free( buf );
404     return result;
405 }
406  
407 const Glib::ustring
408 ConfigRom::getModelName() const
409 {
410     return m_modelName;
411 }
412
413 const Glib::ustring
414 ConfigRom::getVendorName() const
415 {
416     return m_vendorName;
417 }
418
419 const unsigned int
420 ConfigRom::getModelId() const
421 {
422     return m_modelId;
423 }
424
425 const unsigned int
426 ConfigRom::getVendorId() const
427 {
428     return m_vendorId;
429 }
430
431 const unsigned int
432 ConfigRom::getUnitSpecifierId() const
433 {
434     return m_unit_specifier_id;
435 }
436
437 const unsigned int
438 ConfigRom::getUnitVersion() const
439 {
440     return m_unit_version;
441 }
442
443 bool
444 ConfigRom::updatedNodeId()
445 {
446     debugOutput( DEBUG_LEVEL_VERBOSE,
447                  "Checking for updated node id for device with GUID 0x%016llX...\n",
448                  getGuid());
449
450     struct csr1212_csr* csr = NULL;
451     for ( fb_nodeid_t nodeId = 0;
452           nodeId < m_1394Service->getNodeCount();
453           ++nodeId )
454     {
455         struct config_csr_info csr_info;
456         csr_info.service = m_1394Service;
457         csr_info.nodeId = 0xffc0 | nodeId;
458         debugOutput( DEBUG_LEVEL_VERBOSE, "Looking at node %d...\n", nodeId);
459
460         csr = csr1212_create_csr( &configrom_csr1212_ops,
461                                   5 * sizeof(fb_quadlet_t),   // XXX Why 5 ?!?
462                                   &csr_info );
463
464         if (!csr || csr1212_parse_csr( csr ) != CSR1212_SUCCESS) {
465             debugWarning( "Failed to get/parse CSR\n");
466             if (csr) {
467                 csr1212_destroy_csr(csr);
468                 csr = NULL;
469             }
470             continue;
471         }
472
473         octlet_t guid =
474             ((u_int64_t)CSR1212_BE32_TO_CPU(csr->bus_info_data[3]) << 32)
475             | CSR1212_BE32_TO_CPU(csr->bus_info_data[4]);
476
477         debugOutput( DEBUG_LEVEL_VERBOSE,
478                         " Node has GUID 0x%016llX\n",
479                         guid);
480
481         if ( guid == getGuid() ) {
482             debugOutput( DEBUG_LEVEL_VERBOSE, "GUID matches ours\n");
483             if ( nodeId != getNodeId() ) {
484                 debugOutput( DEBUG_LEVEL_VERBOSE,
485                              "Device with GUID 0x%016llX changed node id "
486                              "from %d to %d\n",
487                              getGuid(),
488                              getNodeId(),
489                              nodeId );
490                 m_nodeId = nodeId;
491             } else {
492                 debugOutput( DEBUG_LEVEL_VERBOSE,
493                              "Device with GUID 0x%016llX kept node id %d\n",
494                              getGuid(),
495                              getNodeId());
496             }
497             if (csr) {
498                 csr1212_destroy_csr(csr);
499                 csr = NULL;
500             }
501             return true;
502         }
503     }
504
505     if (csr) {
506         csr1212_destroy_csr(csr);
507     }
508
509     debugOutput( DEBUG_LEVEL_NORMAL,
510                  "Device with GUID 0x%08x%08x could not be found on "
511                  "the bus anymore (removed?)\n",
512                  m_guid >> 32,
513                  m_guid & 0xffffffff );
514     return false;
515 }
516
517 void
518 ConfigRom::printConfigRom() const
519 {
520     using namespace std;
521     debugOutput(DEBUG_LEVEL_NORMAL, "Config ROM\n" );
522     debugOutput(DEBUG_LEVEL_NORMAL, "\tCurrent Node Id:\t%d\n",       getNodeId() );
523     debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016llX\n",       getGuid());
524     debugOutput(DEBUG_LEVEL_NORMAL, "\tVendor Name:\t\t%s\n",         getVendorName().c_str() );
525     debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Name:\t\t%s\n",          getModelName().c_str() );
526     debugOutput(DEBUG_LEVEL_NORMAL, "\tNode Vendor ID:\t\t0x%06x\n",  getNodeVendorId() );
527     debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Id:\t\t0x%08x\n",        getModelId() );
528     debugOutput(DEBUG_LEVEL_NORMAL, "\tUnit Specifier ID:\t0x%06x\n",  getUnitSpecifierId() );
529     debugOutput(DEBUG_LEVEL_NORMAL, "\tUnit version:\t\t0x%08x\n",        getUnitVersion() );
530     debugOutput(DEBUG_LEVEL_NORMAL, "\tISO resource manager:\t%d\n",  isIsoResourseManager() );
531     debugOutput(DEBUG_LEVEL_NORMAL, "\tCycle master capable:\t%d\n",  isSupportsIsoOperations() );
532     debugOutput(DEBUG_LEVEL_NORMAL, "\tBus manager capable:\t%d\n",   isBusManagerCapable() );
533     debugOutput(DEBUG_LEVEL_NORMAL, "\tCycle clock accuracy:\t%d\n", getCycleClockAccurancy() );
534     debugOutput(DEBUG_LEVEL_NORMAL, "\tMax rec:\t\t%d (max asy payload: %d bytes)\n",
535             getMaxRec(), getAsyMaxPayload() );
536 }
537
538 unsigned short
539 ConfigRom::getAsyMaxPayload() const
540 {
541     // XXX use pow instead?
542     return 1 << ( m_maxRec + 1 );
543 }
544
545 bool
546 ConfigRom::serialize( Glib::ustring path, Util::IOSerialize& ser )
547 {
548     bool result;
549     result  = ser.write( path + "m_nodeId", m_nodeId );
550     result &= ser.write( path + "m_avcDevice",  m_avcDevice );
551     result &= ser.write( path + "m_guid", m_guid );
552     result &= ser.write( path + "m_vendorName", Glib::ustring( m_vendorName ) );
553     result &= ser.write( path + "m_modelName", Glib::ustring( m_modelName ) );
554     result &= ser.write( path + "m_vendorId", m_vendorId );
555     result &= ser.write( path + "m_modelId", m_modelId );
556     result &= ser.write( path + "m_unit_specifier_id", m_unit_specifier_id );
557     result &= ser.write( path + "m_unit_version",  m_unit_version );
558     result &= ser.write( path + "m_isIsoResourceManager", m_isIsoResourceManager );
559     result &= ser.write( path + "m_isCycleMasterCapable", m_isCycleMasterCapable );
560     result &= ser.write( path + "m_isSupportIsoOperations", m_isSupportIsoOperations );
561     result &= ser.write( path + "m_isBusManagerCapable", m_isBusManagerCapable );
562     result &= ser.write( path + "m_cycleClkAcc", m_cycleClkAcc );
563     result &= ser.write( path + "m_maxRec", m_maxRec );
564     result &= ser.write( path + "m_nodeVendorId", m_nodeVendorId );
565     result &= ser.write( path + "m_chipIdHi", m_chipIdHi );
566     result &= ser.write( path + "m_chipIdLow", m_chipIdLow );
567     return result;
568 }
569
570 ConfigRom*
571 ConfigRom::deserialize( Glib::ustring path, Util::IODeserialize& deser, Ieee1394Service& ieee1394Service )
572 {
573     ConfigRom* pConfigRom = new ConfigRom;
574     if ( !pConfigRom ) {
575         return 0;
576     }
577
578     pConfigRom->m_1394Service = &ieee1394Service;
579
580     bool result;
581     result  = deser.read( path + "m_nodeId", pConfigRom->m_nodeId );
582     result &= deser.read( path + "m_avcDevice", pConfigRom->m_avcDevice );
583     result &= deser.read( path + "m_guid", pConfigRom->m_guid );
584     result &= deser.read( path + "m_vendorName", pConfigRom->m_vendorName );
585     result &= deser.read( path + "m_modelName", pConfigRom->m_modelName );
586     result &= deser.read( path + "m_vendorId", pConfigRom->m_vendorId );
587     result &= deser.read( path + "m_modelId", pConfigRom->m_modelId );
588     result &= deser.read( path + "m_unit_specifier_id", pConfigRom->m_unit_specifier_id );
589     result &= deser.read( path + "m_unit_version", pConfigRom->m_unit_version );
590     result &= deser.read( path + "m_isIsoResourceManager", pConfigRom->m_isIsoResourceManager );
591     result &= deser.read( path + "m_isCycleMasterCapable", pConfigRom->m_isCycleMasterCapable );
592     result &= deser.read( path + "m_isSupportIsoOperations", pConfigRom->m_isSupportIsoOperations );
593     result &= deser.read( path + "m_isBusManagerCapable", pConfigRom->m_isBusManagerCapable );
594     result &= deser.read( path + "m_cycleClkAcc", pConfigRom->m_cycleClkAcc );
595     result &= deser.read( path + "m_maxRec", pConfigRom->m_maxRec );
596     result &= deser.read( path + "m_nodeVendorId", pConfigRom->m_nodeVendorId );
597     result &= deser.read( path + "m_chipIdHi", pConfigRom->m_chipIdHi );
598     result &= deser.read( path + "m_chipIdLow", pConfigRom->m_chipIdLow );
599
600     if ( !result ) {
601         delete pConfigRom;
602         return 0;
603     }
604
605     return pConfigRom;
606 }
607
608 bool
609 ConfigRom::setNodeId( fb_nodeid_t nodeId )
610 {
611     m_nodeId = nodeId;
612     return true;
613 }
Note: See TracBrowser for help on using the browser.