Bug 21702

Summary: pccard fixes
Product: Base System Reporter: MIHIRA Sanpei Yoshiro <sanpei>
Component: kernAssignee: Warner Losh <imp>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 1.0-RELEASE   
Hardware: Any   
OS: Any   

Description MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2000-10-02 15:30:01 UTC
   I created below patch for Per Andersson's bug report.
   How about this patch, Warner-san and Andersson-san? obtained from
 PAO3
 ---
 MIHIRA, Sanpei Yoshiro
 Yokohama, Japan.
 
 
 Index: src/usr.sbin/pccard/pccardd/cardd.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/pccard/pccardd/cardd.c,v
 retrieving revision 1.60
 diff -u -r1.60 cardd.c
 --- src/usr.sbin/pccard/pccardd/cardd.c	2000/10/01 12:36:14	1.60
 +++ src/usr.sbin/pccard/pccardd/cardd.c	2000/10/02 14:24:39
 @@ -192,6 +192,7 @@
  card_removed(struct slot *sp)
  {
  	struct card *cp;
 +	struct allocblk *sio;
  	int in_use = 0;
  
  	if (sp->config && sp->config->driver && sp->card)
 @@ -210,10 +211,14 @@
  	sp->cis = 0;
  	sp->config = 0;
  	/* release io */
 -	bit_nset(io_avail, sp->io.addr, sp->io.addr + sp->io.size - 1);
 +	if (sp->flags & IO_ASSIGNED) 
 +            for (sio = &sp->io; sio; sio = sio->next)
 +                if (sio->addr && sio->size)
 +			bit_nset(io_avail, sio->addr, sio->addr + sio->size - 1);
  	/* release irq */
 -	if (sp->irq)
 -		pool_irq[sp->irq] = 1;
 +	if (sp->flags & IRQ_ASSIGNED)
 +		if (sp->irq >= 1 && sp->irq <= 15)
 +			pool_irq[sp->irq] = 1;
  }
  
  /* CIS string comparison */
Comment 1 Peter Wemm freebsd_committer freebsd_triage 2000-10-02 20:05:00 UTC
Responsible Changed
From-To: gnats-admin->imp

misfiled - Warner, please take a look at this...
Comment 2 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2000-10-23 15:44:02 UTC
State Changed
From-To: open->closed

This mail was replied to bin/20454.