Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jan 2000 22:34:55 -0500
From:      Peter Radcliffe <pir@pir.net>
To:        freebsd-mobile@freebsd.org
Subject:   pccardd dumping core
Message-ID:  <20000115223455.A2572@pir.net>

next in thread | raw e-mail | index | archive | help
I've been tracking PAO3 on my laptop (Sony 505TR) via cvsup for some time.

At some point after PAO3-19991220 I cvsuped, rebuilt and instslled the
kernel, rebuilt and installed the userland processes.

After a reboot with my D-link DFE-650 in the slot after bringing the
interface up pccardd died and dumped core. This is repeatable, happens
every time at boot time or when pccardd is started (or restarted) later.

[...]
   493 logger   GIO   fd 1 wrote 48 bytes
       "<13>Jan 15 21:53:53 pir: D-link DFE-650 inserted"
   493 logger   RET   sendto 48/0x30
   493 logger   CALL  exit(0)
   492 sh       RET   wait4 493/0x1ed
   492 sh       CALL  exit(0)
   491 pccardd  RET   wait4 492/0x1ec
   491 pccardd  CALL  sigaction(0x2,0xbfbfc97c,0)
   491 pccardd  RET   sigaction 0
   491 pccardd  CALL  sigaction(0x3,0xbfbfc970,0)
   491 pccardd  RET   sigaction 0
   491 pccardd  CALL  sigprocmask(0x3,0)
   491 pccardd  RET   sigprocmask 524288/0x80000
   491 pccardd  PSIG  SIGSEGV SIG_DFL
[...]

Using pccardd from PAO3-19991220 (with the old or new kernel) all
works fine and the same part of ktrace output gives me;

[...]
   578 logger   GIO   fd 1 wrote 48 bytes
       "<13>Jan 15 22:04:12 pir: D-link DFE-650 inserted"
   578 logger   RET   sendto 48/0x30
   578 logger   CALL  exit(0)
   577 sh       RET   wait4 578/0x242
   577 sh       CALL  exit(0)
   559 pccardd  RET   wait4 577/0x241
   559 pccardd  CALL  sigaction(0x2,0xbfbfc96c,0)
   559 pccardd  RET   sigaction 0
   559 pccardd  CALL  sigaction(0x3,0xbfbfc960,0)
   559 pccardd  RET   sigaction 0
   559 pccardd  CALL  sigprocmask(0x3,0)
   559 pccardd  RET   sigprocmask 524288/0x80000
   559 pccardd  CALL  sigaction(0x2,0xbfbfc978,0xbfbfc96c)
   559 pccardd  RET   sigaction 0
   559 pccardd  CALL  sigaction(0x3,0xbfbfc978,0xbfbfc960)
   559 pccardd  RET   sigaction 0
   559 pccardd  CALL  sigprocmask(0x1,0x80000)
   559 pccardd  RET   sigprocmask 0
   559 pccardd  CALL  fork
   559 pccardd  RET   fork 579/0x243
   559 pccardd  CALL  wait4(0x243,0xbfbfc954,0,0)
   579 pccardd  RET   fork 0
   579 pccardd  CALL  sigaction(0x2,0xbfbfc96c,0)
   579 pccardd  RET   sigaction 0
   579 pccardd  CALL  sigaction(0x3,0xbfbfc960,0)
   579 pccardd  RET   sigaction 0
   579 pccardd  CALL  sigprocmask(0x3,0)
   579 pccardd  RET   sigprocmask 524288/0x80000
   579 pccardd  CALL  execve(0x280db966,0xbfbfc908,0xbfbfcfa4)
   579 pccardd  NAMI  "/bin/sh"
   579 sh       RET   execve 0
[...]

pccardd.c hasn't changed in this time.
readcis.h, readcis.c and cardd.c have.

The diffs between the version that works for me (/usr/src/set/PAO3)
and the one that dumps core (/usr/src/PAO3) are:

diff -cr /usr/src/set/PAO3/usr.sbin/pccard/pccardd/cardd.c /usr/src/PAO3/src/usr.sbin/pccard/pccardd/cardd.c
*** /usr/src/set/PAO3/usr.sbin/pccard/pccardd/cardd.c	Fri Dec 17 02:10:41 1999
--- /usr/src/PAO3/src/usr.sbin/pccard/pccardd/cardd.c	Fri Jan 14 16:45:20 2000
***************
*** 419,425 ****
  		return;
  	}
  	ether_mac_err = 0;
! 	bzero(sp->eaddr, sizeof(sp->eaddr));
  #ifdef WAVELAN
  	bzero(&sp->wl, sizeof(sp->wl));
  #endif /* WAVELAN */
--- 419,429 ----
  		return;
  	}
  	ether_mac_err = 0;
! 	if (sp->cis->lan_nid && sp->cis->lan_nid[0] == sizeof(sp->eaddr)) {
! 		bcopy(sp->cis->lan_nid + 1, sp->eaddr, sizeof(sp->eaddr));
! 		sp->flags |= EADDR_CONFIGED;
! 	} else
! 		bzero(sp->eaddr, sizeof(sp->eaddr));
  #ifdef WAVELAN
  	bzero(&sp->wl, sizeof(sp->wl));
  #endif /* WAVELAN */
diff -cr /usr/src/set/PAO3/usr.sbin/pccard/pccardd/readcis.c /usr/src/PAO3/src/usr.sbin/pccard/pccardd/readcis.c
*** /usr/src/set/PAO3/usr.sbin/pccard/pccardd/readcis.c	Tue Dec 14 03:04:59 1999
--- /usr/src/PAO3/src/usr.sbin/pccard/pccardd/readcis.c	Fri Jan 14 16:45:20 2000
***************
*** 57,62 ****
--- 57,63 ----
  static void config_map(struct cis *, unsigned char *, int);
  static void cis_config(struct cis *, unsigned char *, int);
  static void cis_func_id(struct cis *, unsigned char *, int);
+ static void cis_network_ext(struct cis *, unsigned char *, int);
  static struct tuple_list *read_one_tuplelist(int, int, off_t);
  static struct tuple_list *read_tuples(int);
  static struct tuple *find_tuple_in_list(struct tuple_list *, unsigned char);
***************
*** 142,147 ****
--- 143,152 ----
  			case CIS_FUNC_ID:	/* 0x21 */
  				cis_func_id(cp, tp->data, tp->length);
  				break;
+ 			case CIS_FUNC_EXT:	/* 0x22 */
+ 				if (cp->func_id1 == 6)	/* LAN adaptor */
+ 					cis_network_ext(cp, tp->data, tp->length);
+ 				break;
  			}
  		}
  	return (cp);
***************
*** 234,239 ****
--- 239,264 ----
  {
  	cp->func_id1 = *p++;
  	cp->func_id2 = *p++;
+ }
+ 
+ static void
+ cis_network_ext(struct cis *cp, unsigned char *p, int len)
+ {
+ 	int i;
+ 
+ 	switch (p[0]) {
+ 	case 4:		/* Node ID */
+ 		if (len <= 2 || len < p[1] + 2)
+ 			return;
+ 
+ 		if (cp->lan_nid)
+ 			free(cp->lan_nid);
+ 		cp->lan_nid = xmalloc(p[1]);
+ 
+ 		for (i = 0; i <= p[1]; i++)
+ 			cp->lan_nid[i] = p[i + 1];
+ 		break;
+ 	}
  }
  
  /*
diff -cr /usr/src/set/PAO3/usr.sbin/pccard/pccardd/readcis.h /usr/src/PAO3/src/usr.sbin/pccard/pccardd/readcis.h
*** /usr/src/set/PAO3/usr.sbin/pccard/pccardd/readcis.h	Thu Mar 18 08:59:27 1999
--- /usr/src/PAO3/src/usr.sbin/pccard/pccardd/readcis.h	Fri Jan 14 16:45:20 2000
***************
*** 123,128 ****
--- 123,129 ----
  	struct dev_mem common_mem;
  	struct cis_config *def_config;
  	struct cis_config *conf;
+ 	unsigned char *lan_nid;
  };
  
  #define	tpl32(tp)	((*((tp) + 3) << 24) | \


Looks like a change splitting out some networking stuff isn't happy, at
least with both ob my network cards - I got the same results with my
only other network card (Xircom CC PS-CE2-10).

Clues ?

Peter.

-- 
pir                  pir@pir.net                    pir@net.tufts.edu



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000115223455.A2572>