From patchwork Mon Dec 7 20:51:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 7790601 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 441C79F349 for ; Mon, 7 Dec 2015 21:00:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CB2F20515 for ; Mon, 7 Dec 2015 21:00:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68251204AE for ; Mon, 7 Dec 2015 21:00:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964935AbbLGU7z (ORCPT ); Mon, 7 Dec 2015 15:59:55 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:41546 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933061AbbLGU4h (ORCPT ); Mon, 7 Dec 2015 15:56:37 -0500 Received: from sjc00ib2.hgst.com ([199.255.44.5] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1a62po-0004vy-Oc; Mon, 07 Dec 2015 20:56:36 +0000 From: Christoph Hellwig To: linux-rdma@vger.kernel.org Cc: sagig@dev.mellanox.co.il, bart.vanassche@sandisk.com, axboe@fb.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/13] irq_poll: don't disable new irq_poll instances Date: Mon, 7 Dec 2015 12:51:41 -0800 Message-Id: <1449521512-22921-3-git-send-email-hch@lst.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449521512-22921-1-git-send-email-hch@lst.de> References: <1449521512-22921-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no good reason to start out disabled - drivers can control if the poll instance can be scheduled by simply not scheduling it yet. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- drivers/scsi/be2iscsi/be_main.c | 2 -- drivers/scsi/ipr.c | 2 -- lib/irq_poll.c | 4 +--- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 1d879ef..471e2b9 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -5581,7 +5581,6 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev) pbe_eq = &phwi_context->be_eq[i]; irq_poll_init(&pbe_eq->iopoll, be_iopoll_budget, be_iopoll); - irq_poll_enable(&pbe_eq->iopoll); } i = (phba->msix_enabled) ? i : 0; @@ -5754,7 +5753,6 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev, pbe_eq = &phwi_context->be_eq[i]; irq_poll_init(&pbe_eq->iopoll, be_iopoll_budget, be_iopoll); - irq_poll_enable(&pbe_eq->iopoll); } i = (phba->msix_enabled) ? i : 0; diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 6b9c738..402e4ca 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -3708,7 +3708,6 @@ static ssize_t ipr_store_iopoll_weight(struct device *dev, for (i = 1; i < ioa_cfg->hrrq_num; i++) { irq_poll_init(&ioa_cfg->hrrq[i].iopoll, ioa_cfg->iopoll_weight, ipr_iopoll); - irq_poll_enable(&ioa_cfg->hrrq[i].iopoll); } } spin_unlock_irqrestore(shost->host_lock, lock_flags); @@ -10407,7 +10406,6 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) for (i = 1; i < ioa_cfg->hrrq_num; i++) { irq_poll_init(&ioa_cfg->hrrq[i].iopoll, ioa_cfg->iopoll_weight, ipr_iopoll); - irq_poll_enable(&ioa_cfg->hrrq[i].iopoll); } } diff --git a/lib/irq_poll.c b/lib/irq_poll.c index e6fd1dc..88af879 100644 --- a/lib/irq_poll.c +++ b/lib/irq_poll.c @@ -170,8 +170,7 @@ EXPORT_SYMBOL(irq_poll_enable); * @poll_fn: The handler to invoke * * Description: - * Initialize this irq_poll structure. Before being actively used, the - * driver must call irq_poll_enable(). + * Initialize and enable this irq_poll structure. **/ void irq_poll_init(struct irq_poll *iop, int weight, irq_poll_fn *poll_fn) { @@ -179,7 +178,6 @@ void irq_poll_init(struct irq_poll *iop, int weight, irq_poll_fn *poll_fn) INIT_LIST_HEAD(&iop->list); iop->weight = weight; iop->poll = poll_fn; - set_bit(IRQ_POLL_F_SCHED, &iop->state); } EXPORT_SYMBOL(irq_poll_init);