Re: [usb-storage] [PATCH] Panasonic DMC-FS3 reports correct capacity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 03, 2009 at 02:39:53PM +0100, Oliver Neukum wrote:
> Am Tuesday 03 February 2009 13:28:36 schrieb Gregor Jasny:
> > Hi,
> > 
> > I've noticed that my Panasonic DMC-FS3 reports it's capacity correctly
> > but gets blacklisted by a catch-all entry for 04da:2372. I've written a
> > whitelist entry just for my camera and now it's working properly.
> 
> If possible to existing entry should be changed so that it covers
> only the machines that need it.

I ran into the same issue with a Panasonic DMC-FX12.

Unfortunately, the Panasonic cameras seem to report identical
values for vendor (0x04da), product (0x2372) and revision (0.10).

Here's the relevant part of /proc/usb/devices with a DMC-FX12

T:  Bus=08 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04da ProdID=2372 Rev= 0.10
S:  Manufacturer=Panasonic
S:  Product=DMC-FX12
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

The old reports for DMC-LC5 and DMC-LC20 all have the same
vendor/product/revision numbers:
https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-June/000386.html
https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-August/000691.html

So, with the new code for automatically fixing the last sector bugs,
wouldn't it be better to just remove the US_FL_FIX_CAPACITY from
(most?) of the unusual_devs entries?

I tried this with the DMC-FX12 (on kernel 2.6.28.2) and it worked fine.
But I don't have any of the old, buggy cameras to test.

Now the capacity is reported correctly (7861248 sectors) and
reading the last sector works fine:

# dd if=/dev/sdc of=/dev/null bs=512 skip=7861247
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0411284 s, 12.4 kB/s

# dd if=/dev/sdc of=/dev/null bs=512 skip=7861246
2+0 records in
2+0 records out
1024 bytes (1.0 kB) copied, 0.0416289 s, 24.6 kB/s

Here's the patch:

Signed-off-by: Matthias Reichl <hias@xxxxxxxxx>
--- linux-2.6.28.2.orig/drivers/usb/storage/unusual_devs.h	2009-01-28 14:25:13.000000000 +0100
+++ linux-2.6.28.2/drivers/usb/storage/unusual_devs.h	2009-02-03 15:32:50.000000000 +0100
@@ -426,12 +426,16 @@
 		"CD-R/RW Drive",
 		US_SC_8070, US_PR_CB, NULL, 0),
 
-/* Reported by Adriaan Penning <a.penning@xxxxxxxx> */
+/* Reported by Adriaan Penning <a.penning@xxxxxxxx> 
+ * Patch submitted by Matthias Reichl <hias@xxxxxxxxx>
+ * removed US_FL_FIX_CAPACITY since newer cameras like
+ * the DMC-FX12 or DMC-FS3 correctly report the capacity.
+ */
 UNUSUAL_DEV(  0x04da, 0x2372, 0x0000, 0x9999,
 		"Panasonic",
 		"DMC-LCx Camera",
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
-		US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ),
+		US_FL_NOT_LOCKABLE ),
 
 /* Reported by Simeon Simeonov <simeonov_2000@xxxxxxxxx> */
 UNUSUAL_DEV(  0x04da, 0x2373, 0x0000, 0x9999,

so long,

Hias
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux