The following reply was made to PR usb/150401; it has been noted by GNATS.

From: CDP <dr.c...@gmail.com>
To: bug-follo...@freebsd.org, deci...@decibel.org, j...@nasby.net
Cc:  
Subject: Re: usb/150401: [umass] [usb8] Errors from USB drives mixed between
 UFS and ZFS
Date: Wed, 26 Jan 2011 18:44:11 +0200

 This is a multi-part message in MIME format.
 --------------010404030104040904000001
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 I've had my share of problems with USB external HDD's since I upgraded
 to 8.x. I believe the root of your problems is the same as in my case.
 Please take a look at this thread:
 http://lists.freebsd.org/pipermail/freebsd-usb/2011-January/009894.html
 
 I've also attached the patch that fixes the problem in my case. Note
 that it is intended for 8.2-RC2.
 
 Regards,
        Claudiu Dragalina-Paraipan
 
 
 
 --------------010404030104040904000001
 Content-Type: text/plain;
  name="cam_periph.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="cam_periph.patch"
 
 --- sys/cam/cam_periph.c.orig  2011-01-26 09:38:21.000000000 +0200
 +++ sys/cam/cam_periph.c       2011-01-26 09:38:02.000000000 +0200
 @@ -1024,7 +1024,9 @@
        int             frozen = 0;
        u_int           sense_key;
        int             depth = done_ccb->ccb_h.recovery_depth;
 +      int             xpt_done_ccb;
  
 +      xpt_done_ccb = FALSE;
        status = done_ccb->ccb_h.status;
        if (status & CAM_DEV_QFRZN) {
                frozen = 1;
 @@ -1049,14 +1051,22 @@
                if (sense_key != SSD_KEY_NO_SENSE) {
                        saved_ccb->ccb_h.status |=
                            CAM_AUTOSNS_VALID;
 -              } else {
 +
 +                        xpt_done_ccb = TRUE;
 +              } /*else {
                        saved_ccb->ccb_h.status &=
                            ~CAM_STATUS_MASK;
                        saved_ccb->ccb_h.status |=
                            CAM_AUTOSENSE_FAIL;
 -              }
 +              }*/
                bcopy(saved_ccb, done_ccb, sizeof(union ccb));
                xpt_free_ccb(saved_ccb);
 +
 +              periph->flags &= ~CAM_PERIPH_RECOVERY_INPROG;
 +
 +              if (xpt_done_ccb == FALSE)
 +                      xpt_action(done_ccb);
 +
                break;
        }
        default:
 @@ -1084,7 +1094,9 @@
         */
        if (frozen != 0)
                done_ccb->ccb_h.status |= CAM_DEV_QFRZN;
 -      (*done_ccb->ccb_h.cbfcnp)(periph, done_ccb);
 +
 +      if (xpt_done_ccb == TRUE)
 +                (*done_ccb->ccb_h.cbfcnp)(periph, done_ccb);
  }
  
  static void
 
 --------------010404030104040904000001--
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to