1. 13 12月, 2007 2 次提交
    • B
    • B
      ide: DMA reporting and validity checking fixes (take 3) · 3ab7efe8
      Bartlomiej Zolnierkiewicz 提交于
      * ide_xfer_verbose() fixups:
        - beautify returned mode names
        - fix PIO5 reporting
        - make it return 'const char *'
      
      * Change printk() level from KERN_DEBUG to KERN_INFO in ide_find_dma_mode().
      
      * Add ide_id_dma_bug() helper based on ide_dma_verbose() to check for invalid
        DMA info in identify block.
      
      * Use ide_id_dma_bug() in ide_tune_dma() and ide_driveid_update().
      
        As a result DMA won't be tuned or will be disabled after tuning if device
        reports inconsistent info about enabled DMA mode (ide_dma_verbose() does the
        same checks while the IDE device is probed by ide-{cd,disk} device driver).
      
      * Remove no longer needed ide_dma_verbose().
      
      This patch should fix the following problem with out-of-sync IDE messages
      reported by Nick Warne:
      
             hdd: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache<7>hdd:
             skipping word 93 validity check
              , UDMA(66)
      
      and later debugged by Mark Lord to be caused by:
      
              ide_dma_verbose()
                      printk( ... "2048kB Cache");
              eighty_ninty_three()
                      printk(KERN_DEBUG "%s: skipping word 93 validity check\n");
              ide_dma_verbose()
                      printk(", UDMA(66)"
      
      Please note that as a result ide-{cd,disk} device drivers won't report the
      DMA speed used but this is intended since now DMA mode being used is always
      reported by IDE core code.
      
      v2:
      * fixes suggested by Randy:
        - use KERN_CONT for printk()-s in ide-{cd,disk}.c
        - don't remove argument name from ide_xfer_verbose() declaration
      
      v3:
      * Remove incorrect check for (id->field_valid & 1) from ide_id_dma_bug()
        (spotted by Sergei).
      
      * "XFER SLOW" -> "PIO SLOW" in ide_xfer_verbose() (suggested by Sergei).
      
      * Fix ide_find_dma_mode() to report the correct mode ('mode' after being
        limited by 'req_mode').
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Nick Warne <nick@ukfsn.org>
      Cc: Mark Lord <lkml@rtr.ca>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ab7efe8
  2. 20 10月, 2007 1 次提交
  3. 19 10月, 2007 1 次提交
  4. 16 10月, 2007 1 次提交
  5. 17 9月, 2007 1 次提交
  6. 21 8月, 2007 1 次提交
    • B
      ide-disk: workaround for buggy HPA support on ST340823A (take 3) · b0244a00
      Bartlomiej Zolnierkiewicz 提交于
      This disk reports total number of sectors instead of maximum sector address
      in response to READ_NATIVE_MAX_ADDRESS command and also happily accepts
      SET_MAX_ADDRESS command with the bogus value.  This results in +1 sector
      capacity being used and errors on attempts to use the last sector.
      
      ...
      hdd: Host Protected Area detected.
              current capacity is 78165360 sectors (40020 MB)
              native  capacity is 78165361 sectors (40020 MB)
      hdd: Host Protected Area disabled.
      ...
      hdd: reading: block=78165360, sectors=1, buffer=0xc1e63000
      hdd: dma_intr: status=0x51 { DriveReady SeekComplete Error }
      hdd: dma_intr: error=0x10 { SectorIdNotFound }, LBAsect=78165360, sector=78165360
      ...
      
      Add hpa_list[] table and workaround the issue in idedisk_check_hpa().
      
      v2:
      * Add missing export and improve patch description a bit.
      
      v3:
      * Add list termination.  (From Mikko)
      
      Fixes kernel bugzilla bug #8816.
      
      Thanks to Mikko for investigating the issue and helping with this patch.
      
      Cc: Mikko Rapeli <mikko.rapeli@iki.fi>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b0244a00
  7. 24 7月, 2007 1 次提交
  8. 10 7月, 2007 1 次提交
  9. 08 6月, 2007 1 次提交
    • L
      ide: HPA detect from resume · 0d2157f7
      Lee Trager 提交于
      Currently when system which have HPA require HPA to be detected and
      disabled upon resume from RAM or disk. The current IDE drivers do not do
      this nor does libata (obviously it since it doesn't support HPA yet).
      
      I have implemented this into the current IDE drivers and it has been
      tested by many others since 7/15/2006 in bug number 6840:
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=6840
      
      and it has been confirmed to work fine with no problems.
      
      bart: added drv != NULL check to generic_ide_suspend()
      
      From: Lee Trager <lt73@cs.drexel.edu>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0d2157f7
  10. 10 5月, 2007 3 次提交
    • B
      ide: move IDE settings handling to ide-proc.c · 7662d046
      Bartlomiej Zolnierkiewicz 提交于
      * move
      	__ide_add_setting()
      	ide_add_setting()
      	__ide_remove_setting()
      	auto_remove_settings()
      	ide_find_setting_by_name()
      	ide_read_setting()
      	ide_write_setting()
      	set_xfer_rate()
      	ide_add_generic_settings()
      	ide_register_subdriver()
      	ide_unregister_subdriver()
      
        from ide.c to ide-proc.c
      
      * set_{io_32bit,pio_mode,using_dma}() cannot be marked static now, fix it
      
      * rename ide_[un]register_subdriver() to ide_proc_[un]register_driver(),
        update device drivers to use new names
      
      * add CONFIG_IDE_PROC_FS=n versions of ide_proc_[un]register_driver()
        and ide_add_generic_settings()
      
      * make ide_find_setting_by_name(), ide_{read,write}_setting()
        and ide_{add,remove}_proc_entries() static
      
      * cover IDE settings code in device drivers with CONFIG_IDE_PROC_FS #ifdef,
        also while at it cover with CONFIG_IDE_PROC_FS #ifdef ide_driver_t.proc
      
      * remove bogus comment from ide.h
      
      * cover with CONFIG_IDE_PROC_FS #ifdef .proc and .settings in ide_drive_t
      
      Besides saner code this patch results in the IDE core smaller by ~2 kB
      (on x86-32) and IDE disk driver by ~1 kB (ditto) when CONFIG_IDE_PROC_FS=n.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7662d046
    • B
      ide: split off ioctl handling from IDE settings (v2) · 1497943e
      Bartlomiej Zolnierkiewicz 提交于
      * do write permission and min/max checks in ide_procset_t functions
      
      * ide-disk.c: drive->id is always available so cleanup "multcount" setting
        accordingly
      
      * ide-disk.c: "address" setting was incorrectly defined as type TYPE_INTA,
        fix it by using type TYPE_BYTE and updating ide_drive_t->adressing field,
        the bug didn't trigger because this IDE setting uses custom ->set function
      
      * ide.c: add set_ksettings() for handling HDIO_SET_KEEPSETTINGS ioctl
      
      * ide.c: add set_unmaskirq() for handling HDIO_SET_UNMASKINTR ioctl
      
      * handle ioctls directly in generic_ide_ioclt() and idedisk_ioctl()
        instead of using IDE settings to deal with them
      
      * remove no longer needed ide_find_setting_by_ioctl() and {read,write}_ioctl
        fields from ide_settings_t, also remove now unused TYPE_INTA handling
      
      v2:
      * add missing EXPORT_SYMBOL_GPL(ide_setting_sem) needed now for ide-disk
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1497943e
    • B
      ide: make /proc/ide/ optional · ecfd80e4
      Bartlomiej Zolnierkiewicz 提交于
      All important information/features should be already available through
      sysfs and ioctl interfaces.
      
      Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option,
      disabling it makes IDE driver ~5 kB smaller (on x86-32).
      
      While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}()
      and remove no longer needed #ifdefs.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ecfd80e4
  11. 04 3月, 2007 1 次提交
  12. 17 2月, 2007 1 次提交
  13. 01 10月, 2006 1 次提交
    • J
      [PATCH] Split struct request ->flags into two parts · 4aff5e23
      Jens Axboe 提交于
      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: NJens Axboe <axboe@suse.de>
      4aff5e23
  14. 28 7月, 2006 1 次提交
  15. 01 7月, 2006 1 次提交
  16. 27 6月, 2006 2 次提交
  17. 01 4月, 2006 1 次提交
  18. 24 3月, 2006 1 次提交
  19. 23 3月, 2006 1 次提交
  20. 08 2月, 2006 1 次提交
  21. 04 2月, 2006 2 次提交
  22. 15 1月, 2006 1 次提交
  23. 14 1月, 2006 1 次提交
  24. 09 1月, 2006 1 次提交
    • C
      [PATCH] Add block_device_operations.getgeo block device method · a885c8c4
      Christoph Hellwig 提交于
      HDIO_GETGEO is implemented in most block drivers, and all of them have to
      duplicate the code to copy the structure to userspace, as well as getting
      the start sector.  This patch moves that to common code [1] and adds a
      ->getgeo method to fill out the raw kernel hd_geometry structure.  For many
      drivers this means ->ioctl can go away now.
      
      [1] the s390 block drivers are odd in this respect.  xpram sets ->start
          to 4 always which seems more than odd, and the dasd driver shifts
          the start offset around, probably because of it's non-standard
          sector size.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: <mike.miller@hp.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a885c8c4
  25. 06 1月, 2006 1 次提交
    • T
      [BLOCK] update IDE to use new blk_ordered for barriers · 3e087b57
      Tejun Heo 提交于
      Update IDE to use new blk_ordered.  This change makes the
      following behavior changes.
      
      * Partial completion of the barrier request is handled as
        failure of the whole ordered sequence.  No more partial
        completion for barrier requests.
      
      * Any failure of pre or post flush request results in failure
        of the whole ordered sequence.
      
      So, successfully completed ordered sequence guarantees that
      all requests prior to the barrier made to physical medium and,
      then, the while barrier request made to the physical medium.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJens Axboe <axboe@suse.de>
      3e087b57
  26. 05 1月, 2006 1 次提交
    • K
      [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ... · 263756ec
      Kay Sievers 提交于
      IDE: MODALIAS support for autoloading of ide-cd, ide-disk, ...
      
      Add MODULE_ALIAS to IDE midlayer modules: ide-disk, ide-cd, ide-floppy and
      ide-tape, to autoload these modules depending on the probed media type of
      the IDE device.
      
      It is used by udev and replaces the former agent shell script of the hotplug
      package, which was required to lookup the media type in the proc filesystem.
      Using proc was racy, cause the media file is created after the hotplug event
      is sent out.
      
      The module autoloading does not take any effect, until something like the
      following udev rule is configured:
        SUBSYSTEM=="ide",  ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
      
      The module ide-scsi will not be autoloaded, cause it requires manual
      configuration. It can't be, and never was supported for automatic setup in
      the hotplug package. Adding a MODULE_ALIAS to ide-scsi for all supported
      media types, would just lead to a default blacklist entry anyway.
      
        $ modinfo ide-disk
        filename:       /lib/modules/2.6.15-rc4-g1b0997f5/kernel/drivers/ide/ide-disk.ko
        description:    ATA DISK Driver
        alias:          ide:*m-disk*
        license:        GPL
        ...
      
        $ modprobe -vn ide:m-disk
        insmod /lib/modules/2.6.15-rc4-g1b0997f5/kernel/drivers/ide/ide-disk.ko
      
        $ cat /sys/bus/ide/devices/0.0/modalias
        ide:m-disk
      
      It also adds attributes to the IDE device:
        $ tree /sys/bus/ide/devices/0.0/
        /sys/bus/ide/devices/0.0/
        |-- bus -> ../../../../../../../bus/ide
        |-- drivename
        |-- media
        |-- modalias
        |-- power
        |   |-- state
        |   `-- wakeup
        `-- uevent
      
        $ cat /sys/bus/ide/devices/0.0/{modalias,drivename,media}
        ide:m-disk
        hda
        disk
      Signed-off-by: NKay Sievers <kay.sievers@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      263756ec
  27. 15 12月, 2005 1 次提交
  28. 20 11月, 2005 1 次提交
  29. 19 11月, 2005 1 次提交
  30. 07 11月, 2005 1 次提交
  31. 10 8月, 2005 1 次提交
  32. 28 6月, 2005 1 次提交
  33. 24 6月, 2005 1 次提交
  34. 20 6月, 2005 1 次提交
  35. 26 5月, 2005 1 次提交
    • B
      [PATCH] convert IDE device drivers to driver-model · 8604affd
      Bartlomiej Zolnierkiewicz 提交于
      * 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: NBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
      8604affd