lkml.org 
[lkml]   [2008]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: SATA DOM is not identified by ata_piix module
    Mao Rui wrote:
    > I tried to nail down when the problem was introduced. I compiled some
    > official kernel release. Here is the result.
    > 2.6.17.14 IDE -- Failed SATA -- passed
    > 2.6.18 IDE -- Failed SATA -- failed
    > 2.6.18.8 IDE -- Failed SATA -- failed
    > 2.6.24-rc7-git6 IDE -- passed SATA DOM -- failed
    > linux-2.6.24-rc8-git1 IDE -- passed SATA -- failed
    > All IDE failed reason is xfermode error, and all SATA failure is IDENTIFY
    > error.
    >
    > As you can find out, the failure of SATA DOM was introduced from kernel
    > 2.6.18.
    >
    > I'm not good at low level driver programming, so I cannot find out the root
    > cause by myself. But if Alan or someone else needs more info or wants to
    > test the patch, I'm glad to do it in my platform.

    Does the attached patch make any difference?

    --
    tejun
    diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
    index ce803d1..76d779a 100644
    --- a/drivers/ata/libata-core.c
    +++ b/drivers/ata/libata-core.c
    @@ -1975,17 +1975,21 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
    */
    if (ata_id_major_version(id) < 4 || !ata_id_has_lba(id)) {
    err_mask = ata_dev_init_params(dev, id[3], id[6]);
    - if (err_mask) {
    + if (err_mask == 0) {
    + /* current CHS translation info (id[53-58])
    + * might be changed. reread the identify
    + * device info.
    + */
    + flags &= ~ATA_READID_POSTRESET;
    + goto retry;
    + } else if (err_mask == AC_ERR_DEV) {
    + ata_dev_printk(dev, KERN_INFO,
    + "INIT_DEV_PARAMS rejected by device\n");
    + } else {
    rc = -EIO;
    reason = "INIT_DEV_PARAMS failed";
    goto err_out;
    }
    -
    - /* current CHS translation info (id[53-58]) might be
    - * changed. reread the identify device info.
    - */
    - flags &= ~ATA_READID_POSTRESET;
    - goto retry;
    }
    }
    \
     
     \ /
      Last update: 2008-02-02 09:45    [W:0.025 / U:150.688 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site