Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7651
b: refs/heads/master
c: 8af50dc
h: refs/heads/master
i:
  7649: 5a8dcfc
  7647: 6cc12fc
v: v3
  • Loading branch information
Christoph Hellwig authored and James Bottomley committed Aug 2, 2005
1 parent 3f33b14 commit 07bd92b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6c42741ace2fee235b6902e76f3c86a01d32146
refs/heads/master: 8af50dcd22aa0a5840f18276ff10a6977abc3853
57 changes: 20 additions & 37 deletions trunk/drivers/scsi/qla1280.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,22 @@ qla1280_biosparam_old(Disk * disk, kdev_t dev, int geom[])
return qla1280_biosparam(disk->device, NULL, disk->capacity, geom);
}
#endif

/* disable risc and host interrupts */
static inline void
qla1280_disable_intrs(struct scsi_qla_host *ha)
{
WRT_REG_WORD(&ha->iobase->ictrl, 0);
RD_REG_WORD(&ha->iobase->ictrl); /* PCI Posted Write flush */
}

/* enable risc and host interrupts */
static inline void
qla1280_enable_intrs(struct scsi_qla_host *ha)
{
WRT_REG_WORD(&ha->iobase->ictrl, (ISP_EN_INT | ISP_EN_RISC));
RD_REG_WORD(&ha->iobase->ictrl); /* PCI Posted Write flush */
}

/**************************************************************************
* qla1280_intr_handler
Expand All @@ -1286,7 +1302,7 @@ qla1280_intr_handler(int irq, void *dev_id, struct pt_regs *regs)
ha->isr_count++;
reg = ha->iobase;

WRT_REG_WORD(&reg->ictrl, 0); /* disable our interrupt. */
qla1280_disable_intrs(ha);

data = qla1280_debounce_register(&reg->istatus);
/* Check for pending interrupts. */
Expand All @@ -1299,8 +1315,7 @@ qla1280_intr_handler(int irq, void *dev_id, struct pt_regs *regs)

spin_unlock(HOST_LOCK);

/* enable our interrupt. */
WRT_REG_WORD(&reg->ictrl, (ISP_EN_INT | ISP_EN_RISC));
qla1280_enable_intrs(ha);

LEAVE_INTR("qla1280_intr_handler");
return IRQ_RETVAL(handled);
Expand Down Expand Up @@ -1613,38 +1628,6 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp)
/* QLogic ISP1280 Hardware Support Functions. */
/****************************************************************************/

/*
* qla2100_enable_intrs
* qla2100_disable_intrs
*
* Input:
* ha = adapter block pointer.
*
* Returns:
* None
*/
static inline void
qla1280_enable_intrs(struct scsi_qla_host *ha)
{
struct device_reg __iomem *reg;

reg = ha->iobase;
/* enable risc and host interrupts */
WRT_REG_WORD(&reg->ictrl, (ISP_EN_INT | ISP_EN_RISC));
RD_REG_WORD(&reg->ictrl); /* PCI Posted Write flush */
}

static inline void
qla1280_disable_intrs(struct scsi_qla_host *ha)
{
struct device_reg __iomem *reg;

reg = ha->iobase;
/* disable risc and host interrupts */
WRT_REG_WORD(&reg->ictrl, 0);
RD_REG_WORD(&reg->ictrl); /* PCI Posted Write flush */
}

/*
* qla1280_initialize_adapter
* Initialize board.
Expand Down Expand Up @@ -4751,7 +4734,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)

#if LINUX_VERSION_CODE >= 0x020600
error_disable_adapter:
WRT_REG_WORD(&ha->iobase->ictrl, 0);
qla1280_disable_intrs(ha);
#endif
error_free_irq:
free_irq(pdev->irq, ha);
Expand Down Expand Up @@ -4788,7 +4771,7 @@ qla1280_remove_one(struct pci_dev *pdev)
scsi_remove_host(host);
#endif

WRT_REG_WORD(&ha->iobase->ictrl, 0);
qla1280_disable_intrs(ha);

free_irq(pdev->irq, ha);

Expand Down

0 comments on commit 07bd92b

Please sign in to comment.