I thought that all this was fixed by a patch for transport.c from Alan Stern, see quoted email.

With the patch, no unusual dev entries are needed for Pentax cameras.
Was it rejected for some reason?

Cheers
James


Alan Stern wrote:
On 12 Dec 2003, Pat LaVarre wrote:


I sent Alan a trace of what the Windows 2000 machine did with usbsnoop.
I have not really read the usb specs, but I guess we should just find a way to get linux to act exactly the same as Windows 2000, because lets face it, all usb devices will be compatible with Windows!

I see two sides to this argument.


1) Fair enough, maybe we cannot plug 'n play as well as Windows until we
faithfully reproduce the reckless way Windows may be assuming Passed
status more often than a CB device reports Passed status.

2) On the other hand, maybe we could invent a way that works that also
correctly understands the rare trouble of inquiry failing for corrupt
but not short data.  Conceivably we could even try teaching the upper
layer to understand deferred status.


I'm not sure what the best answer is.  Probably Matt will just have to
choose one.

The Windows trace showed no unsolicited REQUEST-SENSE commands, as far as I looked. Not just for the initial INQUIRY but for later commands as well. There were some REQUEST-SENSE commands sent, but it was clear from the log that the preceding commands had failed with UNIT-ATTENTION.

That raises the question: How does Windows decide whether a command has
failed?  I don't know; the USB-Snoopy log doesn't give any indication (or
if it does, I don't know how to interpret it).  Maybe there's a STALL that
doesn't show up in the log?  Or maybe any non-zero-length reply is taken
as a success?  But what about something like TEST-UNIT-READY?  Again I
don't know; I didn't see any examples in the log.

Anyway, to keep our options open, here's something James can try. This patch does what I suggested earlier: don't REQUEST-SENSE following a successful INQUIRY. Try applying it and see if things magically start working!

Alan Stern


===== transport.c 1.113 vs edited =====
--- 1.113/drivers/usb/storage/transport.c Fri Oct 24 11:05:36 2003
+++ edited/drivers/usb/storage/transport.c Fri Dec 12 12:35:27 2003
@@ -578,6 +578,15 @@
US_DEBUGP("** no auto-sense for a special command\n");
need_auto_sense = 0;
}
+
+ /* To avoid provoking unwanted UNIT ATTENTIONs during SCSI
+ * scanning, we won't auto-sense an INQUIRY if all the
+ * requested data was sent (i.e., the residue is 0).
+ */
+ else if (srb->cmnd[0] == INQUIRY && srb->resid == 0) {
+ US_DEBUGP("** no auto-sense for successful INQUIRY\n");
+ need_auto_sense = 0;
+ }
}
/*






Matthias Albert wrote:
On Friday 30 January 2004 01:34, Greg KH wrote:

On Thu, Jan 29, 2004 at 01:16:52PM -0500, Alan Stern wrote:

On Wed, 28 Jan 2004, Greg KH wrote:

ChangeSet 1.1267.20.5, 2004/01/16 15:23:38-08:00, [EMAIL PROTECTED]

[PATCH] USB Storage: patch to unusual_devs.h for Pentax Optio 330GS
camera

I was unable to get my Pentax Optio 330GSrecognised
by the 2.6.0 kernel until I applied the patch below that I found
posted some months ago on the German Debian mailing list.

I have attributred it to the original poster.


drivers/usb/storage/unusual_devs.h | 7 +++++++ 1 files changed, 7 insertions(+)


diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h --- a/drivers/usb/storage/unusual_devs.h Wed Jan 28 13:36:55 2004 +++ b/drivers/usb/storage/unusual_devs.h Wed Jan 28 13:36:55 2004 @@ -671,6 +671,13 @@ US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ),

+/* This entry from <[EMAIL PROTECTED]> in the Debian mailing list */
+UNUSUAL_DEV( 0x0a17, 0x0006, 0x0000, 0xffff,
+               "Pentax",
+               "Optio 330GS",
+               US_SC_8070, US_PR_CB, NULL,
+               US_FL_MODE_XLATE | US_FL_FIX_INQUIRY ),
+
/* Submitted by Per Winkvist <[EMAIL PROTECTED]> */
UNUSUAL_DEV( 0x0a17, 0x006, 0x1000, 0x9009,
                "Pentax",

The new entry has the same vendor and product IDs as the following entry, and they have overlapping release ranges. Someone needs to clear this up with the people who submitted these entries.

I agree. Per, care to look at this?


thanks,

greg k-h


I'm not sure Matthias entry will work with some of the other cameras.


Please apply the attached patches instead. People have tried it on several different Pentax cameras (including 330 GS)

Matthias, let me know if the patches won't work for you.


Thanks, Per Winkvist


Hi, sorry for the late answer.
I will test the patch during the day and post the result.

Thanx a lot.

Many greets,

Matthias



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel





------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to