18 Dec, 2009

2 commits

  • …/rusty/linux-2.6-for-linus

    * 'cpumask-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
    cpumask: rename tsk_cpumask to tsk_cpus_allowed
    cpumask: don't recommend set_cpus_allowed hack in Documentation/cpu-hotplug.txt
    cpumask: avoid dereferencing struct cpumask
    cpumask: convert drivers/idle/i7300_idle.c to cpumask_var_t
    cpumask: use modern cpumask style in drivers/scsi/fcoe/fcoe.c
    cpumask: avoid deprecated function in mm/slab.c
    cpumask: use cpu_online in kernel/perf_event.c

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (40 commits)
    [SCSI] 3w-9xxx fix bug in sgl loading
    [SCSI] fcoe, libfc: adds enable/disable for fcoe interface
    [SCSI] libfc: reduce hold time on SCSI host lock
    [SCSI] libfc: remote port gets stuck in restart state without really restarting
    [SCSI] pm8001: misc code cleanup
    [SCSI] pm8001: enable read HBA SAS address from VPD
    [SCSI] pm8001: do not reset local sata as it will not be found if reset
    [SCSI] pm8001: bit set pm8001_ha->flags
    [SCSI] pm8001:fix potential NULL pointer dereference
    [SCSI] pm8001: set SSC down-spreading only to get less errors on some 6G device.
    [SCSI] pm8001: fix endian issues with SAS address
    [SCSI] pm8001: enhance error handle for IO patch
    [SCSI] pm8001: Fix for sata io circular lock dependency.
    [SCSI] hpsa: add driver for HP Smart Array controllers.
    [SCSI] cxgb3i: always use negative errno in case of error
    [SCSI] bnx2i: minor code cleanup and update driver version
    [SCSI] bnx2i: Task management ABORT TASK fixes
    [SCSI] bnx2i: update CQ arming algorith for 5771x chipsets
    [SCSI] bnx2i: Adjust sq_size module parametr to power of 2 only if a non-zero value is specified
    [SCSI] bnx2i: Add 5771E device support to bnx2i driver
    ...

    Linus Torvalds
     

17 Dec, 2009

1 commit


16 Dec, 2009

2 commits

  • Recently, We marked strstrip() as must_check. because it was frequently
    misused and it should be checked. However, we found one exception.
    scsi/ipr.c intentionally ignore return value of strstrip. Because it
    wishes to keep the whitespace at the beginning.

    Thus we need to keep with and without checked whitespace trim function.
    This patch adds a new strim() and changes ipr.c to use it.

    [akpm@linux-foundation.org: coding-style fixes]
    Suggested-by: Alan Cox
    Signed-off-by: KOSAKI Motohiro
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • To avoid a collision with the newly-added kernel-wide skip_spaces().

    Signed-off-by: André Goddard Rosa
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

13 Dec, 2009

4 commits

  • This small patch fixes a bug in the 3w-9xxx driver where it would load
    an invalid sgl address in the ioctl path even if request length was zero.

    Signed-off-by: Adam Radford
    Signed-off-by: James Bottomley

    adam radford
     
  • This is to allow fcoemon util to enable or disable a fcoe interface
    according to DCB link state change.

    Adds sysfs module param enable and disable for this and also
    updates existing other module param description to be consistent
    and more accurate since older description had double "fcoe" word
    with less meaningful netdev reference to user space.

    Adds code to ignore redundant fc_lport_enter_reset handling for a
    already disabled fcoe interface by checking LPORT_ST_DISABLED
    or LPORT_ST_LOGO states, this also prevents lport state transition
    on link flap on a disabled interface.

    Above changes required lport state transition to get out of
    disabled or logo state on call to fc_fabric_login.

    Signed-off-by: Vasu Dev
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • Introduce a new lock to protect the list of fc_fcp_pkt structs in libfc
    instead of using the host lock. This reduces the contention of this heavily
    used lock, and I see up to a 25% performance gain in CPU bound small I/O
    tests when scaling out across multiple quad-core CPUs.

    The big win is in removing the host lock from the completion path
    completely, as it does not need to be held around the call to scsi_done.

    Signed-off-by: Chris Leech
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Chris Leech
     
  • We ran into a scenario where a remote port goes into RESTART state, but
    never gets added to scsi transport. The running vmcore showed the following:
    a) Port was in RESTART state
    b) rdata->event was STOP
    c) no work gets scheduled for the remote work to fc_rport_work

    After this point, shut/no-shut of the remote port did not cause the port
    to get re-discovered. The port would move betwen DELETE and RESTART states,
    but the event would always be STOP, no work would get scheduled to
    fc_rport_work and the port would not get added to scsi_transport.

    The problem is that rdata->event is not set to NONE after a port is
    restarted. After this point, no more work gets scheduled for the remote port
    since new work is scheduled only if rdata->event is non-NONE. So, the event
    and state keep changing, but fc_rport_work does not get scheduled to actually
    handle the event.

    Here's a transition of states that explains the above observation:

    ) Port is first in READY State, event is NONE

    2) RSCN on shut, port goes to DELETED, event is stop

    3) Before fc_rport_work runs, RSCN on no-shut, port goes to RESTART, event is
    still STOP

    4) fc_rport_work gets scheduled, removes the port from transport, sees state
    as RESTART, begins the PLOGI state machine, event remains as STOP (event NOT
    changed to NONE, this is the bug)

    5) Plogi state machine completes, port state goes to READY, event goes to
    READY, but no work is scheduled since event was STOP (non-NONE) before.
    Fc_rport_work is not scheduled, port remains in READY state, but is not added
    to transport.

    Things are broken at this point. Libfc rport is ready, but no transport rport
    created.

    6) now a shut causes port state to change to DELETE, event to change to STOP,
    no work gets scheduled

    7) no-shut causes port state to change to RESTART, event remains at STOP,
    no work gets scheduled

    (6) and (7) now get repeated everytime we do shut/no-shut. No way to get out
    of this state. Fcc reset does not help too.

    Only way to get out is to load/unload module.

    Fix is to set rdata->event to NONE while processing the STOP/LOGO/FAILED
    events, inside the discovery and rport locks.

    Signed-off-by: Abhijeet Joglekar
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Abhijeet Joglekar
     

11 Dec, 2009

8 commits


10 Dec, 2009

23 commits

  • This patch fix for sata IO circular lock dependency. When we call task_done
    for SATA IO, we have got pm8001_ha->lock ,and in sas_ata_task_done, it will
    get (dev->sata_dev.ap->lock. then cause circular lock dependency .So we
    should drop pm8001_ha->lock when we call task_done for SATA task.

    Signed-off-by: Jack Wang
    Signed-off-by: Lindar Liu
    Signed-off-by: James Bottomley

    jack wang
     
  • This driver supports a subset of HP Smart Array Controllers.
    It is a SCSI alternative to the cciss driver.

    [akpm@linux-foundation.org: avoid helpful cleanup patches]
    [achiang@hp.com: make device attrs static]
    [akpm@linux-foundation.org: msleep() does set_current_state() itself]
    Signed-off-by: Stephen M. Cameron
    Signed-off-by: Mike Miller
    Signed-off-by: Alex Chiang
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Stephen M. Cameron
     
  • Signed-off-by: Karen Xie
    Signed-off-by: James Bottomley

    kxie@chelsio.com
     
  • Removed duplicate function call and not-so-useful comment line

    Signed-off-by: Anil Veerabhadrappa
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Anil Veerabhadrappa
     
  • Due to typo error driver was failing TMF Abort Task request when
    ctask->sc != NULL. Fixed code to fail TMF ABORT Task request only when
    ctask->sc == NULL. Clear age component (19 most significant bits) of
    reference ITT carried in iSCSI TMF PDU. Age component is internal to
    initiator side and only lower bits of ITT as defined by ISCSI_ITT_MASK
    is is sent on wire. Retrieve LUN directly from the ref_sc and update
    SQ wqe as per chip HSI (Host Software Interface) specification

    Signed-off-by: Anil Veerabhadrappa
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Anil Veerabhadrappa
     
  • Only affects 5771x (10G chipsets) devices

    This is an optimized CQ arming algoritm which takes into account the
    number of outstanding tasks

    Signed-off-by: Anil Veerabhadrappa
    Signed-off-by: James Bottomley

    Anil Veerabhadrappa
     
  • This issue was discovered during 10G iscsi testing

    Default value of 'sq_size' module parameter is '0' which means driver
    should use predefined SQ queue size when setting up iscsi connection.

    roundup_pow_of_two(0) results in '1' and forces driver to setup
    connections with send queue size of '1' and results in lower
    performance as well

    Signed-off-by: Anil Veerabhadrappa
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Anil Veerabhadrappa
     
  • Signed-off-by: Anil Veerabhadrappa
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Anil Veerabhadrappa
     
  • After commits c82f63e411f1b58427c103bd95af2863b1c96dd1 (PCI: check saved
    state before restore) and 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff (PCI:
    Clear saved_state after the state has been restored) PCI drivers are
    prevented from restoring the device standard configuration registers
    twice in a row. These changes introduced a regression on ipr EEH
    recovery.

    The ipr device driver saves the PCI state only during the device probe
    and restores it on ipr_reset_restore_cfg_space() during IOA resets. This
    behavior is causing the EEH recovery to fail after the second error
    detected, since the registers are not being restored.

    One possible solution would be saving the registers after restoring
    them. The problem with this approach is that while recovering from an
    EEH error if pci_save_state() results in an EEH error, the adapter/slot
    will be reset, and end up back in ipr_reset_restore_cfg_space(), but it
    won't have a valid saved state to restore, so pci_restore_state() will
    fail.

    The following patch introduces a workaround for this problem, hacking
    around the PCI API by setting pdev->state_saved = true before we do the
    restore. It fixes the EEH regression and prevents that we hit another
    EEH error during EEH recovery.

    [jejb: fix is a hack ... Jesse and Rafael will fix properly]
    Signed-off-by: Kleber Sacilotto de Souza
    Acked-by: Brian King
    Cc: Jesse Barnes
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Kleber Sacilotto de Souza
     
  • If the LLD wants its own WWNN/WWPN to be used, it should implement the
    netdev_ops.ndo_fcoe_get_wwn(). If that is the case, we query the LLD and use
    the queried WWNN/WWPN from the LLD.

    Signed-off-by: Yi Zou
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Yi Zou
     
  • Signed-off-by: Giridhar Malavali
    Signed-off-by: James Bottomley

    Giridhar Malavali
     
  • Fix to accommodate a hardware bug in multiqueue mode that does not
    work properly when acknowledgement of MSIX Interrupts is disabled.

    Signed-off-by: Anirban Chakraborty
    Signed-off-by: Giridhar Malavali
    Signed-off-by: James Bottomley

    Anirban Chakraborty
     
  • Removed the module parameters ql2xqfulltracking and ql2xqfullrampup
    since the queue depth ramp up/down functionality is moved to scsi-ml.

    Signed-off-by: Giridhar Malavali
    Signed-off-by: James Bottomley

    Giridhar Malavali
     
  • Fix crash in qla2x00_fdmi_register() due to the dpc
    thread executing before the scsi host has been fully
    added.

    Unable to handle kernel NULL pointer dereference (address 00000000000001d0)
    qla2xxx_7_dpc[4140]: Oops 8813272891392 [1]

    Call Trace:
    [] show_stack+0x50/0xa0
    sp=e00000b07c59f930 bsp=e00000b07c591400
    [] show_regs+0x820/0x860
    sp=e00000b07c59fb00 bsp=e00000b07c5913a0
    [] die+0x1a0/0x2e0
    sp=e00000b07c59fb00 bsp=e00000b07c591360
    [] ia64_do_page_fault+0x8c0/0x9e0
    sp=e00000b07c59fb00 bsp=e00000b07c591310
    [] ia64_native_leave_kernel+0x0/0x270
    sp=e00000b07c59fb90 bsp=e00000b07c591310
    [] qla2x00_fdmi_register+0x850/0xbe0 [qla2xxx]
    sp=e00000b07c59fd60 bsp=e00000b07c591290
    [] qla2x00_configure_loop+0x1930/0x34c0 [qla2xxx]
    sp=e00000b07c59fd60 bsp=e00000b07c591128
    [] qla2x00_loop_resync+0x1b0/0x2e0 [qla2xxx]
    sp=e00000b07c59fdf0 bsp=e00000b07c5910c0
    [] qla2x00_do_dpc+0x9a0/0xce0 [qla2xxx]
    sp=e00000b07c59fdf0 bsp=e00000b07c590fa0
    [] kthread+0x110/0x140
    sp=e00000b07c59fe00 bsp=e00000b07c590f68
    [] kernel_thread_helper+0xd0/0x100
    sp=e00000b07c59fe30 bsp=e00000b07c590f40
    [] start_kernel_thread+0x20/0x40
    sp=e00000b07c59fe30 bsp=e00000b07c590f40

    crash> dis a000000207197350
    0xa000000207197350 : [MMI] ld1 r45=[r14];;
    crash> scsi_qla_host.host 0xe00000b058c73ff8
    host = 0xe00000b058c73be0,
    crash> Scsi_Host.shost_data 0xe00000b058c73be0
    shost_data = 0x0, <<<<<<<<<<<

    The fc_transport fc_* workqueue threads have yet to be created.

    crash> ps | grep _7
    3891 2 2 e00000b075c80000 IN 0.0 0 0 [scsi_eh_7]
    4140 2 3 e00000b07c590000 RU 0.0 0 0 [qla2xxx_7_dpc]

    The thread creating adding the Scsi_Host is blocked due to other
    activity in sysfs.

    crash> bt 3762
    PID: 3762 TASK: e00000b071e70000 CPU: 3 COMMAND: "modprobe"
    #0 [BSP:e00000b071e71548] schedule at a000000100727e00
    #1 [BSP:e00000b071e714c8] __mutex_lock_slowpath at a0000001007295a0
    #2 [BSP:e00000b071e714a8] mutex_lock at a000000100729830
    #3 [BSP:e00000b071e71478] sysfs_addrm_start at a0000001002584f0
    #4 [BSP:e00000b071e71440] create_dir at a000000100259350
    #5 [BSP:e00000b071e71410] sysfs_create_subdir at a000000100259510
    #6 [BSP:e00000b071e713b0] internal_create_group at a00000010025c880
    #7 [BSP:e00000b071e71388] sysfs_create_group at a00000010025cc50
    #8 [BSP:e00000b071e71368] dpm_sysfs_add at a000000100425050
    #9 [BSP:e00000b071e71310] device_add at a000000100417d90
    #10 [BSP:e00000b071e712d8] scsi_add_host at a00000010045a380
    #11 [BSP:e00000b071e71268] qla2x00_probe_one at a0000002071be950
    #12 [BSP:e00000b071e71248] local_pci_probe at a00000010032e490
    #13 [BSP:e00000b071e71218] pci_device_probe at a00000010032ecd0
    #14 [BSP:e00000b071e711d8] driver_probe_device at a00000010041d480
    #15 [BSP:e00000b071e711a8] __driver_attach at a00000010041d6e0
    #16 [BSP:e00000b071e71170] bus_for_each_dev at a00000010041c240
    #17 [BSP:e00000b071e71150] driver_attach at a00000010041d0a0
    #18 [BSP:e00000b071e71108] bus_add_driver at a00000010041b080
    #19 [BSP:e00000b071e710c0] driver_register at a00000010041dea0
    #20 [BSP:e00000b071e71088] __pci_register_driver at a00000010032f610
    #21 [BSP:e00000b071e71058] (unknown) at a000000207200270
    #22 [BSP:e00000b071e71018] do_one_initcall at a00000010000a9c0
    #23 [BSP:e00000b071e70f98] sys_init_module at a0000001000fef00
    #24 [BSP:e00000b071e70f98] ia64_ret_from_syscall at a00000010000c740

    So, it appears that qla2xxx dpc thread is moving forward before the
    scsi host has been completely added.

    This patch moves the setting of the init_done (and online) flag to
    after the call to scsi_add_host() to hold off the dpc thread.

    Found via large lun count testing using 2.6.31.

    Signed-off-by: Michael Reed
    Acked-by: Giridhar Malavali
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Michael Reed
     
  • So libosd has decided to sacrifice some code simplicity for the sake of
    a clean API. One of these things is the possibility for users to call
    osd_end_request, in any condition at any state. This opens up some
    problems with calling blk_put_request when out-side of the completion
    callback but calling __blk_put_request when detecting a from-completion
    state.

    The current hack was working just fine until exofs decided to operate on
    all devices in parallel and wait for the sum of the requests, before
    deallocating all osd-requests at once. There are two new possible cases
    1. All request in a group are deallocated as part of the last request's
    async-done, request_queue is locked.
    2. All request in a group where executed asynchronously, but
    de-allocation was delayed to after the async-done, in the context of
    another thread. Async execution but request_queue is not locked.

    The solution I chose was to separate the deallocation of the osd_request
    which has the information users need, from the deallocation of the
    internal(2) requests which impose the locking problem. The internal
    block-requests are freed unconditionally inside the async-done-callback,
    when we know the queue is always locked. If at osd_end_request time we
    still have a bock-request, then we know it did not come from within an
    async-done-callback and we can call the regular blk_put_request.

    The internal requests were used for carrying error information after
    execution. This information is now copied to osd_request members for
    later analysis by user code.

    The external API and behaviour was unchanged, except now it really
    supports what was previously advertised.

    Reported-by: Vineet Agarwal
    Signed-off-by: Boaz Harrosh
    Cc: Stable Tree
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • On the large servers, I/O port resource may not be assigned to all
    the PCI devices since it is limited (to 64KB on Intel Architecture[1])
    and it may also be fragmented (I/O base register of PCI-to-PCI bridge
    will usually be aligned to a 4KB boundary[2]).
    If no I/O port resource is assigned to devices, those devices do not
    work.

    [1] Some machines support 64KB I/O port space per PCI segment.
    [2] Some P2P bridges support optional 1KB aligned I/O base.

    Therefore, I made a patch for MegaRAID SAS driver to make PCI legacy
    I/O port free. I have also tested the patch and it had no problem.

    The way to make PCI legacy I/O port free is the same as Fusion-MPT
    driver's and it has been merged into 2.6.30.4.

    This has already been fixed in e1000 and lpfc.

    As a result of the above, the driver can handle its device even when
    there are a huge number of PCI devices being used on the system and no
    I/O port region assigned to the device.

    Signed-off-by: Noriyuki Fujii
    Acked-by: "Yang, Bo"
    Signed-off-by: James Bottomley

    Noriyuki Fujii
     
  • A thin provisioned device may temporarily be out of sufficient
    allocation units to fulfill a write request. In that case it will
    return a space allocation in progress error. Wait a bit and retry the
    write.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Martin K. Petersen
     
  • Implement a function for handling discard requests that sends either
    WRITE SAME(16) or UNMAP(10) depending on parameters indicated by the
    device in the block limits VPD.

    Extract unmap constraints and report them to the block layer.

    Based in part by a patch by Christoph Hellwig .

    Signed-off-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Martin K. Petersen
     
  • dio transfer always resets mdata->page_order to zero. It breaks
    high-order pages previously allocated for non-dio transfer.

    This patches adds reserved_page_order to st_buffer structure to save
    page order for non-dio transfer.

    http://bugzilla.kernel.org/show_bug.cgi?id=14563

    When enlarge_buffer() allocates 524288 from 0, st uses six-order page
    allocation. So mdata->page_order is 6 and frp_seg is 2.

    After that, if st uses dio, sgl_map_user_pages() sets
    mdata->page_order to 0 for st_do_scsi(). After that, when we call
    normalize_buffer(), it frees only free frp_seg * PAGE_SIZE (2 * 4096)
    though we should free frp_seg * PAGE_SIZE << 6 (2 * 4096 << 6). So we
    see buffer_size is set to 516096 (524288 - 8192).

    Reported-by: Joachim Breuer
    Tested-by: Joachim Breuer
    Acked-by: Kai Makisara
    Signed-off-by: FUJITA Tomonori
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • This patch allows for future addition of various async messages
    from the chip. This ensures that the driver won't hit a BUG_ON if
    the Firmware used is newer than inbox driver and so is using
    latest async messages.

    Signed-off-by: Jayamohan Kallickal
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Jayamohan Kallickal
     
  • This is support for Adaptec ASC-1045/1405 SAS/SATA HBA on mvsas, which
    is based on Marvell 88SE6440 chipset.

    Signed-off-by: Srinivas
    Cc: Andy Yan
    Signed-off-by: James Bottomley

    Srinivas
     
  • PMC-Sierra mgmt application uses SMI-S model. According to SMI-S, the
    object model exposed by the SMI-S provider should show an StoragePool
    which contains member disks of a RAID Virtual disk and StorageVolume
    based on the StoragePool. But according to SMI-S, there is a possibility
    where StoragePool is created but StorageVolume is not yet created. To
    satisfy this scenario, we are trying a hidden RAID Virtual disk. The
    hidden RAID virtual disk will not be exposed to OS. Once a StorageVolume
    is created for this RAID virtual disk it is exposed.

    Signed-off-by: Anil Ravindranath
    Signed-off-by: James Bottomley

    Anil Ravindranath
     
  • If transport_class_register fails we should unregister any
    registered classes, or we will leak memory or other
    resources.

    I did a quick modprobe of scsi_transport_fc to test the
    patch.

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

    Mike Christie