usb-storage: enable multi-LUN scanning when needed
[pandora-kernel.git] / drivers / usb / storage / scsiglue.c
index 13b8bcd..eb660bb 100644 (file)
@@ -116,6 +116,10 @@ static int slave_alloc (struct scsi_device *sdev)
        if (us->subclass == USB_SC_UFI)
                sdev->sdev_target->pdt_1f_for_no_lun = 1;
 
+       /* Tell the SCSI layer if we know there is more than one LUN */
+       if (us->protocol == USB_PR_BULK && us->max_lun > 0)
+               sdev->sdev_bflags |= BLIST_FORCELUN;
+
        return 0;
 }