17 Oct, 2007

3 commits

  • ATAPI devices with broken DMA support should be handled by DMA blacklist
    and for debugging purposes we have new shiny "hdx=nodma" kernel paremeter.

    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * hpt34x.c: disable DMA masks for HPT345
    (hwif->autodma is zero so DMA won't be enabled anyway).

    * trm290.c: disable IDE_HFLAG_TRUST_BIOS_FOR_DMA flag
    (hwif->autodma is zero so DMA won't be enabled anyway).

    * Check noautodma global variable instead of drive->autodma in ide_tune_dma().

    This fixes handling of "ide=nodma" kernel parameter for icside, ide-cris,
    au1xxx-ide, pmac, it821x, jmicron, sgiioc4 and siimage host drivers.

    * Remove hwif->autodma (it was not checked by IDE core code anyway) and
    drive->autodma (was set by all host drivers - except HPT345/TRM290 special
    cases - unless "ide=nodma" was used).

    While at it:
    - remove needless printk() from icside.c
    - remove stale FIXME/comment from ide-probe.c
    - don't force DMA off if PCI bus-mastering had to be enabled in setup-pci.c
    (this setting was always later over-ridden by host drivers anyway)

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add IDE_HFLAG_TRUST_BIOS_FOR_DMA host flag for host drivers that depend
    on BIOS for programming device/controller for DMA. Set it in cy82c693,
    generic, ns87415, opti621 and trm290 host drivers.

    * Add IDE_HFLAG_VDMA host flag for host drivers using VDMA. Set it in cs5520
    host driver.

    * Teach ide_tune_dma() about IDE_HFLAG_TRUST_BIOS_FOR_DMA flag.

    * Add generic ide_dma_check() helper and remove all open coded ->ide_dma_check
    implementations. Fix all places checking for presence of ->ide_dma_check
    hook to check for ->ide_dma_on instead.

    * Remove no longer needed code from config_drive_for_dma().

    * Make ide_tune_dma() static.

    v2:
    * Fix config_drive_for_dma() return values.

    * Fix ide-dma.c build for CONFIG_BLK_DEV_IDEDMA_PCI=n by adding
    dummy config_drive_for_dma() inline.

    * Fix IDE_HFLAG_TRUST_BIOS_FOR_DMA handling in ide_dma_check().

    * Fix init_hwif_it8213() comment.

    There should be no functionality changes caused by this patch.

    Cc: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

16 Oct, 2007

1 commit


13 Oct, 2007

1 commit


12 Oct, 2007

1 commit

  • * Add IDE_HFLAG_ABUSE_{PREFETCH,FAST_DEVSEL,DMA_MODES} flags
    and set them in ht6560, cmd640, cmd64x and sc1200 host drivers.

    * Add set_pio_mode_abuse() for checking if host driver has a non-standard
    ->tuneproc() implementation and use it in do_special().

    * Add ide_set_pio() for setting PIO mode (it uses hwif->pio_mask to find
    the maximum PIO mode supported by the host), also add ide_set_max_pio()
    wrapper for ide_set_pio() to use for auto-tuning. Convert users of
    ->tuneproc to use ide_set{_max}_pio() where possible. This leaves only
    do_special(), set_using_pio(), ide_hwif_restore() and ide_set_pio() as
    a direct users of ->tuneproc.

    * Remove no longer needed ide_get_best_pio_mode() calls and printk-s
    reporting PIO mode selected from ->tuneproc implementations.

    * Rename ->tuneproc hook to ->set_pio_mode and make 'pio' argument const.

    * Remove stale comment from ide_config_drive_speed().

    v2:
    * Fix "ata_" prefix (Noticed by Jeff).

    v3:
    * Minor cleanups/fixups per Sergei's suggestions.

    v4:
    * Fix compile problem in drivers/ide/pci/cmd640.c
    (Noticed by Andrew Morton).

    * Improve some ->set_pio_mode comments.

    Reviewed-by: Sergei Shtylyov
    Cc: Jeff Garzik
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

24 Jul, 2007

1 commit

  • Some of the code has been gradually transitioned to using the proper
    struct request_queue, but there's lots left. So do a full sweet of
    the kernel and get rid of this typedef and replace its uses with
    the proper type.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

18 Jul, 2007

1 commit

  • kmalloc_node() and kmem_cache_alloc_node() were not available in a zeroing
    variant in the past. But with __GFP_ZERO it is possible now to do zeroing
    while allocating.

    Use __GFP_ZERO to remove the explicit clearing of memory via memset whereever
    we can.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

10 Jul, 2007

2 commits


04 Jul, 2007

1 commit

  • Found by a static analyser. It is in theory possible we dereference
    dev->id when it has become invalid. Re-order to avoid this.

    Not needed for new-ide as we no longer support the crazy exabyte nest stuff

    Signed-off-by: Alan Cox
    Cc: Andrew Morton
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Alan Cox
     

08 Jun, 2007

1 commit

  • The DMA support for RAID mode broke after:

    commit 71ef51cc1756d1c56b57c70e7cc27a3559c81ee6
    Author: Jens Axboe
    Date:   Fri Jul 28 09:02:17 2006 +0200

        [PATCH] it821x: fix ide dma setup bug

        Only enable dma for a valid speed setting.

        Signed-off-by: Jens Axboe

    commit 0a8348d08677ad77ee353f96eb8745c693a05a13
    Author: Jens Axboe
    Date:   Fri Jul 28 08:58:26 2006 +0200

        [PATCH] ide: if the id fields looks screwy, disable DMA

        It's the safer choice. Originally due to a bug in itx821x, but a
        generally sound thing to do.

        Signed-off-by: Jens Axboe

    However it worked by pure luck before Jens' fixes: bogus ide_dma_enable()
    usage in it821x driver combined with loosy check in ide_dma_verbose() allowed
    the hardware to operate in DMA mode. When these problems were fixed the DMA
    support broke...

    The source root for the regression turned out to be that the it821x.c code
    was clearing too much of id->field_valid. The IDE core code was using the
    original value of id->field_valid to do the tuning but later DMA got disabled
    in ide_dma_verbose() because of the incorrect id->field_valid fixup. Fix it.

    While at it:

    * Do fixup() after probing the drives but before tuning them (which is also
    OK w.r.t. ide_undecoded_slave() fixup). This change fixes device IDENTIFY
    data to be consistent before/after the tuning and allows us to remove extra
    re-tuning of drives from it821x_fixups().

    * Fake MWDMA0 enabled/supported bits in IDENTIFY data if the device has
    DMA capable bit set (this is just to tell the IDE core that DMA is
    supported since it821x firmware takes care of DMA mode programming).

    * Don't touch timing registers and don't program transfer modes on devices
    et all when in RAID mode - depend solely on firmware to do the tuning
    (as suggested by Alan Cox and done in libata pata_it821x driver).

    Thanks for testing the patch goes out to Thomas Kuther.

    Cc: Thomas Kuther
    Cc: Alan Cox
    Cc: Jens Axboe
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

10 May, 2007

1 commit

  • * create_proc_ide_interfaces() tries to add /proc entries for every probed
    and initialized IDE port, replace it by ide_proc_register_port() which does
    it only for the given port (also rename destroy_proc_ide_interface() to
    ide_proc_unregister_port() for consistency)

    * convert {create,destroy}_proc_ide_interface[s]() users to use new functions

    * pmac driver depended on proc_ide_create() to add /proc port entries, fix it

    * au1xxx-ide, swarm and cs5520 drivers depended indirectly on ide-generic
    driver (CONFIG_IDE_GENERIC=y) to add port /proc entries, fix them

    * there is now no need to add /proc entries for IDE ports in proc_ide_create()
    so don't do it

    * proc_ide_create() needs now to be called before drivers are probed - fix it,
    while at it make proc_ide_create() create /proc "ide" directory

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

04 Mar, 2007

1 commit


17 Feb, 2007

2 commits

  • * since ide_hwif_t.ide_dma_{host_off,off_quietly} always return '0'
    make these functions void and while at it drop "ide_" prefix
    * fix comment for __ide_dma_off_quietly()
    * make __ide_dma_{host_off,off_quietly,off}() void and drop "__" prefix

    v2:
    * while at it rename atiixp_ide_dma_host_off() to atiixp_dma_host_off(),
    sgiioc4_ide_dma_{host_off,off_quietly}() to sgiioc4_dma_{host_off,off_quietly}()
    and sl82c105_ide_dma_off_quietly() to sl82c105_dma_off_quietly()
    [ Noticed by Sergei Shtylyov . ]

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * add ide_set_dma() helper and make ide_hwif_t.ide_dma_check return
    -1 when DMA needs to be disabled (== need to call ->ide_dma_off_quietly)
    0 when DMA needs to be enabled (== need to call ->ide_dma_on)
    1 when DMA setting shouldn't be changed
    * fix IDE code to use ide_set_dma() instead if using ->ide_dma_check directly

    v2:
    * updated for scc_pata

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

08 Feb, 2007

1 commit

  • This patch implements ACPI integration for generic IDE devices.
    The ACPI spec mandates that some methods are called during suspend and
    resume. And consequently there most modern Laptops cannot resume
    properly without it.

    According to the spec, we should call '_GTM' (Get Timing) upon suspend
    to store the current IDE adapter settings.
    Upon resume we should call '_STM' (Set Timing) to initialize the
    adapter with the stored settings; afterwards '_GTF' (Get Taskfile)
    should be called which returns a buffer with some IDE initialisation
    commands. Those commands should be passed to the drive.

    There are two module params which control the behaviour of this patch:

    'ide=noacpi'
    Do not call any ACPI methods (Disables any ACPI method calls)
    'ide=acpigtf'
    Enable execution of _GTF methods upon resume.
    Has no effect if 'ide=noacpi' is set.
    'ide=acpionboot'
    Enable execution of ACPI methods during boot.
    This might be required on some machines if 'ide=acpigtf' is
    selected as some machines modify the _GTF information
    depending on the drive identification passed down with _STM.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Hannes Reinecke
     

12 Dec, 2006

1 commit

  • While working on bidi support at struct request level
    I have found that blk_queue_activity_fn is actually never used.
    The only user is in ide-probe.c with this code:

    /* enable led activity for disk drives only */
    if (drive->media == ide_disk && hwif->led_act)
    blk_queue_activity_fn(q, hwif->led_act, drive);

    And led_act is never initialized anywhere.
    (Looking back at older kernels it was used in the PPC arch, but was removed around 2.6.18)
    Unless it is all for future use off course.
    (this patch is against linux-2.6-block.git as off 2006/12/4)

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Jens Axboe

    Boaz Harrosh
     

03 Oct, 2006

1 commit


03 Jul, 2006

1 commit


01 Jul, 2006

1 commit


27 Jun, 2006

1 commit


20 Jun, 2006

1 commit

  • This ugly hack was long overdue to die.

    It was a way to print out Sparc interrupts in a more freindly format,
    since IRQ numbers were arbitrary opaque 32-bit integers which vectored
    into PIL levels. These 32-bit integers were not necessarily in the
    0-->NR_IRQS range, but the PILs they vectored to were.

    The idea now is that we will increase NR_IRQS a little bit and use a
    virtualreal IRQ number mapping scheme similar to PowerPC.

    That makes this IRQ printing hack irrelevant, and furthermore only a
    handful of drivers actually used __irq_itoa() making it even less
    useful.

    Signed-off-by: David S. Miller

    David S. Miller
     

24 Mar, 2006

1 commit


04 Feb, 2006

1 commit

  • This patch stops CompactFlash devices being marked as removable. They are
    not removable (as defined by Linux) as the media and device are
    inseparable. When a card is removed, the whole device is removed from the
    system and never sits in a media-less state.

    This stops some nasty udev device creation/destruction loops.

    Further, once this change is made, there is no need for ide to can be
    removed from ide_drive_t.

    Signed-off-by: Richard Purdie
    Acked-by: Bartlomiej Zolnierkiewicz
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie
     

13 Jan, 2006

1 commit

  • There's a problem with the REQ_BLOCK_PC handling as well (bad ->data_len
    handling) where it could actually complete a request ahead of time. I
    suggest we just back this out for now, I will resubmit it later when I'm
    fully confident in it.

    This reverts commit 8672d57138b34447719cd7749f3d21070e1175a1

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

10 Jan, 2006

1 commit

  • The patch changes semaphores that are initialized as
    locked to complete().

    Source: MontaVista Software, Inc.

    Modified-by: Steven Rostedt

    The following patch is from Montavista. I modified it slightly.
    Semaphores are currently being used where it makes more sense for
    completions. This patch corrects that.

    Signed-off-by: Aleksey Makarov
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Aleksey Makarov
     

09 Jan, 2006

1 commit


07 Nov, 2005

2 commits


10 Aug, 2005

1 commit


05 Aug, 2005

1 commit

  • Patch fixes oops caused by ide interfaces not on pci. pcibus_to_node
    causes the kernel to crash otherwise. Patch also adds a BUG_ON to check if
    hwif is NULL.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Shai Fultheim
    Signed-off-by: Ravikiran Thirumalai
    Cc: Andi Kleen
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ravikiran G Thirumalai
     

24 Jun, 2005

1 commit

  • Patch to allocate the control structures for for ide devices on the node of
    the device itself (for NUMA systems). The patch depends on the Slab API
    change patch by Manfred and me (in mm) and the pcidev_to_node patch that I
    posted today.

    Does some realignment too.

    Signed-off-by: Justin M. Forbes
    Signed-off-by: Christoph Lameter
    Signed-off-by: Pravin Shelar
    Signed-off-by: Shobhit Dayal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

26 May, 2005

2 commits

  • From: Marcello Maggioni

    Problem: Some drives (NEC 3500, TDK 1616N, Mad-dog MD-16XDVD9, RICOH
    MP5163DA, Memorex DVD9 drive and IO-DATA's too for sure), if a
    CD/DVD is inserted into the tray when the system is booted and if
    before the OS bootup the BIOS checked for the presence of a bootable
    CD/DVD into the drive, during the IDE probe phase the drive may
    result busy and remain so for the next 25/30 seconds . This cause the
    drive to be skipped during the booting phase and not begin usable
    until the next reboot (if the reboot goes well and the drive doesn't
    timeout again).

    Solution: Rising the timeout time from 10 seconds to 35 seconds
    (during these 35 seconds every drive should wake up for sure
    according to the tests I've done).

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Marcello Maggioni
     
  • * add ide_bus_match() and export ide_bus_type
    * split ide_remove_driver_from_hwgroup() out of ide_unregister()
    * move device cleanup from ide_unregister() to drive_release_dev()
    * convert ide_driver_t->name to driver->name
    * convert ide_driver_t->{attach,cleanup} to driver->{probe,remove}
    * remove ide_driver_t->busy as ide_bus_type->subsys.rwsem
    protects against concurrent ->{probe,remove} calls
    * make ide_{un}register_driver() void as it cannot fail now
    * use driver_{un}register() directly, remove ide_{un}register_driver()
    * use device_register() instead of ata_attach(), remove ata_attach()
    * add proc_print_driver() and ide_drivers_show(), remove ide_drivers_op
    * fix ide_replace_subdriver() and move it to ide-proc.c
    * remove ide_driver_t->drives, ide_drives and drives_lock
    * remove ide_driver_t->drivers, drivers and drivers_lock
    * remove ide_drive_t->driver and DRIVER() macro

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds