[PATCH] [2.6.23.13] udev hangs USB-storage (HP r707 camera)

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

 



On Sat, Jan 19, 2008 at 10:11:05PM -0600, James Bottomley wrote:
...
> 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,
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.

root@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 <grundler@xxxxxxxxxxxxxxxx>

--- 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 <grundler@xxxxxxxxxxxxxxxx>
+ * 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 <sebastian_kapfer@xxxxxxx>
  * and Olaf Hering <olh@xxxxxxx> (different bcd's, same vendor/product)
  * for USB floppies that need the SINGLE_LUN enforcement.

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux