From: Tomas Henzl <thenzl@redhat.com> Date: Sun, 29 Aug 2010 15:49:39 -0400 Subject: [block] cciss: remove the scan thread Message-id: <1283097002-3341-41-git-send-email-thenzl@redhat.com> Patchwork-id: 27901 O-Subject: [RHEL6 PATCH 40/63] cciss: remove the scan thread Bugzilla: 568830 RH-Acked-by: Neil Horman <nhorman@redhat.com> remove the scan thread diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index e7f23eb..5e5f5de 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -50,7 +50,6 @@ #include <scsi/sg.h> #include <scsi/scsi_ioctl.h> #include <linux/cdrom.h> -#include <linux/kthread.h> #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) #define DRIVER_NAME "HP CISS Driver (v 3.6.20-RH4)" @@ -183,7 +182,6 @@ static int process_sendcmd_error(ctlr_info_t *h, CommandList_struct *c); static void fail_all_cmds(unsigned long ctlr); static void cciss_shutdown(struct pci_dev *); -static int scan_thread(void *data); static void cciss_get_uid(int ctlr, int logvol, unsigned char *uid, int buflen); static int check_for_unit_attention(ctlr_info_t *h, CommandList_struct *c); @@ -3333,23 +3331,6 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } -static int scan_thread(void *data) -{ - ctlr_info_t *h = data; - int rc; - DECLARE_COMPLETION_ONSTACK(wait); - h->rescan_wait = &wait; - - for (;;) { - rc = wait_for_completion_interruptible(&wait); - if (kthread_should_stop()) - break; - if (!rc) - rebuild_lun_table(h, 0); - } - return 0; -} - static int check_for_unit_attention(ctlr_info_t *h, CommandList_struct *c) { if (c->err_info->SenseInfo[2] != UNIT_ATTENTION) @@ -3369,8 +3350,6 @@ static int check_for_unit_attention(ctlr_info_t *h, CommandList_struct *c) case REPORT_LUNS_CHANGED: printk(KERN_WARNING "cciss%d: report LUN data " "changed\n", h->ctlr); - if (h->rescan_wait) - complete(h->rescan_wait); return 1; break; case POWER_OR_RESET: @@ -4131,12 +4110,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, hba[i]->cciss_sector_size = 2048; hba[i]->busy_initializing = 0; rebuild_lun_table(hba[i], 1); -#if 0 - hba[i]->cciss_scan_thread = kthread_run(scan_thread, hba[i], - "cciss_scan%02d", i); - if (IS_ERR(hba[i]->cciss_scan_thread)) - return PTR_ERR(hba[i]->cciss_scan_thread); -#endif return 1; @@ -4219,10 +4192,6 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev) return; } -#if 0 - kthread_stop(hba[i]->cciss_scan_thread); -#endif - remove_proc_entry(hba[i]->devname, proc_cciss); unregister_blkdev(hba[i]->major, hba[i]->devname); diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h index fda688c..54d9d2e 100644 --- a/drivers/block/cciss.h +++ b/drivers/block/cciss.h @@ -124,8 +124,6 @@ struct ctlr_info /* and saved for later processing */ #endif unsigned char alive; - struct completion *rescan_wait; - struct task_struct *cciss_scan_thread; struct device dev; };