Re: [PATCH 14/15] ide: rework the code for selecting the best DMA transfer mode

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sergei Shtylyov
Date: Monday, January 22, 2007 - 12:48 pm

Hello.

Bartlomiej Zolnierkiewicz wrote:


    Here's another portion of comments...



    Erm, maybe a shorter method name like udma_filter would go with the others 
better.  But well, that's my taste. :-)



    I didn't quite like the array/loop approach but well, that's my taste (I'd
rather put the mode-from-mask evaluation to the function and call it thrice)...


[...]


    Alas, my ide_dma_speed() fix is going to be oudated rather quickly... :-)


    Erm, I see.  This driver will need some redesign because 'struct hpt_info' 
was fitted for the old rate filtering model.  Looks like the 'max_mode' field 
should be replaced by 'ultra_mask' there...


    When I think about it, it seems quite stupid to set a PIO mode instead of 
a requested DMA one.  So, this is actually a questionable piece of code in 
this driver...

    Well, I must note the sorrow fact that both the IDE susbsytem as a whole 
doesn't keep track of PIO/DMA modes separately (having only current_mode) and 
the many drivers also fail to handle the timing registers shared by PIO/DMA 
modes correctly (well, it's actually also a hardware design issue :-).


    Well, I liked this code where it was. But anyway, it's going to be 
replaced RSN...


    Same comments here...


    Hm, this looks like it needs rework...


    Hm, what was the problem with setting the proper masks based on PCI device 
ID in the init. code?
That'd have greatly simplified the filter...


    Most probably this is doable at init. time also...

MBR, Sergei

PS: I understand that the intent wasn not to make this rewrite optimal but
do it quick and with least affect.  And I certainly may handle hpt366.c 
redesign... :-)

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/15] IDE quilt tree updated, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:30 pm)
[PATCH 1/15] ACPI support for IDE devices, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:31 pm)
[PATCH 2/15] via82cxxx/pata_via: correct PCI_DEVICE_ID_VIA ..., Bartlomiej Zolnierki ..., (Thu Jan 18, 5:31 pm)
[PATCH 3/15] it8213: fix build and ->ultra_mask, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:31 pm)
[PATCH 4/15] ide: convert ide_hwif_t.mmio into flag, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:31 pm)
[PATCH 5/15] hpt34x: hpt34x_tune_chipset() (->speedproc) fix, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:31 pm)
[PATCH 6/15] atiixp/jmicron/triflex: fix PIO fallback, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:31 pm)
[PATCH 7/15] piix: cleanup, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:31 pm)
[PATCH 8/15] ide: disable DMA in ->ide_dma_check for "no I ..., Bartlomiej Zolnierki ..., (Thu Jan 18, 5:31 pm)
[PATCH 9/15] sgiioc4: fix sgiioc4_ide_dma_check() to enabl ..., Bartlomiej Zolnierki ..., (Thu Jan 18, 5:32 pm)
[PATCH 10/15] ide: add ide_set_dma() helper, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:32 pm)
[PATCH 11/15] ide: make ide_hwif_t.ide_dma_{host_off,off_q ..., Bartlomiej Zolnierki ..., (Thu Jan 18, 5:32 pm)
[PATCH 12/15] ide: make ide_hwif_t.ide_dma_host_on void, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:32 pm)
[PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:32 pm)
[PATCH 14/15] ide: rework the code for selecting the best ..., Bartlomiej Zolnierki ..., (Thu Jan 18, 5:32 pm)
[PATCH 15/15] ide: add ide_tune_dma() helper, Bartlomiej Zolnierki ..., (Thu Jan 18, 5:32 pm)
Re: [PATCH 10/15] ide: add ide_set_dma() helper, Sergei Shtylyov, (Sat Jan 20, 1:22 pm)
Re: [PATCH 12/15] ide: make ide_hwif_t.ide_dma_host_on void, Sergei Shtylyov, (Sat Jan 20, 1:46 pm)
Re: [PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks, Sergei Shtylyov, (Mon Jan 22, 9:19 am)
Re: [PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks, Sergei Shtylyov, (Mon Jan 22, 11:17 am)
Re: [PATCH 14/15] ide: rework the code for selecting the b ..., Sergei Shtylyov, (Mon Jan 22, 12:48 pm)
Re: [PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks, Sergei Shtylyov, (Mon Jan 22, 1:28 pm)
Re: [PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks, Jeff Garzik, (Mon Jan 22, 3:39 pm)
Re: [PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks, Sergei Shtylyov, (Tue Jan 23, 7:51 am)
Re: [PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks, Sergei Shtylyov, (Thu Jan 25, 8:40 am)
Re: [PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks, Sergei Shtylyov, (Wed Jan 31, 1:38 pm)
Re: [PATCH 12/15] ide: make ide_hwif_t.ide_dma_host_on void, Sergei Shtylyov, (Mon Mar 26, 10:19 am)
Re: [PATCH 12/15] ide: make ide_hwif_t.ide_dma_host_on void, Sergei Shtylyov, (Fri Apr 20, 1:36 pm)