13 Oct, 2007

2 commits

  • * Convert {ide_hwif_t,ide_pci_device_t}->host_flag to be u16.

    * Add IDE_HFLAG_POST_SET_MODE host flag to indicate the need to program
    the host for the transfer mode after programming the device. Set it
    in au1xxx-ide, amd74xx, cs5530, cs5535, pdc202xx_new, sc1200, pmac
    and via82cxxx host drivers.

    * Add IDE_HFLAG_NO_SET_MODE host flag to indicate the need to completely
    skip programming of host/device for the transfer mode ("smart" hosts).
    Set it in it821x host driver and check it in ide_tune_dma().

    * Add ide_set_pio_mode()/ide_set_dma_mode() helpers and convert all
    direct ->set_pio_mode/->speedproc users to use these helpers.

    * Move ide_config_drive_speed() calls from ->set_pio_mode/->speedproc
    methods to callers.

    * Rename ->speedproc method to ->set_dma_mode, make it void and update
    all implementations accordingly.

    * Update ide_set_xfer_rate() comments.

    * Unexport ide_config_drive_speed().

    v2:
    * Fix issues noticed by Sergei:
    - export ide_set_dma_mode() instead of moving ->set_pio_mode abuse wrt
    to setting DMA modes from sc1200_set_pio_mode() to do_special()
    - check IDE_HFLAG_NO_SET_MODE in ide_tune_dma()
    - check for (hwif->set_pio_mode) == NULL in ide_set_pio_mode()
    - check for (hwif->set_dma_mode) == NULL in ide_set_dma_mode()
    - return -1 from ide_set_{pio,dma}_mode() if ->set_{pio,dma}_mode == NULL
    - don't set ->set_{pio,dma}_mode on it821x in "smart" mode
    - fix build problem in pmac.c
    - minor fixes in au1xxx-ide.c/cs5530.c/siimage.c
    - improve patch description

    Changes in behavior caused by this patch:
    - HDIO_SET_PIO_MODE ioctl would now return -ENOSYS for attempts to change
    PIO mode if it821x controller is in "smart" mode
    - removal of two debugging printk-s (from cs5530.c and sc1200.c)
    - transfer modes 0x00-0x07 passed from user space may be programmed twice on
    the device (not really an issue since 0x00 is not supported correctly by
    any host driver ATM, 0x01 is not supported at all and 0x02-0x07 are invalid)

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

    Bartlomiej Zolnierkiewicz
     
  • * Add "good DMA drives" hack for icside to ide-dma.c::ide_find_dma_mode()
    (in the long-term it should be either removed or generalized for all hosts).

    * Use ide_tune_dma() in icside.c::icside_dma_check().

    This results in the following changes in behavior:
    - pre-EIDE SWDMA modes are now also respected
    - drive->autodma is checked instead of hwif->autodma
    (doesn't really matter as icside sets both to "1")

    * Make ide-dma.c::__ide_dma_good_drive() static and drop "__" prefix.

    Cc: Russell King
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

12 Oct, 2007

3 commits

  • * Add an extra argument to ide_max_dma_mode() for passing requested transfer
    mode. Use it as an upper limit when finding the best DMA for device/host.

    * Rename ide_max_dma_mode() to ide_find_dma_mode() and at the same time add
    ide_max_dma_mode() wrapper which passes XFER_UDMA_6 as a requested mode to
    ide_find_dma_mode(). Also add inline ide_find_dma_mode() version for
    CONFIG_BLK_DEV_IDEDMA=n case.

    * Pass requested transfer mode from ide_find_dma_mode() to ide_get_mode_mask()
    to avoid false warning from eighty_ninty_three().

    * Use ide_find_dma_mode() to limit the user requested transfer mode in
    ide_rate_filter(). Also limit the requested mode by host max PIO mode.

    Above changes make ide_rate_filter() to:

    * Clip desired transfer mode down if it is invalid (values 0x0F, 0x13-0x19
    and 0x25-0x39, values > 0x46 were already clipped down, same for values
    0x25-0x39 but iff UDMA was not supported by the host).

    * Clip desired transfer mode down if it is currently unsupported by IDE core
    (PIO6 and MWDMA3-4, the latter were already clipped down but iff UDMA was
    not supported by the host).

    * Clip desired transfer mode down according to the host capabilities
    (UDMA modes were already clipped down but MWDMA/SWDMA/PIO weren't,
    also ->atapi_dma flag was not respected).

    * Clip desired transfer mode down according to the device capabilities
    (except PIO modes for now which require mode work) - shouldn't be a
    problem since ide_set_xfer_rate() is called _after_ device has accepted
    given transfer mode.

    and also result in a number of host driver specific bugfixes:

    * icside
    - clip unsupported PIO5 mode down
    - fix unsupported/invalid modes being set in drive->current_speed

    * ide-cris
    - clip unsupported PIO5 and SWDMA0-2 modes down
    - clip DMA modes down for ATAPI devices
    - fix BUG() on unsupported/invalid modes

    * au1xxx-ide
    - clip unsupported PIO5, SWDMA0-2 and MWDMA0-2
    (if BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=n) modes down

    * aec62xx
    - clip unsupported PIO5 and SWDMA0-2 modes down
    - clip DMA modes down for ATAPI devices
    - fix 0x00 being programmed as PIO timing for unsupported/invalid modes
    - fix unsupported/invalid modes being set on the device

    * alim15x3
    - clip DMA modes down for ATAPI devices (chipset revision == 0x20 only)
    - fix theoretical OOPS for 0x0F mode
    - fix unsupported/invalid modes being set on the device

    * amd74xx
    - clip unsupported SWDMA0-2 (on COBRA_7401 revs
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Give the udma_filter() method call precedence over using the mode masks.

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

    Sergei Shtylyov
     
  • The Marvell bridge chips used on HighPoint SATA cards do not seem to support
    the MWDMA modes (at least that could be seen in their so-called drivers :-),
    so the driver needs to account for this -- to achieve this:

    - add mdma_filter() method from the original patch by Bartlomiej Zolnierkiewicz
    with his consent;

    - install the method for all chips to only return empty mask if a SATA drive
    is detected on HPT372{AN]/374 chips...

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

    Sergei Shtylyov
     

21 Aug, 2007

2 commits

  • * Move ide_in_drive_list() from ide-dma.c to ide-iops.c.

    * Add ivb_list[] table for listening early UDMA66 devices which don't conform
    to ATA4 standard wrt cable detection (bit14 is zero, only bit13 is valid)
    and use only device side cable detection for them since host side cable
    detection may be unreliable.

    * Add model "QUANTUM FIREBALLlct10 05" with firwmare "A03.0900" to the list
    (from Craig's bugreport).

    v2:
    * Improve kernel message basing on suggestion from Sergei.

    v3:
    * Don't print kernel message when no device side cable detection is done,
    plus some minor fixes. (Noticed by Sergei)

    Thanks to Craig for testing this patch.

    Cc: Craig Block
    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add DMA blacklist checking (->ide_dma_on check probably can go now).

    * Add ->atapi_dma flag checking and remove no longer needed
    ns87415_ide_dma_check() from ns87415 host driver.

    * Remove now needless __ide_dma_check() wrapper and symbol export.

    * Check drive->autodma instead of hwif->autodma (there should be no changes in
    behavior as all users of config_drive_for_dma() set both ->autodma flags).

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

10 Jul, 2007

6 commits

  • ide_set_dma no longer has any modular user.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Adrian Bunk
     
  • If the word 62 is not defined use the word 52 to get SWDMA mask
    in ide_get_mode_mask().

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • This removes the support to treat "ALL" as a wildcard for
    firmware revision. This is made a separate patch, as it will
    break out-of-tree ide drivers that feed its own table that uses
    "ALL" as the wildcard to ide_in_drive_list().

    Signed-off-by: Junio C Hamano
    Cc: Alan Cox
    Cc: Dave Jones
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Junio C Hamano
     
  • Earlier, the matching of (model,rev) in ide-dma black/white list
    handling was to consider "ALL" in the table to match any
    revision. This makes NULL to be also an accepted wildcard, and
    changes the entries of tables in ide-dma.c to use NULL.

    The code still accepts "ALL" as the wildcard, in order to keep
    any out-of-tree ide driver that feeds its own table that uses
    "ALL" as the wildcard to ide_in_drive_list() function from
    breaking.

    Signed-off-by: Junio C Hamano
    Cc: Alan Cox
    Cc: Dave Jones
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Junio C Hamano
     
  • Since ide_dma_timeout() method's result is discarded, make it return 'void'.
    While at it, drop 'ide_' from the method's name, drop the '__' prefix from
    the default method's name, and do some cleanups in this method driver-wise:

    - in ide-dma.c, au1xxx-ide.c, and pdc202xx_old.c, define/use 'hwif' variable;

    - in au1xxx-ide.c, get rid of commented out printk();

    - in sl82c105.c, get rid of unnecessary variables.

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

    Sergei Shtylyov
     
  • Since ide_dma_lostirq() method's result is discarded, make it return 'void'.
    While at it, rename the method to dma_lost_irq(), drop the '__' prefix from the
    default method's name, and do some cleanups in this method driver-wise:

    - in aec62xx.c, rename the method in accordance with other drivers, and get rid
    of unnecessary variables there;

    - in pdc202xx_old.c, define/use 'hwif' variable;

    - in sgiioc4.c, rearrange the code to call the resetproc() method directly.

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

    Sergei Shtylyov
     

24 May, 2007

1 commit


16 May, 2007

3 commits


10 May, 2007

2 commits

  • After reworking the code responsible for selecting the best DMA
    transfer mode it is now possible to add generic ide_tune_dma() helper.

    Convert some IDE PCI host drivers to use it (the ones left need more work).

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch.

    * add ide_hwif_t.udma_filter hook for filtering UDMA mask
    (use it in alim15x3, hpt366, siimage and serverworks drivers)
    * add ide_max_dma_mode() for finding best DMA mode for the device
    (loosely based on some older libata-core.c code)
    * convert ide_dma_speed() users to use ide_max_dma_mode()
    * make ide_rate_filter() take "ide_drive_t *drive" as an argument instead
    of "u8 mode" and teach it to how to use UDMA mask to do filtering
    * use ide_rate_filter() in hpt366 driver
    * remove no longer needed ide_dma_speed() and *_ratemask()
    * unexport eighty_ninty_three()

    v2:
    * rename ->filter_udma_mask to ->udma_filter
    [ Suggested by Sergei Shtylyov . ]

    v3:
    * updated for scc_pata driver (fixes XFER_UDMA_6 filtering for user-space
    originated transfer mode change requests when 100MHz clock is used)

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

18 Mar, 2007

1 commit

  • For CONFIG_IDEDMA_{ICS,PCI}_AUTO=n and/or "ide=nodma" option the host/device
    are not programmed for DMA and it is also explicitly disabled by ide_set_dma()
    (->ide_dma_check returns "-1"). However the code responsible for manually
    enabling DMA ("hdparm -d 1") has a bug which results in DMA being erroneously
    enabled - ide_set_dma() incorrectly passes "0" return value to set_using_dma().
    This may work if BIOS/firmware configured the host/device for DMA and chipset
    allows independent configuration of DMA/PIO modes but won't work after suspend
    and is generally unsafe on many chipsets (possibly including data corruption
    if the same registers are used for DMA/PIO timings).

    This patch fixes kernel bugzilla bug #8169 (piix host driver fixes for
    setting PIO mode exposed the problem described above). The side-effect of
    the fix is that some rare configuration may be forced to PIO mode when DMA
    mode was previously used - this is addressed by the next patch which removes
    CONFIG_IDEDMA_{PCI,ICS}_AUTO config option completely.

    Thanks goes out to Patrick Horn for reporting the issue, narrowing it down
    to the specific commit and testing the fix. Also thanks to Sergei Shtylyov
    for help in debugging the problem.

    Cc: Patrick Horn
    Cc: Sergei Shtylyov
    Cc: Russell King
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

17 Feb, 2007

6 commits

  • * since ide_hwif_t.ide_dma_host_on is called either when drive->using_dma == 1
    or when return value is discarded make it void, also drop "ide_" prefix
    * make __ide_dma_host_on() void and drop "__" prefix

    v2:
    * while at it rename atiixp_ide_dma_host_on() to atiixp_dma_host_on()
    and sgiioc4_ide_dma_host_on() to sgiioc4_dma_host_on().
    [ Noticed by Sergei Shtylyov . ]

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * 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
     
  • All users of ->mmio == 1 are gone so convert ->mmio into flag.

    Noticed by Alan Cox.

    v2:
    * updated for scc_pata

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • This results in smaller/faster/simpler code and allows future optimizations.
    Also remove no longer needed ide[_mm]_{inl,outl}() and ide_hwif_t.{INL,OUTL}.

    v2:
    * updated for scc_pata

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * add ide_use_fast_pio() helper for use by host drivers

    * add DMA capability and hwif->autodma checks to ide_use_dma()

    - au1xxx-ide/it8213/it821x drivers didn't check for (id->capability & 1)

    [ for the IT8211/2 in SMART mode this check shouldn't be made but since
    in it821x_fixups() we set DMA bit explicitly:

    if(strstr(id->model, "Integrated Technology Express")) {
    /* In raid mode the ident block is slightly buggy
    We need to set the bits so that the IDE layer knows
    LBA28. LBA48 and DMA ar valid */
    id->capability |= 3; /* LBA28, DMA */

    we are better off using generic helper if we can ]

    - ide-cris driver didn't set ->autodma

    [ before the patch hwif->autodma was only checked in the chipset specific
    hwif->ide_dma_check implementations, for ide-cris it is cris_dma_check()
    function so there no behavior change here ]

    v2:
    * updated patch description (thanks to Alan Cox for the feedback)

    v3:
    * updated for scc_pata driver

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

03 Oct, 2006

5 commits

  • Remove dma_base2 field from ide_hwif_t as it's used only in 2 drivers and
    without great need.

    Signed-off-by: Sergei Shtylyov
    Cc: John Keller
    Signed-off-by: Jeremy Higdon
    Acked-by: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergei Shtylyov
     
  • - setup-pci.c: remove the unused ide_pci_unregister_driver()
    - ide-dma.c: remove the unused EXPORT_SYMBOL_GPL(ide_in_drive_list)

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Fix ide_in_drive_list: drive_table->id_firmware should be searched *in*
    id->fw_rev, not vice versa.

    Signed-off-by: Kirill Smelkov
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Smelkov
     
  • Release the DMA engine for the custom mapping IDE drivers also (for
    example, siimage.c does allocate it in both I/O-mapped and custom-mapped
    modes). Remove useless code from the error path of
    ide_allocate_dma_engine().

    Signed-off-by: Sergei Shtylyov
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergei Shtylylov
     
  • - Claim extra DMA I/O ports regardless of what IDE channels are
    present/enabled.

    - Remove extra ports handling from ide_mapped_mmio_dma() since it's not
    applicable to the custom-mapping IDE drivers.

    Signed-off-by: Sergei Shtylyov
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergei Shtylylov
     

01 Oct, 2006

1 commit

  • Right now ->flags is a bit of a mess: some are request types, and
    others are just modifiers. Clean this up by splitting it into
    ->cmd_type and ->cmd_flags. This allows introduction of generic
    Linux block message types, useful for sending generic Linux commands
    to block devices.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

28 Jul, 2006

1 commit


01 Jul, 2006

1 commit


23 Jun, 2006

1 commit


24 Mar, 2006

1 commit


15 Dec, 2005

1 commit


28 Jun, 2005

1 commit


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