On Fri, 5 Jan 2007 10:52:27 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote:
> We are led to the following reasoning:
>
> CB and CBI can't pass the LUN value as a control parameter,
> but only as part of the CDB.
>
> If scsi_level is 0 then the LUN value won't be passed in the CDB.
>
> Hence any device using CB or CBI with scsi_level == 0 _must_
> be single-LUN.
>
> Pete, I imagine this will solve your problem better than your proposed
> change.
OK, the patch works, although the /proc/scsi/scs now looks like this:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: AMI Model: Virtual CDROM Rev: 1.00
Type: CD-ROM ANSI SCSI revision: ffffffff
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: AMI Model: Virtual Floppy Rev: 1.00
Type: Direct-Access ANSI SCSI revision: ffffffff
> - sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;
> + if (sdev->scsi_level > SCSI_2)
> + sdev->scsi_level = sdev->sdev_target->scsi_level =
> + SCSI_2;
This looks a little ugly. Can we have this instead:
if (sdev->scsi_level > SCSI_2) {
sdev->scsi_level = SCSI_2;
sdev->sdev_target->scsi_level = SCSI_2;
}
The 0x1A is still there. I looked at the code and it seems observing
use_10_for_ms everywhere. But also both sd and scsi_lib can reset it
to zero if things go wrong, which is what may be happening. I think
a couple of printks may clear up the picture.
-- Pete
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel