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 Tue, Aug 26, 2008 at 11:21:20AM -0400, Todd Kover wrote:
>  > So the device reported an EIO. You didn't get SCSI error messages
>  > before the panic, did you ?
> 
> no message to console, syslog or amanda logs, but this is a tape drive
> and amanda will run until it fills up a tape, then switch to the next
> tape and retry, so getting an end of media would not be at all strange.

OK, EOM is most probably the cause of the issue then

> 
>  > The attached patch may fix the panic, but I'm not sure it's correct.
>  > It could actually cause the driver to report an error, while the data
>  > actually got written. But I'm not sure what the correct fix would be
>  > in such a case ...
> 
> there was no attached patch. :)

Ops, sorry. Here it is

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: st.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/st.c,v
retrieving revision 1.205
diff -u -r1.205 st.c
--- st.c        8 Jun 2008 18:18:34 -0000       1.205
+++ st.c        26 Aug 2008 15:11:36 -0000
@@ -1323,6 +1323,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;
@@ -2193,6 +2201,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;


Home | Main Index | Thread Index | Old Index