Re: [RFC][PATCH] 2.4 IDE Serverworks OSB4 DMA patch

From: Bartlomiej Zolnierkiewicz (B.Zolnierkiewicz_at_elka.pw.edu.pl)
Date: 04/30/04

  • Next message: Timothy Miller: "Re: A compromise that could have been reached. Re: [PATCH] Blacklist binary-only modules lying about their license"
    To: Patrick Wildi <patrick@wildi.com>
    Date:	Fri, 30 Apr 2004 23:27:56 +0200
    
    

    On Friday 30 of April 2004 18:44, Patrick Wildi wrote:
    > On Fri, 30 Apr 2004, Bartlomiej Zolnierkiewicz wrote:
    > > On Friday 30 of April 2004 00:09, Patrick Wildi wrote:
    > > > On Thu, 29 Apr 2004, Bartlomiej Zolnierkiewicz wrote:
    > > > > On Thursday 29 of April 2004 21:04, Patrick Wildi wrote:
    > > > > > I have been using a OSB4 chipset based system with a CompactFlash
    > > > > > that supports PIO only and a laptop IBM/Hitachi Travelstar HDD
    > > > > > that supports UDMA.
    > > > > > For both drives, the serverworks code misconfigures the drives:
    > > > > >
    > > > > > - for the CF (hooked up as /dev/hda),
    > > > > > svwks_config_drive_xfer_rate() will not match any tests
    > > > > > (drive->autodma = 0, id->capability = 2, id->field_valid = 1), but
    > > > > > the function will then call
    > > > > > hwif->ide_dma_on(drive), which it should not do for this drive.
    > > > > > This patch moves the enabling of DMA up into the DMA section of
    > > > > > the code.
    > > > >
    > > > > Yep, known bug, it is fixed in 2.6.
    > > > >
    > > > > It is present in many other drivers, my 2.6 patch needs to be
    > > > > backported.
    > > >
    > > > Are you the maintainer for 2.4 or to whom should I send the changes?
    > >
    > > Send them to me.
    > >
    > > > > > - for the Travelstart HDD, the settings coming into
    > > > > > svwks_config_drive_xfer_rate() are: drive->autodma = 32,
    > > > > > id->capability = 15, id->field_valid = 7, id->dma_ultra = 0x43f.
    > > > > > But as this is an OSB4, the hwif->ultra_mask is set to not
    > > > > > support UDMA. Unfortunately in that case
    > > > > > svwks_config_drive_xfer_rate() falls through to the end of the
    > > > > > function, instead of trying other DMA modes.
    > > > >
    > > > > Good catch.
    > > > >
    > > > > It seems the same bug can be present in other drivers too (hint,
    > > > > hint). ;)
    > > >
    > > > I noticed that the piix driver uses the exact same logic. I could
    > > > replicate this part of the patch for other 2.4 drivers. I have no
    > > > way of testing them.
    > > > I can send you a combined patch for 2.4. I am not yet using 2.6.
    > >
    > > No problem. :)
    >
    > Below is the 2.4 patch. I believe I updated all drivers that use
    > similar code.

    This is not needed. I've just checked all drivers:

    - no IORDY fix is not necessary for alim15x3.c

    - hwif->ultra_mask fix is only needed for OSB4

    [ I discovered another bug in the process - some drivers are using
      hwif->ultra_mask == 0x80 to indicate that UDMA is unsupported
      but bit 0x80 means UDMA7 (UDMA150) now, oh well. ]

    Therefore I will send Marcelo backport of 2.6 patch for no IORDY support
    + your OSB4 fix and Linus will get only your OSB4 fix. Thanks!

    Cheers,
    Bartlomiej

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Timothy Miller: "Re: A compromise that could have been reached. Re: [PATCH] Blacklist binary-only modules lying about their license"

    Relevant Pages

    • [05/11] Fix i2c messsage flags in video drivers
      ... The drivers improperly copy the i2c client ... flags as the message flags, while both sets are mostly unrelated. ... I think this patch qualifies hands down as a "critical bug fix" to be ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ - ...
      (Linux-Kernel)
    • Re: [PATCH 0/23] reboot-fixes
      ... >> Presumably it unfixes Pavel's patch? ... > the suspend path. ... > But those are among the few drivers that do anything in either ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] Real-Time Preemption, -RT-2.6.13-rc6-V0.7.53-11
      ... the patch should be okay. ... Perhaps most of the USB drivers don't care whether interrupts ... are enabled or not in their completion routines. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: RT patch acceptance
      ... Look at the patch. ... You're the one spreading FUD that preempt-RT is as good as RTAI, ... even worse than local_irq_disable isn't used in drivers or not safe to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] PCI cleanups
      ... > The patch below does some cleanups in the PCI code: ... Care to make a patch for just this? ... I've heard rumors that those drivers will be public ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)