All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
	Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org, linux-usb-devel@lists.sourceforge.net,
	linux-scsi@vger.kernel.org
Subject: [PATCH] [2.6.23.13] udev hangs USB-storage (HP r707 camera)
Date: Sat, 19 Jan 2008 22:25:53 -0700	[thread overview]
Message-ID: <20080120052553.GA5452@colo.lackof.org> (raw)
In-Reply-To: <1200802265.11214.8.camel@localhost.localdomain>

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@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 <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 <sebastian_kapfer@gmx.net>
  * and Olaf Hering <olh@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-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

  reply	other threads:[~2008-01-20  5:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19 17:45 udev hangs USB-storage (HP r707 camera) Grant Grundler
2008-01-20  0:53 ` Stefan Richter
2008-01-20  2:28   ` Grant Grundler
2008-01-20  2:56     ` James Bottomley
     [not found]       ` <1200797791.11214.3.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-20  3:10         ` Grant Grundler
     [not found]           ` <20080120031008.GI11553-lGaJ6EKWmV+kGg0756fqLw@public.gmane.org>
2008-01-20  3:12             ` Grant Grundler
2008-01-20  4:11             ` James Bottomley
2008-01-20  5:25               ` Grant Grundler [this message]
     [not found]                 ` <20080120052553.GA5452-lGaJ6EKWmV+kGg0756fqLw@public.gmane.org>
2008-01-23  5:27                   ` [linux-usb-devel] [PATCH] [2.6.23.13] " Phil Dibowitz
2008-01-23  6:55                     ` Grant Grundler
2008-01-23  7:02                       ` [linux-usb-devel] " Grant Grundler
2008-01-23  8:50                         ` Phil Dibowitz
2008-01-24  5:55                         ` [linux-usb-devel] " Phil Dibowitz
     [not found]     ` <20080120022829.GG11553-lGaJ6EKWmV+kGg0756fqLw@public.gmane.org>
2008-01-20  2:57       ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080120052553.GA5452@colo.lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.