diff options
| -rw-r--r-- | drivers/scsi/qla1280.c | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index eb5543ef513b..58ecdc696675 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
| @@ -1265,6 +1265,22 @@ qla1280_biosparam_old(Disk * disk, kdev_t dev, int geom[]) | |||
| 1265 | return qla1280_biosparam(disk->device, NULL, disk->capacity, geom); | 1265 | return qla1280_biosparam(disk->device, NULL, disk->capacity, geom); |
| 1266 | } | 1266 | } |
| 1267 | #endif | 1267 | #endif |
| 1268 | |||
| 1269 | /* disable risc and host interrupts */ | ||
| 1270 | static inline void | ||
| 1271 | qla1280_disable_intrs(struct scsi_qla_host *ha) | ||
| 1272 | { | ||
| 1273 | WRT_REG_WORD(&ha->iobase->ictrl, 0); | ||
| 1274 | RD_REG_WORD(&ha->iobase->ictrl); /* PCI Posted Write flush */ | ||
| 1275 | } | ||
| 1276 | |||
| 1277 | /* enable risc and host interrupts */ | ||
| 1278 | static inline void | ||
| 1279 | qla1280_enable_intrs(struct scsi_qla_host *ha) | ||
| 1280 | { | ||
| 1281 | WRT_REG_WORD(&ha->iobase->ictrl, (ISP_EN_INT | ISP_EN_RISC)); | ||
| 1282 | RD_REG_WORD(&ha->iobase->ictrl); /* PCI Posted Write flush */ | ||
| 1283 | } | ||
| 1268 | 1284 | ||
| 1269 | /************************************************************************** | 1285 | /************************************************************************** |
| 1270 | * qla1280_intr_handler | 1286 | * qla1280_intr_handler |
| @@ -1286,7 +1302,7 @@ qla1280_intr_handler(int irq, void *dev_id, struct pt_regs *regs) | |||
| 1286 | ha->isr_count++; | 1302 | ha->isr_count++; |
| 1287 | reg = ha->iobase; | 1303 | reg = ha->iobase; |
| 1288 | 1304 | ||
| 1289 | WRT_REG_WORD(®->ictrl, 0); /* disable our interrupt. */ | 1305 | qla1280_disable_intrs(ha); |
| 1290 | 1306 | ||
| 1291 | data = qla1280_debounce_register(®->istatus); | 1307 | data = qla1280_debounce_register(®->istatus); |
| 1292 | /* Check for pending interrupts. */ | 1308 | /* Check for pending interrupts. */ |
| @@ -1299,8 +1315,7 @@ qla1280_intr_handler(int irq, void *dev_id, struct pt_regs *regs) | |||
| 1299 | 1315 | ||
| 1300 | spin_unlock(HOST_LOCK); | 1316 | spin_unlock(HOST_LOCK); |
| 1301 | 1317 | ||
| 1302 | /* enable our interrupt. */ | 1318 | qla1280_enable_intrs(ha); |
| 1303 | WRT_REG_WORD(®->ictrl, (ISP_EN_INT | ISP_EN_RISC)); | ||
| 1304 | 1319 | ||
| 1305 | LEAVE_INTR("qla1280_intr_handler"); | 1320 | LEAVE_INTR("qla1280_intr_handler"); |
| 1306 | return IRQ_RETVAL(handled); | 1321 | return IRQ_RETVAL(handled); |
| @@ -1613,38 +1628,6 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
| 1613 | /* QLogic ISP1280 Hardware Support Functions. */ | 1628 | /* QLogic ISP1280 Hardware Support Functions. */ |
| 1614 | /****************************************************************************/ | 1629 | /****************************************************************************/ |
| 1615 | 1630 | ||
| 1616 | /* | ||
| 1617 | * qla2100_enable_intrs | ||
| 1618 | * qla2100_disable_intrs | ||
| 1619 | * | ||
| 1620 | * Input: | ||
| 1621 | * ha = adapter block pointer. | ||
| 1622 | * | ||
| 1623 | * Returns: | ||
| 1624 | * None | ||
| 1625 | */ | ||
| 1626 | static inline void | ||
| 1627 | qla1280_enable_intrs(struct scsi_qla_host *ha) | ||
| 1628 | { | ||
| 1629 | struct device_reg __iomem *reg; | ||
| 1630 | |||
| 1631 | reg = ha->iobase; | ||
| 1632 | /* enable risc and host interrupts */ | ||
| 1633 | WRT_REG_WORD(®->ictrl, (ISP_EN_INT | ISP_EN_RISC)); | ||
| 1634 | RD_REG_WORD(®->ictrl); /* PCI Posted Write flush */ | ||
| 1635 | } | ||
| 1636 | |||
| 1637 | static inline void | ||
| 1638 | qla1280_disable_intrs(struct scsi_qla_host *ha) | ||
| 1639 | { | ||
| 1640 | struct device_reg __iomem *reg; | ||
| 1641 | |||
| 1642 | reg = ha->iobase; | ||
| 1643 | /* disable risc and host interrupts */ | ||
| 1644 | WRT_REG_WORD(®->ictrl, 0); | ||
| 1645 | RD_REG_WORD(®->ictrl); /* PCI Posted Write flush */ | ||
| 1646 | } | ||
| 1647 | |||
| 1648 | /* | 1631 | /* |
| 1649 | * qla1280_initialize_adapter | 1632 | * qla1280_initialize_adapter |
| 1650 | * Initialize board. | 1633 | * Initialize board. |
| @@ -4751,7 +4734,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 4751 | 4734 | ||
| 4752 | #if LINUX_VERSION_CODE >= 0x020600 | 4735 | #if LINUX_VERSION_CODE >= 0x020600 |
| 4753 | error_disable_adapter: | 4736 | error_disable_adapter: |
| 4754 | WRT_REG_WORD(&ha->iobase->ictrl, 0); | 4737 | qla1280_disable_intrs(ha); |
| 4755 | #endif | 4738 | #endif |
| 4756 | error_free_irq: | 4739 | error_free_irq: |
| 4757 | free_irq(pdev->irq, ha); | 4740 | free_irq(pdev->irq, ha); |
| @@ -4788,7 +4771,7 @@ qla1280_remove_one(struct pci_dev *pdev) | |||
| 4788 | scsi_remove_host(host); | 4771 | scsi_remove_host(host); |
| 4789 | #endif | 4772 | #endif |
| 4790 | 4773 | ||
| 4791 | WRT_REG_WORD(&ha->iobase->ictrl, 0); | 4774 | qla1280_disable_intrs(ha); |
| 4792 | 4775 | ||
| 4793 | free_irq(pdev->irq, ha); | 4776 | free_irq(pdev->irq, ha); |
| 4794 | 4777 | ||
