aac_disk.c (95536) | aac_disk.c (103675) |
---|---|
1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2001 Scott Long 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001 Adaptec, Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2001 Scott Long 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001 Adaptec, Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/dev/aac/aac_disk.c 95536 2002-04-27 01:31:17Z scottl $ | 29 * $FreeBSD: head/sys/dev/aac/aac_disk.c 103675 2002-09-20 12:52:03Z phk $ |
30 */ 31 32#include "opt_aac.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/sysctl.h> --- 262 unchanged lines hidden (view full) --- 300 301/* 302 * Handle completion of an I/O request. 303 */ 304void 305aac_biodone(struct bio *bp) 306{ 307 struct aac_disk *sc; | 30 */ 31 32#include "opt_aac.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/sysctl.h> --- 262 unchanged lines hidden (view full) --- 300 301/* 302 * Handle completion of an I/O request. 303 */ 304void 305aac_biodone(struct bio *bp) 306{ 307 struct aac_disk *sc; |
308 int blkno; | |
309 310 debug_called(4); 311 312 sc = (struct aac_disk *)bp->bio_dev->si_drv1; 313 314 devstat_end_transaction_bio(&sc->ad_stats, bp); 315 if (bp->bio_flags & BIO_ERROR) { | 308 309 debug_called(4); 310 311 sc = (struct aac_disk *)bp->bio_dev->si_drv1; 312 313 devstat_end_transaction_bio(&sc->ad_stats, bp); 314 if (bp->bio_flags & BIO_ERROR) { |
315#if __FreeBSD_version > 500039 316 disk_err(bp, "hard error", -1, 1); 317#elif __FreeBSD_version > 500005 318 int blkno; |
|
316 blkno = (sc->ad_label.d_nsectors) ? 0 : -1; | 319 blkno = (sc->ad_label.d_nsectors) ? 0 : -1; |
317#if __FreeBSD_version > 500005 | |
318 diskerr(bp, (char *)bp->bio_driver1, blkno, &sc->ad_label); 319#else | 320 diskerr(bp, (char *)bp->bio_driver1, blkno, &sc->ad_label); 321#else |
322 int blkno; 323 blkno = (sc->ad_label.d_nsectors) ? 0 : -1; |
|
320 diskerr(bp, (char *)bp->bio_driver1, 0, blkno, &sc->ad_label); 321#endif 322 } 323 biodone(bp); 324} 325 326/* 327 * Stub only. --- 92 unchanged lines hidden --- | 324 diskerr(bp, (char *)bp->bio_driver1, 0, blkno, &sc->ad_label); 325#endif 326 } 327 biodone(bp); 328} 329 330/* 331 * Stub only. --- 92 unchanged lines hidden --- |