From 1941885cfdcb553ca73a201b852c4db777e49e61 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 26 Nov 2024 01:01:25 +0200 Subject: [PATCH] Kernel: Disable USB Mass Storage writing until I get it fixed This prevented real hw from running for over 10-20 seconds. When first disk sync happens after 10 secods, USB storage would enter faulty state and not allow any io operations. I have no idea what the problem is. If I don't send Reset command to the USB device writing seems to work fine. I also don't think its part of the Reset process either as reading works just fine. --- kernel/kernel/USB/MassStorage/SCSIDevice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/kernel/USB/MassStorage/SCSIDevice.cpp b/kernel/kernel/USB/MassStorage/SCSIDevice.cpp index 9033554b..32929aa1 100644 --- a/kernel/kernel/USB/MassStorage/SCSIDevice.cpp +++ b/kernel/kernel/USB/MassStorage/SCSIDevice.cpp @@ -174,6 +174,8 @@ namespace Kernel BAN::ErrorOr USBSCSIDevice::write_sectors_impl(uint64_t first_lba, uint64_t sector_count, BAN::ConstByteSpan buffer) { + return BAN::Error::from_errno(ENOTSUP); + dprintln_if(DEBUG_USB_MASS_STORAGE, "write_blocks({}, {})", first_lba, sector_count); const size_t max_blocks_per_write = m_max_packet_size / m_block_size;