wl1251: fix a memory leak in probe
[safe/jmp/linux-2.6] / drivers / misc / hpilo.h
index 03a14c8..247eb38 100644 (file)
@@ -44,13 +44,27 @@ struct ilo_hwinfo {
 
        struct pci_dev *ilo_dev;
 
+       /*
+        * open_lock      serializes ccb_cnt during open and close
+        * [ irq disabled ]
+        * -> alloc_lock  used when adding/removing/searching ccb_alloc,
+        *                which represents all ccbs open on the device
+        * --> fifo_lock  controls access to fifo queues shared with hw
+        *
+        * Locks must be taken in this order, but open_lock and alloc_lock
+        * are optional, they do not need to be held in order to take a
+        * lower level lock.
+        */
+       spinlock_t open_lock;
        spinlock_t alloc_lock;
        spinlock_t fifo_lock;
 
        struct cdev cdev;
 };
 
-/* offset from mmio_vaddr */
+/* offset from mmio_vaddr for enabling doorbell interrupts */
+#define DB_IRQ         0xB2
+/* offset from mmio_vaddr for outbound communications */
 #define DB_OUT         0xD4
 /* DB_OUT reset bit */
 #define DB_RESET       26
@@ -131,6 +145,9 @@ struct ccb_data {
        /* pointer to hardware device info */
        struct ilo_hwinfo *ilo_hw;
 
+       /* queue for this ccb to wait for recv data */
+       wait_queue_head_t ccb_waitq;
+
        /* usage count, to allow for shared ccb's */
        int         ccb_cnt;