Skip to content

Commit

Permalink
ata: libata: improve ata_read_log_page() error message
Browse files Browse the repository at this point in the history
commit 23ef63d upstream.

If ata_read_log_page() fails to read a log page, the ata_dev_err() error
message only print the page number, omitting the log number. In case of
error, facilitate debugging by also printing the log number.

Cc: stable@kernel.org # 5.15
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: Matthew Perkowski <mgperkow@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Damien Le Moal authored and gregkh committed Nov 25, 2021
1 parent 4ca2a26 commit 08a667e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/ata/libata-core.c
Expand Up @@ -2031,8 +2031,9 @@ unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
dev->horkage |= ATA_HORKAGE_NO_DMA_LOG;
goto retry;
}
ata_dev_err(dev, "Read log page 0x%02x failed, Emask 0x%x\n",
(unsigned int)page, err_mask);
ata_dev_err(dev,
"Read log 0x%02x page 0x%02x failed, Emask 0x%x\n",
(unsigned int)log, (unsigned int)page, err_mask);
}

return err_mask;
Expand Down

0 comments on commit 08a667e

Please sign in to comment.