--- - branch: netbsd-8 date: Thu Oct 26 15:13:38 UTC 2023 files: - new: 1.8.10.8 old: 1.8.10.7 path: src/sys/dev/pci/mpii.c pathrev: src/sys/dev/pci/mpii.c@1.8.10.8 type: modified id: 20231026T151338Z.e74c4f28b467f69f01ee39b5c54aad1038d35ccf log: "Pull up following revision(s) (requested by buhrow in ticket #1916):\n\n\tsys/dev/pci/mpii.c: revision 1.30\n\nFixes for PR kern/57133:\n\nI 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.\n\n \ If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after\n a successful transfer, or one that is a recovered error,\n mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before\n returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the\n XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set\n ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do\n not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the\n assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters\n a MPII_SCSIIO_STATUS_CHECK_COND condition.\n\nThis bug affects NetBSD-10, netbsd-9 and netbsd-8.\n" module: src subject: 'CVS commit: [netbsd-8] src/sys/dev/pci' unixtime: '1698333218' user: martin