Skip to content

Commit ad50d92

Browse files
floatiousdamien-lemoal
authored andcommitted
ata: libata: Add libata.force parameter max_sec
Add a new libata.force parameter called max_sec. The parameter can take an arbitrary value using the format: libata.force=max_sec=<number of 512B sectors> e.g. libata.force=max_sec=8191 or libata.force=max_sec=2048 This will allow the user to set an arbitrary maximum command size (dev->max_sectors) using libata.force. We cannot remove the existing libata.force parameters "max_sec_128" and "max_sec_1024", as these are a part of the exising user facing API. Signed-off-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
1 parent 45c4c5a commit ad50d92

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3412,6 +3412,11 @@ Kernel parameters
34123412
* [no]logdir: Enable or disable access to the general
34133413
purpose log directory.
34143414

3415+
* max_sec=<sectors>: Set the transfer size limit, in
3416+
number of 512-byte sectors, to the value specified in
3417+
<sectors>. The value specified in <sectors> has to be
3418+
a non-zero positive integer.
3419+
34153420
* max_sec_128: Set transfer size limit to 128 sectors.
34163421

34173422
* max_sec_1024: Set or clear transfer size limit to

drivers/ata/libata-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6569,6 +6569,7 @@ static const struct ata_force_param force_tbl[] __initconst = {
65696569

65706570
force_quirk_val(max_sec_128, ATA_QUIRK_MAX_SEC, 128),
65716571
force_quirk_val(max_sec_1024, ATA_QUIRK_MAX_SEC, 1024),
6572+
force_quirk_on(max_sec=, ATA_QUIRK_MAX_SEC),
65726573
force_quirk_on(max_sec_lba48, ATA_QUIRK_MAX_SEC_LBA48),
65736574

65746575
force_quirk_onoff(lpm, ATA_QUIRK_NOLPM),

0 commit comments

Comments
 (0)