[prev in list] [next in list] [prev in thread] [next in thread]
List: haiku-bugs
Subject: [haiku-bugs] Re: [Haiku] #7669: SCSI sync command hangs usb mass storage device
From: "Haiku" <trac () haiku-os ! org>
Date: 2023-05-31 16:22:54
Message-ID: 061.43174d71073a7e79a939e9ad68cb2882 () haiku-os ! org
[Download RAW message or body]
--==============…10856832304722319=MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
#7669: SCSI sync command hangs usb mass storage device
-------------------------------+----------------------------
Reporter: pulkomandy | Owner: mmlr
Type: bug | Status: in-progress
Priority: normal | Milestone: R1.1
Component: Drivers/Disk/USB | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking: 7673
Platform: All |
-------------------------------+----------------------------
Comment (by waddlesplash):
Please try this patch:
{{{
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 dd260d2c94..164eba358d 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
@@ -88,7 +88,6 @@ static void usb_disk_callback(void *cookie, status_t
status, void *data,
size_t actualLength);
uint8 usb_disk_get_max_lun(disk_device *device);
-void usb_disk_reset_recovery(disk_device *device);
status_t usb_disk_receive_csw(disk_device *device,
usb_massbulk_command_status_wrapper
*status);
@@ -199,7 +198,7 @@ usb_disk_clear_halt(usb_pipe pipe)
}
-void
+static void
usb_disk_reset_recovery(disk_device *device, err_act *_action)
{
TRACE("reset recovery\n");
@@ -999,6 +998,11 @@ usb_disk_synchronize(device_lun *lun, bool force)
return B_OK;
}
+ if (result == B_DEV_STALLED || result == B_TIMED_OUT) {
+ usb_disk_reset_recovery(lun->device, NULL);
+ result = B_DEV_INVALID_IOCTL;
+ }
+
if (result == B_DEV_INVALID_IOCTL)
lun->device->sync_support = 0;
else
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/7669#comment:14>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.
--==============…10856832304722319==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic