[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200812042037.21323.bzolnier@gmail.com>
Date: Thu, 4 Dec 2008 20:37:21 +0100
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: "Shane McDonald" <mcdonald.shane@...il.com>,
"Sergei Shtylyov" <sshtylyov@...mvista.com>,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Resurrect IT8172 IDE controller driver
On Thursday 04 December 2008, Alan Cox wrote:
> On Thu, 4 Dec 2008 08:01:49 -0600
> "Shane McDonald" <mcdonald.shane@...il.com> wrote:
>
> > Would it be acceptable to claim that these changes are outside the
> > scope of this patch, and code the IT8172 driver to behave in the same
> > manner as the other wrong drivers, with a suitable comment indicating
> > this fact?
>
> I think so.. and if its moved over to libata it can just be fixed then
It shouldn't be necessary...
Shane, you can use helpers from <linux/ata.h> just fine in IDE host drivers
so looking at what libata-core helper used by ata_piix.c:
if (ata_pio_need_iordy(adev))
control |= 2; /* IE enable */
is actually doing:
unsigned int ata_pio_need_iordy(const struct ata_device *adev)
{
/* Controller doesn't support IORDY. Probably a pointless check
as the caller should know this */
if (adev->link->ap->flags & ATA_FLAG_NO_IORDY)
return 0;
/* PIO3 and higher it is mandatory */
if (adev->pio_mode > XFER_PIO_2)
return 1;
/* We turn it on when possible */
if (ata_id_has_iordy(adev->id))
return 1;
return 0;
}
we see that all you need to add in your driver is an additional checking
for ata_id_has_iordy().
Thanks,
Bart
PS when it comes to actually setting the transfer mode on the device
(done in ide_config_drive_speed() core function) IORDY is also handled
just fine (thanks to Sergei).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists