···10491049 return -ENOENT;10501050}1051105110521052+/*10531053+ * Apparently there are many different wrong implementations of the CRC10541054+ * algorithm. We don't fail, we just warn... approximately once per GUID.10551055+ */10561056+static void10571057+csr1212_check_crc(const u32 *buffer, size_t length, u16 crc, __be32 *guid)10581058+{10591059+ static u64 last_bad_eui64;10601060+ u64 eui64 = ((u64)be32_to_cpu(guid[0]) << 32) | be32_to_cpu(guid[1]);10611061+10621062+ if (csr1212_crc16(buffer, length) == crc ||10631063+ csr1212_msft_crc16(buffer, length) == crc ||10641064+ eui64 == last_bad_eui64)10651065+ return;10661066+10671067+ printk(KERN_DEBUG "ieee1394: config ROM CRC error\n");10681068+ last_bad_eui64 = eui64;10691069+}1052107010531071/* Parse a chunk of data as a Config ROM */10541072···11101092 return ret;11111093 }1112109411131113- /* Apparently there are many different wrong implementations of the CRC11141114- * algorithm. We don't fail, we just warn. */11151115- if ((csr1212_crc16(bi->data, bi->crc_length) != bi->crc) &&11161116- (csr1212_msft_crc16(bi->data, bi->crc_length) != bi->crc))11171117- printk(KERN_DEBUG "IEEE 1394 device has ROM CRC error\n");10951095+ csr1212_check_crc(bi->data, bi->crc_length, bi->crc,10961096+ &csr->bus_info_data[3]);1118109711191098 cr = CSR1212_MALLOC(sizeof(*cr));11201099 if (!cr)···12201205 &cache->data[bytes_to_quads(kv->offset - cache->offset)];12211206 kvi_len = be16_to_cpu(kvi->length);1222120712231223- /* Apparently there are many different wrong implementations of the CRC12241224- * algorithm. We don't fail, we just warn. */12251225- if ((csr1212_crc16(kvi->data, kvi_len) != kvi->crc) &&12261226- (csr1212_msft_crc16(kvi->data, kvi_len) != kvi->crc))12271227- printk(KERN_DEBUG "IEEE 1394 device has ROM CRC error\n");12081208+ /* GUID is wrong in here in case of extended ROM. We don't care. */12091209+ csr1212_check_crc(kvi->data, kvi_len, kvi->crc, &cache->data[3]);1228121012291211 switch (kv->key.type) {12301212 case CSR1212_KV_TYPE_DIRECTORY: