mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-14 16:23:51 +08:00
libata: add horkage for missing Identify Device log
ACS-3 introduced the ATA Identify Device Data log as mandatory. A warning message currently signals to the user if a device does not report supporting this log page in the log directory page, regardless of the ATA version of the device. Furthermore, this warning will appear for all attempts at accessing this missing log page during device revalidation. Since it is useless to constantly access the log directory and warn about this lack of support once we have discovered that the device does not support this log page, introduce the horkage flag ATA_HORKAGE_NO_ID_DEV_LOG to mark a device as lacking support for the Identify Device Data log page. Set this flag when ata_log_supported() returns false in ata_identify_page_supported(). The warning is printed only if the device ATA level is 10 or above (ACS-3 or above), and only once on device scan. With this flag set, the log directory page is not accessed again to test for Identify Device Data log page support. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
51839e25d4
commit
636f6e2af4
@ -2052,8 +2052,19 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page)
|
||||
struct ata_port *ap = dev->link->ap;
|
||||
unsigned int err, i;
|
||||
|
||||
if (dev->horkage & ATA_HORKAGE_NO_ID_DEV_LOG)
|
||||
return false;
|
||||
|
||||
if (!ata_log_supported(dev, ATA_LOG_IDENTIFY_DEVICE)) {
|
||||
ata_dev_warn(dev, "ATA Identify Device Log not supported\n");
|
||||
/*
|
||||
* IDENTIFY DEVICE data log is defined as mandatory starting
|
||||
* with ACS-3 (ATA version 10). Warn about the missing log
|
||||
* for drives which implement this ATA level or above.
|
||||
*/
|
||||
if (ata_id_major_version(dev->id) >= 10)
|
||||
ata_dev_warn(dev,
|
||||
"ATA Identify Device Log not supported\n");
|
||||
dev->horkage |= ATA_HORKAGE_NO_ID_DEV_LOG;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -427,6 +427,7 @@ enum {
|
||||
ATA_HORKAGE_MAX_SEC_1024 = (1 << 25), /* Limit max sects to 1024 */
|
||||
ATA_HORKAGE_MAX_TRIM_128M = (1 << 26), /* Limit max trim size to 128M */
|
||||
ATA_HORKAGE_NO_NCQ_ON_ATI = (1 << 27), /* Disable NCQ on ATI chipset */
|
||||
ATA_HORKAGE_NO_ID_DEV_LOG = (1 << 28), /* Identify device log missing */
|
||||
|
||||
/* DMA mask for user DMA control: User visible values; DO NOT
|
||||
renumber */
|
||||
|
Loading…
Reference in New Issue
Block a user