Re: [PATCH pata-2.6] cmd64x: fix multiword and remove single-word DMA support

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

 



On Saturday 14 April 2007, Sergei Shtylyov wrote:
> Fix the multiword DMA and drop the single-word DMA support (which nobody will
> miss, I think).  In order to do it, a number of changes was necessary:
> 
> - rename program_drive_counts() to program_cycle_times(), pass to it cycle's
>   total/active times instead of the clock counts, and convert them into the
>   active/recovery clocks there instead of cmd64x_tune_pio() -- this causes
>   quantize_timing() to also move;
> 
> - contrarywise, move all the code handling the address setup timing into
>   cmd64x_tune_pio(), so that setting MWDMA mode wouldn't change address setup;
> 
> - remove from the speedproc() method the  bogus code pretending to set the DMA
>   timings by twiddling bits in the BMIDE status register, handle setting MWDMA
>   by just calling program_cycle_times(); while at it, improve the style of that
>   whole switch statement;
> 
> - stop fiddling with the DMA capable bits in the speedproc() method -- they do
>   not enable DMA, and are properly dealt with by the dma_host_{on,off} methods;
> 
> - don't set hwif->swdma_mask in the init_hwif() method anymore.
> 
> In addition to those changes, do the following:
> 
> - in cmd64x_tune_pio(), when writing to ARTTIM23 register preserve the interrupt
>   status bit, eliminate local_irq_{save|restore}() around this code as there's
>   *no* actual race with the interrupt handler, and move cmdprintk() to a more
>   fitting place -- after ide_get_best_pio_mode() call;
> 
> - make {arttim|drwtim}_regs arrays single-dimensional, indexed with drive->dn;
> 
> - rename {setup|recovery}_counts[] into more fitting {setup|recovery}_values[];
> 
> - in  the speedproc() method, get rid of the duplicate reads/writes from/to the
>   UDIDETCRx registers and of the extra variable used to store the transfer mode
>   value after filtering,  use another method of determining master/slave drive,
>   and cleanup useless parens;
> 
> - beautify cmdprintk() output here and there.
> 
> While at it, remove meaningless comment about the driver being used only on
> UltraSPARC and long non-relevant RCS tag. :-)
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
> 
> ---
> This patch is basically the result of merge of the former two:
> cmd64x-remove-brokem-sw-mw-dma-support.patch and
> cmd64x-add-back-mwdma-support.patch (minus the part removing the timing register
> setup form the init_chipset() method -- that's been moved to another patch).
> Has been (at last!) tested on PCI-649.

applied
-
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