コード例 #1
0
ファイル: mac_esp.c プロジェクト: Red680812/DNA_kitkat
static irqreturn_t mac_scsi_esp_intr(int irq, void *dev_id)
{
    int got_intr;

    /*
     * This is an edge triggered IRQ, so we have to be careful to
     * avoid missing a transition when it is shared by two ESP devices.
     */

    do {
        got_intr = 0;
        if (esp_chips[0] &&
                (mac_esp_read8(esp_chips[0], ESP_STATUS) & ESP_STAT_INTR)) {
            (void)scsi_esp_intr(irq, esp_chips[0]);
            got_intr = 1;
        }
        if (esp_chips[1] &&
                (mac_esp_read8(esp_chips[1], ESP_STATUS) & ESP_STAT_INTR)) {
            (void)scsi_esp_intr(irq, esp_chips[1]);
            got_intr = 1;
        }
    } while (got_intr);

    return IRQ_HANDLED;
}
コード例 #2
0
static irqreturn_t mac_scsi_esp_intr(int irq, void *dev_id)
{
	int got_intr;


	do {
		got_intr = 0;
		if (esp_chips[0] &&
		    (mac_esp_read8(esp_chips[0], ESP_STATUS) & ESP_STAT_INTR)) {
			(void)scsi_esp_intr(irq, esp_chips[0]);
			got_intr = 1;
		}
		if (esp_chips[1] &&
		    (mac_esp_read8(esp_chips[1], ESP_STATUS) & ESP_STAT_INTR)) {
			(void)scsi_esp_intr(irq, esp_chips[1]);
			got_intr = 1;
		}
	} while (got_intr);

	return IRQ_HANDLED;
}