On Thu, Apr 26, 2001 at 02:02:40PM +0200, Lists Account wrote:
> Hi All
> 
> Ok, the newcard stuff under version 5 picks up my bridge fine, and it
> finds my wi0 (orinoco gold card) perfectly, this is all great and I was
> rather ecstatic as I watched it boot and tell me all this...
> 
> However the problem comes in the fact that it tries to probe pccard1 after
> finishing with pccard0, and the moment it does this (there is only one
> bridge, and only space for one card), it hangs the machine solid, not even
> a numlock, says something about printing cis tuplets and *boom* nothing
> left.

Yes, I had the same problem with my PCMCIA->PCI bridge.  I solved it with
the following patch, which adds a new option to pccardd: -S maxslot.
Then, add -S 1 to pccardd_flags in your /etc/rc.conf, and you're all set.

The patch is against -current; I can provide one against -stable if
somebody is interested.

G'luck,
Peter

-- 
What would this sentence be like if pi were 3?

Index: src/usr.sbin/pccard/pccardd/cardd.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pccard/pccardd/cardd.c,v
retrieving revision 1.65
diff -u -r1.65 cardd.c
--- src/usr.sbin/pccard/pccardd/cardd.c 2000/12/24 15:30:36     1.65
+++ src/usr.sbin/pccard/pccardd/cardd.c 2001/04/26 13:47:46
@@ -51,6 +51,7 @@
 static void             read_ether_attr2(struct slot *sp);
 
 struct slot *slots;
+int            slot_max = MAXSLOT;
 
 /*
  *     Dump configuration file data.
@@ -112,7 +113,7 @@
        struct slot *sp;
 
        slots = NULL;
-       for (i = 0; i < MAXSLOT; i++) {
+       for (i = 0; i < slot_max; i++) {
                sprintf(name, CARD_DEVICE, i);
                fd = open(name, O_RDWR);
                if (fd < 0)
Index: src/usr.sbin/pccard/pccardd/cardd.h
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pccard/pccardd/cardd.h,v
retrieving revision 1.27
diff -u -r1.27 cardd.h
--- src/usr.sbin/pccard/pccardd/cardd.h 2000/10/20 13:08:18     1.27
+++ src/usr.sbin/pccard/pccardd/cardd.h 2001/04/26 13:47:46
@@ -141,6 +141,7 @@
 
 EXTERN struct slot *slots, *current_slot;
 EXTERN int slen;
+EXTERN int slot_max;
 
 EXTERN struct allocblk *pool_ioblks;            /* I/O blocks in the pool */
 EXTERN struct allocblk *pool_mem;               /* Memory in the pool */
Index: src/usr.sbin/pccard/pccardd/pccardd.8
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pccard/pccardd/pccardd.8,v
retrieving revision 1.22
diff -u -r1.22 pccardd.8
--- src/usr.sbin/pccard/pccardd/pccardd.8       2000/12/27 15:30:15     1.22
+++ src/usr.sbin/pccard/pccardd/pccardd.8       2001/04/26 13:47:47
@@ -39,6 +39,7 @@
 .Op Fl i Ar IRQ
 .Op Fl I 
 .Op Fl f Ar configfile
+.Op Fl S Ar maxslot
 .Sh DESCRIPTION
 .Nm Pccardd
 is normally started at boot time, and manages the insertion
@@ -153,6 +154,12 @@
 .Nm ,
 and the kernel drivers and devices that are used to
 interface to the card.
+.It Fl S Ar maxslot
+Specifies the maximum number of slots to probe (default 16).
+This may be useful with e.g. some PCMCIA->PCI bridges, when probing
+the second slot causes
+.Nm
+to enter an infinite loop.
 .El
 .Sh FILES
 .Bl -tag -width /etc/defaults/pccard.conf -compact
Index: src/usr.sbin/pccard/pccardd/pccardd.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pccard/pccardd/pccardd.c,v
retrieving revision 1.12
diff -u -r1.12 pccardd.c
--- src/usr.sbin/pccard/pccardd/pccardd.c       2000/10/20 13:08:18     1.12
+++ src/usr.sbin/pccard/pccardd/pccardd.c       2001/04/26 13:47:47
@@ -161,7 +161,7 @@
        int irq_specified = 0;
        int i;
        struct sockaddr_un sun;
-#define        COM_OPTS        ":Idvf:s:i:z"
+#define        COM_OPTS        ":Idvf:S:s:i:z"
 
        bzero(irq_arg, sizeof(irq_arg));
        use_kern_irq = 1;
@@ -192,6 +192,13 @@
                        }
                        irq_arg[i] = 1;
                        irq_specified = 1;
+                       break;
+               case 'S':
+                       if (sscanf(optarg, "%d", &i) != 1) {
+                               fprintf(stderr, "%s: -S number\n", argv[0]);
+                               exit(1);
+                       }
+                       slot_max = i;
                        break;
                case 's':
                        sock = optarg;

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to