Author: manu
Date: Tue Aug  4 20:00:21 2020
New Revision: 363860
URL: https://svnweb.freebsd.org/changeset/base/363860

Log:
  mmccam: mmc_xpt: We're only interested about losing the device
  
  Remove all the uneeded printfs
  
  Reviewed by:  imp, kibab
  Differential Revision:        https://reviews.freebsd.org/D25948

Modified:
  head/sys/cam/mmc/mmc_xpt.c

Modified: head/sys/cam/mmc/mmc_xpt.c
==============================================================================
--- head/sys/cam/mmc/mmc_xpt.c  Tue Aug  4 19:55:26 2020        (r363859)
+++ head/sys/cam/mmc/mmc_xpt.c  Tue Aug  4 20:00:21 2020        (r363860)
@@ -199,11 +199,6 @@ mmc_dev_async(u_int32_t async_code, struct cam_eb *bus
              struct cam_ed *device, void *async_arg)
 {
 
-       printf("mmc_dev_async(async_code=0x%x, path_id=%d, target_id=%x, 
lun_id=%" SCNx64 "\n",
-              async_code,
-              bus->path_id,
-              target->target_id,
-              device->lun_id);
        /*
         * We only need to handle events for real devices.
         */
@@ -211,24 +206,11 @@ mmc_dev_async(u_int32_t async_code, struct cam_eb *bus
             || device->lun_id == CAM_LUN_WILDCARD)
                return;
 
-        if (async_code == AC_LOST_DEVICE) {
-                if ((device->flags & CAM_DEV_UNCONFIGURED) == 0) {
-                        printf("AC_LOST_DEVICE -> set to unconfigured\n");
-                        device->flags |= CAM_DEV_UNCONFIGURED;
-                        xpt_release_device(device);
-                } else {
-                        printf("AC_LOST_DEVICE on unconfigured device\n");
-                }
-        } else if (async_code == AC_FOUND_DEVICE) {
-                printf("Got AC_FOUND_DEVICE -- whatever...\n");
-        } else if (async_code == AC_PATH_REGISTERED) {
-                printf("Got AC_PATH_REGISTERED -- whatever...\n");
-        } else if (async_code == AC_PATH_DEREGISTERED ) {
-                        printf("Got AC_PATH_DEREGISTERED -- whatever...\n");
-       } else if (async_code == AC_UNIT_ATTENTION) {
-               printf("Got interrupt generated by the card and ignored it\n");
-       } else
-               panic("Unknown async code\n");
+       if (async_code == AC_LOST_DEVICE &&
+           (device->flags & CAM_DEV_UNCONFIGURED) == 0) {
+               device->flags |= CAM_DEV_UNCONFIGURED;
+               xpt_release_device(device);
+       }
 }
 
 /* Taken from nvme_scan_lun, thanks to bsdimp@ */
_______________________________________________
[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