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
     

12 Jul, 2007

2 commits

  • Well, first of all, I don't want to change so many files either.

    What I do:
    Adding a new parameter "struct bin_attribute *" in the
    .read/.write methods for the sysfs binary attributes.

    In fact, only the four lines change in fs/sysfs/bin.c and
    include/linux/sysfs.h do the real work.
    But I have to update all the files that use binary attributes
    to make them compatible with the new .read and .write methods.
    I'm not sure if I missed any. :(

    Why I do this:
    For a sysfs attribute, we can get a pointer pointing to the
    struct attribute in the .show/.store method,
    while we can't do this for the binary attributes.
    I don't know why this is different, but this does make it not
    so handy to use the binary attributes as the regular ones.
    So I think this patch is reasonable. :)

    Who benefits from it:
    The patch that exposes ACPI tables in sysfs
    requires such an improvement.
    All the table binary attributes share the same .read method.
    Parameter "struct bin_attribute *" is used to get
    the table signature and instance number which are used to
    distinguish different ACPI table binary attributes.

    Without this parameter, we need to offer different .read methods
    for different ACPI table binary attributes.
    This is impossible as there are various ACPI tables on different
    platforms, and we don't know what they are until they are loaded.

    Signed-off-by: Zhang Rui
    Signed-off-by: Greg Kroah-Hartman

    Zhang Rui
     
  • sysfs is now completely out of driver/module lifetime game. After
    deletion, a sysfs node doesn't access anything outside sysfs proper,
    so there's no reason to hold onto the attribute owners. Note that
    often the wrong modules were accounted for as owners leading to
    accessing removed modules.

    This patch kills now unnecessary attribute->owner. Note that with
    this change, userland holding a sysfs node does not prevent the
    backing module from being unloaded.

    For more info regarding lifetime rule cleanup, please read the
    following message.

    http://article.gmane.org/gmane.linux.kernel/510293

    (tweaked by Greg to not delete the field just yet, to make it easier to
    merge things properly.)

    Signed-off-by: Tejun Heo
    Cc: Cornelia Huck
    Cc: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     

18 Jun, 2007

1 commit

  • Description:

    1. Implement PCI-Express error recovery function and AER
    capability, especially thanks to Yanmin Zhang's openhanded help
    about AER

    2. Implement the selection of ARCMSR_MAX_XFER_SECTORS_B=4096 if
    firmware version is latter than 1.42

    3. Add arcmsr_done4_abort_postqueue in arcmsr_iop_reset function
    to improve the stability as hot-unplug/plug

    4. Modify the ISR, arcmsr_interrupt routine, to prevent the
    inconsistency with sg_mod driver if application directly calls
    the arcmsr driver w/o passing through scsi midlayer

    Signed-off-by: Nick Cheng
    [jejb: unused variable removal]
    Signed-off-by: James Bottomley

    nickcheng(鄭守謙
     

28 May, 2007

1 commit


03 May, 2007

1 commit

  • I noticed that many source files include while they do
    not appear to need it. Here is an attempt to clean it all up.

    In order to find all possibly affected files, I searched for all
    files including but without any other occurence of "pci"
    or "PCI". I removed the include statement from all of these, then I
    compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
    false positives manually.

    My tests covered 66% of the affected files, so there could be false
    positives remaining. Untested files are:

    arch/alpha/kernel/err_common.c
    arch/alpha/kernel/err_ev6.c
    arch/alpha/kernel/err_ev7.c
    arch/ia64/sn/kernel/huberror.c
    arch/ia64/sn/kernel/xpnet.c
    arch/m68knommu/kernel/dma.c
    arch/mips/lib/iomap.c
    arch/powerpc/platforms/pseries/ras.c
    arch/ppc/8260_io/enet.c
    arch/ppc/8260_io/fcc_enet.c
    arch/ppc/8xx_io/enet.c
    arch/ppc/syslib/ppc4xx_sgdma.c
    arch/sh64/mach-cayman/iomap.c
    arch/xtensa/kernel/xtensa_ksyms.c
    arch/xtensa/platform-iss/setup.c
    drivers/i2c/busses/i2c-at91.c
    drivers/i2c/busses/i2c-mpc.c
    drivers/media/video/saa711x.c
    drivers/misc/hdpuftrs/hdpu_cpustate.c
    drivers/misc/hdpuftrs/hdpu_nexus.c
    drivers/net/au1000_eth.c
    drivers/net/fec_8xx/fec_main.c
    drivers/net/fec_8xx/fec_mii.c
    drivers/net/fs_enet/fs_enet-main.c
    drivers/net/fs_enet/mac-fcc.c
    drivers/net/fs_enet/mac-fec.c
    drivers/net/fs_enet/mac-scc.c
    drivers/net/fs_enet/mii-bitbang.c
    drivers/net/fs_enet/mii-fec.c
    drivers/net/ibm_emac/ibm_emac_core.c
    drivers/net/lasi_82596.c
    drivers/parisc/hppb.c
    drivers/sbus/sbus.c
    drivers/video/g364fb.c
    drivers/video/platinumfb.c
    drivers/video/stifb.c
    drivers/video/valkyriefb.c
    include/asm-arm/arch-ixp4xx/dma.h
    sound/oss/au1550_ac97.c

    I would welcome test reports for these files. I am fine with removing
    the untested files from the patch if the general opinion is that these
    changes aren't safe. The tested part would still be nice to have.

    Note that this patch depends on another header fixup patch I submitted
    to LKML yesterday:
    [PATCH] scatterlist.h needs types.h
    http://lkml.org/lkml/2007/3/01/141

    Signed-off-by: Jean Delvare
    Cc: Badari Pulavarty
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     

15 Feb, 2007

1 commit

  • The obsolete SA_xxx interrupt flags have been used despite the scheduled
    removal. Fixup the remaining users.

    Signed-off-by: Thomas Gleixner
    Acked-by: Ingo Molnar
    Cc: "Luck, Tony"
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Jeff Garzik
    Cc: Wim Van Sebroeck
    Cc: Roland Dreier
    Cc: Alessandro Zummo
    Cc: James Bottomley
    Cc: Greg KH
    Cc: Dave Airlie
    Cc: James Simmons
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

02 Aug, 2006

2 commits

  • The sysfs files in arcmsr are non-standard in that they aren't simple
    filename value pairs, the values actually contain preceeding text which
    would have to be parsed. The idea of sysfs files is that the file name
    is the description and the contents is a simple value.

    Fix up arcmsr to conform to this standard.

    Acked-By: Erich Chen
    Signed-off-by: James Bottomley

    James Bottomley
     
  • Remove sysfs_remove_bin_file() return-value checking from the areca driver.

    There's nothing a driver can do if sysfs file removal fails, so we'll soon be
    changing sysfs_remove_bin_file() to internally print a diagnostic and to
    return void.

    Cc: Erich Chen
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Andrew Morton
     

29 Jul, 2006

1 commit

  • arcmsr is a driver for the Areca Raid controller, a host based RAID
    subsystem that speaks SCSI at the firmware level.

    This patch is quite a clean up over the initial submission with
    contributions from:

    Randy Dunlap
    Christoph Hellwig
    Matthew Wilcox
    Adrian Bunk

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

    Erich Chen