patch-2.4.2 linux/drivers/block/cciss.h
Next file: linux/drivers/block/cpqarray.c
Previous file: linux/drivers/block/cciss.c
Back to the patch index
Back to the overall index
- Lines: 74
- Date:
Sat Feb 3 12:13:19 2001
- Orig file:
v2.4.1/linux/drivers/block/cciss.h
- Orig date:
Mon Dec 11 12:50:40 2000
diff -u --recursive --new-file v2.4.1/linux/drivers/block/cciss.h linux/drivers/block/cciss.h
@@ -94,8 +94,13 @@
#define SA5_REPLY_PORT_OFFSET 0x44
#define SA5_INTR_STATUS 0x30
+#define SA5_CTCFG_OFFSET 0xB4
+#define SA5_CTMEM_OFFSET 0xB8
+
#define SA5_INTR_OFF 0x08
+#define SA5B_INTR_OFF 0x04
#define SA5_INTR_PENDING 0x08
+#define SA5B_INTR_PENDING 0x04
#define FIFO_EMPTY 0xffffffff
#define CISS_ERROR_BIT 0x02
@@ -133,6 +138,22 @@
}
}
/*
+ * This card is the oposite of the other cards.
+ * 0 turns interrupts on...
+ * 0x04 turns them off...
+ */
+static void SA5B_intr_mask(ctlr_info_t *h, unsigned long val)
+{
+ if (val)
+ { /* Turn interrupts on */
+ writel(0, h->vaddr + SA5_REPLY_INTR_MASK_OFFSET);
+ } else /* Turn them off */
+ {
+ writel( SA5B_INTR_OFF,
+ h->vaddr + SA5_REPLY_INTR_MASK_OFFSET);
+ }
+}
+/*
* Returns true if fifo is full.
*
*/
@@ -183,6 +204,21 @@
return 0 ;
}
+/*
+ * Returns true if an interrupt is pending..
+ */
+static unsigned long SA5B_intr_pending(ctlr_info_t *h)
+{
+ unsigned long register_value =
+ readl(h->vaddr + SA5_INTR_STATUS);
+#ifdef CCISS_DEBUG
+ printk("cciss: intr_pending %lx\n", register_value);
+#endif /* CCISS_DEBUG */
+ if( register_value & SA5B_INTR_PENDING)
+ return 1;
+ return 0 ;
+}
+
static struct access_method SA5_access = {
SA5_submit_command,
@@ -190,6 +226,14 @@
SA5_fifo_full,
SA5_intr_pending,
SA5_completed,
+};
+
+static struct access_method SA5B_access = {
+ SA5_submit_command,
+ SA5B_intr_mask,
+ SA5_fifo_full,
+ SA5B_intr_pending,
+ SA5_completed,
};
struct board_type {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)