Re: Question about PATA Sil680 Bus Reset Code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fajun Chen wrote:
Hi,

Could someone help me interpret the code snippet below:
static int sil680_bus_reset(struct ata_port *ap,unsigned int *classes)
{
       struct pci_dev *pdev = to_pci_dev(ap->host->dev);
       unsigned long addr = sil680_selreg(ap, 0);
       u8 reset;

       pci_read_config_byte(pdev, addr, &reset);
       pci_write_config_byte(pdev, addr, reset | 0x03);   // ?
       udelay(25);
       pci_write_config_byte(pdev, addr, reset);
       return ata_std_softreset(ap, classes);
}

Based on Sil680 data sheet, channel reset bit is bit 2,  why the reset
code above is not "pci_write_config_byte(pdev, addr, reset | 0x04);"?

Definitely looks like a bug to me.

Channel reset is bit 2 in SiI 311x SATA family as well.

	Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux