From 9f6dd249744f1bd2dad7cfed5a59f9be277c7433 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Thu, 13 Oct 2011 15:54:40 +0000 Subject: [PATCH] Don't try to do another request sense if the failing operation already was a request sense. Otherwise we can easily run into an infinite recursion. Should fix #8022. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42840 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp b/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp index bc712101a8..2ae90e6a56 100644 --- a/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp +++ b/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp @@ -386,6 +386,9 @@ usb_disk_operation(device_lun *lun, uint8 operation, uint8 opLength, // the operation is complete and has succeeded return B_OK; } else { + if (operation == SCSI_REQUEST_SENSE_6) + return B_ERROR; + // the operation is complete but has failed at the SCSI level if (operation != SCSI_TEST_UNIT_READY_6) { TRACE_ALWAYS("operation 0x%02x failed at the SCSI level\n",