11 Jan, 2012

2 commits

  • SCSI updates for post 3.2 merge window

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (67 commits)
    [SCSI] lpfc 8.3.28: Update driver version to 8.3.28
    [SCSI] lpfc 8.3.28: Add Loopback support for SLI4 adapters
    [SCSI] lpfc 8.3.28: Critical Miscellaneous fixes
    [SCSI] Lpfc 8.3.28: FC and SCSI Discovery Fixes
    [SCSI] lpfc 8.3.28: Add support for ABTS failure handling
    [SCSI] lpfc 8.3.28: SLI fixes and added SLI4 support
    [SCSI] lpfc 8.3.28: Miscellaneous fixes in sysfs and mgmt interfaces
    [SCSI] mpt2sas: Removed redundant calling of _scsih_probe_devices() from _scsih_probe
    [SCSI] mac_scsi: Remove obsolete IRQ_FLG_* users
    [SCSI] qla4xxx: Update driver version to 5.02.00-k10
    [SCSI] qla4xxx: check for FW alive before calling chip_reset
    [SCSI] qla4xxx: Fix qla4xxx_dump_buffer to dump buffer correctly
    [SCSI] qla4xxx: Fix the IDC locking mechanism
    [SCSI] qla4xxx: Wait for disable_acb before doing set_acb
    [SCSI] qla4xxx: Don't recover adapter if device state is FAILED
    [SCSI] qla4xxx: fix call trace on rmmod with ql4xdontresethba=1
    [SCSI] qla4xxx: Fix CPU lockups when ql4xdontresethba set
    [SCSI] qla4xxx: Perform context resets in case of context failures.
    [SCSI] iscsi class: export pid of process that created
    [SCSI] mpt2sas: Remove unused duplicate diag_buffer_enable param
    ...

    Linus Torvalds
     
  • * 'upstream-linus' of git://github.com/jgarzik/libata-dev:
    ahci: support the STA2X11 I/O Hub
    pata_bf54x: fix BMIDE status register emulation
    ata: add ata port hibernate callbacks
    ata: update ata port's runtime status during system resume
    [SCSI] runtime resume parent for child's system-resume
    ahci: platform support for suspend/resume
    libata-core: kill duplicate statement in ata_do_set_mode()
    pata_of_platform: remove direct dependency on OF_IRQ
    SATA/PATA: convert drivers/ata/* to use module_platform_driver()
    pata_cs5536: forward port changes from cs5536
    libata-sff: use ATAPI_{COD|IO}
    ata: add ata port runtime PM callbacks
    ata: add ata port system PM callbacks
    [SCSI] sd: check runtime PM status in sd_shutdown
    [SCSI] check runtime PM status in system PM
    [SCSI] add flag to skip the runtime PM calls on the host
    ata: make ata port as parent device of scsi host
    ahci: start engine only during soft/hard resets

    Linus Torvalds
     

09 Jan, 2012

7 commits

  • [Patch description from Alan Stern]

    If a child device was runtime-suspended when a system suspend began,
    then there will be nothing to prevent its parent from
    runtime-suspending as soon as it is woken up during the system resume.
    Then when the time comes to resume the child, the resume will fail
    because the parent is already back at low power.

    On the other hand, there are some devices which should remain at low
    power across an entire suspend-resume cycle. The details depend on the
    device and the platform.

    This suggests that the PM core is not the right place to solve the
    problem. One possible solution is for the subsystem or device driver
    to call pm_runtime_get_sync(dev->parent) at the start of the
    system-resume procedure and pm_runtime_put_sync(dev->parent) at the
    end.

    Acked-by: Alan Stern
    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • sd_shutdown is called during reboot/poweroff.
    It may fail if parent device, for example, ata port, was runtime suspended.

    Fix it by checking runtime PM status of sd.
    Exit immediately if sd was runtime suspended already.

    Acked-by: Alan Stern
    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • The only high-level SCSI driver that currently implements runtime PM is
    sd, and sd treats runtime suspend exactly the same as the SUSPEND and
    HIBERNATE stages of system sleep, but not the same as the FREEZE stage.

    Therefore, when entering the SUSPEND or HIBERNATE stages of system
    sleep, we can skip the callback to the driver if the device is already
    in runtime suspend. When entering the FREEZE stage, however, we should
    first issue a runtime resume. The overhead of doing this is
    negligible, because a suspended drive would be spun up during the THAW
    stage of hibernation anyway.

    Signed-off-by: Lin Ming
    Signed-off-by: Alan Stern
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • With previous change, now the ata port runtime suspend will happen as:

    disk suspend --> scsi target suspend --> scsi host suspend --> ata port
    suspend

    ata port(parent device) suspend need to schedule scsi EH which will resume
    scsi host(child device). Then the child device resume will in turn make
    parent device resume first. This is kind of recursive.

    This patch adds a new flag Scsi_Host::eh_noresume.
    ata port will set this flag to skip the runtime PM calls on scsi host.

    Acked-by: Alan Stern
    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • We leak in drivers/scsi/aacraid/commctrl.c::aac_send_raw_srb() :

    We allocate memory:

    ...
    struct user_sgmap* usg;
    usg = kmalloc(actual_fibsize - sizeof(struct aac_srb)
    + sizeof(struct sgmap), GFP_KERNEL);

    and then neglect to free it:

    ...
    for (i = 0; i < usg->count; i++) {
    u64 addr;
    void* p;
    if (usg->sg[i].count >
    ((dev->adapter_info.options &
    AAC_OPT_NEW_COMM) ?
    (dev->scsi_host_ptr->max_sectors << 9) :
    65536)) {
    rcode = -EINVAL;
    goto cleanup;
    ... this 'goto' makes 'usg' go out of scope and leak the memory we
    allocated.

    Other exits properly kfree(usg), it's just here it is neglected.

    Signed-off-by: Jesper Juhl
    Cc: James Bottomley
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     
  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

07 Jan, 2012

2 commits

  • Al Viro
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (21 commits)
    m68k/mac: Make CONFIG_HEARTBEAT unavailable on Mac
    m68k/serial: Remove references to obsolete serial config options
    m68k/net: Remove obsolete IRQ_FLG_* users
    m68k: Don't comment out syscalls used by glibc
    m68k/atari: Move declaration of atari_SCC_reset_done to header file
    m68k/serial: Remove references to obsolete CONFIG_SERIAL167
    m68k/hp300: Export hp300_ledstate
    m68k: Initconst section fixes
    m68k/mac: cleanup macro case
    mac_scsi: fix mac_scsi on some powerbooks
    m68k/mac: fix powerbook 150 adb_type
    m68k/mac: fix baboon irq disable and shutdown
    m68k/mac: oss irq fixes
    m68k/mac: fix nubus slot irq disable and shutdown
    m68k/mac: enable via_alt_mapping on performa 580
    m68k/mac: cleanup forward declarations
    m68k/mac: cleanup mac_irq_pending
    m68k/mac: cleanup mac_clear_irq
    m68k/mac: early console
    m68k/mvme16x: Add support for EARLY_PRINTK
    ...

    Fix up trivial conflict in arch/m68k/Kconfig.debug due to new
    EARLY_PRINTK config option addition clashing with movement of the
    BOOTPARAM options.

    Linus Torvalds
     

04 Jan, 2012

4 commits


02 Jan, 2012

1 commit


24 Dec, 2011

1 commit


15 Dec, 2011

23 commits

  • There's a mistake in one of the pmcraid_err() calls in
    drivers/scsi/pmcraid.c - 'failed' is misspelled as 'faile'. This patch
    fixes that error.

    PS. This patch is generated on top of my previous one "[PATCH] SCSI,
    pmcraid: Fix kmalloc() argument order in pmcraid_chr_ioctl()".

    Signed-off-by: Jesper Juhl
    Signed-off-by: Jiri Kosina

    Jesper Juhl
     
  • Use DCB notifiers to set the skb priority to allow packets
    to be steered and tagged correctly over DCB enabled drivers
    that setup traffic classes.

    This allows queue_mapping() routines to be removed in these
    drivers that were previously inspecting the ethertype of
    every skb to mark FCoE/FIP frames.

    Signed-off-by: John Fastabend
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    john fastabend
     
  • Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • - Add Basic support for SLI4 Loopback.
    (CR 124951, 125766, 124951, 125843, 125832, 125843)
    - Added missing protection in setting/clearing of phba->link_flag bit
    field (CR 125994)
    - Use link type and link number obtained from READ_CONFIG mailbox
    command. (CR 126264)

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • - Make lpfc_sli4_pci_mem_unset interface type aware (CR 124390)
    - Convert byte count to word count when calling __iowrite32_copy (CR 122550)
    - Checked the ERR1 and ERR2 registers for error attention due to SLI
    Port state affected by forced debug dump. (CR 122986, 122426, 124859)
    - Use the lpfc_readl routine instead of the readl for the port status
    register read in lpfc_handle_eratt_s4 (CR 125403)
    - Call lpfc_sli4_queue_destroy inside of lpfc_sli4_brdreset before doing
    a pci function reset (CR 125124, 125168, 125572, 125622)
    - Zero out the HBQ when it is allocated (CR 125663)
    - Alter port reset log messages to indicate error type (CR 125989)
    - Added proper NULL pointer checking to all the places that accessing
    the queue memory (CR 125832)

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • FC and SCSI Discovery Fixes:

    - Clear the virtual fabrics bit (word 1 bit 30) when sending the FLOGI
    and FDISC. (CR 124339)
    - Return a MLQUEUE_DEVICE_BUSY if the driver detects that an I/O is being
    retried too quickly (CR 124668)
    - Remove NDLP reference put in lpfc_cmpl_els_logo_acc for all but fabric
    nodes (CR 123924)
    - Only retry FDISCs every second and stop retrying after devloss number
    of retries (CR 13939)
    - Check to see if vports are unloading before adding them to the vport
    work array. (CR 124996)
    - Fixed illegal state transition during driver unload (CR 124191)
    - Added missing protection on setting/clearing of vport->fc_flag bit (CR 126002)
    - Set NPIV flag in lpfc_mbx_process_link_up for all ports sli3 and
    above. (CR 126094)
    - Clear FCP command bytes that are not used. (CR 126209)

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • Add support for ABTS failure handling:

    - Add asynchronous ABTS notification event feature to driver (CR 124578)
    - Change driver message 3092 and 3116 to KERN_WARNING (CR 124768)
    - Alter the SCR ELS command to use the temporary RPI and the
    Destination DID for SLI4-FC (CR 126070)

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • Adapter (SLI) interface fixes:

    - Modify WQ handling to use entry_repost (CR 123981)
    - Fix for ABTS. Do not free original IOCB whenever ABTS fails. (CR 115829)
    - Check board for FCoE before reading FCoE paramaters (CR124731)
    - Add support for SLI4 FC Loop mode (CR 124721)
    - Add support for resource count changes during fw reset. (CR 125888, 125675)
    - Increase CQE count from 256 to 1024. (CR 126149)

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • Miscellaneous fixes in sysfs and mgmt interfaces:

    - Added SLI4 INTF_TYPE and SLI_FAMILY as sub-field to the fwrev sysfs
    attribute (CR 124103)
    - Added a sysfs attribute "protocol" to report SLI4 port link protocol
    type (CR 124102)
    - Increment mix-and-match minor number by 1 for added "protocol" sysfs
    attribute. (124102)
    - Move the link speed check into the generic sli3/sli4 code
    path. (CR 124185, 124122)
    - Deleted check for inExtWLen (CR 122523)
    - Add the word "offline" to message 2889 (CR 124385)
    - Conditionalize the firmware upgrade/downgrade so that it is only
    attempted for SLI4 type 2 boards (CR 124406)
    - Return an error if the mbox sysfs is called. (CR 124210)
    - When port_state is less than LPFC_VPORT_READY, report
    FC_PORTSTATE_BYPASSED (CR 120018)
    - Added driver support for performing persistent linkdown based on
    configure region 23 (CR 124534)
    - Added restore state and error log when sysfs board_mode attribute
    access failed (CR 124158)
    - Added support for SLI4_CONFIG non-embedded COMN_GET_CNTL_ADDL_ATTR
    pass-through (CR 124466)
    - Rejecting un-supported multi-buffer mailbox commands (CR 124771)
    - Byte swap the extended data request and response data for extended
    mailbox data (CR 125081)

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • Removed redundant calling of _scsih_probe_devices() from _scsih_probe as
    it is getting called from _scsih_scan_finished.

    Also moved the function scsi_scan_host(shost) to get called after the
    volumes on warp drive are reported to the OS. Otherwise by the time
    the (ioc->hide_drives) flags is set, the volumes on warp drive
    are reported to the OS already.

    Also modified the initialization of reply queues only in case of driver load
    time in the function _base_make_ioc_operational().

    Signed-off-by: Nagalakshmi Nandigama
    Signed-off-by: James Bottomley

    nagalakshmi.nandigama@lsi.com
     
  • The m68k core irq code stopped honoring these flags during the irq
    restructuring in 2006.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: James Bottomley

    Geert Uytterhoeven
     
  • Signed-off-by: Vikas Chaudhary
    Signed-off-by: James Bottomley

    Vikas Chaudhary
     
  • Check for firmware alive and do premature completion of
    mbox commands in case of FW hung before doing chip_reset

    Signed-off-by: Shyam Sunder
    Reviewed-by: Mike Christie
    Signed-off-by: Nilesh Javali
    Signed-off-by: Vikas Chaudhary
    Signed-off-by: James Bottomley

    Shyam Sunder
     
  • KERN_INFO in printk adding new line character that mess-up
    dump print format. Remove KERN_INFO to fix dump format.

    Signed-off-by: Vikas Chaudhary
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Vikas Chaudhary
     
  • This ensures the transition of dev_state from COLD to
    INITIALIZING is within lock and atomic.

    Signed-off-by: Nilesh Javali
    Signed-off-by: Vikas Chaudhary
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Nilesh Javali
     
  • In function qla4xxx_iface_set_param wait for disable_acb to
    complete so that set_acb will not fail.

    Signed-off-by: Vikas Chaudhary
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Vikas Chaudhary
     
  • Multiple reset request don't get handled correctly as
    the driver tries to recover adapter which is in FAILED state.

    Signed-off-by: Sarang Radke
    Signed-off-by: Vikas Chaudhary
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Sarang Radke
     
  • abort all active commands from eh_host_reset in-case
    of ql4xdontresethba=1

    Fix following call trace:-
    Nov 21 14:50:47 172.17.140.111 qla4xxx 0000:13:00.4: qla4_8xxx_disable_msix: qla4xxx (rsp_q)
    Nov 21 14:50:47 172.17.140.111 qla4xxx 0000:13:00.4: PCI INT A disabled
    Nov 21 14:50:47 172.17.140.111 slab error in kmem_cache_destroy(): cache `qla4xxx_srbs': Can't free all objects
    Nov 21 14:50:47 172.17.140.111 Pid: 9154, comm: rmmod Tainted: G O 3.2.0-rc2+ #2
    Nov 21 14:50:47 172.17.140.111 Call Trace:
    Nov 21 14:50:47 172.17.140.111 [] ? kmem_cache_destroy+0x9a/0xb0
    Nov 21 14:50:47 172.17.140.111 [] ? sys_delete_module+0x14a/0x210
    Nov 21 14:50:47 172.17.140.111 [] ? do_munmap+0x202/0x280
    Nov 21 14:50:47 172.17.140.111 [] ? audit_syscall_entry+0x1ae/0x1d0
    Nov 21 14:50:47 172.17.140.111 [] ? sysenter_do_call+0x12/0x28
    Nov 21 14:51:50 172.17.140.111 SLAB: cache with size 64 has lost its name
    Nov 21 14:51:50 172.17.140.111 iscsi: registered transport (qla4xxx)
    Nov 21 14:51:50 172.17.140.111 qla4xxx 0000:13:00.4: PCI INT A -> GSI 28 (level, low) -> IRQ 28

    Signed-off-by: Sarang Radke
    Signed-off-by: Vikas Chaudhary
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Sarang Radke
     
  • Fix issue where CPU lockup is seen when ql4xdontresethba is set and
    driver is "stuck" in NEED_RESET state handler.

    Signed-off-by: Mike Hernandez
    Signed-off-by: Vikas Chaudhary
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Hernandez
     
  • For 4032, context reset was the same as chip reset, and any firmware
    issue was recovered by performing a chip reset.
    For 82xx, the iSCSI firmware runs along with FCoE and the NIC
    firmware contexts, and an error encountered doesnot essentially mean
    that a chip reset is necessary.

    Perform Chip resets only in the following cases:
    1. Mailbox system error.
    2. Mailbox command timeout.
    3. fw_heartbeat_counter counter stops incrementing.

    For all other cases, only perform a context reset.
    1. Command Completion with an invalid srb.
    2. Other mailbox failures.

    Signed-off-by: Vikas Chaudhary
    Signed-off-by: Shyam Sunder
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Vikas Chaudhary
     
  • There could be multiple userspace entities creating/destroying/
    recoverying sessions and also the kernel's iscsi drivers could
    be doing this too. If the userspace apps do try to manage the kernel
    ones it can get the driver/fw out of sync and cause the user to
    loose the root disk, oopses or ping ponging becasue userspace
    wants to do one thing but the kernel manager thought we
    are trying to do another.

    This patch fixes the problem by just exporting the pid of
    the entity that created the session. Userspace programs like
    iscsid, iscsiadm, iscsistart, qlogic's tools, etc, can then
    figure out which sessions they own and only manage them.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • Commit 921cd8024b90 ("[SCSI] mpt2sas: New feature - Fast Load
    Support") moved handling of the diag_buffer_enable module parameter
    from mpt2sas_base.c to mpt2sas_scsih.c, but it left an old copy of the
    parameter in mpt2sas_base.c. Remove the unused stub.

    Signed-off-by: Roland Dreier
    Acked-by: "Nandigama, Nagalakshmi"
    Signed-off-by: James Bottomley

    Roland Dreier
     
  • When computing reply_queue_count (the number of MSI-X vectors to use),
    the driver does

    ioc->reply_queue_count = min_t(u8, ioc->cpu_count,
    ioc->msix_vector_count);

    However, on a big machine, ioc->cpu_count could be outside the range
    that fits in a u8; eg a system with 256 CPUs will end up
    reply_queue_count set to 0.

    Fix this by calculating the minimum as ints and then letting the
    assignment to reply_queue_count handle integer demotion.

    Signed-off-by: Roland Dreier
    Acked-by: "Nandigama, Nagalakshmi"
    Signed-off-by: James Bottomley

    Roland Dreier