On Thu, Sep 08, 2005 at 11:33:04PM +0100, Daniel Drake wrote: > Hi, > > I am developing a usb-storage subdriver for a non-standard device which has > a SmartMedia port and an XD media port. > > I'm at the stage where I'd like the driver to support both ports > simultaneously, i.e. creating /dev/sda and /dev/sdb, one for each port. > > How can I instruct my driver to create two disks? > > I tried setting max_lun to 1 in usb.c:get_transport but that didn't make > any difference, even with CONFIG_SCSI_MULTI_LUN in the kernel.
This is the right way to go.
> I also tried adding the US_FL_SCM_MULT_TARG flag to my device in
> unusual_devs.h. That resulted in 8 scsi disks appearing, no matter what the
> setting of max_lun is. Each disk was on lun 0 and had device numbers from
> 0-7.
No, this flag is for something else entirely.
If you set max_lun to 1 and compile with SCSI_MULTI_LUN, are you seeing the
SCSI scan for multiple LUNs?
What your subdriver needs to do is to decode the lun field of the SRB to
decide how to handle the device. As long as SCSI sees responses to INQUIRY
commands with lun=0 and lun=1, you'll get two devices.
Matt
--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver
God, root, what is difference?
-- Pitr
User Friendly, 11/11/1999
pgp8fXox3Cm4F.pgp
Description: PGP signature
