Merge master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
[pandora-kernel.git] / include / pcmcia / ss.h
index 67b867f..c8592c7 100644 (file)
 #ifndef _LINUX_SS_H
 #define _LINUX_SS_H
 
+#include <linux/config.h>
+#include <linux/device.h>
+
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/bulkmem.h>
-#include <linux/device.h>
+#ifdef CONFIG_CARDBUS
+#include <linux/pci.h>
+#endif
 
 /* Definitions for card status flags for GetStatus */
 #define SS_WRPROT      0x0001
@@ -171,7 +176,7 @@ typedef struct window_t {
 
 struct config_t;
 struct pcmcia_callback;
-
+struct user_info_t;
 
 struct pcmcia_socket {
        struct module                   *owner;
@@ -216,8 +221,9 @@ struct pcmcia_socket {
 
        /* is set to one if resource setup is done using adjust_resource_info() */
        u8                              resource_setup_old:1;
+       u8                              resource_setup_new:1;
 
-       u8                              reserved:6;
+       u8                              reserved:5;
 
        /* socket operations */
        struct pccard_operations *      ops;
@@ -230,7 +236,11 @@ struct pcmcia_socket {
 
        /* so is power hook */
        int (*power_hook)(struct pcmcia_socket *sock, int operation);
-                           
+#ifdef CONFIG_CARDBUS
+       /* allows tuning the CB bridge before loading driver for the CB card */
+       void (*tune_bridge)(struct pcmcia_socket *sock, struct pci_bus *bus);
+#endif
+
        /* state thread */
        struct semaphore                skt_sem;        /* protects socket h/w state */
 
@@ -241,9 +251,32 @@ struct pcmcia_socket {
        unsigned int                    thread_events;
 
        /* pcmcia (16-bit) */
-       struct pcmcia_bus_socket        *pcmcia;
        struct pcmcia_callback          *callback;
 
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
+       struct list_head                devices_list;   /*  PCMCIA devices */
+       u8                              device_count;   /* the number of devices, used
+                                                        * only internally and subject
+                                                        * to incorrectness and change */
+
+       struct {
+               u8                      present:1,      /* PCMCIA card is present in socket */
+                                       busy:1,         /* "master" ioctl is used */
+                                       dead:1,         /* pcmcia module is being unloaded */
+                                       device_add_pending:1, /* a pseudo-multifunction-device
+                                                              * add event is pending */
+                                       reserved:4;
+       }                               pcmcia_state;
+
+       struct work_struct              device_add;     /* for adding further pseudo-multifunction
+                                                        * devices */
+
+#ifdef CONFIG_PCMCIA_IOCTL
+       struct user_info_t              *user;
+       wait_queue_head_t               queue;
+#endif
+#endif
+
        /* cardbus (32-bit) */
 #ifdef CONFIG_CARDBUS
        struct resource *               cb_cis_res;