NetBSD-Bugs archive

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

PR/57133 CVS commit: src/sys/dev/pci



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

From: "Brian Buhrow" <buhrow%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/57133 CVS commit: src/sys/dev/pci
Date: Wed, 25 Oct 2023 00:21:49 +0000

 Module Name:	src
 Committed By:	buhrow
 Date:		Wed Oct 25 00:21:49 UTC 2023
 
 Modified Files:
 	src/sys/dev/pci: mpii.c
 
 Log Message:
 Fixes for PR kern/57133:
 
 I can now explain why this assert is firing and have a fix for it.  It is a
  regression introduced in R1.22 of mpii.c.
 
         If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after
  a successful transfer, or one that is a recovered error,
  mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before
  returning the xfer to the upper scsi layers.  Once the upper layers get it, they notice the
  XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set
  ERESTART and send the xfer request down to the mpii(4) layer again for a retry.  What they do
  not do is reset xs->resid equal to xs->datalen.  When the xfer comes down to mpii(4) again, the
  assert happens.  The fix is for the mpii(4) driver to leave xs->resid alone when it encounters
  a MPII_SCSIIO_STATUS_CHECK_COND condition.
 
 This bug affects NetBSD-10, netbsd-9 and netbsd-8.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/mpii.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index