Grant Grundler
2008-01-20 05:25:53 UTC
On Sat, Jan 19, 2008 at 10:11:05PM -0600, James Bottomley wrote:
...
Thanks! Patch below (for Alan) works for me.
Jan 19 20:50:17 localhost kernel: USB Mass Storage support registered.
Jan 19 20:50:22 localhost kernel: scsi scan: INQUIRY result too short (5), using 36
Jan 19 20:50:22 localhost kernel: scsi 0:0:0:0: Direct-Access HP PhotoSmart R707 A001 PQ: 0 ANSI: 0
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] 60800 512-byte hardware sectors (31 MB)
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] Write Protect is off
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] 60800 512-byte hardware sectors (31 MB)
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] Write Protect is off
Jan 19 20:50:22 localhost kernel: sda: sda1
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] Attached SCSI removable disk
FTR, previous sd output was showing 60801 sectors.
***@mb500:~ # lsusb
Bus 001 Device 007: ID 03f0:4002 Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage)
Bus 001 Device 004: ID 046d:c030 Logitech, Inc. iFeel Mouse
Bus 001 Device 003: ID 0451:1446 Texas Instruments, Inc. TUSB2040/2070 Hub
Bus 001 Device 002: ID 7fff:bfff
Bus 001 Device 001: ID 0000:0000
Thanks!
grant
Commit Log entry:
Add "FIX_CAPACITY" entry for HP Photosmart r707 Camera in "Disk" mode.
Camera will wedge when /lib/udev/vol_id attempts to access the last sector,
EIO gets reported to dmesg, and block device is marked "offline" (it is).
Reproduced vol_id behavior with:
"dd if=/dev/sda of=/dev/null skip=60800 count=1"
With patch, linux now reports 60800 sectors and udev is happy.
email thread reference:
http://marc.info/?t=120076483300002&r=1&w=2
Signed-off-by: Grant Grundler <***@parisc-linux.org>
--- linux-2.6.23.13/drivers/usb/storage/unusual_devs.h 2008-01-19 19:59:15.000000000 -0800
+++ linux-2.6.23-GGG/drivers/usb/storage/unusual_devs.h 2008-01-19 20:40:40.000000000 -0800
@@ -86,6 +86,14 @@
US_SC_8070, US_PR_USBAT, init_usbat_cd, 0),
#endif
+/* Reported by Grant Grundler <***@parisc-linux.org>
+ * HP r707 camera in "Disk" mode with 2.00.23 or 2.00.24 firmware.
+ */
+UNUSUAL_DEV( 0x03f0, 0x4002, 0x0001, 0x0001,
+ "HP",
+ "PhotoSmart R707",
+ US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY),
+
/* Reported by Sebastian Kapfer <***@gmx.net>
* and Olaf Hering <***@suse.de> (different bcd's, same vendor/product)
* for USB floppies that need the SINGLE_LUN enforcement.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
...
Add the device to drivers/usb/storage/unusual_devs.h with
US_FL_FIX_CAPACITY. You'll need to know it's USB ids as well for this
file.
James,US_FL_FIX_CAPACITY. You'll need to know it's USB ids as well for this
file.
Thanks! Patch below (for Alan) works for me.
Jan 19 20:50:17 localhost kernel: USB Mass Storage support registered.
Jan 19 20:50:22 localhost kernel: scsi scan: INQUIRY result too short (5), using 36
Jan 19 20:50:22 localhost kernel: scsi 0:0:0:0: Direct-Access HP PhotoSmart R707 A001 PQ: 0 ANSI: 0
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] 60800 512-byte hardware sectors (31 MB)
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] Write Protect is off
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] 60800 512-byte hardware sectors (31 MB)
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] Write Protect is off
Jan 19 20:50:22 localhost kernel: sda: sda1
Jan 19 20:50:22 localhost kernel: sd 0:0:0:0: [sda] Attached SCSI removable disk
FTR, previous sd output was showing 60801 sectors.
***@mb500:~ # lsusb
Bus 001 Device 007: ID 03f0:4002 Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage)
Bus 001 Device 004: ID 046d:c030 Logitech, Inc. iFeel Mouse
Bus 001 Device 003: ID 0451:1446 Texas Instruments, Inc. TUSB2040/2070 Hub
Bus 001 Device 002: ID 7fff:bfff
Bus 001 Device 001: ID 0000:0000
Thanks!
grant
Commit Log entry:
Add "FIX_CAPACITY" entry for HP Photosmart r707 Camera in "Disk" mode.
Camera will wedge when /lib/udev/vol_id attempts to access the last sector,
EIO gets reported to dmesg, and block device is marked "offline" (it is).
Reproduced vol_id behavior with:
"dd if=/dev/sda of=/dev/null skip=60800 count=1"
With patch, linux now reports 60800 sectors and udev is happy.
email thread reference:
http://marc.info/?t=120076483300002&r=1&w=2
Signed-off-by: Grant Grundler <***@parisc-linux.org>
--- linux-2.6.23.13/drivers/usb/storage/unusual_devs.h 2008-01-19 19:59:15.000000000 -0800
+++ linux-2.6.23-GGG/drivers/usb/storage/unusual_devs.h 2008-01-19 20:40:40.000000000 -0800
@@ -86,6 +86,14 @@
US_SC_8070, US_PR_USBAT, init_usbat_cd, 0),
#endif
+/* Reported by Grant Grundler <***@parisc-linux.org>
+ * HP r707 camera in "Disk" mode with 2.00.23 or 2.00.24 firmware.
+ */
+UNUSUAL_DEV( 0x03f0, 0x4002, 0x0001, 0x0001,
+ "HP",
+ "PhotoSmart R707",
+ US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY),
+
/* Reported by Sebastian Kapfer <***@gmx.net>
* and Olaf Hering <***@suse.de> (different bcd's, same vendor/product)
* for USB floppies that need the SINGLE_LUN enforcement.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel