Author: havner                       Date: Sat Jan 28 04:30:44 2006 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- next try for KBZ 5569, previous one didn't fix all issues.

---- Files affected:
SOURCES:
   kernel-2.6-pcmcia.patch (1.1.2.1 -> 1.1.2.2) 

---- Diffs:

================================================================
Index: SOURCES/kernel-2.6-pcmcia.patch
diff -u SOURCES/kernel-2.6-pcmcia.patch:1.1.2.1 
SOURCES/kernel-2.6-pcmcia.patch:1.1.2.2
--- SOURCES/kernel-2.6-pcmcia.patch:1.1.2.1     Fri Jan 20 03:33:00 2006
+++ SOURCES/kernel-2.6-pcmcia.patch     Sat Jan 28 05:30:39 2006
@@ -1,20 +1,77 @@
-[PATCH] pcmcia: delay creation of 'pseudo' devices
-
-Pseudo secondary PCMCIA devices work best if the primary PCMCIA device
-is configured already. Therefore, delay things a bit...
-
-Signed-off-by: Dominik Brodowski <[EMAIL PROTECTED]>
-
 diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
-index d419f17..3e3bb09 100644
+index 0a424a4..54ad93d 100644
 --- a/drivers/pcmcia/ds.c
 +++ b/drivers/pcmcia/ds.c
-@@ -679,7 +679,7 @@ static inline void pcmcia_add_pseudo_dev
+@@ -352,11 +352,20 @@ static void pcmcia_release_dev(struct de
+       kfree(p_dev);
+ }
+ 
++static void pcmcia_add_pseudo_device(struct pcmcia_socket *s)
++{
++      if (!s->pcmcia_state.device_add_pending) {
++              s->pcmcia_state.device_add_pending = 1;
++              schedule_work(&s->device_add);
++      }
++      return;
++}
+ 
+ static int pcmcia_device_probe(struct device * dev)
  {
-       if (!s->pcmcia_state.device_add_pending) {
-               s->pcmcia_state.device_add_pending = 1;
--              schedule_work(&s->device_add);
-+              schedule_delayed_work(&s->device_add, 10);
+       struct pcmcia_device *p_dev;
+       struct pcmcia_driver *p_drv;
++      struct pcmcia_device_id *did;
+       struct pcmcia_socket *s;
+       int ret = 0;
+ 
+@@ -392,6 +401,19 @@ static int pcmcia_device_probe(struct de
        }
-       return;
+ 
+       ret = p_drv->probe(p_dev);
++      if (ret)
++              goto put_module;
++
++      /* handle pseudo multifunction devices:
++       * there are at most two pseudo multifunction devices.
++       * if we're matching against the first, schedule a
++       * call which will then check whether there are two
++       * pseudo devices, and if not, add the second one.
++       */
++      did = (struct pcmcia_device_id *) p_dev->dev.driver_data;
++      if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
++          (p_dev->socket->device_count == 1) && (p_dev->device_no == 0))
++              pcmcia_add_pseudo_device(p_dev->socket);
+ 
+  put_module:
+       if (ret)
+@@ -660,15 +682,6 @@ static void pcmcia_delayed_add_pseudo_de
+       s->pcmcia_state.device_add_pending = 0;
  }
+ 
+-static inline void pcmcia_add_pseudo_device(struct pcmcia_socket *s)
+-{
+-      if (!s->pcmcia_state.device_add_pending) {
+-              s->pcmcia_state.device_add_pending = 1;
+-              schedule_work(&s->device_add);
+-      }
+-      return;
+-}
+-
+ static int pcmcia_requery(struct device *dev, void * _data)
+ {
+       struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
+@@ -755,15 +768,6 @@ static inline int pcmcia_devmatch(struct
+       }
+ 
+       if (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) {
+-              /* handle pseudo multifunction devices:
+-               * there are at most two pseudo multifunction devices.
+-               * if we're matching against the first, schedule a
+-               * call which will then check whether there are two
+-               * pseudo devices, and if not, add the second one.
+-               */
+-              if (dev->device_no == 0)
+-                      pcmcia_add_pseudo_device(dev->socket);
+-
+               if (dev->device_no != did->device_no)
+                       return 0;
+       }
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/SOURCES/kernel-2.6-pcmcia.patch?r1=1.1.2.1&r2=1.1.2.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to