Skip to content

Commit

Permalink
irq_poll: don't disable new irq_poll instances
Browse files Browse the repository at this point in the history
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 <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
  • Loading branch information
Christoph Hellwig committed Dec 11, 2015
1 parent 511cbce commit 78d0264
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions drivers/scsi/be2iscsi/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}

Expand Down
4 changes: 1 addition & 3 deletions lib/irq_poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,14 @@ 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)
{
memset(iop, 0, sizeof(*iop));
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);

Expand Down

0 comments on commit 78d0264

Please sign in to comment.