[haiku-commits] haiku: hrev47345 - src/add-ons/kernel/busses/scsi/ahci

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 11 Jun 2014 00:57:44 +0200 (CEST)

hrev47345 adds 1 changeset to branch 'master'
old head: c57c62505eb4f46d12b206ac48393e4f4167eed4
new head: bc4db40c4033d294d3f1f740f4d9afa3fac5fdc9
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=bc4db40+%5Ec57c625

----------------------------------------------------------------------------

bc4db40: AHCI: use a minimum of 1 block for trim ranges.
  
  * Word 105 of ATA IDENTIFY should contain the maximum number of block
    ranges the device supports, but it always supports at least a single
    one.
  * This change lets the trim command do something on Virtual Box.

                                   [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev47345
Commit:      bc4db40c4033d294d3f1f740f4d9afa3fac5fdc9
URL:         http://cgit.haiku-os.org/haiku/commit/?id=bc4db40
Author:      Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date:        Tue Jun 10 22:56:09 2014 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+)
src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp | 3 +++

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp 
b/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp
index 4b2576d..a83f4d6 100644
--- a/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp
+++ b/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp
@@ -623,6 +623,9 @@ AHCIPort::ScsiInquiry(scsi_ccb* request)
                        fUse48BitCommands, ataData.lba_sector_count,
                        ataData.lba48_sector_count, fSectorCount * fSectorSize);
                if (fTrimSupported) {
+                       if (fMaxTrimRangeBlocks == 0)
+                               fMaxTrimRangeBlocks = 1;
+
                        bool deterministic = 
ataData.supports_deterministic_read_after_trim;
                        TRACE("trim supported, %" B_PRIu32 " ranges blocks, 
reads are "
                                "%sdeterministic%s.\n", fMaxTrimRangeBlocks,


Other related posts:

  • » [haiku-commits] haiku: hrev47345 - src/add-ons/kernel/busses/scsi/ahci - axeld