1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-05 12:56:08 +00:00

Fix a bug of retrieving configuration ROM.

- Handle directories and leaves other than unit directories and text leaves
  correctly.
- Now we can retrieve CROM of iSight correctly.

Approved by: re (hrs)
Tested by: flz
MFC after: 3 days
This commit is contained in:
Hidetoshi Shimokawa 2007-07-08 11:47:52 +00:00
parent d73144e778
commit ead41a8810
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171302

View File

@ -1455,9 +1455,9 @@ fw_explore_csrblock(struct fw_device *fwdev, int offset, int recur)
return (0);
for (i = 0; i < dir->crc_len; i ++, offset += sizeof(uint32_t)) {
if (reg[i].key == CROM_UDIR)
if ((reg[i].key & CSRTYPE_MASK) == CSRTYPE_D)
recur = 1;
else if (reg[i].key == CROM_TEXTLEAF)
else if ((reg[i].key & CSRTYPE_MASK) == CSRTYPE_L)
recur = 0;
else
continue;