#
215b685f |
|
11-Dec-2022 |
X512 <danger_mail@list.ru> |
kernel: Drop non-standard GNU inline assignment syntax * We needed this previously due to our gcc2 compiled kernel. * Now that our kernel is always latest gcc, we can move to the c++20 syntax for inline assignment. * Improves compatibility with clang, less GNU-specific stuff Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898 Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
688acf41 |
|
15-Sep-2022 |
Jérôme Duval <jerome.duval@gmail.com> |
add physical_block_size field where applicable only scsi_disk checks the actual value, other drivers take the logical block size. This change reports the physical block size from the disk rather than the block size used by IDE/SATA/SCSI commands. On typical modern SATA disks, the SATA commands will use 512 byte blocks, but the disk will actually read and write 4K blocks internally. This is only of importance for partition alignment for DriveSetup, and is independant of file systems or partitioning systems. This could also influence the recommended block size for some file systems. Change-Id: Id0f2e22659e89fcef64c1f8d04f81cd68995e01f Reviewed-on: https://review.haiku-os.org/c/haiku/+/5667 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
8b1d35bd |
|
03-Jul-2021 |
David Sebek <dasebek@gmail.com> |
Improve SCSI and SATA trim support Fixes: * scsi: Fix a bug that caused the device capacity to be set to an undefined value for some large SCSI devices when READ CAPACITY (16) was used * ahci: Fix VPD page reporting so that it does not return undefined values * ahci: Set the write bit to true when sending a DATA SET MANAGEMENT (trim) command to a device. The command would otherwise fail and time out on some devices. Improvements: * scsi: Extend the READ CAPACITY (16) support to also include logical block provisioning information * scsi: Prefer READ CAPACITY (16) over READ CAPACITY (10) on devices that are expected to support this command * scsi, ahci: Enable trim on SCSI and SATA devices that are expected to support trim and which correctly report trim support * ahci: Redo the implementation of the SCSI UNMAP command * scsi: Redo UNMAP-related code * scsi: Add support for UNMAP via WRITE SAME (10) and WRITE SAME (16) commands * When copying trim ranges between different data types, make sure that the values don't change (detect overflows) * Report the number of trimmed blocks even if the trim operation fails Change-Id: Ie5fc993bbbc19546b4308138ba10184bf7b9986a Reviewed-on: https://review.haiku-os.org/c/haiku/+/4157 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
fe17f0df |
|
18-Jun-2018 |
Augustin Cavalier <waddlesplash@gmail.com> |
scsi: Use _res and not res in MK_ERROR. Some users of MK_ERROR pass in parameters from a variable called "res", which is obviously not what they want to do, as that will use this "res" and not theirs. Spotted by Clang.
|
#
99086aa3 |
|
14-Aug-2013 |
Axel Dörfler <axeld@pinc-software.de> |
trim: Target SCSI UNMAP command instead of WRITE SAME. * The UNMAP command is theoretically much faster, as it can get many block ranges instead of just a single range. * Furthermore, the ATA TRIM command resembles it much better. * Therefore, fs_trim_data now gets an array of ranges, and we use SCSI UNMAP to trim. * Updated BFS code to collect array ranges to fully support the new fs_trim_data possibilities.
|
#
960c56ae |
|
04-Aug-2013 |
Axel Dörfler <axeld@pinc-software.de> |
This gets the trim command as WRITE SAME operation to SCSI * Neither hardware nor driver to test it; AHCI/IDE support is next on the table.
|
#
455b379c |
|
01-Jun-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Added a read_write() function to the scsi_periph module. * Internally, moved the contents of periph_io() into a static read_write() function, and use it from the new periph_read_write() as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36988 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a3901de2 |
|
18-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Build fix: this should have been part of the last commit. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27030 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
70e2d4ac |
|
14-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Replaced the B_BLOCK_DEVICE_* defines with B_DMA_* defines that better match our dma_restrictions structure (but we're using blocks instead of bytes, since unlike the block size, the restrictions attributes are constant). * We might want to use blocks for the dma_restrictions structure as well in the future... * Fixed another bug in the device_node variant of DMAResource::Init(): the max segment size was specified in blocks as well. * Removed the "hardcode" block_io module and header. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26973 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
24593e2c |
|
05-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* First baby steps in letting our drivers use the new I/O request/scheduler architecture: for now, we do this on the lowest layer only, therefore all requests are handled synchronously (ie. in the scheduler's thread). * Instead of using the block_io module, scsi_disk (and scsi_cd) are now exporting a device on their own, and use an I/O scheduler with an appropriate DMA resource. * There are still lots of TODOs, and it can easily panic - don't update if you intend to demo Haiku. * scsi_periph now only has an io() function that get an io_operation, instead of the previous read/write functions, moved preferred CCB size from those functions into the device registration. * Changed all scsi_periph files to C++. * scsi_cd ported, too, but untested. * Removed block_io from image - it will be removed completely soon. * Temporarily commented an ASSERT() in the ATA bus manager (in case you use it); it's sometimes triggered by the code now, and I haven't yet looked into the issue -- doesn't seem to harm, at least. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26828 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5ebabf09 |
|
29-May-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Added new line at end of file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25694 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
368167ed |
|
26-May-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Integration of the new driver architecture. * Moved devfs from fs/ to device_manager/, and separated the legacy driver support from it. * Removed fast_log module. * There are a couple of (temporary) regressions, though: - legacy SATA and ISA IDE support is disabled, the drivers haven't been ported yet. - The not yet used ATA bus manager hasn't been ported yet, either. - AHCI changes have not been tested. - the listdev command has been removed from the build (as it currently doesn't work anymore). - device manager generated IDs currently are not freed anymore when a device node is removed. - generic drivers can't yet use the new driver architecture. - simple busses that do not support device types won't work yet. - legacy driver publishing/unpublishing (ie. what USB needs) has not been tested, and may be broken. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8ce98e44 |
|
28-Sep-2007 |
Marcus Overhagen <marcusoverhagen@gmail.com> |
convert files to new include file locations git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22347 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4ecfa05e |
|
28-Sep-2007 |
Marcus Overhagen <marcusoverhagen@gmail.com> |
this header should be private git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22340 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
99086aa32333be5792b0f059ccbbe3c90be05ea6 |
|
14-Aug-2013 |
Axel Dörfler <axeld@pinc-software.de> |
trim: Target SCSI UNMAP command instead of WRITE SAME. * The UNMAP command is theoretically much faster, as it can get many block ranges instead of just a single range. * Furthermore, the ATA TRIM command resembles it much better. * Therefore, fs_trim_data now gets an array of ranges, and we use SCSI UNMAP to trim. * Updated BFS code to collect array ranges to fully support the new fs_trim_data possibilities.
|
#
960c56aea53d8a930ab5dbbd3265e2b14e04e0ae |
|
04-Aug-2013 |
Axel Dörfler <axeld@pinc-software.de> |
This gets the trim command as WRITE SAME operation to SCSI * Neither hardware nor driver to test it; AHCI/IDE support is next on the table.
|
#
455b379c2799703a11b8d17521840808f11afe6c |
|
01-Jun-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Added a read_write() function to the scsi_periph module. * Internally, moved the contents of periph_io() into a static read_write() function, and use it from the new periph_read_write() as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36988 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a3901de2088afec601854c5fee55d06868a3c20f |
|
18-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Build fix: this should have been part of the last commit. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27030 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
70e2d4ac43aa54d8c567ec12e6b24155d3171dd9 |
|
14-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Replaced the B_BLOCK_DEVICE_* defines with B_DMA_* defines that better match our dma_restrictions structure (but we're using blocks instead of bytes, since unlike the block size, the restrictions attributes are constant). * We might want to use blocks for the dma_restrictions structure as well in the future... * Fixed another bug in the device_node variant of DMAResource::Init(): the max segment size was specified in blocks as well. * Removed the "hardcode" block_io module and header. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26973 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
24593e2c79f5f228fd9e1edd3e705d5aa286dcdb |
|
05-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* First baby steps in letting our drivers use the new I/O request/scheduler architecture: for now, we do this on the lowest layer only, therefore all requests are handled synchronously (ie. in the scheduler's thread). * Instead of using the block_io module, scsi_disk (and scsi_cd) are now exporting a device on their own, and use an I/O scheduler with an appropriate DMA resource. * There are still lots of TODOs, and it can easily panic - don't update if you intend to demo Haiku. * scsi_periph now only has an io() function that get an io_operation, instead of the previous read/write functions, moved preferred CCB size from those functions into the device registration. * Changed all scsi_periph files to C++. * scsi_cd ported, too, but untested. * Removed block_io from image - it will be removed completely soon. * Temporarily commented an ASSERT() in the ATA bus manager (in case you use it); it's sometimes triggered by the code now, and I haven't yet looked into the issue -- doesn't seem to harm, at least. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26828 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5ebabf09525f2aff8f4df80d8ecd3491a1ce1b27 |
|
29-May-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Added new line at end of file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25694 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
368167ede8118f72da8c9ac5bb98ce9b46a8a639 |
|
26-May-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Integration of the new driver architecture. * Moved devfs from fs/ to device_manager/, and separated the legacy driver support from it. * Removed fast_log module. * There are a couple of (temporary) regressions, though: - legacy SATA and ISA IDE support is disabled, the drivers haven't been ported yet. - The not yet used ATA bus manager hasn't been ported yet, either. - AHCI changes have not been tested. - the listdev command has been removed from the build (as it currently doesn't work anymore). - device manager generated IDs currently are not freed anymore when a device node is removed. - generic drivers can't yet use the new driver architecture. - simple busses that do not support device types won't work yet. - legacy driver publishing/unpublishing (ie. what USB needs) has not been tested, and may be broken. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8ce98e44ccce2220ad96b65043d7df792229f552 |
|
28-Sep-2007 |
Marcus Overhagen <marcusoverhagen@gmail.com> |
convert files to new include file locations git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22347 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4ecfa05eb330212dd78840cc43b8c9a1efa77260 |
|
28-Sep-2007 |
Marcus Overhagen <marcusoverhagen@gmail.com> |
this header should be private git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22340 a95241bf-73f2-0310-859d-f6bbb57e9c96
|