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
     

20 Jul, 2007

26 commits

  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Now that ide-floppy supports SG_IO we can add support for SCSI ioctls
    (except deprecated SCSI_IOCTL_SEND_COMMAND and legacy CDROM_SEND_PACKET
    ones - we can add them later iff really needed).

    While at it remove handling of CDROMEJECT and CDROMCLOSETRAY ioctls from
    generic_ide_ioctl():

    - This prevents ide-{disk,tape,scsi} device drivers from obtaining
    REQ_TYPE_BLOCK_PC type requests which are currently unsupported by
    these drivers and which are potentially harmful (as reported by Andrew).

    - There is no functionality loss since aforementioned ioctls will now be
    handled by idefloppy_ioctl()->scsi_cmd_ioctl() (for devices using
    ide-floppy driver) and by idecd_ioctl->cdrom_ioctl()->scsi_cmd_ioctl()
    (for devices using ide-cd driver).

    Cc: Jens Axboe
    Cc: FUJITA Tomonori
    Cc: James Bottomley
    Cc: Jeff Garzik
    Cc: Andrew Morton
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add ATA_PIO[0-6] defines to .

    * Add ->pio_mask field to ide_pci_device_t and ide_hwif_t.

    * Add PIO masks to host drivers.

    change ACK-ed by Jeff Garzik .

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

    Bartlomiej Zolnierkiewicz
     
  • * Add ->host_flags to ide_hwif_t to store ide_pci_device_t.host_flags,
    assign it in setup-pci.c:ide_pci_setup_ports().

    * Add IDE_HFLAG_PIO_NO_{BLACKLIST,DOWNGRADE} to ide_pci_device_t.host_flags
    and teach ide_get_best_pio_mode() about them. Also remove needless
    !drive->id check while at it (drive->id is always present).

    * Convert amd74xx, via82cxxx and ide-timing.h to use ide_get_best_pio_mode()
    and then remove no longer needed ide_find_best_pio_mode().

    There should be no functionality changes caused by this patch.

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

    Bartlomiej Zolnierkiewicz
     
  • * Drop no longer needed "PIO data" argument from ide_get_best_pio_mode()
    and convert all users accordingly.

    * Remove no longer needed ide_pio_data_t.

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

    Bartlomiej Zolnierkiewicz
     
  • * Check IORDY bit for PIO modes > 2.

    * Some devices claim maximum PIO mode > 2 in id->tPIO, they were punished too
    severly for this by being limited to PIO_SLOW. Limit them to PIO2 instead.

    v2:
    * Fix PIO number being returned incorrectly instead of PIO mode
    (Noticed by Sergei).

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

    Bartlomiej Zolnierkiewicz
     
  • * Add ide_pio_cycle_time() helper.

    * Use it in ali14xx/ht6560b/qd65xx/cmd64{0,x}/sl82c105 and pmac host drivers
    (previously cycle time given by the device was only used for "pio" == 255).

    * Remove no longer needed ide_pio_data_t.cycle_time field.

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

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

    Bartlomiej Zolnierkiewicz
     
  • * Nowadays core IDE code handles restoring of PIO and DMA modes
    (ide-io.c:ide_start_power_step() etc) so remove open-coded version
    from sc1200_resume().

    There should be no change in behavior because settings done by
    sc1200_resume() were always overridden by generic_ide_resume()
    and ide_{start,stop}_power_step().

    * Bump driver version.

    Cc: Mark Lord
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Do the same thing as probe_hwif() and always disable DMA so chipset DMA
    enabled bit gets cleared (if the drive doesn't support DMA ide_set_dma()
    won't try to tune it anyway).

    * Add TODO comment about respecting ->using_dma setting.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • The driver used to depend on BIOS settings for deciding whether it is OK
    to use DMA. However it seems that BIOS doesn't always handle all cases
    correctly so just let IDE core to decide about this. It should be a safe
    thing to do now, after the driver went through heavy bugfixing.

    Thanks for bugreport and testing the patch goes out to Sven Niedner.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Always set ->autotune so PIO gets correctly auto-tuned (previously
    ->autotune was only set when ->dma_base wasn't available, however
    ->ide_dma_check()/->speedproc() was always trying to tune PIO when
    tuning DMA).

    * Move code responsible for programming chipset for PIO mode from
    svwks_tune_chipset() to svwks_tune_pio(). Don't tune PIO when tuning
    DMA (this is no longer needed since ->autotune is always set now).

    * Handle PIO modes early in svwks_tune_chipset() so DMA configuration
    registers don't get cleared when programming PIO mode.

    * Bump driver version.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Rename ide_pci_device_t.flags to ide_pci_device_t.host_flags
    and IDEPCI_FLAG_ISA_PORTS flag to IDE_HFLAG_ISA_PORTS.

    * Add IDE_HFLAG_SINGLE flag for single channel devices.

    * Convert core code and all IDE PCI drivers to use IDE_HFLAG_SINGLE
    and remove no longer needed ide_pci_device_t.channels field.

    v2:
    * Fix issues noticed by Sergei:
    - correct code alignment in scc_pata.c
    - s/IDE_HFLAG_SINGLE/~IDE_HFLAG_SINGLE/ in serverworks.c

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

    Bartlomiej Zolnierkiewicz
     
  • * Add ide_dev_has_iordy() helper and use it sl82c105 host driver.

    * Remove no longer needed ide_pio_data_t.use_iordy field.

    v2/v3:
    * Fix issues noticed by Sergei:
    - correct patch description
    - fix comment in ide_get_best_pio_mode()

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

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

    Bartlomiej Zolnierkiewicz
     
  • * Print info about overriding PIO mode in ide_get_best_pio_mode().

    * Remove info about overriding PIO mode from cmd64{0,x} host drivers.

    * Remove no longer needed ide_pio_data_t.overridden field.

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

    Bartlomiej Zolnierkiewicz
     
  • * Add sil_tuneproc() wrapper for siimage_tuneproc() which also sets
    PIO mode on the device.

    * Add missing ide_get_best_pio_mode() call to sil_tuneproc() so
    "pio" == 255 (autotune) is handled correctly (previously PIO0 was used)
    and "pio" values > 4 && < 255 are filtered to PIO4 (instead of PIO0).

    * Add code limiting maximum PIO mode according to the pair device capabilities
    to sil_tuneproc().

    * Convert users of config_siimage_chipset_for_pio() to use sil_tune_pio() and
    sil_tuneproc(). This fixes PIO fallback in siimage_config_drive_for_dma() to
    use max PIO mode available instead of PIO4 (config_siimage_chipset_for_pio()
    used wrong arguments for ide_get_best_pio_mode() and as a results always
    tried to set PIO4).

    * Remove no longer needed siimage_taskfile_timing()
    and config_siimage_chipset_for_pio().

    * Enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes
    from siimage_speedproc()

    * Bump driver version.

    v2:
    * Fix issues noticed by Sergei:
    - correct pair device check
    - trim only taskfile PIO to the slowest of the master/slave
    - enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes
    from siimage_speedproc()
    - add TODO item for IORDY bugs
    - minor cleanups

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

    Bartlomiej Zolnierkiewicz
     
  • * Split off exisiting atiixp_tuneproc() into atiixp_tune_pio()
    and then add setting device PIO mode to atiixp_tuneproc().

    * Add missing ide_get_best_pio_mode() call to atiixp_tuneproc() so
    "pio" == 255 (autotune) is handled correctly and "pio" values > 4 && < 255
    are filtered to PIO4 (previously "pio" == 5 could result in wrong timings
    being used and "pio" values > 4 && < 255 in an OOPS).

    * Handle PIO modes early in atiixp_speedproc() so save_mdma_mode[]
    doesn't get cleared.

    * In atiixp_dma_check():
    - fix max_mode argument for ide_get_best_pio_mode()
    - don't call atiixp_dma_2_pio() so PIO1 doesn't get remapped to PIO0
    - use atiixp_tuneproc() instead of atiixp_speedproc()

    * Bump driver version.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Various old IDE drivers go mapping ROM devices for no apparent reason and
    without using the ROM mapping API we now have. They don't actually use
    the ROM they map and the new libata drivers are happy without it being
    mapped so rather than port them lets just junk it for the next -rc1.

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

    Alan Cox
     
  • The two CONFIG variables

    CONFIG_ETRAX_IDE_CSE1_16_RESET
    CONFIG_ETRAX_IDE_CSP0_8_RESET

    appear to have been dead since way back in 2.5.xx days:

    http://www.linuxhq.com/kernel/v2.5/75/arch/cris/drivers/Kconfig

    Signed-off-by: Robert P. J. Day
    Cc: Michael Starvik
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Robert P. J. Day
     
  • One card submitted by user.

    Signed-off-by: Marcin Juszkiewicz
    Cc: Jeff Garzik
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Marcin Juszkiewicz
     
  • Workaround for errata A308: turn down the UDMA mode and retry
    the DMA command when the data lost condition is detected.

    take2:
    udma_filter() hook is used to limit ATAPI UDMA mode.

    Signed-off-by: Kou Ishizaki
    Signed-off-by: Akira Iguchi
    Cc: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Kou Ishizaki
     
  • Move to using inline function variant of eieio instead of inline assmebly.

    Signed-off-by: Kumar Gala
    Cc: kou.ishizaki@toshiba.co.jp
    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Kumar Gala
     
  • ide-disk calls

    ide_end_request(drive, 0, 0);

    to finish an unknown request, but this doesn't work so well for non-fs
    requests, since ide_end_request() internally looks at ->hard_cur_sectors
    to see how much data to end. Only file system requests store a transfer
    value in there, pc requests fill out ->data_len as a byte based transfer
    value instead.

    Since we ask to end 0 bytes of that request, it will never be terminated
    and ide-disk gets stuck in a loop "handling" that same request over and
    over.

    Switch __ide_end_request() to take a byte based transfer count, and
    adjust ide_end_request() to look at the right field to determine how
    much IO to end when it's being passed in 0.

    Acked-by: Bartlomiej Zolnierkiewicz
    Tested-By: Giacomo Catenazzi
    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     
  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

18 Jul, 2007

2 commits

  • The old IDE driver is not ready to take generic SCSI commands, even if
    it uses them for some specific issues (ie the tray open/close ioctls for
    IDE CD-ROM's). Pointed out by Bartlomiej.

    I'm sure we'll have it fixed properly soon enough, but for now we should
    not allow it to cause problems.

    Cc: Bartlomiej Zolnierkiewicz
    Cc: Jens Axboe
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • 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
     

16 Jul, 2007

3 commits


13 Jul, 2007

2 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits)
    PCI: Only build PCI syscalls on architectures that want them
    PCI: limit pci_get_bus_and_slot to domain 0
    PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure
    PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge
    PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3
    PCI: hotplug: pciehp: wait for 1 second after power off slot
    PCI: pci_set_power_state(): check for PM capabilities earlier
    PCI: cpci_hotplug: Convert to use the kthread API
    PCI: add pci_try_set_mwi
    PCI: pcie: remove SPIN_LOCK_UNLOCKED
    PCI: ROUND_UP macro cleanup in drivers/pci
    PCI: remove pci_dac_dma_... APIs
    PCI: pci-x-pci-express-read-control-interfaces cleanups
    PCI: Fix typo in include/linux/pci.h
    PCI: pci_ids, remove double or more empty lines
    PCI: pci_ids, add atheros and 3com_2 vendors
    PCI: pci_ids, reorder some entries
    PCI: i386: traps, change VENDOR to DEVICE
    PCI: ATM: lanai, change VENDOR to DEVICE
    PCI: Change all drivers to use pci_device->revision
    ...

    Linus Torvalds
     
  • An ST-506 disk these days is pretty much someone trying to pull ancient
    data using an auxilliary controller. Pulling data from the BIOS or CMOS
    is just plain wrong, since it's likely to be the primary OS disk... and
    would be user-entered data anyway. Instead, require the user enters it
    on the command line.

    Signed-off-by: H. Peter Anvin
    Signed-off-by: Linus Torvalds

    H. Peter Anvin
     

12 Jul, 2007

2 commits

  • As suggested by Andrew, add pci_try_set_mwi(), which does not require
    return-value checking.

    - add pci_try_set_mwi() without __must_check
    - make it return 0 on success, errno if the "try" failed or error
    - review callers

    Signed-off-by: Randy Dunlap
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     
  • Instead of all drivers reading pci config space to get the revision
    ID, they can now use the pci_device->revision member.

    This exposes some issues where drivers where reading a word or a dword
    for the revision number, and adding useless error-handling around the
    read. Some drivers even just read it for no purpose of all.

    In devices where the revision ID is being copied over and used in what
    appears to be the equivalent of hotpath, I have left the copy code
    and the cached copy as not to influence the driver's performance.

    Compile tested with make all{yes,mod}config on x86_64 and i386.

    Signed-off-by: Auke Kok
    Acked-by: Dave Jones
    Signed-off-by: Greg Kroah-Hartman

    Auke Kok
     

10 Jul, 2007

4 commits