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.
This commit is contained in:
Bananymous 2024-11-26 01:01:25 +02:00
parent 88a86a9927
commit 1941885cfd
1 changed files with 2 additions and 0 deletions

View File

@ -174,6 +174,8 @@ namespace Kernel
BAN::ErrorOr<void> USBSCSIDevice::write_sectors_impl(uint64_t first_lba, uint64_t sector_count, BAN::ConstByteSpan buffer) BAN::ErrorOr<void> 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); 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; const size_t max_blocks_per_write = m_max_packet_size / m_block_size;