tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: amd64 panics w/XEN_DOM0, not GENERIC
> On Thu, Nov 06, 2008 at 09:09:17AM -0500, Todd Kover wrote:
> >
> > This remains an inssue in the 5.0 tree (and presumably in -current).
> > I've been running under the patched kernel for a few months with no
> > issue.
>
> I fear I don't remember what the patch was exactly ...
attached.
-Todd
Index: dev/scsipi/st.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/st.c,v
retrieving revision 1.207
diff -u -r1.207 st.c
--- dev/scsipi/st.c 2 Sep 2008 08:58:07 -0000 1.207
+++ dev/scsipi/st.c 6 Nov 2008 14:13:22 -0000
@@ -1324,6 +1324,14 @@
*/
if (bp->b_resid > bp->b_bcount || bp->b_resid < 0)
bp->b_resid = bp->b_bcount;
+ /*
+ * Some devices reports an info field of 0 on errors.
+ * Assume no data was transfered in this case
+ */
+ if (error && bp->b_resid == 0) {
+ aprint_error_dev(&st->sc_dev, "fixing b_resid\n");
+ bp->b_resid = bp->b_bcount;
+ }
if ((bp->b_flags & B_READ) == B_WRITE)
st->flags |= ST_WRITTEN;
@@ -1348,6 +1356,10 @@
st->blkno++;
}
}
+ if (bp->b_error) {
+ printf("stdone error %d count %d resid %d\n",
+ bp->b_error, bp->b_bcount, bp->b_resid);
+ }
biodone(bp);
}
@@ -2194,6 +2206,8 @@
* for variable mode (this is always
* on for fixed block mode).
*/
+ aprint_error_dev(&st->sc_dev, "EOM detected\n");
+
if (st->flags & ST_EARLYWARN) {
st->flags |= ST_EOM_PENDING;
retval = 0;
Index: kern/kern_physio.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_physio.c,v
retrieving revision 1.88
diff -u -r1.88 kern_physio.c
--- kern/kern_physio.c 24 Sep 2008 08:19:19 -0000 1.88
+++ kern/kern_physio.c 6 Nov 2008 14:13:23 -0000
@@ -173,10 +173,13 @@
#if defined(DIAGNOSTIC)
struct physio_stat *ps = bp->b_private;
size_t todo = bp->b_bufsize;
+ size_t done = bp->b_bcount - bp->b_resid;
KASSERT(ps->ps_running > 0);
KASSERT(bp->b_bcount <= todo);
KASSERT(bp->b_resid <= bp->b_bcount);
+ if (done == todo)
+ KASSERT(bp->b_error == 0);
#endif /* defined(DIAGNOSTIC) */
workqueue_enqueue(physio_workqueue, &bp->b_work, NULL);
Home |
Main Index |
Thread Index |
Old Index