From d7c98bf5045e806121756e81321c44062a848255 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Thu, 18 Feb 2010 01:52:45 +0100 Subject: [PATCH] --- yaml --- r: 185099 b: refs/heads/master c: 2799d5c5f9d2064c6d1f50ec82e28e3eac5f6954 h: refs/heads/master i: 185097: 929a48da33989175301ce5e831d4ccae285ba9fd 185095: b03156b844ddc62202f6466bfee010818fbb7a33 v: v3 --- [refs] | 2 +- trunk/drivers/firewire/core-device.c | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index bb6a9e87064d..2cc8555f8feb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d54423c62c2f687919d4e5bdd4bb064234ff2d44 +refs/heads/master: 2799d5c5f9d2064c6d1f50ec82e28e3eac5f6954 diff --git a/trunk/drivers/firewire/core-device.c b/trunk/drivers/firewire/core-device.c index e02bf2dff845..01cb6a327e29 100644 --- a/trunk/drivers/firewire/core-device.c +++ b/trunk/drivers/firewire/core-device.c @@ -588,15 +588,19 @@ static int read_bus_info_block(struct fw_device *device, int generation) if (read_rom(device, generation, i, &rom[i]) != RCODE_COMPLETE) goto out; end = i + (rom[i] >> 16) + 1; - i++; - if (end > READ_BIB_ROM_SIZE) + if (end > READ_BIB_ROM_SIZE) { /* - * This block extends outside standard config - * area (and the array we're reading it - * into). That's broken, so ignore this - * device. + * This block extends outside the config ROM which is + * a firmware bug. Ignore this whole block, i.e. + * simply set a fake block length of 0. */ - goto out; + fw_error("skipped invalid ROM block %x at %llx\n", + rom[i], + i * 4 | CSR_REGISTER_BASE | CSR_CONFIG_ROM); + rom[i] = 0; + end = i; + } + i++; /* * Now read in the block. If this is a directory