]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ieee1394: add quirk fix for Freecom HDD
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 16 Dec 2008 19:35:13 +0000 (20:35 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 18 Dec 2008 17:13:38 +0000 (09:13 -0800)
commit 25a41b280083259d05d68f61633194344a1f8a9f upstream.

According to http://bugzilla.kernel.org/show_bug.cgi?id=12206, Freecom
FireWire Hard Drive 1TB reports max_rom=2 but returns garbage if block
read requests are used to read the config ROM.  Force max_rom=0 to limit
them to quadlet read requests.

Reported-by: Christian Mueller <cm1@mumac.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ieee1394/nodemgr.c

index 16240a7896509c024bacf59ff48bd8dd1c227d9d..3d3c3bc8ad042c99047c43192452c78111f97953 100644 (file)
@@ -115,8 +115,14 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length,
        return error;
 }
 
+#define OUI_FREECOM_TECHNOLOGIES_GMBH 0x0001db
+
 static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci)
 {
+       /* Freecom FireWire Hard Drive firmware bug */
+       if (be32_to_cpu(bus_info_data[3]) >> 8 == OUI_FREECOM_TECHNOLOGIES_GMBH)
+               return 0;
+
        return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3;
 }