public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [linux-usb-devel] FW: USB 2.0 external hard drive problem
@ 2004-02-06 15:10 Joerg Schilling
  0 siblings, 0 replies; 9+ messages in thread
From: Joerg Schilling @ 2004-02-06 15:10 UTC (permalink / raw)
  To: mdharm-usb, schilling, stern; +Cc: appro, linux-scsi, linux-usb-devel, magliery


>From stern@rowland.harvard.edu  Fri Feb  6 15:59:52 2004

>> But as you may know, there is a Linux bug that causes the status to be 0 when
>> sense data (correctly) is available. Libscg _needs_ to add a workarounf for
>> this bug or nothing would work!

>What bug is that?  Or rather, under what circumstances is the status equal 
>to 0 when it shouldn't be?

Sorry, this is long long ago ---> Check the cdrwite mail archives.


>> It is definitely a severe bug in the kernel to retrieve sense data in case
>> of a DMA size error.

>> -	The Linux kernel issues a REQUEST SENSE command ---> this is the first
>> 	severe bug. It is completely wrong to issue a REQUEST SENSE in
>> 	case of a DMA Size error.

>> And there exactly is the bug (which is most likely in usb-storage but
>> definitely in the Linux kernel:
>> 
>>       In case of _only_ a DMA size error, a request sense must not be
>>       issued by the driver.
>> 
>> If you are the maintainer of this piece of software, please fix this.

>(I'm not the maintainer; Matthew Dharm is.)

>Who says it's wrong to retrieve sense information when there is an
>underrun but not Check Condition?  Can you provide a reference to a
>published (or draft) document that states this?

The SCSI standard says that the sense data should retrieved when the 
CHECK CONDITION bit is set. ATAPI drives use a bit in the ATA Status
for this purpose.

Read the SCSI CAM standard to see more on this topic.

>Bear in mind that there are some transports which do not provide any
>status at all.  The _only_ way for a driver to determine whether an
>error occurred is to get the sense data.

Let us asume such transport does not exist, unless you name at least a
single transport that has no bit that means "CHECK CONDITION".


>In the absence of any official statement to the contrary, the logical
>conclusion is that whether or not the driver gets the sense data is a
>low-level matter.  It should only be of interest to the driver and the
>device.  Higher-level drivers and user programs should not care one way or
>the other.

If you retrive sense data without reason, you may "read away" a senseful
error status that is related to a different command. 


Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling@fokus.fraunhofer.de	(work) chars I am J"org Schilling
 URL:  http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-02-09 22:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200402061211.i16CBSIw001678@burner.fokus.fraunhofer.de>
2004-02-06 14:59 ` [linux-usb-devel] FW: USB 2.0 external hard drive problem Alan Stern
2004-02-06 15:24   ` James Bottomley
2004-02-06 20:59     ` Matthew Dharm
2004-02-09 16:40       ` Alan Stern
2004-02-09 16:50         ` James Bottomley
2004-02-09 21:11           ` Matthew Dharm
2004-02-09 21:30           ` Alan Stern
2004-02-09 22:11             ` Tony Battersby
2004-02-06 15:10 Joerg Schilling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox