NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/52814: WD_SOFTBADSECT option cause build error



The following reply was made to PR kern/52814; it has been noted by GNATS.

From: Paul Goyette <paul%whooppee.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/52814: WD_SOFTBADSECT option cause build error
Date: Wed, 13 Dec 2017 15:26:08 +0800 (+08)

 Looks like (based on WD_SOFTBADSECT code elsewhere), the sc in this 
 block should really be the wdsc.
 
 Perhaps try the following?
 
 Index: wd.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/ata/wd.c,v
 retrieving revision 1.436
 diff -u -p -r1.436 wd.c
 --- wd.c        7 Nov 2017 04:09:08 -0000       1.436
 +++ wd.c        13 Dec 2017 07:24:42 -0000
 @@ -535,9 +535,9 @@ wddetach(device_t self, int flags)
 
   #ifdef WD_SOFTBADSECT
   	/* Clean out the bad sector list */
 -	while (!SLIST_EMPTY(&sc->sc_bslist)) {
 -		void *head = SLIST_FIRST(&sc->sc_bslist);
 -		SLIST_REMOVE_HEAD(&sc->sc_bslist, dbs_next);
 +	while (!SLIST_EMPTY(&wd->sc_bslist)) {
 +		void *head = SLIST_FIRST(&wd->sc_bslist);
 +		SLIST_REMOVE_HEAD(&wd->sc_bslist, dbs_next);
   		free(head, M_TEMP);
   	}
          sc->sc_bscount = 0;
 
 
 
 
 +------------------+--------------------------+----------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
 +------------------+--------------------------+----------------------------+
 


Home | Main Index | Thread Index | Old Index