Panic when removing a SCSI device entry

Alexander Motin mav at FreeBSD.org
Sat Jun 11 19:30:25 UTC 2011


Joerg Wunsch wrote:
> As Kostik Belousov wrote:
> 
>> This looks like a CAM issue, which is out of my scope.
>> Hope other subscribers will offer the help.
> 
> I see frequently console messages like this now:
> 
> xpt_release_devq(0): requested 1 > present 0
> 
> Could that be related?  Any ideas?

This massage tells about non-fatal error somewhere in CAM. Previously
such conditions were silently ignored. I see at least one suspicious
point in sa driver, but I am not very good at it's logic. Could you
investigate what kind of activity triggers those messages, so I could
try to reproduce it?

I am thinking about something like this:

--- scsi_sa.c.orig      2011-04-15 00:25:33.000000000 +0300
+++ scsi_sa.c   2011-06-11 22:18:20.000000000 +0300
@@ -1783,12 +1783,7 @@ sadone(struct cam_periph *periph, union
                                }
                        }
                }
-               /*
-                * If we had an error (immediate or pending),
-                * release the device queue now.
-                */
-               if (error || (softc->flags & SA_FLAG_ERR_PENDING))
-                       cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0);
+               QFRLS(done_ccb);
 #ifdef CAMDEBUG
                if (error || bp->bio_resid) {
                        CAM_DEBUG(periph->path, CAM_DEBUG_INFO,


> So far, no panic again, but probably not since the bug itself
> has been fixed but rather since I slightly changed the scripts
> that powerup/-down the tape library.

-- 
Alexander Motin


More information about the freebsd-scsi mailing list