11 Oct, 2008

21 commits

  • * 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: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Use ATA_CMD_* defines instead of WIN_* ones.

    * Include directly instead of through .

    Signed-off-by: Bartlomiej Zolnierkiewicz

    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: Chris Wedgwood
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Acked-by: Jeff Garzik
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • idedisk_supports_hpa() -> ata_id_hpa_enabled().

    The latter one also checks validity of words 82 & 85.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Replace open-coded check by ata_id_wcache_enabled()
    (which also checks validity of word 85).

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Replace open-coded checks by ata_id_current_chs_valid().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    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: Bartlomiej Zolnierkiewicz

    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: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Do all __le16_to_cpu() swapping in one loop.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Remove superfluous checks for drive->mult_req.

    * No need to zero drive's fields.

    * Move the common code out of #ifdef scope.

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • This condition is checked by both ide_disk_init_mult_count()
    and set_multcount() so no need to do it again in ide_disk_special().

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • The format specifier for rq->sector didn't specify the proper size and
    signedness. Borislav Petkov discovered that the signedness for
    rq->nr_sectors and rq->current_nr_sectors also were incorrect.

    Signed-off-by: Mark de Wever
    Acked-by: Borislav Petkov
    [bart: remove trailing whitespace]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Mark de Wever
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: skcipher - Use RNG interface instead of get_random_bytes
    crypto: rng - RNG interface and implementation
    crypto: api - Add fips_enable flag
    crypto: skcipher - Move IV generators into their own modules
    crypto: cryptomgr - Test ciphers using ECB
    crypto: api - Use test infrastructure
    crypto: cryptomgr - Add test infrastructure
    crypto: tcrypt - Add alg_test interface
    crypto: tcrypt - Abort and only log if there is an error
    crypto: crc32c - Use Intel CRC32 instruction
    crypto: tcrypt - Avoid using contiguous pages
    crypto: api - Display larval objects properly
    crypto: api - Export crypto_alg_lookup instead of __crypto_alg_lookup
    crypto: Kconfig - Replace leading spaces with tabs

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (29 commits)
    RDMA/nes: Fix slab corruption
    IB/mlx4: Set RLKEY bit for kernel QPs
    RDMA/nes: Correct error_module bit mask
    RDMA/nes: Fix routed RDMA connections
    RDMA/nes: Enhanced PFT management scheme
    RDMA/nes: Handle AE bounds violation
    RDMA/nes: Limit critical error interrupts
    RDMA/nes: Stop spurious MAC interrupts
    RDMA/nes: Correct tso_wqe_length
    RDMA/nes: Fill in firmware version for ethtool
    RDMA/nes: Use ethtool timer value
    RDMA/nes: Correct MAX TSO frags value
    RDMA/nes: Enable MC/UC after changing MTU
    RDMA/nes: Free NIC TX buffers when destroying NIC QP
    RDMA/nes: Fix MDC setting
    RDMA/nes: Add wqm_quanta module option
    RDMA/nes: Module parameter permissions
    RDMA/cxgb3: Set active_mtu in ib_port_attr
    RDMA/nes: Add support for 4-port 1G HP blade card
    RDMA/nes: Make mini_cm_connect() static
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
    dlm: choose better identifiers
    dlm: remove bkl
    dlm: fix address compare
    dlm: fix locking of lockspace list in dlm_scand
    dlm: detect available userspace daemon
    dlm: allow multiple lockspace creates

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
    dm: detect lost queue
    dm: publish dm_vcalloc
    dm: publish dm_table_unplug_all
    dm: publish dm_get_mapinfo
    dm: export struct dm_dev
    dm crypt: avoid unnecessary wait when splitting bio
    dm crypt: tidy ctx pending
    dm crypt: fix async inc_pending
    dm crypt: move dec_pending on error into write_io_submit
    dm crypt: remove inc_pending from write_io_submit
    dm crypt: tidy write loop pending
    dm crypt: tidy crypt alloc
    dm crypt: tidy inc pending
    dm exception store: use chunk_t for_areas
    dm exception store: introduce area_location function
    dm raid1: kcopyd should stop on error if errors handled
    dm mpath: remove is_active from struct dm_path
    dm mpath: use more error codes

    Fixed up trivial conflict in drivers/md/dm-mpath.c manually.

    Linus Torvalds
     
  • Currently we disable barriers as soon as we get a buffer in xlog_iodone
    that has the XBF_ORDERED flag cleared. But this can be the case not only
    for buffers where the barrier failed, but also the first buffer of a
    split log write in case of a log wraparound. Due to the disabled
    barriers we can easily get directory corruption on unclean shutdowns.
    So instead of using this check add a new buffer flag for failed barrier
    writes.

    This is a regression vs 2.6.26 caused by patch to use the right macro
    to check for the ORDERED flag, as we previously got true returned for
    every buffer.

    Thanks to Toei Rei for reporting the bug.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Eric Sandeen
    Reviewed-by: David Chinner
    Signed-off-by: Tim Shimmin
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw:
    GFS2: Support for I/O barriers
    GFS2: Add UUID to GFS2 sb
    GFS2: high time to take some time over atime
    GFS2: The war on bloat
    GFS2: GFS2 will panic if you misspell any mount options
    GFS2: Direct IO write at end of file error
    GFS2: Use an IS_ERR test rather than a NULL test
    GFS2: Fix race relating to glock min-hold time
    GFS2: Fix & clean up GFS2 rename
    GFS2: rm on multiple nodes causes panic
    GFS2: Fix metafs mounts
    GFS2: Fix debugfs glock file iterator

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (37 commits)
    [SCSI] zfcp: fix double dbf id usage
    [SCSI] zfcp: wait on SCSI work to be finished before proceeding with init dev
    [SCSI] zfcp: fix erp list usage without using locks
    [SCSI] zfcp: prevent fc_remote_port_delete calls for unregistered rport
    [SCSI] zfcp: fix deadlock caused by shared work queue tasks
    [SCSI] zfcp: put threshold data in hba trace
    [SCSI] zfcp: Simplify zfcp data structures
    [SCSI] zfcp: Simplify get_adapter_by_busid
    [SCSI] zfcp: remove all typedefs and replace them with standards
    [SCSI] zfcp: attach and release SAN nameserver port on demand
    [SCSI] zfcp: remove unused references, declarations and flags
    [SCSI] zfcp: Update message with input from review
    [SCSI] zfcp: add queue_full sysfs attribute
    [SCSI] scsi_dh: suppress comparison warning
    [SCSI] scsi_dh: add Dell product information into rdac device handler
    [SCSI] qla2xxx: remove the unused SCSI_QLOGIC_FC_FIRMWARE option
    [SCSI] qla2xxx: fix printk format warnings
    [SCSI] qla2xxx: Update version number to 8.02.01-k8.
    [SCSI] qla2xxx: Ignore payload reserved-bits during RSCN processing.
    [SCSI] qla2xxx: Additional residual-count corrections during UNDERRUN handling.
    ...

    Linus Torvalds
     
  • * 'for-2.6.28' of git://git.kernel.dk/linux-2.6-block: (132 commits)
    doc/cdrom: Trvial documentation error, file not present
    block_dev: fix kernel-doc in new functions
    block: add some comments around the bio read-write flags
    block: mark bio_split_pool static
    block: Find bio sector offset given idx and offset
    block: gendisk integrity wrapper
    block: Switch blk_integrity_compare from bdev to gendisk
    block: Fix double put in blk_integrity_unregister
    block: Introduce integrity data ownership flag
    block: revert part of d7533ad0e132f92e75c1b2eb7c26387b25a583c1
    bio.h: Remove unused conditional code
    block: remove end_{queued|dequeued}_request()
    block: change elevator to use __blk_end_request()
    gdrom: change to use __blk_end_request()
    memstick: change to use __blk_end_request()
    virtio_blk: change to use __blk_end_request()
    blktrace: use BLKTRACE_BDEV_SIZE as the name size for setup structure
    block: add lld busy state exporting interface
    block: Fix blk_start_queueing() to not kick a stopped queue
    include blktrace_api.h in headers_install
    ...

    Linus Torvalds
     

10 Oct, 2008

19 commits

  • This merges phase 1 of the x86 tree, which is a collection of branches:

    x86/alternatives, x86/cleanups, x86/commandline, x86/crashdump,
    x86/debug, x86/defconfig, x86/doc, x86/exports, x86/fpu, x86/gart,
    x86/idle, x86/mm, x86/mtrr, x86/nmi-watchdog, x86/oprofile,
    x86/paravirt, x86/reboot, x86/sparse-fixes, x86/tsc, x86/urgent and
    x86/vmalloc

    and as Ingo says: "these are the easiest, purely independent x86 topics
    with no conflicts, in one nice Octopus merge".

    * 'x86-v28-for-linus-phase1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (147 commits)
    x86: mtrr_cleanup: treat WRPROT as UNCACHEABLE
    x86: mtrr_cleanup: first 1M may be covered in var mtrrs
    x86: mtrr_cleanup: print out correct type v2
    x86: trivial printk fix in efi.c
    x86, debug: mtrr_cleanup print out var mtrr before change it
    x86: mtrr_cleanup try gran_size to less than 1M, v3
    x86: mtrr_cleanup try gran_size to less than 1M, cleanup
    x86: change MTRR_SANITIZER to def_bool y
    x86, debug printouts: IOMMU setup failures should not be KERN_ERR
    x86: export set_memory_ro and set_memory_rw
    x86: mtrr_cleanup try gran_size to less than 1M
    x86: mtrr_cleanup prepare to make gran_size to less 1M
    x86: mtrr_cleanup safe to get more spare regs now
    x86_64: be less annoying on boot, v2
    x86: mtrr_cleanup hole size should be less than half of chunk_size, v2
    x86: add mtrr_cleanup_debug command line
    x86: mtrr_cleanup optimization, v2
    x86: don't need to go to chunksize to 4G
    x86_64: be less annoying on boot
    x86, olpc: fix endian bug in openfirmware workaround
    ...

    Linus Torvalds
     
  • We already did that a long time ago for pnp_system_init, but
    pnpacpi_init and pnpbios_init remained as subsys_initcalls, and get
    linked into the kernel before the arch-specific routines that finalize
    the PCI resources (pci_subsys_init).

    This means that the PnP routines would either register their resources
    before the PCI layer could, or would be unable to check whether a PCI
    resource had already been registered. Both are problematic.

    I wanted to do this before 2.6.27, but every time we change something
    like this, something breaks. That said, _every_ single time we trust
    some firmware (like PnP tables) more than we trust the hardware itself
    (like PCI probing), the problems have been worse.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'upstream-2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
    libata-eh: clear UNIT ATTENTION after reset
    ata_piix: add Hercules EC-900 mini-notebook to ich_laptop short cable list
    libata: reorder ata_device to remove 8 bytes of padding on 64 bits
    [libata] pata_bf54x: Add proper PM operation
    pata_sil680: convert CONFIG_PPC_MERGE to CONFIG_PPC
    libata: Implement disk shock protection support
    [libata] Introduce ata_id_has_unload()
    PATA: RPC now selects HAVE_PATA_PLATFORM for pata platform driver
    ata_piix: drop merged SCR access and use slave_link instead
    libata: implement slave_link
    libata: misc updates to prepare for slave link
    libata: reimplement link iterator
    libata: make SCR access ops per-link

    Linus Torvalds
     
  • Detect and report buggy drivers that destroy their request_queue.

    Signed-off-by: Alasdair G Kergon
    Cc: Stefan Raspl
    Cc: Jens Axboe
    Cc: Andrew Morton

    Alasdair G Kergon
     
  • Publish dm_vcalloc in include/linux/device-mapper.h because this function is
    used by targets.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Publish dm_table_unplug_all in include/linux/device-mapper.h because this
    function is used by targets.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Publish dm_get_mapinfo in include/linux/device-mapper.h because this function
    is used by targets.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Split struct dm_dev in two and publish the part that other targets need in
    include/linux/device-mapper.h.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Don't wait between submitting crypt requests for a bio unless
    we are short of memory.

    There are two situations when we must split an encrypted bio:
    1) there are no free pages;
    2) the new bio would violate underlying device restrictions
    (e.g. max hw segments).

    In case (2) we do not need to wait.

    Add output variable to crypt_alloc_buffer() to distinguish between
    these cases.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Move the initialisation of ctx->pending into one place, at the
    start of crypt_convert().

    Introduce crypt_finished to indicate whether or not the encryption
    is finished, for use in a later patch.

    No functional change.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • The pending reference count must be incremented *before* the async work is
    queued to another thread, not after. Otherwise there's a race if the
    work completes and decrements the reference count before it gets incremented.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Make kcryptd_crypt_write_io_submit() responsible for decrementing
    the pending count after an error.

    Also fixes a bug in the async path that forgot to decrement it.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Make the caller reponsible for incrementing the pending count before calling
    kcryptd_crypt_write_io_submit() in the non-async case to bring it into line
    with the async case.

    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     
  • Move kcryptd_crypt_write_convert_loop inside kcryptd_crypt_write_convert.
    This change is needed for a later patch.

    No functional change.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Factor out crypt io allocation code.
    Later patches will call it from another place.

    No functional change.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Move io pending to one place.

    No functional change, usefull to simplify debugging.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Change uint32_t into chunk_t to remove 32-bit limitation on the
    number of chunks on systems with 64-bit sector numbers.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Move this logic to a function, because it will be reused later.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • dm-raid1 is setting the 'DM_KCOPYD_IGNORE_ERROR' flag unconditionally
    when assigning kcopyd work. kcopyd is responsible for copying an
    assigned section of disk to one or more other disks. The
    'DM_KCOPYD_IGNORE_ERROR' flag affects kcopyd in the following way:

    When not set:
    kcopyd will immediately stop the copy operation when an error is
    encountered.

    When set:
    kcopyd will try to proceed regardless of errors and try to continue
    copying any remaining amount.

    Since dm-raid1 tracks regions of the address space that are (or
    are not) in sync and it now has the ability to handle these
    errors, we can safely enable this optimization. This optimization
    is conditional on whether mirror error handling has been enabled.

    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow