1. 05 3月, 2009 1 次提交
  2. 15 1月, 2009 1 次提交
  3. 07 1月, 2009 7 次提交
  4. 30 12月, 2008 1 次提交
  5. 03 12月, 2008 3 次提交
  6. 03 11月, 2008 1 次提交
  7. 18 10月, 2008 1 次提交
  8. 14 10月, 2008 4 次提交
    • 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: factor out reset error reporting from reset_pollfunc() · 0e3d84a5
      Bartlomiej Zolnierkiewicz 提交于
      Factor out reset error reporting from reset_pollfunc()
      to ide_reset_report_error() helper.
      
      While at it:
      - fix KERN_* printk() levels
      - remove 'switch ()'
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0e3d84a5
    • 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: 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
  9. 11 10月, 2008 10 次提交
    • B
      ide: ide_dev_is_sata() -> ata_id_is_sata() · 367d7e78
      Bartlomiej Zolnierkiewicz 提交于
      * Use optimized ATA version check from Sergei in ata_id_is_sata().
      
      * ide_dev_is_sata() -> ata_id_is_sata()
      
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      367d7e78
    • B
      ide: remove SECTOR_WORDS define · 151a6701
      Bartlomiej Zolnierkiewicz 提交于
      Just use SECTOR_SIZE instead.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      151a6701
    • B
      ide: include <linux/hdreg.h> only when needed · 3ceca727
      Bartlomiej Zolnierkiewicz 提交于
      * Include <linux/ata.h> directly in <linux/ide.h>
        instead of through <linux/hdreg.h>.
      
      * Include <linux/hdreg.h> only when needed.
      
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ceca727
    • B
      ide: enhance ide_busy_sleep() · b163f46d
      Bartlomiej Zolnierkiewicz 提交于
      * Make ide_busy_sleep() take timeout value as a parameter
        and also allow use of AltStatus Register if requested with
        altstatus parameter.  Update existing users accordingly.
      
      * Convert ide_driveid_update() and actual_try_to_identify()
        to use ide_busy_sleep().
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b163f46d
    • L
      ide: re-code ide_fixstring() loop to be less evil · 1a7809e3
      Linus Torvalds 提交于
      On Friday 25 July 2008, Linus Torvalds wrote:
      > 
      > On Fri, 25 Jul 2008, Ben Dooks wrote:
      > > 
      > > personally, i would much prefer to see the loop being less evil
      > > like:
      > > 
      > > 	for (p = s; p < end; p += 2)
      > > 		be16_to_cpus((u16 *)p);
      > 
      > Well, in this case, the code actually depends on 'p' being back at the 
      > start of the buffer by the end of it all, so it would need some more 
      > changes than that. 
      > 
      > But yes, I applied David's patch, but I _also_ suspect that we would be 
      > better off without code that does horrid things like casts and assignments 
      > inside the function arguments.
      > 
      > So it would be nice to re-code that loop to be more readable. But due to 
      > the reliance of 'p' being 's' after the loop, the minimal patch would be 
      > something like the appended.
      > 
      > Bartlomiej - take this or not, I'm not going to commit it - I haven't 
      > tested it, nor do I even have any machines that would trigger it. So this 
      > is more a "maybe something like this" than anything else.
      
      From: Linus Torvalds <torvalds@linux-foundation.org>
      CC: Ben Dooks <ben-linux@fluff.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: harvey.harrison@gmail.com
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1a7809e3
    • B
      ide: use ATA_* defines instead of *_STAT and *_ERR ones · 3a7d2484
      Bartlomiej Zolnierkiewicz 提交于
      * ERR_STAT   -> ATA_ERR
      * INDEX_STAT -> ATA_IDX
      * ECC_STAT   -> ATA_CORR
      * DRQ_STAT   -> ATA_DRQ
      * SEEK_STAT  -> ATA_DSC
      * WRERR_STAT -> ATA_DF
      * READY_STAT -> ATA_DRDY
      * BUSY_STAT  -> ATA_BUSY
      
      * MARK_ERR   -> ATA_AMNF
      * TRK0_ERR   -> ATA_TRK0NF
      * ABRT_ERR   -> ATA_ABORTED
      * MCR_ERR    -> ATA_MCR
      * ID_ERR     -> ATA_IDNF
      * MC_ERR     -> ATA_MC
      * ECC_ERR    -> ATA_UNC
      * ICRC_ERR   -> ATA_ICRC
      
      * BBD_ERR    -> ATA_BBK
      
      Also:
      
      * ILI_ERR    -> ATAPI_ILI
      * EOM_ERR    -> ATAPI_EOM
      * LFS_ERR    -> ATAPI_LFS
      
      * CD         -> ATAPI_COD
      * IO         -> ATAPI_IO
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3a7d2484
    • B
      ide: WIN_* -> ATA_CMD_* · aaaade3f
      Bartlomiej Zolnierkiewicz 提交于
      * Use ATA_CMD_* defines instead of WIN_* ones.
      
      While at it:
      
      * EXABYTE_ENABLE_NEXT -> ATA_EXABYTE_ENABLE_NEST
      
      * SETFEATURES_{EN,DIS}_WCACHE -> SETFEATURES_WC_{ON,OFF}
      
      * SETFEATURES_{EN,DIS}_AAM -> SETFEATURES_AAM_{ON,OFF}
      
      * SMART_* -> ATA_SMART_*
      
      * Remove stale comment from ide-proc.c.
      
      Partially based on earlier work by Chris Wedgwood.
      Acked-by: NChris Wedgwood <cw@f00f.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      aaaade3f
    • B
      ide: remove drive->driveid · 48fb2688
      Bartlomiej Zolnierkiewicz 提交于
      * Factor out HDIO_[OBSOLETE,GET]_IDENTITY ioctls handling
        to ide_get_identity_ioctl().
      
      * Use temporary buffer in ide_get_identity_ioctl() instead
        of accessing drive->id directly.
      
      * Add ide_id_to_hd_driveid() inline to convert raw id into
        struct hd_driveid format (needed on big-endian).
      
      * Use ide_id_to_hd_driveid() in ide_get_identity_ioctl(),
        cleanup ide_fix_driveid() and switch ide to use use raw id.
      
      * Remove no longer needed drive->driveid.
      
        This leaves us with 3 users of struct hd_driveid in tree:
        - arch/um/drivers/ubd_kern.c
        - drivers/block/xsysace.c
        - drivers/usb/storage/isd200.c
      
      While at it:
      
      * Use ata_id_u{32,64}() and ata_id_has_{dma,lba,iordy}() macros.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      48fb2688
    • B
      ide: make drive->id an union (take 2) · 4dde4492
      Bartlomiej Zolnierkiewicz 提交于
      Make drive->id an unnamed union so id can be accessed either by using
      'u16 *id' or 'struct hd_driveid *driveid'.  Then convert all existing
      drive->id users accordingly (using 'u16 *id' when possible).
      
      This is an intermediate step to make ide 'struct hd_driveid'-free.
      
      While at it:
      
      - Add missing KERN_CONTs in it821x.c.
      
      - Use ATA_ID_WORDS and ATA_ID_*_LEN defines.
      
      - Remove unnecessary checks for drive->id.
      
      - s/drive_table/table/ in ide_in_drive_list().
      
      - Cleanup ide_config_drive_speed() a bit.
      
      - s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave().
      
      v2:
      Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell)
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4dde4492
    • B
      ide: cleanup ide_fix_driveid() · 5b90e990
      Bartlomiej Zolnierkiewicz 提交于
      Do all __le16_to_cpu() swapping in one loop.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5b90e990
  10. 06 8月, 2008 1 次提交
  11. 25 7月, 2008 1 次提交
  12. 24 7月, 2008 9 次提交