diff for duplicates of <20160103050506.341788617@telegraphics.com.au> diff --git a/a/1.txt b/N1/1.txt index 19d8e41..22dc335 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,488 +1,3 @@ -Allocate a work queue that will permit busy waiting and sleeping. This -means NCR5380_init() can potentially fail, so add this error path. - -Signed-off-by: Finn Thain <fthain@telegraphics.com.au> -Reviewed-by: Hannes Reinecke <hare@suse.com> -Tested-by: Ondrej Zary <linux@rainbow-software.org> -Tested-by: Michael Schmitz <schmitzmic@gmail.com> - ---- - -In subsequent patches, the work function adopts this work queue so it -can sleep while polling, which allows the removal of some flawed and -complicated code in NCR5380_select() in NCR5380.c. - -Changed since v1: -- Dropped WQ_CPU_INTENSIVE flag because Documentation/workqueue.txt says it - "is meaningless for unbound wq". - ---- - drivers/scsi/NCR5380.c | 15 +++++++++++---- - drivers/scsi/NCR5380.h | 1 + - drivers/scsi/arm/cumana_1.c | 8 ++++++-- - drivers/scsi/arm/oak.c | 8 ++++++-- - drivers/scsi/atari_NCR5380.c | 8 +++++++- - drivers/scsi/atari_scsi.c | 5 ++++- - drivers/scsi/dmx3191d.c | 17 +++++++++++------ - drivers/scsi/dtc.c | 11 +++++++++-- - drivers/scsi/g_NCR5380.c | 31 +++++++++++++++---------------- - drivers/scsi/mac_scsi.c | 5 ++++- - drivers/scsi/pas16.c | 10 ++++++++-- - drivers/scsi/sun3_scsi.c | 5 ++++- - drivers/scsi/t128.c | 13 ++++++++++--- - 13 files changed, 96 insertions(+), 41 deletions(-) - -Index: linux/drivers/scsi/NCR5380.c -=================================================================== ---- linux.orig/drivers/scsi/NCR5380.c 2016-01-03 16:03:20.000000000 +1100 -+++ linux/drivers/scsi/NCR5380.c 2016-01-03 16:03:23.000000000 +1100 -@@ -514,7 +514,7 @@ static int should_disconnect(unsigned ch - static void NCR5380_set_timer(struct NCR5380_hostdata *hostdata, unsigned long timeout) - { - hostdata->time_expires = jiffies + timeout; -- schedule_delayed_work(&hostdata->coroutine, timeout); -+ queue_delayed_work(hostdata->work_q, &hostdata->coroutine, timeout); - } - - -@@ -791,7 +791,12 @@ static int NCR5380_init(struct Scsi_Host - hostdata->disconnected_queue = NULL; - - INIT_DELAYED_WORK(&hostdata->coroutine, NCR5380_main); -- -+ hostdata->work_q = alloc_workqueue("ncr5380_%d", -+ WQ_UNBOUND | WQ_MEM_RECLAIM, -+ 1, instance->host_no); -+ if (!hostdata->work_q) -+ return -ENOMEM; -+ - /* The CHECK code seems to break the 53C400. Will check it later maybe */ - if (flags & FLAG_NCR53C400) - hostdata->flags = FLAG_HAS_LAST_BYTE_SENT | flags; -@@ -872,6 +877,7 @@ static void NCR5380_exit(struct Scsi_Hos - struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; - - cancel_delayed_work_sync(&hostdata->coroutine); -+ destroy_workqueue(hostdata->work_q); - } - - /** -@@ -932,7 +938,7 @@ static int NCR5380_queue_command_lck(str - - /* Run the coroutine if it isn't already running. */ - /* Kick off command processing */ -- schedule_delayed_work(&hostdata->coroutine, 0); -+ queue_delayed_work(hostdata->work_q, &hostdata->coroutine, 0); - return 0; - } - -@@ -1128,7 +1134,8 @@ static irqreturn_t NCR5380_intr(int dumm - } /* if BASR_IRQ */ - spin_unlock_irqrestore(instance->host_lock, flags); - if(!done) -- schedule_delayed_work(&hostdata->coroutine, 0); -+ queue_delayed_work(hostdata->work_q, -+ &hostdata->coroutine, 0); - } while (!done); - return IRQ_HANDLED; - } -Index: linux/drivers/scsi/NCR5380.h -=================================================================== ---- linux.orig/drivers/scsi/NCR5380.h 2016-01-03 16:03:17.000000000 +1100 -+++ linux/drivers/scsi/NCR5380.h 2016-01-03 16:03:23.000000000 +1100 -@@ -284,6 +284,7 @@ struct NCR5380_hostdata { - unsigned spin_max_r; - unsigned spin_max_w; - #endif -+ struct workqueue_struct *work_q; - }; - - #ifdef __KERNEL__ -Index: linux/drivers/scsi/arm/cumana_1.c -=================================================================== ---- linux.orig/drivers/scsi/arm/cumana_1.c 2016-01-03 16:03:22.000000000 +1100 -+++ linux/drivers/scsi/arm/cumana_1.c 2016-01-03 16:03:23.000000000 +1100 -@@ -238,7 +238,9 @@ static int cumanascsi1_probe(struct expa - - host->irq = ec->irq; - -- NCR5380_init(host, 0); -+ ret = NCR5380_init(host, 0); -+ if (ret) -+ goto out_unmap; - - NCR5380_maybe_reset_bus(host); - -@@ -250,7 +252,7 @@ static int cumanascsi1_probe(struct expa - if (ret) { - printk("scsi%d: IRQ%d not free: %d\n", - host->host_no, host->irq, ret); -- goto out_unmap; -+ goto out_exit; - } - - ret = scsi_add_host(host, &ec->dev); -@@ -262,6 +264,8 @@ static int cumanascsi1_probe(struct expa - - out_free_irq: - free_irq(host->irq, host); -+ out_exit: -+ NCR5380_exit(host); - out_unmap: - iounmap(priv(host)->base); - iounmap(priv(host)->dma); -Index: linux/drivers/scsi/arm/oak.c -=================================================================== ---- linux.orig/drivers/scsi/arm/oak.c 2016-01-03 16:03:03.000000000 +1100 -+++ linux/drivers/scsi/arm/oak.c 2016-01-03 16:03:23.000000000 +1100 -@@ -143,17 +143,21 @@ static int oakscsi_probe(struct expansio - host->irq = NO_IRQ; - host->n_io_port = 255; - -- NCR5380_init(host, 0); -+ ret = NCR5380_init(host, 0); -+ if (ret) -+ goto out_unmap; - - NCR5380_maybe_reset_bus(host); - - ret = scsi_add_host(host, &ec->dev); - if (ret) -- goto out_unmap; -+ goto out_exit; - - scsi_scan_host(host); - goto out; - -+ out_exit: -+ NCR5380_exit(host); - out_unmap: - iounmap(priv(host)->base); - unreg: -Index: linux/drivers/scsi/atari_NCR5380.c -=================================================================== ---- linux.orig/drivers/scsi/atari_NCR5380.c 2016-01-03 16:03:19.000000000 +1100 -+++ linux/drivers/scsi/atari_NCR5380.c 2016-01-03 16:03:23.000000000 +1100 -@@ -643,7 +643,7 @@ static inline void queue_main(struct NCR - queue it on the 'immediate' task queue, to be processed - immediately after the current interrupt processing has - finished. */ -- schedule_work(&hostdata->main_task); -+ queue_work(hostdata->work_q, &hostdata->main_task); - } - /* else: nothing to do: the running NCR5380_main() will pick up - any newly queued command. */ -@@ -832,6 +832,11 @@ static int __init NCR5380_init(struct Sc - hostdata->flags = flags; - - INIT_WORK(&hostdata->main_task, NCR5380_main); -+ hostdata->work_q = alloc_workqueue("ncr5380_%d", -+ WQ_UNBOUND | WQ_MEM_RECLAIM, -+ 1, instance->host_no); -+ if (!hostdata->work_q) -+ return -ENOMEM; - - prepare_info(instance); - -@@ -907,6 +912,7 @@ static void NCR5380_exit(struct Scsi_Hos - struct NCR5380_hostdata *hostdata = shost_priv(instance); - - cancel_work_sync(&hostdata->main_task); -+ destroy_workqueue(hostdata->work_q); - } - - /** -Index: linux/drivers/scsi/atari_scsi.c -=================================================================== ---- linux.orig/drivers/scsi/atari_scsi.c 2016-01-03 16:03:09.000000000 +1100 -+++ linux/drivers/scsi/atari_scsi.c 2016-01-03 16:03:23.000000000 +1100 -@@ -885,7 +885,9 @@ static int __init atari_scsi_probe(struc - #endif - host_flags |= setup_toshiba_delay > 0 ? FLAG_TOSHIBA_DELAY : 0; - -- NCR5380_init(instance, host_flags); -+ error = NCR5380_init(instance, host_flags); -+ if (error) -+ goto fail_init; - - if (IS_A_TT()) { - error = request_irq(instance->irq, scsi_tt_intr, 0, -@@ -947,6 +949,7 @@ fail_host: - free_irq(instance->irq, instance); - fail_irq: - NCR5380_exit(instance); -+fail_init: - scsi_host_put(instance); - fail_alloc: - if (atari_dma_buffer) -Index: linux/drivers/scsi/dmx3191d.c -=================================================================== ---- linux.orig/drivers/scsi/dmx3191d.c 2016-01-03 16:03:03.000000000 +1100 -+++ linux/drivers/scsi/dmx3191d.c 2016-01-03 16:03:23.000000000 +1100 -@@ -95,7 +95,9 @@ static int dmx3191d_probe_one(struct pci - */ - shost->irq = NO_IRQ; - -- NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); -+ error = NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); -+ if (error) -+ goto out_host_put; - - NCR5380_maybe_reset_bus(shost); - -@@ -103,11 +105,15 @@ static int dmx3191d_probe_one(struct pci - - error = scsi_add_host(shost, &pdev->dev); - if (error) -- goto out_release_region; -+ goto out_exit; - - scsi_scan_host(shost); - return 0; - -+out_exit: -+ NCR5380_exit(shost); -+out_host_put: -+ scsi_host_put(shost); - out_release_region: - release_region(io, DMX3191D_REGION_LEN); - out_disable_device: -@@ -119,15 +125,14 @@ static int dmx3191d_probe_one(struct pci - static void dmx3191d_remove_one(struct pci_dev *pdev) - { - struct Scsi_Host *shost = pci_get_drvdata(pdev); -+ unsigned long io = shost->io_port; - - scsi_remove_host(shost); - - NCR5380_exit(shost); -- -- release_region(shost->io_port, DMX3191D_REGION_LEN); -- pci_disable_device(pdev); -- - scsi_host_put(shost); -+ release_region(io, DMX3191D_REGION_LEN); -+ pci_disable_device(pdev); - } - - static struct pci_device_id dmx3191d_pci_tbl[] = { -Index: linux/drivers/scsi/dtc.c -=================================================================== ---- linux.orig/drivers/scsi/dtc.c 2016-01-03 16:03:22.000000000 +1100 -+++ linux/drivers/scsi/dtc.c 2016-01-03 16:03:23.000000000 +1100 -@@ -230,12 +230,13 @@ static int __init dtc_detect(struct scsi - found: - instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata)); - if (instance == NULL) -- break; -+ goto out_unmap; - - instance->base = addr; - ((struct NCR5380_hostdata *)(instance)->hostdata)->base = base; - -- NCR5380_init(instance, 0); -+ if (NCR5380_init(instance, 0)) -+ goto out_unregister; - - NCR5380_maybe_reset_bus(instance); - -@@ -275,6 +276,12 @@ found: - ++count; - } - return count; -+ -+out_unregister: -+ scsi_unregister(instance); -+out_unmap: -+ iounmap(base); -+ return count; - } - - /* -Index: linux/drivers/scsi/g_NCR5380.c -=================================================================== ---- linux.orig/drivers/scsi/g_NCR5380.c 2016-01-03 16:03:20.000000000 +1100 -+++ linux/drivers/scsi/g_NCR5380.c 2016-01-03 16:03:23.000000000 +1100 -@@ -239,9 +239,6 @@ static int __init do_DTC3181E_setup(char - * and DTC436(ISAPnP) controllers. If overrides have been set we use - * them. - * -- * The caller supplied NCR5380_init function is invoked from here, before -- * the interrupt line is taken. -- * - * Locks: none - */ - -@@ -402,15 +399,8 @@ static int __init generic_NCR5380_detect - } - #endif - instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata)); -- if (instance == NULL) { --#ifndef SCSI_G_NCR5380_MEM -- release_region(overrides[current_override].NCR5380_map_name, region_size); --#else -- iounmap(iomem); -- release_mem_region(base, NCR5380_region_size); --#endif -- continue; -- } -+ if (instance == NULL) -+ goto out_release; - - #ifndef SCSI_G_NCR5380_MEM - instance->io_port = overrides[current_override].NCR5380_map_name; -@@ -427,7 +417,8 @@ static int __init generic_NCR5380_detect - ((struct NCR5380_hostdata *)instance->hostdata)->iomem = iomem; - #endif - -- NCR5380_init(instance, flags); -+ if (NCR5380_init(instance, flags)) -+ goto out_unregister; - - if (overrides[current_override].board == BOARD_NCR53C400) - NCR5380_write(C400_CONTROL_STATUS_REG, CSR_BASE); -@@ -459,6 +450,17 @@ static int __init generic_NCR5380_detect - ++count; - } - return count; -+ -+out_unregister: -+ scsi_unregister(instance); -+out_release: -+#ifndef SCSI_G_NCR5380_MEM -+ release_region(overrides[current_override].NCR5380_map_name, region_size); -+#else -+ iounmap(iomem); -+ release_mem_region(base, NCR5380_region_size); -+#endif -+ return count; - } - - /** -@@ -475,15 +477,12 @@ static int generic_NCR5380_release_resou - if (instance->irq != NO_IRQ) - free_irq(instance->irq, instance); - NCR5380_exit(instance); -- - #ifndef SCSI_G_NCR5380_MEM - release_region(instance->io_port, instance->n_io_port); - #else - iounmap(((struct NCR5380_hostdata *)instance->hostdata)->iomem); - release_mem_region(instance->base, NCR5380_region_size); - #endif -- -- - return 0; - } - -Index: linux/drivers/scsi/mac_scsi.c -=================================================================== ---- linux.orig/drivers/scsi/mac_scsi.c 2016-01-03 16:03:09.000000000 +1100 -+++ linux/drivers/scsi/mac_scsi.c 2016-01-03 16:03:23.000000000 +1100 -@@ -382,7 +382,9 @@ static int __init mac_scsi_probe(struct - #endif - host_flags |= setup_toshiba_delay > 0 ? FLAG_TOSHIBA_DELAY : 0; - -- NCR5380_init(instance, host_flags); -+ error = NCR5380_init(instance, host_flags); -+ if (error) -+ goto fail_init; - - if (instance->irq != NO_IRQ) { - error = request_irq(instance->irq, macscsi_intr, IRQF_SHARED, -@@ -407,6 +409,7 @@ fail_host: - free_irq(instance->irq, instance); - fail_irq: - NCR5380_exit(instance); -+fail_init: - scsi_host_put(instance); - return error; - } -Index: linux/drivers/scsi/pas16.c -=================================================================== ---- linux.orig/drivers/scsi/pas16.c 2016-01-03 16:03:22.000000000 +1100 -+++ linux/drivers/scsi/pas16.c 2016-01-03 16:03:23.000000000 +1100 -@@ -378,11 +378,12 @@ static int __init pas16_detect(struct sc - - instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); - if(instance == NULL) -- break; -+ goto out; - - instance->io_port = io_port; - -- NCR5380_init(instance, 0); -+ if (NCR5380_init(instance, 0)) -+ goto out_unregister; - - NCR5380_maybe_reset_bus(instance); - -@@ -418,6 +419,11 @@ static int __init pas16_detect(struct sc - ++count; - } - return count; -+ -+out_unregister: -+ scsi_unregister(instance); -+out: -+ return count; - } - - /* -Index: linux/drivers/scsi/sun3_scsi.c -=================================================================== ---- linux.orig/drivers/scsi/sun3_scsi.c 2016-01-03 16:03:09.000000000 +1100 -+++ linux/drivers/scsi/sun3_scsi.c 2016-01-03 16:03:23.000000000 +1100 -@@ -557,7 +557,9 @@ static int __init sun3_scsi_probe(struct - host_flags |= setup_use_tagged_queuing > 0 ? FLAG_TAGGED_QUEUING : 0; - #endif - -- NCR5380_init(instance, host_flags); -+ error = NCR5380_init(instance, host_flags); -+ if (error) -+ goto fail_init; - - error = request_irq(instance->irq, scsi_sun3_intr, 0, - "NCR5380", instance); -@@ -604,6 +606,7 @@ fail_host: - free_irq(instance->irq, instance); - fail_irq: - NCR5380_exit(instance); -+fail_init: - scsi_host_put(instance); - fail_alloc: - if (udc_regs) -Index: linux/drivers/scsi/t128.c -=================================================================== ---- linux.orig/drivers/scsi/t128.c 2016-01-03 16:03:22.000000000 +1100 -+++ linux/drivers/scsi/t128.c 2016-01-03 16:03:23.000000000 +1100 -@@ -208,12 +208,13 @@ static int __init t128_detect(struct scs - found: - instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); - if(instance == NULL) -- break; -- -+ goto out_unmap; -+ - instance->base = base; - ((struct NCR5380_hostdata *)instance->hostdata)->base = p; - -- NCR5380_init(instance, 0); -+ if (NCR5380_init(instance, 0)) -+ goto out_unregister; - - NCR5380_maybe_reset_bus(instance); - -@@ -246,6 +247,12 @@ found: - ++count; - } - return count; -+ -+out_unregister: -+ scsi_unregister(instance); -+out_unmap: -+ iounmap(p); -+ return count; - } - - static int t128_release(struct Scsi_Host *shost) +An embedded and charset-unspecified text was scrubbed... +Name: ncr5380-new-workqueue +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160103/78c0a861/attachment.ksh> diff --git a/a/content_digest b/N1/content_digest index 5e03a4e..d7ecc60 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,505 +1,12 @@ "ref\020160103050501.042035135@telegraphics.com.au\0" - "From\0Finn Thain <fthain@telegraphics.com.au>\0" + "From\0fthain@telegraphics.com.au (Finn Thain)\0" "Subject\0[PATCH v4 20/78] ncr5380: Introduce unbound workqueue\0" "Date\0Sun, 03 Jan 2016 16:05:21 +1100\0" - "To\0James E.J. Bottomley <JBottomley@odin.com>" - Martin K. Petersen <martin.petersen@oracle.com> - Michael Schmitz <schmitzmic@gmail.com> - linux-m68k@vger.kernel.org - linux-scsi@vger.kernel.org - linux-kernel@vger.kernel.org - Russell King <linux@arm.linux.org.uk> - " linux-arm-kernel@lists.infradead.org\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" - "fn\0ncr5380-new-workqueue\0" "b\0" - "Allocate a work queue that will permit busy waiting and sleeping. This\n" - "means NCR5380_init() can potentially fail, so add this error path.\n" - "\n" - "Signed-off-by: Finn Thain <fthain@telegraphics.com.au>\n" - "Reviewed-by: Hannes Reinecke <hare@suse.com>\n" - "Tested-by: Ondrej Zary <linux@rainbow-software.org>\n" - "Tested-by: Michael Schmitz <schmitzmic@gmail.com>\n" - "\n" - "---\n" - "\n" - "In subsequent patches, the work function adopts this work queue so it\n" - "can sleep while polling, which allows the removal of some flawed and\n" - "complicated code in NCR5380_select() in NCR5380.c.\n" - "\n" - "Changed since v1:\n" - "- Dropped WQ_CPU_INTENSIVE flag because Documentation/workqueue.txt says it\n" - " \"is meaningless for unbound wq\".\n" - "\n" - "---\n" - " drivers/scsi/NCR5380.c | 15 +++++++++++----\n" - " drivers/scsi/NCR5380.h | 1 +\n" - " drivers/scsi/arm/cumana_1.c | 8 ++++++--\n" - " drivers/scsi/arm/oak.c | 8 ++++++--\n" - " drivers/scsi/atari_NCR5380.c | 8 +++++++-\n" - " drivers/scsi/atari_scsi.c | 5 ++++-\n" - " drivers/scsi/dmx3191d.c | 17 +++++++++++------\n" - " drivers/scsi/dtc.c | 11 +++++++++--\n" - " drivers/scsi/g_NCR5380.c | 31 +++++++++++++++----------------\n" - " drivers/scsi/mac_scsi.c | 5 ++++-\n" - " drivers/scsi/pas16.c | 10 ++++++++--\n" - " drivers/scsi/sun3_scsi.c | 5 ++++-\n" - " drivers/scsi/t128.c | 13 ++++++++++---\n" - " 13 files changed, 96 insertions(+), 41 deletions(-)\n" - "\n" - "Index: linux/drivers/scsi/NCR5380.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/NCR5380.c\t2016-01-03 16:03:20.000000000 +1100\n" - "+++ linux/drivers/scsi/NCR5380.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -514,7 +514,7 @@ static int should_disconnect(unsigned ch\n" - " static void NCR5380_set_timer(struct NCR5380_hostdata *hostdata, unsigned long timeout)\n" - " {\n" - " \thostdata->time_expires = jiffies + timeout;\n" - "-\tschedule_delayed_work(&hostdata->coroutine, timeout);\n" - "+\tqueue_delayed_work(hostdata->work_q, &hostdata->coroutine, timeout);\n" - " }\n" - " \n" - " \n" - "@@ -791,7 +791,12 @@ static int NCR5380_init(struct Scsi_Host\n" - " \thostdata->disconnected_queue = NULL;\n" - " \t\n" - " \tINIT_DELAYED_WORK(&hostdata->coroutine, NCR5380_main);\n" - "-\t\n" - "+\thostdata->work_q = alloc_workqueue(\"ncr5380_%d\",\n" - "+\t WQ_UNBOUND | WQ_MEM_RECLAIM,\n" - "+\t 1, instance->host_no);\n" - "+\tif (!hostdata->work_q)\n" - "+\t\treturn -ENOMEM;\n" - "+\n" - " \t/* The CHECK code seems to break the 53C400. Will check it later maybe */\n" - " \tif (flags & FLAG_NCR53C400)\n" - " \t\thostdata->flags = FLAG_HAS_LAST_BYTE_SENT | flags;\n" - "@@ -872,6 +877,7 @@ static void NCR5380_exit(struct Scsi_Hos\n" - " \tstruct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata;\n" - " \n" - " \tcancel_delayed_work_sync(&hostdata->coroutine);\n" - "+\tdestroy_workqueue(hostdata->work_q);\n" - " }\n" - " \n" - " /**\n" - "@@ -932,7 +938,7 @@ static int NCR5380_queue_command_lck(str\n" - " \n" - " \t/* Run the coroutine if it isn't already running. */\n" - " \t/* Kick off command processing */\n" - "-\tschedule_delayed_work(&hostdata->coroutine, 0);\n" - "+\tqueue_delayed_work(hostdata->work_q, &hostdata->coroutine, 0);\n" - " \treturn 0;\n" - " }\n" - " \n" - "@@ -1128,7 +1134,8 @@ static irqreturn_t NCR5380_intr(int dumm\n" - " \t\t}\t/* if BASR_IRQ */\n" - " \t\tspin_unlock_irqrestore(instance->host_lock, flags);\n" - " \t\tif(!done)\n" - "-\t\t\tschedule_delayed_work(&hostdata->coroutine, 0);\n" - "+\t\t\tqueue_delayed_work(hostdata->work_q,\n" - "+\t\t\t &hostdata->coroutine, 0);\n" - " \t} while (!done);\n" - " \treturn IRQ_HANDLED;\n" - " }\n" - "Index: linux/drivers/scsi/NCR5380.h\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/NCR5380.h\t2016-01-03 16:03:17.000000000 +1100\n" - "+++ linux/drivers/scsi/NCR5380.h\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -284,6 +284,7 @@ struct NCR5380_hostdata {\n" - " \tunsigned spin_max_r;\n" - " \tunsigned spin_max_w;\n" - " #endif\n" - "+\tstruct workqueue_struct *work_q;\n" - " };\n" - " \n" - " #ifdef __KERNEL__\n" - "Index: linux/drivers/scsi/arm/cumana_1.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/arm/cumana_1.c\t2016-01-03 16:03:22.000000000 +1100\n" - "+++ linux/drivers/scsi/arm/cumana_1.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -238,7 +238,9 @@ static int cumanascsi1_probe(struct expa\n" - " \n" - " \thost->irq = ec->irq;\n" - " \n" - "-\tNCR5380_init(host, 0);\n" - "+\tret = NCR5380_init(host, 0);\n" - "+\tif (ret)\n" - "+\t\tgoto out_unmap;\n" - " \n" - " \tNCR5380_maybe_reset_bus(host);\n" - " \n" - "@@ -250,7 +252,7 @@ static int cumanascsi1_probe(struct expa\n" - " \tif (ret) {\n" - " \t\tprintk(\"scsi%d: IRQ%d not free: %d\\n\",\n" - " \t\t host->host_no, host->irq, ret);\n" - "-\t\tgoto out_unmap;\n" - "+\t\tgoto out_exit;\n" - " \t}\n" - " \n" - " \tret = scsi_add_host(host, &ec->dev);\n" - "@@ -262,6 +264,8 @@ static int cumanascsi1_probe(struct expa\n" - " \n" - " out_free_irq:\n" - " \tfree_irq(host->irq, host);\n" - "+ out_exit:\n" - "+\tNCR5380_exit(host);\n" - " out_unmap:\n" - " \tiounmap(priv(host)->base);\n" - " \tiounmap(priv(host)->dma);\n" - "Index: linux/drivers/scsi/arm/oak.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/arm/oak.c\t2016-01-03 16:03:03.000000000 +1100\n" - "+++ linux/drivers/scsi/arm/oak.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -143,17 +143,21 @@ static int oakscsi_probe(struct expansio\n" - " \thost->irq = NO_IRQ;\n" - " \thost->n_io_port = 255;\n" - " \n" - "-\tNCR5380_init(host, 0);\n" - "+\tret = NCR5380_init(host, 0);\n" - "+\tif (ret)\n" - "+\t\tgoto out_unmap;\n" - " \n" - " \tNCR5380_maybe_reset_bus(host);\n" - " \n" - " \tret = scsi_add_host(host, &ec->dev);\n" - " \tif (ret)\n" - "-\t\tgoto out_unmap;\n" - "+\t\tgoto out_exit;\n" - " \n" - " \tscsi_scan_host(host);\n" - " \tgoto out;\n" - " \n" - "+ out_exit:\n" - "+\tNCR5380_exit(host);\n" - " out_unmap:\n" - " \tiounmap(priv(host)->base);\n" - " unreg:\n" - "Index: linux/drivers/scsi/atari_NCR5380.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/atari_NCR5380.c\t2016-01-03 16:03:19.000000000 +1100\n" - "+++ linux/drivers/scsi/atari_NCR5380.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -643,7 +643,7 @@ static inline void queue_main(struct NCR\n" - " \t\t queue it on the 'immediate' task queue, to be processed\n" - " \t\t immediately after the current interrupt processing has\n" - " \t\t finished. */\n" - "-\t\tschedule_work(&hostdata->main_task);\n" - "+\t\tqueue_work(hostdata->work_q, &hostdata->main_task);\n" - " \t}\n" - " \t/* else: nothing to do: the running NCR5380_main() will pick up\n" - " \t any newly queued command. */\n" - "@@ -832,6 +832,11 @@ static int __init NCR5380_init(struct Sc\n" - " \thostdata->flags = flags;\n" - " \n" - " \tINIT_WORK(&hostdata->main_task, NCR5380_main);\n" - "+\thostdata->work_q = alloc_workqueue(\"ncr5380_%d\",\n" - "+\t WQ_UNBOUND | WQ_MEM_RECLAIM,\n" - "+\t 1, instance->host_no);\n" - "+\tif (!hostdata->work_q)\n" - "+\t\treturn -ENOMEM;\n" - " \n" - " \tprepare_info(instance);\n" - " \n" - "@@ -907,6 +912,7 @@ static void NCR5380_exit(struct Scsi_Hos\n" - " \tstruct NCR5380_hostdata *hostdata = shost_priv(instance);\n" - " \n" - " \tcancel_work_sync(&hostdata->main_task);\n" - "+\tdestroy_workqueue(hostdata->work_q);\n" - " }\n" - " \n" - " /**\n" - "Index: linux/drivers/scsi/atari_scsi.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/atari_scsi.c\t2016-01-03 16:03:09.000000000 +1100\n" - "+++ linux/drivers/scsi/atari_scsi.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -885,7 +885,9 @@ static int __init atari_scsi_probe(struc\n" - " #endif\n" - " \thost_flags |= setup_toshiba_delay > 0 ? FLAG_TOSHIBA_DELAY : 0;\n" - " \n" - "-\tNCR5380_init(instance, host_flags);\n" - "+\terror = NCR5380_init(instance, host_flags);\n" - "+\tif (error)\n" - "+\t\tgoto fail_init;\n" - " \n" - " \tif (IS_A_TT()) {\n" - " \t\terror = request_irq(instance->irq, scsi_tt_intr, 0,\n" - "@@ -947,6 +949,7 @@ fail_host:\n" - " \t\tfree_irq(instance->irq, instance);\n" - " fail_irq:\n" - " \tNCR5380_exit(instance);\n" - "+fail_init:\n" - " \tscsi_host_put(instance);\n" - " fail_alloc:\n" - " \tif (atari_dma_buffer)\n" - "Index: linux/drivers/scsi/dmx3191d.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/dmx3191d.c\t2016-01-03 16:03:03.000000000 +1100\n" - "+++ linux/drivers/scsi/dmx3191d.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -95,7 +95,9 @@ static int dmx3191d_probe_one(struct pci\n" - " \t */\n" - " \tshost->irq = NO_IRQ;\n" - " \n" - "-\tNCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E);\n" - "+\terror = NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E);\n" - "+\tif (error)\n" - "+\t\tgoto out_host_put;\n" - " \n" - " \tNCR5380_maybe_reset_bus(shost);\n" - " \n" - "@@ -103,11 +105,15 @@ static int dmx3191d_probe_one(struct pci\n" - " \n" - " \terror = scsi_add_host(shost, &pdev->dev);\n" - " \tif (error)\n" - "-\t\tgoto out_release_region;\n" - "+\t\tgoto out_exit;\n" - " \n" - " \tscsi_scan_host(shost);\n" - " \treturn 0;\n" - " \n" - "+out_exit:\n" - "+\tNCR5380_exit(shost);\n" - "+out_host_put:\n" - "+\tscsi_host_put(shost);\n" - " out_release_region:\n" - " \trelease_region(io, DMX3191D_REGION_LEN);\n" - " out_disable_device:\n" - "@@ -119,15 +125,14 @@ static int dmx3191d_probe_one(struct pci\n" - " static void dmx3191d_remove_one(struct pci_dev *pdev)\n" - " {\n" - " \tstruct Scsi_Host *shost = pci_get_drvdata(pdev);\n" - "+\tunsigned long io = shost->io_port;\n" - " \n" - " \tscsi_remove_host(shost);\n" - " \n" - " \tNCR5380_exit(shost);\n" - "-\n" - "-\trelease_region(shost->io_port, DMX3191D_REGION_LEN);\n" - "-\tpci_disable_device(pdev);\n" - "-\n" - " \tscsi_host_put(shost);\n" - "+\trelease_region(io, DMX3191D_REGION_LEN);\n" - "+\tpci_disable_device(pdev);\n" - " }\n" - " \n" - " static struct pci_device_id dmx3191d_pci_tbl[] = {\n" - "Index: linux/drivers/scsi/dtc.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/dtc.c\t2016-01-03 16:03:22.000000000 +1100\n" - "+++ linux/drivers/scsi/dtc.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -230,12 +230,13 @@ static int __init dtc_detect(struct scsi\n" - " found:\n" - " \t\tinstance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata));\n" - " \t\tif (instance == NULL)\n" - "-\t\t\tbreak;\n" - "+\t\t\tgoto out_unmap;\n" - " \n" - " \t\tinstance->base = addr;\n" - " \t\t((struct NCR5380_hostdata *)(instance)->hostdata)->base = base;\n" - " \n" - "-\t\tNCR5380_init(instance, 0);\n" - "+\t\tif (NCR5380_init(instance, 0))\n" - "+\t\t\tgoto out_unregister;\n" - " \n" - " \t\tNCR5380_maybe_reset_bus(instance);\n" - " \n" - "@@ -275,6 +276,12 @@ found:\n" - " \t\t++count;\n" - " \t}\n" - " \treturn count;\n" - "+\n" - "+out_unregister:\n" - "+\tscsi_unregister(instance);\n" - "+out_unmap:\n" - "+\tiounmap(base);\n" - "+\treturn count;\n" - " }\n" - " \n" - " /*\n" - "Index: linux/drivers/scsi/g_NCR5380.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/g_NCR5380.c\t2016-01-03 16:03:20.000000000 +1100\n" - "+++ linux/drivers/scsi/g_NCR5380.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -239,9 +239,6 @@ static int __init do_DTC3181E_setup(char\n" - " *\tand DTC436(ISAPnP) controllers. If overrides have been set we use\n" - " *\tthem.\n" - " *\n" - "- *\tThe caller supplied NCR5380_init function is invoked from here, before\n" - "- *\tthe interrupt line is taken.\n" - "- *\n" - " *\tLocks: none\n" - " */\n" - " \n" - "@@ -402,15 +399,8 @@ static int __init generic_NCR5380_detect\n" - " \t\t}\n" - " #endif\n" - " \t\tinstance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata));\n" - "-\t\tif (instance == NULL) {\n" - "-#ifndef SCSI_G_NCR5380_MEM\n" - "-\t\t\trelease_region(overrides[current_override].NCR5380_map_name, region_size);\n" - "-#else\n" - "-\t\t\tiounmap(iomem);\n" - "-\t\t\trelease_mem_region(base, NCR5380_region_size);\n" - "-#endif\n" - "-\t\t\tcontinue;\n" - "-\t\t}\n" - "+\t\tif (instance == NULL)\n" - "+\t\t\tgoto out_release;\n" - " \n" - " #ifndef SCSI_G_NCR5380_MEM\n" - " \t\tinstance->io_port = overrides[current_override].NCR5380_map_name;\n" - "@@ -427,7 +417,8 @@ static int __init generic_NCR5380_detect\n" - " \t\t((struct NCR5380_hostdata *)instance->hostdata)->iomem = iomem;\n" - " #endif\n" - " \n" - "-\t\tNCR5380_init(instance, flags);\n" - "+\t\tif (NCR5380_init(instance, flags))\n" - "+\t\t\tgoto out_unregister;\n" - " \n" - " \t\tif (overrides[current_override].board == BOARD_NCR53C400)\n" - " \t\t\tNCR5380_write(C400_CONTROL_STATUS_REG, CSR_BASE);\n" - "@@ -459,6 +450,17 @@ static int __init generic_NCR5380_detect\n" - " \t\t++count;\n" - " \t}\n" - " \treturn count;\n" - "+\n" - "+out_unregister:\n" - "+\tscsi_unregister(instance);\n" - "+out_release:\n" - "+#ifndef SCSI_G_NCR5380_MEM\n" - "+\trelease_region(overrides[current_override].NCR5380_map_name, region_size);\n" - "+#else\n" - "+\tiounmap(iomem);\n" - "+\trelease_mem_region(base, NCR5380_region_size);\n" - "+#endif\n" - "+\treturn count;\n" - " }\n" - " \n" - " /**\n" - "@@ -475,15 +477,12 @@ static int generic_NCR5380_release_resou\n" - " \tif (instance->irq != NO_IRQ)\n" - " \t\tfree_irq(instance->irq, instance);\n" - " \tNCR5380_exit(instance);\n" - "-\n" - " #ifndef SCSI_G_NCR5380_MEM\n" - " \trelease_region(instance->io_port, instance->n_io_port);\n" - " #else\n" - " \tiounmap(((struct NCR5380_hostdata *)instance->hostdata)->iomem);\n" - " \trelease_mem_region(instance->base, NCR5380_region_size);\n" - " #endif\n" - "-\n" - "-\n" - " \treturn 0;\n" - " }\n" - " \n" - "Index: linux/drivers/scsi/mac_scsi.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/mac_scsi.c\t2016-01-03 16:03:09.000000000 +1100\n" - "+++ linux/drivers/scsi/mac_scsi.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -382,7 +382,9 @@ static int __init mac_scsi_probe(struct\n" - " #endif\n" - " \thost_flags |= setup_toshiba_delay > 0 ? FLAG_TOSHIBA_DELAY : 0;\n" - " \n" - "-\tNCR5380_init(instance, host_flags);\n" - "+\terror = NCR5380_init(instance, host_flags);\n" - "+\tif (error)\n" - "+\t\tgoto fail_init;\n" - " \n" - " \tif (instance->irq != NO_IRQ) {\n" - " \t\terror = request_irq(instance->irq, macscsi_intr, IRQF_SHARED,\n" - "@@ -407,6 +409,7 @@ fail_host:\n" - " \t\tfree_irq(instance->irq, instance);\n" - " fail_irq:\n" - " \tNCR5380_exit(instance);\n" - "+fail_init:\n" - " \tscsi_host_put(instance);\n" - " \treturn error;\n" - " }\n" - "Index: linux/drivers/scsi/pas16.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/pas16.c\t2016-01-03 16:03:22.000000000 +1100\n" - "+++ linux/drivers/scsi/pas16.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -378,11 +378,12 @@ static int __init pas16_detect(struct sc\n" - " \n" - " \tinstance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));\n" - " \tif(instance == NULL)\n" - "-\t\tbreak;\n" - "+\t\tgoto out;\n" - " \t\t\n" - " \tinstance->io_port = io_port;\n" - " \n" - "-\tNCR5380_init(instance, 0);\n" - "+\tif (NCR5380_init(instance, 0))\n" - "+\t\tgoto out_unregister;\n" - " \n" - " \tNCR5380_maybe_reset_bus(instance);\n" - " \n" - "@@ -418,6 +419,11 @@ static int __init pas16_detect(struct sc\n" - " \t++count;\n" - " }\n" - " return count;\n" - "+\n" - "+out_unregister:\n" - "+\tscsi_unregister(instance);\n" - "+out:\n" - "+\treturn count;\n" - " }\n" - " \n" - " /*\n" - "Index: linux/drivers/scsi/sun3_scsi.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/sun3_scsi.c\t2016-01-03 16:03:09.000000000 +1100\n" - "+++ linux/drivers/scsi/sun3_scsi.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -557,7 +557,9 @@ static int __init sun3_scsi_probe(struct\n" - " \thost_flags |= setup_use_tagged_queuing > 0 ? FLAG_TAGGED_QUEUING : 0;\n" - " #endif\n" - " \n" - "-\tNCR5380_init(instance, host_flags);\n" - "+\terror = NCR5380_init(instance, host_flags);\n" - "+\tif (error)\n" - "+\t\tgoto fail_init;\n" - " \n" - " \terror = request_irq(instance->irq, scsi_sun3_intr, 0,\n" - " \t \"NCR5380\", instance);\n" - "@@ -604,6 +606,7 @@ fail_host:\n" - " \t\tfree_irq(instance->irq, instance);\n" - " fail_irq:\n" - " \tNCR5380_exit(instance);\n" - "+fail_init:\n" - " \tscsi_host_put(instance);\n" - " fail_alloc:\n" - " \tif (udc_regs)\n" - "Index: linux/drivers/scsi/t128.c\n" - "===================================================================\n" - "--- linux.orig/drivers/scsi/t128.c\t2016-01-03 16:03:22.000000000 +1100\n" - "+++ linux/drivers/scsi/t128.c\t2016-01-03 16:03:23.000000000 +1100\n" - "@@ -208,12 +208,13 @@ static int __init t128_detect(struct scs\n" - " found:\n" - " \tinstance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));\n" - " \tif(instance == NULL)\n" - "-\t\tbreak;\n" - "-\t\t\n" - "+\t\tgoto out_unmap;\n" - "+\n" - " \tinstance->base = base;\n" - " \t((struct NCR5380_hostdata *)instance->hostdata)->base = p;\n" - " \n" - "-\tNCR5380_init(instance, 0);\n" - "+\tif (NCR5380_init(instance, 0))\n" - "+\t\tgoto out_unregister;\n" - " \n" - " \tNCR5380_maybe_reset_bus(instance);\n" - " \n" - "@@ -246,6 +247,12 @@ found:\n" - " \t++count;\n" - " }\n" - " return count;\n" - "+\n" - "+out_unregister:\n" - "+\tscsi_unregister(instance);\n" - "+out_unmap:\n" - "+\tiounmap(p);\n" - "+\treturn count;\n" - " }\n" - " \n" - static int t128_release(struct Scsi_Host *shost) + "An embedded and charset-unspecified text was scrubbed...\n" + "Name: ncr5380-new-workqueue\n" + URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160103/78c0a861/attachment.ksh> -71c1516f1126b934175125694f3f9a8c9ab2fa490a9880e452c79cacef4f7455 +72459b2ae95f222d4c441f2b966c171f84d3a16b36430fb913eff92b6690122c
diff --git a/a/content_digest b/N2/content_digest index 5e03a4e..4c7ed7f 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -5,9 +5,9 @@ "To\0James E.J. Bottomley <JBottomley@odin.com>" Martin K. Petersen <martin.petersen@oracle.com> Michael Schmitz <schmitzmic@gmail.com> - linux-m68k@vger.kernel.org - linux-scsi@vger.kernel.org - linux-kernel@vger.kernel.org + <linux-m68k@vger.kernel.org> + <linux-scsi@vger.kernel.org> + <linux-kernel@vger.kernel.org> Russell King <linux@arm.linux.org.uk> " linux-arm-kernel@lists.infradead.org\0" "\00:1\0" @@ -502,4 +502,4 @@ " \n" static int t128_release(struct Scsi_Host *shost) -71c1516f1126b934175125694f3f9a8c9ab2fa490a9880e452c79cacef4f7455 +97eb2517ab7a9f082366a577e99e37830c745e73de3ecaa72338e5bf9d56f833
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.