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



 > >  > I fear I don't remember what the patch was exactly ...
 > > 
 > > attached.
 > 
 > OK, thanks. It was more a diagnostic patch than a proper fix.
 > Could you give the attached patch a try ? This one should be correct.

This seems to do it on the NetBSD 5 branch. (I can't test -current now).

thanks,
-Todd

Index: st.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/st.c,v
retrieving revision 1.207
diff -u -r1.207 st.c
--- st.c        2 Sep 2008 08:58:07 -0000       1.207
+++ st.c        9 Nov 2008 12:10:18 -0000
@@ -2199,6 +2199,12 @@
                                retval = 0;
                        } else {
                                retval = EIO;
+                               /*
+                                * If we return an error we can't claim to
+                                * have transfered all data.
+                                */
+                               if (xs->resid == 0)
+                                       xs->resid = xs->datalen;
                        }
 
                        /*
@@ -2237,7 +2243,7 @@
                        }
                }
                if (bp)
-                       bp->b_resid = info;
+                       bp->b_resid = xs->resid;
        }
 
 #ifndef SCSIPI_DEBUG


Home | Main Index | Thread Index | Old Index