staging:rts_pstor:Avoid "Bad target number" message when probing driver
authorwwang <wei_wang@realsil.com.cn>
Tue, 27 Mar 2012 08:43:20 +0000 (16:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Apr 2012 16:18:16 +0000 (09:18 -0700)
Avoid "Bad LUN" and "Bad target number" message by setting the supported
max_lun and max_id for the scsi host

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts_pstor/rtsx.c

index a7feb3e..1dccd93 100644 (file)
@@ -1000,6 +1000,11 @@ static int __devinit rtsx_probe(struct pci_dev *pci,
 
        rtsx_init_chip(dev->chip);
 
+       /* set the supported max_lun and max_id for the scsi host
+        * NOTE: the minimal value of max_id is 1 */
+       host->max_id = 1;
+       host->max_lun = dev->chip->max_lun;
+
        /* Start up our control thread */
        th = kthread_run(rtsx_control_thread, dev, CR_DRIVER_NAME);
        if (IS_ERR(th)) {