Dump register contents during init. Signed-off-by: Martin K. Petersen --- diff -r b0dc16d276be drivers/ata/pata_cs5536.c --- a/drivers/ata/pata_cs5536.c Tue Feb 12 08:52:44 2008 -0500 +++ b/drivers/ata/pata_cs5536.c Wed Feb 13 01:51:00 2008 -0500 @@ -73,6 +73,11 @@ enum { IDE_CAST_CMD_SHIFT = 24, IDE_ETC_NODMA = 0x03, + + CFG_REG_MASK = 0x34002, + DTC_REG_MASK = 0xffff0000, + CAST_REG_MASK = 0xff0000f0, + ETC_REG_MASK = 0xc7c70000, }; static int use_msr; @@ -84,6 +89,23 @@ static const u8 pci_reg[4] = { static const u8 pci_reg[4] = { PCI_IDE_CFG, PCI_IDE_DTC, PCI_IDE_CAST, PCI_IDE_ETC, }; + +static void cs5536_regs(void) +{ + u32 reg, dummy; + + rdmsr(MSR_IDE_CFG, reg, dummy); + printk(KERN_ERR " CFG = 0x%08x\n", reg & CFG_REG_MASK); + + rdmsr(MSR_IDE_DTC, reg, dummy); + printk(KERN_ERR " DTC = 0x%08x\n", reg & DTC_REG_MASK); + + rdmsr(MSR_IDE_CAST, reg, dummy); + printk(KERN_ERR " CAST = 0x%08x\n", reg & CAST_REG_MASK); + + rdmsr(MSR_IDE_ETC, reg, dummy); + printk(KERN_ERR " ETC = 0x%08x\n", reg & ETC_REG_MASK); +} static inline int cs5536_read(struct pci_dev *pdev, int reg, int *val) { @@ -303,6 +325,8 @@ static int cs5536_init_one(struct pci_de return -ENODEV; } + cs5536_regs(); + return ata_pci_init_one(dev, ppi); }