27 Jul, 2008

1 commit


10 Jul, 2008

1 commit


03 May, 2008

1 commit

  • Fix following warnings:
    WARNING: vmlinux.o(.data+0x17aa88): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9410_setup()
    WARNING: vmlinux.o(.data+0x17aa98): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9410_setup()
    WARNING: vmlinux.o(.data+0x17aaa8): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9405_setup()

    asd_pcidev_data is only used by __devinit asd_pci_probe. So mark is const and
    annotate it __devinitconst to fix the warnings.

    [akpm@linux-foundation.org: fix warning]
    Signed-off-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Sam Ravnborg
     

08 Apr, 2008

2 commits


24 Feb, 2008

2 commits

  • This is a particularly nasty bug. The problem is that if any internal
    ascb times out, currently we free it even though it's pending at the
    sequencer. This results in the sequencer getting terminally confused
    and the error message:

    BUG:sequencer:dl:no ascb

    Being returned when it comes back. The way to fix this is to manage
    freeing the ascb from the tasklet completion routine, so that we only
    free it when the sequencer actually returns it. The code is also
    altered to use on stack completions and transfer variables.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • Currently aic94xx has no exported I_T_nexus_reset function. This is a
    bit of a huge problem, since sas_ata relies on this function to
    perform an ATA phy reset and also it means that if abort fails, we
    really have no bigger hammer to hit everything with.

    Plumb in the I_T_nexus_reset by quiescing the sequencer, sending the
    correct phy reset (link for ATA and hard for SAS) and then carefully
    resuming the sequencer again.

    Signed-off-by: James Bottomley

    James Bottomley
     

23 Feb, 2008

1 commit

  • The clear nexus I_T and clear nexus I_T_L functions in the aic94xx
    specify the SUSPEND_TX flag which causes the sequencer to be suspended
    until it receives a RESUME_TX. Unfortunately, nothing ever sends the
    resume, so the sequencer on the link is stopped forever, leading to
    eventual timeouts and I/O errors.

    Since clear nexus commands are only executed as part of error recovery,
    it's perfectly fine to keep the sequencer running on the link ... as
    soon as the recovery function is completed, we'll send it the commands
    to retry.

    Signed-off-by: James Bottomley

    James Bottomley
     

18 Feb, 2008

1 commit

  • This driver has been failing under heavy load with

    aic94xx: escb_tasklet_complete: REQ_TASK_ABORT, reason=0x6
    aic94xx: escb_tasklet_complete: Can't find task (tc=4) to abort!

    The second message is because the driver fails to identify the task
    it's being asked to abort. On closer inpection, there's a thinko in
    the for each task loop over pending tasks in both the REQ_TASK_ABORT
    and REQ_DEVICE_RESET cases where it doesn't look at the task on the
    pending list but at the one on the ESCB (which is always NULL).

    Fix by looking at the right task. Also add a print for the case where
    the pending SCB doesn't have a task attached.

    Not sure if this will fix all the problems, but it's a definite first
    step.

    Cc: Stable Tree
    Signed-off-by: James Bottomley

    James Bottomley
     

12 Feb, 2008

1 commit


26 Jan, 2008

1 commit


12 Jan, 2008

3 commits

  • Fix section mismatch warning:

    WARNING: vmlinux.o(.init.text+0x23be6): Section mismatch: reference to .exit.text:asd_unmap_ha (between 'asd_pci_probe' and 'qla4xxx_module_init')
    +
    WARNING: vmlinux.o(.text+0x1ec8a8): Section mismatch: reference to .exit.text:as
    d_unmap_ioport (between 'asd_unmap_ha' and 'asd_remove_dev_attrs')
    WARNING: vmlinux.o(.text+0x1ec8b1): Section mismatch: reference to .exit.text:as
    d_unmap_memio (between 'asd_unmap_ha' and 'asd_remove_dev_attrs')

    Signed-off-by: Randy Dunlap
    Signed-off-by: James Bottomley

    Randy Dunlap
     
  • sparse complains about the mixing of enums in libsas. Since the
    underlying numeric values of both enums are the same, combine them
    to get rid of the warning.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • 1. Create a file "update_bios" in sysfs to allow user to update bios
    from user space.

    2. The BIOS image file can be downloaded from web site

    "http://www.adaptec.com/en-US/downloads/bios_fw/bios_fw_ver?productId=SAS-48300&dn=Adaptec+Serial+Attached+SCSI+48300"
    and copy the BIOS image into /lib/firmware folder.

    3. The aic994xx will accept "update bios_file" and "verify bios_file"
    commands to perform update and verify BIOS image .

    For example:

    Type "echo "update asc483c01.ufi" > /sys/devices/.../update_bios"
    to update BIOS image from /lib/firmware/as483c01.ufi file into
    HBA's flash memory.

    Type "echo "verify asc483c01.ufi" > /sys/devices/.../update_bios"
    to verify BIOS image between /lib/firmware/asc48c01.ufi file
    and
    HBA's flash memory.

    4. Type "cat /sys/devices/.../update_bios" to view the status or
    result
    of updating BIOS.

    Signed-off-by: Gilbert Wu
    Signed-off-by: James Bottomley

    Gilbert Wu
     

15 Nov, 2007

1 commit

  • arm:

    drivers/scsi/aic94xx/aic94xx_sds.c:381:1: warning: "FLASH_SIZE" redefined
    In file included from include/asm/arch/irqs.h:22,
    from include/asm/irq.h:4,
    from include/asm/hardirq.h:6,
    from include/linux/hardirq.h:7,
    from include/asm-generic/local.h:5,
    from include/asm/local.h:1,
    from include/linux/module.h:19,
    from include/linux/device.h:21,
    from include/linux/pci.h:52,
    from drivers/scsi/aic94xx/aic94xx_sds.c:28:
    include/asm/arch/platform.h:444:1: warning: this is the location of the previous definition

    Cc: Gilbert Wu
    Cc: James Bottomley
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

16 Oct, 2007

1 commit


15 Oct, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (207 commits)
    [SCSI] gdth: fix CONFIG_ISA build failure
    [SCSI] esp_scsi: remove __dev{init,exit}
    [SCSI] gdth: !use_sg cleanup and use of scsi accessors
    [SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2
    [SCSI] gdth: Setup proper per-command private data
    [SCSI] gdth: Remove gdth_ctr_tab[]
    [SCSI] gdth: switch to modern scsi host registration
    [SCSI] gdth: gdth_interrupt() gdth_get_status() & gdth_wait() fixes
    [SCSI] gdth: clean up host private data
    [SCSI] gdth: Remove virt hosts
    [SCSI] gdth: Reorder scsi_host_template intitializers
    [SCSI] gdth: kill gdth_{read,write}[bwl] wrappers
    [SCSI] gdth: Remove 2.4.x support, in-kernel changelog
    [SCSI] gdth: split out pci probing
    [SCSI] gdth: split out eisa probing
    [SCSI] gdth: split out isa probing
    gdth: Make one abuse of scsi_cmnd less obvious
    [SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation
    [SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution
    [SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE
    ...

    Linus Torvalds
     

13 Oct, 2007

3 commits

  • The SSP response DPRINTK in asd_get_response_tasklet() was printing
    a hardcoded status result, rather than the status from the SSP
    response IU.

    Arguably, this should not be a DPRINTK either, since the admin might
    want to know about this.

    Signed-off-by: Jeff Garzik
    Signed-off-by: James Bottomley

    Jeff Garzik
     
  • If an error occurred during initialisation, we would sometimes fail to
    call scsi_host_put() and thus end up with a leaked scsi_host. It was
    also possible to miss calling scsi_remove_host().

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • Add new HBA PCI ID (0x416) for ASC58300 which has eight port SAS and
    SATA PCI-X 133MHz low profile host bus adapter with two mini SAS 4x
    external connectors.

    Signed-off-by: Gilbert Wu
    Signed-off-by: James Bottomley

    Gilbert Wu
     

03 Oct, 2007

1 commit


26 Jul, 2007

1 commit


23 Jul, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits)
    [SCSI] libsas: make ATA functions selectable by a config option
    [SCSI] bsg: unexport sg v3 helper functions
    [SCSI] bsg: fix bsg_unregister_queue
    [SCSI] bsg: make class backlinks
    [SCSI] 3w-9xxx: add support for 9690SA
    [SCSI] bsg: fix bsg_register_queue error path
    [SCSI] ESP: Increase ESP_BUS_TIMEOUT to 275.
    [SCSI] libsas: fix scr_read/write users and update the libata documentation
    [SCSI] mpt fusion: update Kconfig help
    [SCSI] scsi_transport_sas: add destructor for bsg
    [SCSI] iscsi_tcp: buggered kmalloc()
    [SCSI] qla2xxx: Update version number to 8.02.00-k2.
    [SCSI] qla2xxx: Add ISP25XX support.
    [SCSI] qla2xxx: Use pci_try_set_mwi().
    [SCSI] qla2xxx: Use PCI-X/PCI-Express read control interfaces.
    [SCSI] qla2xxx: Re-factor isp_operations to static structures.
    [SCSI] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
    [SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration.
    [SCSI] qla2xxx: Generalize iIDMA support.
    [SCSI] qla2xxx: Generalize FW-Interface-2 support.
    ...

    Linus Torvalds
     

20 Jul, 2007

1 commit

  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
    BUGs for both slab and slub, and slob never supported them
    either.

    This rips out support for the dtor pointer from kmem_cache_create()
    completely and fixes up every single callsite in the kernel (there were
    about 224, not including the slab allocator definitions themselves,
    or the documentation references).

    Signed-off-by: Paul Mundt

    Paul Mundt
     

19 Jul, 2007

5 commits

  • This one was noticed by Gilbert Wu of Adaptec:

    The libata core actually does the DMA mapping for you, so there has to
    be an exception in the device drivers that *don't* do dma mapping for
    ATA commands. However, since we've already done this, libsas must now
    dma map any ATA commands that it wishes to issue ... and yes, this is a
    horrible mess.

    Additionally, the test in aic94xx for ATA protocols isn't quite right.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • It turns out that libata has already dma_map_sg'd the scatterlist
    entries that go with an ata_queued_cmd by the time it calls
    sas_ata_qc_issue. sas_ata_qc_issue passes this scatterlist to aic94xx.
    Unfortunately, aic94xx assumes that any scatterlist passed to it needs
    to be pci_map_sg'd... which blows away the mapping that libata created!
    This causes (on a x260) Calgary IOMMU table leaks and duplicate frees
    when aic94xx and libata try to {pci,dma}_unmap_sg the scatterlist.

    Signed-off-by: Darrick J. Wong

    Key this check off ATA_PROTOCOL_STP

    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • We actually had two problems: the one with the tag (which is fixed by
    zeroing the tag before sending the taskfile to the sequencer) but the
    other with the fact that we sent our first NCQ command to the device
    before the sequencer had been informed of the NCQ tagging
    capabilities. I fixed the latter by moving the rphy_add() to the
    correct point in the code after the NCQ capabilities are set up.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • The aic94xx controller has a bitmask establishing which tags are ok to
    use with a SATA NCQ disk. When the queue depth is 32, however, the
    expression that is used sets the mask to zero, not 0xFFFFFFFF.
    This patch widens the width of the integer so that this case is handled
    properly.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • Hook the scsi_host_template functions in libsas to delegate
    functionality to libata when appropriate.

    Signed-off-by: Darrick J. Wong

    Misc code changes and merge fixes and update for libata->drivers/ata
    move

    Signed-off-by: James Bottomley

    Darrick J. Wong
     

12 Jul, 2007

1 commit

  • Instead of all drivers reading pci config space to get the revision
    ID, they can now use the pci_device->revision member.

    This exposes some issues where drivers where reading a word or a dword
    for the revision number, and adding useless error-handling around the
    read. Some drivers even just read it for no purpose of all.

    In devices where the revision ID is being copied over and used in what
    appears to be the equivalent of hotpath, I have left the copy code
    and the cached copy as not to influence the driver's performance.

    Compile tested with make all{yes,mod}config on x86_64 and i386.

    Signed-off-by: Auke Kok
    Acked-by: Dave Jones
    Signed-off-by: Greg Kroah-Hartman

    Auke Kok
     

23 May, 2007

1 commit

  • Every so often, the driver will call asd_clear_nexus to clean out a task.
    It is supposed to be the case that the CLEAR NEXUS does not go on the done
    list until after the task itself has been put on the done list, but for
    some reason this doesn't always happen. Thus, the
    wait_for_completion_timeout call times out, and we return success. This
    makes libsas free the task even though the task hasn't completed, leading
    to a BUG_ON message from aic94xx_hwi.c around line 341. We should return
    failure from asd_clear_nexus so that libsas tries again; at a bare minimum
    it shouldn't be freeing active tasks. I _think_ this will fix one of
    the SCB timeout crash problems (though I've not been able to reproduce
    it lately...)

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     

09 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
     

16 Feb, 2007

1 commit

  • The sequencer firmware file has both a string (currently showing
    V17/10c6) and a number (currently set to 1.1). It has become apparent
    that Adaptec may issue sequencer firmware in the future which could be
    incompatible with the current driver. Therefore, the driver will be
    tied to the particular major number of the firmware (i.e. the current
    driver will load any 1.x firmware). Additionally, the driver will print
    out both the ascii string and the major number, so with this pach the
    current firmware will print out

    aic94xx: Found sequencer firmware version 1.1 (V17/10c6)

    Signed-off-by: James Bottomley

    James Bottomley
     

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
     

12 Feb, 2007

2 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (97 commits)
    [SCSI] zfcp: removed wrong comment
    [SCSI] zfcp: use of uninitialized variable
    [SCSI] zfcp: Invalid locking order
    [SCSI] aic79xx: use dma_get_required_mask()
    [SCSI] aic79xx: fix bracket mismatch in unused macro
    [SCSI] BusLogic: Replace 'boolean' by 'bool'
    [SCSI] advansys: clean up warnings
    [SCSI] 53c7xx: brackets fix in uncompiled code
    [SCSI] nsp_cs: remove old scsi code
    [SCSI] aic79xx: make ahd_match_scb() static
    [SCSI] DAC960: kmalloc->kzalloc/Casting cleanups
    [SCSI] scsi_kmap_atomic_sg(): check that local irqs are disabled
    [SCSI] Buslogic: local_irq_disable() is redundant after local_irq_save()
    [SCSI] aic94xx: update for v28 firmware
    [SCSI] scsi_error: Fix lost EH commands
    [SCSI] aic94xx: Add default bus reset handler
    [SCSI] aic94xx: Remove TMF result code munging
    [SCSI] libsas: Add an LU reset mechanism to the error handler
    [SCSI] libsas: Don't BUG when connecting two expanders via wide port
    [SCSI] st: fix Tape dies if wrong block size used, bug 7919
    ...

    Linus Torvalds
     
  • Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
    corresponding "kmem_cache_zalloc()" call.

    Signed-off-by: Robert P. J. Day
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Roland McGrath
    Cc: James Bottomley
    Cc: Greg KH
    Acked-by: Joel Becker
    Cc: Steven Whitehouse
    Cc: Jan Kara
    Cc: Michael Halcrow
    Cc: "David S. Miller"
    Cc: Stephen Smalley
    Cc: James Morris
    Cc: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

04 Feb, 2007

1 commit

  • These changes work compatibly with the old V17 firmware

    Contribution:

    Ed Chim
    Gilbert Wu

    Change Log:

    1. Use dword instead of qword to display the value of Connection
    State register for debug purpose.

    2. There are some registers location of AIC94xx chip has been changed
    according to the new V28 firmware. The patch has redefined the register
    location and provided initialization.

    3. The new sequencer firmware v28 for Aic94xx SAS/SATA Linux open
    source device driver can be downloaded from
    http://www.adaptec.com/NR/exeres/35B611BC-9789-4B5B-82C6-85A2CCA8A46A.htm

    Signed-off-by: Gilbert Wu
    Signed-off-by: James Bottomley

    Wu, Gilbert
     

03 Feb, 2007

2 commits

  • Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • In asd_initiate_ssp_tmf, the TMF result code is replaced with
    TMF_RESP_FUNC_FAILED except when the TMF returns a result code immediately.
    However, TMFs can return result codes via an ESCB... yet these codes are
    also replaced with "FAILED". The only values that can fall into that case
    are TMF_* codes anyway, so get rid of this code where COMPLETE and SUCCESS
    are turned into FAILED. This also lets us propagate those TMF_* codes up
    to the caller.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong