Skip to contentSkip to conversation

libata: clear ehi description after initial host report

PATCH Applied Tejun Heo 2 participants 2 messages Oct 9, 2007 – Oct 10, 2007 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: clear ehi description after initial host report

ehi description field is used to carry LLD specific controller description. Sometimes, it's used without clearing before and LLD description gets printed with exception information one more time. Clear after printing.

---
 drivers/ata/libata-core.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/ata/libata-core.c +3 -2
index 64d2c99..88becd2 100644
@@ -6770,13 +6770,14 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
 		xfer_mask = ata_pack_xfermask(ap->pio_mask, ap->mwdma_mask,
 					      ap->udma_mask);
 
-		if (!ata_port_is_dummy(ap))
+		if (!ata_port_is_dummy(ap)) {
 			ata_port_printk(ap, KERN_INFO,
 					"%cATA max %s %s\n",
 					(ap->flags & ATA_FLAG_SATA) ? 'S' : 'P',
 					ata_mode_string(xfer_mask),
 					ap->link.eh_info.desc);
-		else
+			ata_ehi_clear_desc(&ap->link.eh_info);
+		} else
 			ata_port_printk(ap, KERN_INFO, "DUMMY\n");
 	}
 
Signature · 1 line
1.5.0.3
Applied
#1 lore raw
Quoted 9 lines · Tejun Heo

ehi description field is used to carry LLD specific controller description. Sometimes, it's used without clearing before and LLD description gets printed with exception information one more time. Clear after printing.

---
 drivers/ata/libata-core.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

applied