Author: zbb
Date: Fri Nov 27 18:16:10 2015
New Revision: 291401
URL: https://svnweb.freebsd.org/changeset/base/291401

Log:
  Do not zero memory in umass_detach
  
  The detach function is called very often, for example from
  get_capacity function. We don't want to loose any pointers
  here, so disable detaching for umass driver.
  
  Submitted by:  Wojciech Macek <[email protected]>
  Obtained from: Semihalf
  Sponsored by:  Juniper Networks Inc.
  Differential Revision: https://reviews.freebsd.org/D4141

Modified:
  head/sys/boot/usb/storage/umass_common.c

Modified: head/sys/boot/usb/storage/umass_common.c
==============================================================================
--- head/sys/boot/usb/storage/umass_common.c    Fri Nov 27 18:14:45 2015        
(r291400)
+++ head/sys/boot/usb/storage/umass_common.c    Fri Nov 27 18:16:10 2015        
(r291401)
@@ -82,6 +82,9 @@ umass_attach(device_t dev)
 static int
 umass_detach(device_t dev)
 {
+
+#ifdef USB_DEBUG
        memset(&umass_uaa, 0, sizeof(umass_uaa));
+#endif
        return (0);
 }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to