diff options
Diffstat (limited to 'drivers/staging/rts5139/rts51x.c')
-rw-r--r-- | drivers/staging/rts5139/rts51x.c | 83 |
1 files changed, 2 insertions, 81 deletions
diff --git a/drivers/staging/rts5139/rts51x.c b/drivers/staging/rts5139/rts51x.c index 2b9f785954df..c3fe7dda1f4e 100644 --- a/drivers/staging/rts5139/rts51x.c +++ b/drivers/staging/rts5139/rts51x.c @@ -56,12 +56,6 @@ MODULE_DESCRIPTION(RTS51X_DESC); MODULE_LICENSE("GPL"); MODULE_VERSION(DRIVER_VERSION); -#ifdef SCSI_SCAN_DELAY -static unsigned int delay_use = 5; -module_param(delay_use, uint, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device"); -#endif - static int auto_delink_en; module_param(auto_delink_en, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(auto_delink_en, "enable auto delink"); @@ -114,7 +108,7 @@ static inline void usb_autopm_disable(struct usb_interface *intf) usb_autopm_get_interface(intf); } -void rts51x_try_to_enter_ss(struct rts51x_chip *chip) +static void rts51x_try_to_enter_ss(struct rts51x_chip *chip) { RTS51X_DEBUGP("Ready to enter SS state\n"); usb_autopm_enable(chip->usb->pusb_intf); @@ -207,7 +201,7 @@ int rts51x_reset_resume(struct usb_interface *iface) #else /* CONFIG_PM */ -void rts51x_try_to_enter_ss(struct rts51x_chip *chip) +static void rts51x_try_to_enter_ss(struct rts51x_chip *chip) { } @@ -364,11 +358,6 @@ static int rts51x_polling_thread(void *__chip) { struct rts51x_chip *chip = (struct rts51x_chip *)__chip; -#ifdef SCSI_SCAN_DELAY - /* Wait until SCSI scan finished */ - wait_timeout((delay_use + 5) * HZ); -#endif - for (;;) { wait_timeout(POLLING_INTERVAL); @@ -432,38 +421,6 @@ static int rts51x_polling_thread(void *__chip) return 0; } -#ifdef SCSI_SCAN_DELAY -/* Thread to carry out delayed SCSI-device scanning */ -static int rts51x_scan_thread(void *__chip) -{ - struct rts51x_chip *chip = (struct rts51x_chip *)__chip; - - printk(KERN_DEBUG - "rts51x: device found at %d\n", chip->usb->pusb_dev->devnum); - - set_freezable(); - /* Wait for the timeout to expire or for a disconnect */ - if (delay_use > 0) { - printk(KERN_DEBUG "rts51x: waiting for device " - "to settle before scanning\n"); - wait_event_freezable_timeout(chip->usb->delay_wait, - test_bit(FLIDX_DONT_SCAN, - &chip->usb->dflags), - delay_use * HZ); - } - - /* If the device is still connected, perform the scanning */ - if (!test_bit(FLIDX_DONT_SCAN, &chip->usb->dflags)) { - scsi_scan_host(rts51x_to_host(chip)); - printk(KERN_DEBUG "rts51x: device scan complete\n"); - - /* Should we unbind if no devices were detected? */ - } - - complete_and_exit(&chip->usb->scanning_done, 0); -} -#endif - /* Associate our private data with the USB device */ static int associate_dev(struct rts51x_chip *chip, struct usb_interface *intf) { @@ -521,7 +478,6 @@ static void rts51x_init_options(struct rts51x_chip *chip) { struct rts51x_option *option = &(chip->option); - option->led_blink_speed = 7; option->mspro_formatter_enable = 1; option->fpga_sd_sdr104_clk = CLK_100; @@ -549,7 +505,6 @@ static void rts51x_init_options(struct rts51x_chip *chip) option->ss_en = ss_en; option->ss_delay = ss_delay; - option->needs_remote_wakeup = needs_remote_wakeup; option->auto_delink_en = auto_delink_en; @@ -561,10 +516,7 @@ static void rts51x_init_options(struct rts51x_chip *chip) option->rts5129_D3318_off_enable = 0; option->sd20_pad_drive = 0; option->reset_or_rw_fail_set_pad_drive = 1; - option->rcc_fail_flag = 0; - option->rcc_bug_fix_en = 1; option->debounce_num = 2; - option->polling_time = 100; option->led_toggle_interval = 6; option->xd_rwn_step = 0; option->sd_send_status_en = 0; @@ -737,15 +689,6 @@ static void quiesce_and_remove_host(struct rts51x_chip *chip) if (rts51x->pusb_dev->state == USB_STATE_NOTATTACHED) set_bit(FLIDX_DISCONNECTING, &rts51x->dflags); -#ifdef SCSI_SCAN_DELAY - /* Prevent SCSI-scanning (if it hasn't started yet) - * and wait for the SCSI-scanning thread to stop. - */ - set_bit(FLIDX_DONT_SCAN, &rts51x->dflags); - wake_up(&rts51x->delay_wait); - wait_for_completion(&rts51x->scanning_done); -#endif - /* Removing the host will perform an orderly shutdown: caches * synchronized, disks spun down, etc. */ @@ -757,9 +700,6 @@ static void quiesce_and_remove_host(struct rts51x_chip *chip) scsi_lock(host); set_bit(FLIDX_DISCONNECTING, &rts51x->dflags); scsi_unlock(host); -#ifdef SCSI_SCAN_DELAY - wake_up(&rts51x->delay_wait); -#endif } /* Second stage of disconnect processing: deallocate all resources */ @@ -818,10 +758,6 @@ static int rts51x_probe(struct usb_interface *intf, init_completion(&rts51x->control_exit); init_completion(&rts51x->polling_exit); init_completion(&(rts51x->notify)); -#ifdef SCSI_SCAN_DELAY - init_waitqueue_head(&rts51x->delay_wait); - init_completion(&rts51x->scanning_done); -#endif chip->usb = rts51x; @@ -855,22 +791,7 @@ static int rts51x_probe(struct usb_interface *intf, printk(KERN_WARNING RTS51X_TIP "Unable to add the scsi host\n"); goto BadDevice; } -#ifdef SCSI_SCAN_DELAY - /* Start up the thread for delayed SCSI-device scanning */ - th = kthread_create(rts51x_scan_thread, chip, RTS51X_SCAN_THREAD); - if (IS_ERR(th)) { - printk(KERN_WARNING RTS51X_TIP - "Unable to start the device-scanning thread\n"); - complete(&rts51x->scanning_done); - quiesce_and_remove_host(chip); - result = PTR_ERR(th); - goto BadDevice; - } - - wake_up_process(th); -#else scsi_scan_host(rts51x_to_host(chip)); -#endif /* Start up our polling thread */ th = kthread_run(rts51x_polling_thread, chip, RTS51X_POLLING_THREAD); |