02 May, 2011

2 commits

  • The code currently computes an offset into a dma_alloc_coherent() area
    on the assumption that the alignment is imprecise. In fact, the API
    guarantees PAGE_SIZE alignment, so the offset calculation is always
    zero: remove it.

    [jejb: make description actually descriptive]
    Signed-off-by: Tomas henzl
    Acked-by: Nick Cheng
    Signed-off-by: James Bottomley

    Tomas Henzl
     
  • I removed outer loops in ...wait_msgint_ready the sleeptime and
    retrycount are in fact never changed so I changed them into
    defines. In arcmsr_flush_hba_cache is a loop removed, which printed
    the same printk 100 times, one line in log is enough I think. The
    arcmsr_sleep_for_bus_reset has lost a functionality with the latest
    patches, The only thing the function does is a long sleep, so it's
    replaced with a ssleep.

    [jejb: checkpatch fixes]
    Signed-off-by: Tomas henzl
    Acked-by: Nick Cheng
    Signed-off-by: James Bottomley

    Tomas Henzl
     

18 Mar, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (170 commits)
    [SCSI] scsi_dh_rdac: Add MD36xxf into device list
    [SCSI] scsi_debug: add consecutive medium errors
    [SCSI] libsas: fix ata list corruption issue
    [SCSI] hpsa: export resettable host attribute
    [SCSI] hpsa: move device attributes to avoid forward declarations
    [SCSI] scsi_debug: Logical Block Provisioning (SBC3r26)
    [SCSI] sd: Logical Block Provisioning update
    [SCSI] Include protection operation in SCSI command trace
    [SCSI] hpsa: fix incorrect PCI IDs and add two new ones (2nd try)
    [SCSI] target: Fix volume size misreporting for volumes > 2TB
    [SCSI] bnx2fc: Broadcom FCoE offload driver
    [SCSI] fcoe: fix broken fcoe interface reset
    [SCSI] fcoe: precedence bug in fcoe_filter_frames()
    [SCSI] libfcoe: Remove stale fcoe-netdev entries
    [SCSI] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h
    [SCSI] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
    [SCSI] fcoe, libfc: initialize EM anchors list and then update npiv EMs
    [SCSI] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out"
    [SCSI] libfc: Fixing a memory leak when destroying an interface
    [SCSI] megaraid_sas: Version and Changelog update
    ...

    Fix up trivial conflicts due to whitespace differences in
    drivers/scsi/libsas/{sas_ata.c,sas_scsi_host.c}

    Linus Torvalds
     

13 Feb, 2011

1 commit

  • Simple conversions to drop flush_scheduled_work() usages in
    drivers/scsi. More involved ones will be done in separate patches.

    * NCR5380, megaraid_sas: cancel_delayed_work() +
    flush_scheduled_work() -> cancel_delayed_work_sync().

    * mpt2sas_scsih: drop unnecessary flush_scheduled_work().

    * arcmsr_hba, ipr, pmcraid: flush the used work explicitly instead of
    using flush_scheduled_work().

    Signed-off-by: Tejun Heo
    Signed-off-by: James Bottomley

    Tejun Heo
     

25 Jan, 2011

1 commit


04 Jan, 2011

1 commit


17 Nov, 2010

1 commit

  • Move the mid-layer's ->queuecommand() invocation from being locked
    with the host lock to being unlocked to facilitate speeding up the
    critical path for drivers who don't need this lock taken anyway.

    The patch below presents a simple SCSI host lock push-down as an
    equivalent transformation. No locking or other behavior should change
    with this patch. All existing bugs and locking orders are preserved.

    Additionally, add one parameter to queuecommand,
    struct Scsi_Host *
    and remove one parameter from queuecommand,
    void (*done)(struct scsi_cmnd *)

    Scsi_Host* is a convenient pointer that most host drivers need anyway,
    and 'done' is redundant to struct scsi_cmnd->scsi_done.

    Minimal code disturbance was attempted with this change. Most drivers
    needed only two one-line modifications for their host lock push-down.

    Signed-off-by: Jeff Garzik
    Acked-by: James Bottomley
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     

06 Sep, 2010

1 commit

  • Outdent the code following the if.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable braces4@
    position p1,p2;
    statement S1,S2;
    @@

    (
    if (...) { ... }
    |
    if (...) S1@p1 S2@p2
    )

    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@

    if (p1[0].column == p2[0].column):
    cocci.print_main("branch",p1)
    cocci.print_secs("after",p2)
    //

    Signed-off-by: Julia Lawall
    Acked-by: Nick Cheng
    Signed-off-by: James Bottomley

    Julia Lawall
     

18 Aug, 2010

1 commit


06 Aug, 2010

1 commit


28 Jul, 2010

3 commits

  • Commit

    commit 2c3c8bea608866d8bd9dcf92657d57fdcac011c5
    Author: Chris Wright
    Date: Wed May 12 18:28:57 2010 -0700

    sysfs: add struct file* to bin_attr callbacks

    Added an extra struct file * parameter at the beginning, which the
    arcmsr binary attribute additions didn't have. Fix this to prevent
    nasty crashes.

    Cc: Nick Cheng
    Signed-off-by: James Bottomley

    James Bottomley
     
  • 1. To support Type C RAID controller, ACB_ADAPTER_TYPE_C, i.e. PCI device
    ID: 0x1880.
    Signed-off-by: Nick Cheng< nick.cheng@areca.com.tw >
    Signed-off-by: James Bottomley

    Nick Cheng
     
  • …trapped and behaviors of EHs

    1. To support 4M/1024 scatter-gather list entry, reorganize struct
    ARCMSR_CDB and struct CommandControlBlock
    2. To modify arcmsr_probe
    3. In order to help fix F/W issue, add the driver mode for type B card
    4. To improve AP's behavior while F/W resets
    5. To unify struct MessageUnit_B's members' naming in all OS drivers'
    6. To improve error handlers, arcmsr_bus_reset(), arcmsr_abort()
    7. To fix the arcmsr_queue_command() in bus reset stage, just let the
    commands pass down to FW, don't block

    Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw>
    Signed-off-by: James Bottomley <James.Bottomley@suse.de>

    Nick Cheng
     

25 May, 2010

1 commit


22 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

05 Dec, 2009

1 commit

  • This patch modifies scsi_host_template->change_queue_depth so that
    it takes an argument indicating why it is being called. This will be
    used so that if a LLD needs to do some extra processing when
    handling queue fulls or later ramp ups, it can do so.

    This is a simple port of the drivers setting a change_queue_depth
    callback. In the patch I just have these LLDs adjust the queue depth
    if the user was requesting it.

    Signed-off-by: Mike Christie

    [Vasu.Dev: v2
    Also converted pmcraid_change_queue_depth and then verified
    all modules compile using "make allmodconfig" for any new build
    warnings on X86_64.

    Updated original description after combing two original
    patches from Mike to make this patch git bisectable.]
    Signed-off-by: Vasu Dev
    [jejb: fixed up 53c700]
    Signed-off-by: James Bottomley

    Mike Christie
     

07 Apr, 2009

2 commits


30 Dec, 2008

1 commit


20 Oct, 2008

1 commit

  • Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs
    attribute->owner unnecessary. But the field was left in the structure to
    ease the merge. It's been over a year since that change and it is now
    time to start killing attribute->owner along with its users - one arch at
    a time!

    This patch is attempt #1 to get rid of attribute->owner only for
    CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on
    as and when possible - avr32 will be the next since that is something I
    can test. Compile (make allyesconfig / make allmodconfig / custom config)
    and boot tested.

    akpm: the idea is that we put the declaration of sttribute.owner inside
    `#ifndef CONFIG_X86'. But that proved to be too ambitious for now because
    new usages kept on turning up in subsystem trees.

    [akpm: remove the ifdef for now]
    Signed-off-by: Parag Warudkar
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Tejun Heo
    Cc: Len Brown
    Cc: Jens Axboe
    Cc: Jean Delvare
    Cc: Roland Dreier
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Parag Warudkar
     

20 Apr, 2008

1 commit


15 Mar, 2008

1 commit

  • The Type B Adapter teardown does iounmap on pointers subtracted by a
    constant offset. Since the offset is in bytes, we need the pointers to
    be of type void * not uint32_t * so the subtraction is done in the
    correct units and we iounmap the correct area.

    Signed-off-by: Nick Cheng
    Signed-off-by: James Bottomley

    nickcheng
     

04 Mar, 2008

1 commit

  • The fix up from Daniel Drake for replacing GFP_DMA with something
    more sensible has gone in here:

    commit 69e562c234440fb7410877b5b24f4b29ef8521d1
    Author: Daniel Drake
    Date: Wed Feb 20 13:29:05 2008 +0000

    [SCSI] arcmsr: fix message allocation

    add a change log and update the version for this.

    Signed-off-by: Nick Cheng
    Signed-off-by: James Bottomley

    Nick Cheng
     

22 Feb, 2008

1 commit

  • arcmsr_iop_message_xfer() is called from atomic context under the
    queuecommand scsi_host_template handler. James Bottomley pointed out
    that the current GFP_KERNEL|GFP_DMA flags are wrong: firstly we are in
    atomic context, secondly this memory is not used for DMA.
    Also removed some unneeded casts.

    Signed-off-by: Daniel Drake
    Cc: Nick Cheng
    Signed-off-by: James Bottomley

    Daniel Drake
     

08 Feb, 2008

1 commit

  • - add arcmsr_enable_eoi_mode()and readl(reg->iop2drv_doorbell_reg) in
    arcmsr_handle_hbb_isr() on adapter Type B in case of the doorbell
    interrupt clearance is cached

    - add conditional declaration for arcmsr_pci_error_detected() and
    arcmsr_pci_slot_reset

    - check if the sg list member number exceeds arcmsr default limit in
    arcmsr_build_ccb()

    - change the returned value type of arcmsr_build_ccb()from "void" to
    "int" returns FAILED in arcmsr_queue_command()

    - modify arcmsr_drain_donequeue() to ignore unknown command and let
    kernel process command timeout. This could handle IO request violating
    maximum segments, i.e. Linux XFS over DM-CRYPT. Thanks to Milan Broz's
    comments

    - fix the release of dma memory for type B in arcmsr_free_ccb_pool()

    - fix the arcmsr_polling_hbb_ccbdone()

    Signed-off-by: Nick Cheng
    Cc: Milan Broz
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Nick Cheng
     

31 Jan, 2008

1 commit

  • With the sg table code, every SCSI driver is now either chain capable
    or broken (or has sg_tablesize set so chaining is never activated), so
    there's no need to have a check in the host template.

    Also tidy up the code by moving the scatterlist size defines into the
    SCSI includes and permit the last entry of the scatterlist pools not
    to be a power of two.
    Signed-off-by: James Bottomley

    James Bottomley
     

24 Jan, 2008

1 commit


29 Oct, 2007

4 commits


23 Oct, 2007

1 commit


16 Oct, 2007

1 commit


13 Oct, 2007

5 commits

  • drivers/scsi/arcmsr/arcmsr_hba.c:129: error: 'arcmsr_pci_error_detected' undeclared here (not in a function)
    drivers/scsi/arcmsr/arcmsr_hba.c:130: error: 'arcmsr_pci_slot_reset' undeclared here (not in a function)

    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Andrew Morton
     
  • * Remove IRQF_DISABLED, it is clearly wrong for this driver.

    * Remove wasteful spin_lock_irqsave() in interrupt handler.
    The lighter-weight spin_lock() is all that's needed.

    * Annotate with FIXME where arcmsr_interrupt() is called
    without any spinlock being acquired.

    * Eliminate pointless cast from void pointer in arcmsr_do_interrupt()

    [jejb: conflict resolution]

    Signed-off-by: Jeff Garzik
    Acked-by: Nick Cheng
    Signed-off-by: James Bottomley

    Jeff Garzik
     
  • Remove _interruptible, since receiving a signal while waiting on a
    hardware condition will simply cause the driver to busy-wait.

    Using msleep_interruptible() is rarely the right thing to do, when
    waiting on a hardware condition to change.

    Also, replace msleep with ssleep while doing this, where appropriate.

    [jejb: fix up merge conflict]

    Signed-off-by: Jeff Garzik
    Acked-by: Nick Cheng
    Signed-off-by: James Bottomley

    Jeff Garzik
     
  • CC [M] drivers/scsi/arcmsr/arcmsr_hba.o
    drivers/scsi/arcmsr/arcmsr_attr.c:186: warning: initialization from
    incompatible pointer type
    drivers/scsi/arcmsr/arcmsr_attr.c:196: warning: initialization from
    incompatible pointer type
    drivers/scsi/arcmsr/arcmsr_attr.c:206: warning: initialization from
    incompatible pointer type
    drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_alloc_ccb_pool':
    drivers/scsi/arcmsr/arcmsr_hba.c:329: warning: assignment from
    incompatible pointer type
    drivers/scsi/arcmsr/arcmsr_hba.c: At top level:
    drivers/scsi/arcmsr/arcmsr_hba.c:101: warning:
    'arcmsr_pci_error_detected' declared 'static' but never defined
    drivers/scsi/arcmsr/arcmsr_hba.c:102: warning: 'arcmsr_pci_slot_reset'
    declared 'static' but never defined

    The majority being incorrect casting or the fact that binary attributes
    now take an additional argument.

    Cc: Nick Cheng
    Signed-off-by: James Bottomley

    James Bottomley
     
  • Description:
    ** support ARC1200/1201/1202 SATA RAID adapter, which is named
    ACB_ADAPTER_TYPE_B
    ** modify the arcmsr_pci_slot_reset function
    ** modify the arcmsr_pci_ers_disconnect_forepart function
    ** modify the arcmsr_pci_ers_need_reset_forepart function 

    Signed-off-by: Nick Cheng
    Signed-off-by: James Bottomley

    Nick Cheng
     

16 Jul, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits)
    [SCSI] ibmvscsi: convert to use the data buffer accessors
    [SCSI] dc395x: convert to use the data buffer accessors
    [SCSI] ncr53c8xx: convert to use the data buffer accessors
    [SCSI] sym53c8xx: convert to use the data buffer accessors
    [SCSI] ppa: coding police and printk levels
    [SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc
    [SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c
    [SCSI] remove the dead CYBERSTORMIII_SCSI option
    [SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA
    [SCSI] Clean up scsi_add_lun a bit
    [SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs
    [SCSI] sni_53c710: Cleanup
    [SCSI] qla4xxx: Fix underrun/overrun conditions
    [SCSI] megaraid_mbox: use mutex instead of semaphore
    [SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation.
    [SCSI] qla2xxx: update version to 8.02.00-k1.
    [SCSI] qla2xxx: add support for NPIV
    [SCSI] stex: use resid for xfer len information
    [SCSI] Add Brownie 1200U3P to blacklist
    [SCSI] scsi.c: convert to use the data buffer accessors
    ...

    Linus Torvalds