[EMAIL PROTECTED] wrote:
On the one hand, I have never seen SCSI error recovery do something useful.
On the other hand, in this case, it is mostly our fault.
If we return errors with the meaning "don't retry, that is meaningless"
that would stop the SCSI layer from doing its nonsense.

I tried your suggestion - insmod without CF card inserted and found
that it took 13 minutes in my case. Then polished the error returns
a bit and got it down to 2 seconds instead.

Yes, I have 26 minutes due to having two luns from my datafab device. What I really don't like about "sd.c" is that it considers the device "ready for access" when even not a single GOOD was returned from the datafab driver. Finally this behavior results in an I/O error when reading the partition table. Should we report this to the scsi maintainers (whose email / ml I btw. don't know)?


Now you want to see the improved code, but just a moment ago my
ethernet hub broke down - never had that happen before - so my
development machine is out of reach for the moment.
The changes are easy to describe.

Oh the poor hub, R.I.P.


In the routine *determine_lun() there are three possible results:
*GOOD / *FAILED / *ERROR. The two cases where a lun is discovered
were and remain *GOOD. The cases where we cannot send a command
at all (the write fails) were and remain *ERROR.
The remaining cases (we do not try because of beenhere, or we try
but do not find a lun) return *FAILED.
When FAILED is returned, the sense code for Unit Attention, No Media is set.
Clear the beenhere when we return *FAILED after trying in vain,
so that we can try later.

(In fact I made beenhere the condition info->lun == -2,
and changed all tests elsewhere from "if (info->lun == -1)"
to "if (info->lun < 0)".)

I have a more fundamental question: Why do we need lun detection? The datafab reader is already presented to the OS as a two lun device (sda/sdb). In this case the user can decide which lun to use. Or is your datafab device different with this regard?


The other possibility would be to report only a single lun to the OS and let the lun detection select the lun with a CF inserted. So my question is: should I modify datafab to present the two luns indepently to the operating system and send you the patch?

greetings,
eduard.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to