From: Eduard Hasenleithner <[EMAIL PROTECTED]>

    > One can arbitrarily choose info->lun = 0 or, as you do here,
    > info->lun = srb->device->lun, but that may be true or not.
    > 
    > A CF+SM reader has a CF part, and it has a srb->device->lun,
    > and it has a SM part, with a different srb->device->lun.
    > If probing has shown that srb->device->lun == 0 belongs
    > to the SM half, with a different driver, then datafab.c
    > will be called only for srb->device->lun == 1,
    > but still it may need info->lun = 0.

    Are we talking here about existing or future code?

Existing.

    Because I can't find a single instance where two different drivers
    are used for the same physical device.

I put some preliminary version of that code up for somebody
in linux/kernel/people/aeb/ or so, a year or perhaps two ago.
So there is something you can look at. Hope to redo that work
one of these weeks - lots of details are a bit different now.

    As the command set of the datafab driver still may offer two luns we 
    might have three luns in total.

That is not the right point of view.
The command set of a SCSI device allows for example 8 luns,
but that does not mean every SCSI device "has" 8 luns.
It probably has only one. Probing will tell us which one. Probably 0.

Similarly here the command set may have room for more than a single lun,
but a single device has only a single lun.

In both the SCSI and the datafab case one needs discovery to find out
which lun. My experience is that info->lun = 0 is safer than
info->lun = srb->device->lun, because usually it *is* 0, even when
srb->device->lun is 1.

Do you object against the probing?

Andries


-------------------------------------------------------
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