1. 14 10月, 2008 9 次提交
    • E
      ide: Implement disk shock protection support (v4) · 4abdc6ee
      Elias Oltmanns 提交于
      On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD
      FEATURE as specified in ATA-7 is issued to the device and processing of
      the request queue is stopped thereafter until the specified timeout
      expires or user space asks to resume normal operation. This is supposed
      to prevent the heads of a hard drive from accidentally crashing onto the
      platter when a heavy shock is anticipated (like a falling laptop expected
      to hit the floor). Port resets are deferred whenever a device on that
      port is in the parked state.
      
      v3:
      Elias Oltmanns <eo@nebensachen.de> wrote:
      [...]
      > >> 1. Make sure that no negative value is being passed to
      > >>    jiffies_to_msecs() in ide_park_show().
      > >> 2. Drop the superfluous variable hwif in ide_special_rq().
      > >> 3. Skip initialisation of task and tf in ide_special_rq() if we are not
      > >>    handling a (un)park request.
      > >
      > > Well, #3 should have been done differently because we donn't want to
      > > check for REQ_(UN)?PARK_HEADS more often than is necessary.
      > 
      > While preparing the backport to 2.6.27, it has just occurred to me that
      > we need to clear the IDE_DFLAG_PARKED flag in ide_disk_pre_reset()
      > because this flag must not be set after *any* sort of access to the
      > device.
      
      v4:
      Fix a memory leak due to a missing blk_put_request() in
      issue_park_cmd(). Additionally, we should plug the queue when enqueueing
      the unpark request because there is no guarantee that the park timeout
      has not expired by then. Even though the chance for that to happen is
      very slim, the request might end up hanging in the queue until the next
      I/O operation is queued up. While at it, clean up the code a little:
      - make issue_park_cmd() a function of type void since nobody cares for
        the return value anyway;
      - use blk_start_queueing() instead of __blk_run_queue() since we don't
        have to worry about recursion;
      - remove a superfluous pointer deference in task_no_data_intr().
      Signed-off-by: NElias Oltmanns <eo@nebensachen.de>
      Cc: Jeff Garzik <jeff@garzik.org>,
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4abdc6ee
    • B
      ide: switch to DMA-mapping API part #2 · 2bbd57ca
      Bartlomiej Zolnierkiewicz 提交于
      Follow-up to commit 5c05ff68
      ("ide: switch to DMA-mapping API"):
      
      * pci_{alloc,free}_consistent() -> dma_{alloc,free}_coherent()
        in ide_{allocate,release}_dma_engine().
      
      * Add ->prd_max_nents and ->prd_ent_size fields to ide_hwif_t
        (+ set default values in ide_allocate_dma_engine()).
      
      * Make ide_{allocate,release}_dma_engine() available also
        for CONFIG_BLK_DEV_IDEDMA_SFF=n.  Then convert au1xxx-ide.c,
        scc_pata.c and sgiioc4.c to use them.
      
      * Add missing ->init_dma method to scc_pata.
      
      This patch also fixes:
      - ->dmatable_cpu leak for au1xxx-ide
      - too early realease of ->dmatable_cpu for scc_pata
      - wrong amount of ->dmatable_cpu memory being freed for sgiioc4
      
      While at it:
      - remove superfluous ->dma_base check from ide_unregister()
      - return -ENOMEM on error in ide_release_dma_engine()
      - beautify error message in ide_release_dma_engine()
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2bbd57ca
    • B
      ide-disk: move all ioctl handling to ide-disk_ioctl.c · f8790489
      Bartlomiej Zolnierkiewicz 提交于
      While at it:
      - idedisk_ioctl() -> ide_disk_ioctl()
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f8790489
    • B
      ide: convert 'pio_mode' device setting to use DS_SYNC flag · 6982daf7
      Bartlomiej Zolnierkiewicz 提交于
      * Convert 'pio_mode' device setting to use DS_SYNC flag.
      
      * Remove unused special_t.b.{set_tune,serviced} and ide_drive_t.tune_req.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6982daf7
    • B
      ide: remove [ata_]select_t · 7f612f27
      Bartlomiej Zolnierkiewicz 提交于
      * Use 'drive->dn & 1' in ide_init_disk().
      
      * remove [ata_]select_t.
      
      While at it:
      
      * Use ATA_DEVICE_OBS define in ide_port_init_devices_data().
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7f612f27
    • B
      ide: use 'drive->dn & 1' instead of drive->select.b.unit · 123995b9
      Bartlomiej Zolnierkiewicz 提交于
      * Call ide_port_init_devices() in ide_host_register()
        also if 'struct ide_port_info *d' is not available.
      
      * Init drive->dn in ide_port_init_devices() instead of
        ide_probe_port() so it is valid also in ->init_dev.
      
      * Pass device number to ide_dev_apply_params().
      
      * Use 'drive->dn & 1' instead of drive->select.b.unit.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      123995b9
    • B
      ide: sanitize ide*_pm_* enums · 0d346ba0
      Bartlomiej Zolnierkiewicz 提交于
      * Move ide*_pm_* enums from ide-io.c to <linux/ide.h>.
      
      * idedisk_pm_* -> ide_pm_*
      
      * ide_pm_state_* -> ide_pm_*
      
      * No need to set ide_pm_* enums to the fixed values.
      
      * Uppercase ide_pm_* enums.
      
      * Fix/update comments.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0d346ba0
    • B
      ide: add device flags · 97100fc8
      Bartlomiej Zolnierkiewicz 提交于
      Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
      to IDE_DFLAG_* flags.
      
      While at it:
      - IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48
      - fixup some comments
      - remove needless g->flags zeroing from ide*_probe()
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      97100fc8
    • B
      ide: fix IDE ACPI for slave device-only configurations · 1ea1031c
      Bartlomiej Zolnierkiewicz 提交于
      ACPI _GTM / _PS0 / _STM were not called if only slave device was present.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1ea1031c
  2. 11 10月, 2008 16 次提交
  3. 25 7月, 2008 1 次提交
  4. 24 7月, 2008 8 次提交
  5. 17 7月, 2008 6 次提交