Message ID | CACVXFVPR2qA-N2wi6c2ranOLuhRVuQQ5nhdE=4m1hxjW-Z=Ohw@mail.gmail.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
Hello, Sorry about the delay. On Wed, Sep 28, 2011 at 12:58:25PM +0800, Ming Lei wrote: > On Mon, Sep 26, 2011 at 3:23 PM, Ming Lei <ming.lei@canonical.com> wrote: > > > How about this one below? The patch itself looks good but please read on. > After testing, I found the patch above does not make DVD drive work. > But plus the below[1], dvd drive starts to working. Since piix_sidpr_sata_ops > is hardcode in ata_piix.c, looks like it is a bit difficult to figure > out a clean fix. Sorry about that. I forgot that sidpr ops selection was dynamic. :( Hmmm... it seems we already have dynamic switch to control 32bit PIO - ATA_PFLAG_PIO32. How about the following then? * define PIIX_FLAG_PIO16 and set it in the port_info for SNBs. * define piix_port_start() which sets PFLAG_PIO32 iff !PIIX_FLAG_PIO16 and then call ata_bmdma_port_start() and use it in piix_sata_ops. Thank you.
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 150d286..3b3785d 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -376,7 +376,7 @@ static struct scsi_host_template piix_sidpr_sht = { }; static struct ata_port_operations piix_sidpr_sata_ops = { - .inherits = &piix_sata_ops, + .inherits = &piix_sata_snb_ops, .hardreset = sata_std_hardreset, .scr_read = piix_sidpr_scr_read, .scr_write = piix_sidpr_scr_write,