[patch] MFI should set bio_resid on command failure

Sean Bruno seanbru at yahoo-inc.com
Wed Jul 18 18:11:45 UTC 2012


On Fri, 2012-07-13 at 15:37 -0700, Mark Johnston wrote:
> It seems that the analogous line is also missing from aac(4). Is the
> patch below correct? Or am I missing something?
> 
> Thanks,
> -Mark
> 
> diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c
> index e4042f7..f2f6636 100644
> --- a/sys/dev/aac/aac_disk.c
> +++ b/sys/dev/aac/aac_disk.c
> @@ -334,8 +334,10 @@ aac_biodone(struct bio *bp)
>  {
>         fwprintf(NULL, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
>  
> -       if (bp->bio_flags & BIO_ERROR)
> +       if (bp->bio_flags & BIO_ERROR) {
> +               bp->bio_resid = bp->bio_bcount;
>                 disk_err(bp, "hard error", -1, 1);
> +       }
>  
>         biodone(bp);
>  } 

Committed at svn r238601

Sean



More information about the freebsd-scsi mailing list