31 Mar, 2011

1 commit


24 Mar, 2011

2 commits

  • The xmit path can sleep with a page kmapped in the network
    xmit code while it waits for space to open up, so we have to use
    kmap instead of kmap atomic in that path.

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

    Mike Christie
     
  • During device discovery, scsi mid layer sends INQUIRY command to LUN
    0. If the LUN 0 is not mapped to host, it creates a temporary
    scsi_device with LUN id 0 and sends REPORT_LUNS command to it. After
    the REPORT_LUNS succeeds, it walks through the LUN table and adds each
    LUN found to sysfs. At the end of REPORT_LUNS lun table scan, it will
    delete the temporary scsi_device of LUN 0.

    When scsi devices are added to sysfs, it calls add_dev function of all
    the registered class interfaces. If ses driver has been registered,
    ses_intf_add() of ses module will be called. This function calls
    scsi_device_enclosure() to check the inquiry data for EncServ
    bit. Since inquiry was not allocated for temporary LUN 0 scsi_device,
    it will cause NULL pointer exception.

    To fix the problem, sdev->inquiry is checked for NULL before reading it.

    Signed-off-by: Somasundaram Krishnasamy
    Signed-off-by: Babu Moger
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Krishnasamy, Somasundaram
     

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
     

02 Mar, 2011

1 commit

  • The conversion is quite complex given that the libata new error
    handler has to be hooked into the current libsas timeout and error
    handling. The way this is done is to process all the failed commands
    via libsas first, but if they have no underlying sas task (and they're
    on a sata device) assume they are destined for the libata error
    handler and send them accordingly.

    Finally, activate the port recovery of the libata error handler for
    each port known to the host. This is somewhat suboptimal, since that
    port may not need recovering, but given the current architecture of
    the libata error handler, it's the only way; and the spurious
    activation is harmless.

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

    James Bottomley
     

01 Mar, 2011

2 commits


26 Feb, 2011

1 commit


25 Feb, 2011

5 commits


14 Feb, 2011

1 commit

  • The conversion is quite complex given that the libata new error
    handler has to be hooked into the current libsas timeout and error
    handling. The way this is done is to process all the failed commands
    via libsas first, but if they have no underlying sas task (and they're
    on a sata device) assume they are destined for the libata error
    handler and send them accordingly.

    Finally, activate the port recovery of the libata error handler for
    each port known to the host. This is somewhat suboptimal, since that
    port may not need recovering, but given the current architecture of
    the libata error handler, it's the only way; and the spurious
    activation is harmless.

    Signed-off-by: James Bottomley

    James Bottomley
     

13 Feb, 2011

9 commits

  • To facilitate LLDDs to reuse the code, skb queue related functions are moved to
    libfcoe, so that both fcoe and bnx2fc drivers can use them. The common structures
    fcoe_port, fcoe_percpu_s are moved to libfcoe. fcoe_port will now have an
    opaque pointer that points to corresponding driver's interface structure.
    Also, fcoe_start_io and fcoe_fc_crc are moved to libfcoe.

    As part of this change, fixed fcoe_start_io to return ENOMEM if
    skb_clone fails.

    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • This patch enables LLD to listen to rport events and perform LLD
    specific operations based on the rport event. This patch also stores
    sp_features and spp_type in rdata for further reference by LLD.

    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • add the fcoe_transport struct to the common libfcoe.h header so all fcoe
    transport provides can use it to attach itself as an fcoe transport. This
    is the header part, and the next patch will be the transport code itself.

    Signed-off-by: Yi Zou
    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Yi Zou
     
  • Target modules using lport->tt.seq_assign() get a hold on the
    exchange but have no way of releasing it. Add that.

    Signed-off-by: Joe Eykholt
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • When an SCST provider is registered, it needs to know what
    local ports are available for configuration as targets.

    Add a notifier chain that is invoked when any local port
    that is added or deleted.

    Maintain a global list of local ports and add an
    interator function that calls a given function for
    every existing local port. This is used when first
    loading a provider.

    Signed-off-by: Joe Eykholt
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • The target provider needs a per-instance lookup table
    or other way to lookup sessions quickly without going through
    a linear list or serializing too much.

    Add a simple void * array indexed by FC-4 type to the fc_lport.

    Signed-off-by: Joe Eykholt
    Committed-by: Nicholas A. Bellinger
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • Add a method for setting handler for incoming exchange.
    For multi-sequence exchanges, this allows the target driver
    to add a response handler for handling subsequent sequences,
    and exchange manager resets.

    The new function is called fc_seq_set_resp().

    Signed-off-by: Joe Eykholt
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • Allow FC-4 provider modules to hook into libfc, mostly for targets.
    This should allow any FC-4 module to handle PRLI requests and maintain
    process-association states.

    Each provider registers its ops with libfc and then will be called for
    any incoming PRLI for that FC-4 type on any instance. The provider
    can decide whether to handle that particular instance using any method
    it likes, such as ACLs or other configuration information.

    A count is kept of the number of successful PRLIs from the remote port.
    Providers are called back with an implicit PRLO when the remote port
    is about to be deleted or has been reset.

    fc_lport_recv_req() now sends incoming FC-4 requests to FC-4 providers,
    and there is a built-in provider always registered for handling
    incoming ELS requests.

    The call to provider recv() routines uses rcu_read_lock()
    so that providers aren't removed during the call. That lock is very
    cheap and shouldn't affect any performance on ELS requests.
    Providers can rely on the RCU lock to protect a session lookup as well.

    Signed-off-by: Joe Eykholt
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • Instead of just passing 'EIO' for any I/O error we should be
    notifying the upper layers with more details about the cause
    of this error.

    Update the possible I/O errors to:

    - ENOLINK: Link failure between host and target
    - EIO: Retryable I/O error
    - EREMOTEIO: Non-retryable I/O error
    - EBADE: I/O error restricted to the I_T_L nexus

    'Retryable' in this context means that an I/O error _might_ be
    restricted to the I_T_L nexus (vulgo: path), so retrying on another
    nexus / path might succeed.

    'Non-retryable' in general refers to a target failure, so this
    error will always be generated regardless of the I_T_L nexus
    it was send on.

    I/O errors restricted to the I_T_L nexus might be retried
    on another nexus / path, but they should _not_ be queued
    if no paths are available.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: Mike Snitzer
    Signed-off-by: James Bottomley

    Hannes Reinecke
     

25 Jan, 2011

2 commits


14 Jan, 2011

2 commits

  • * 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits)
    block: ensure that completion error gets properly traced
    blktrace: add missing probe argument to block_bio_complete
    block cfq: don't use atomic_t for cfq_group
    block cfq: don't use atomic_t for cfq_queue
    block: trace event block fix unassigned field
    block: add internal hd part table references
    block: fix accounting bug on cross partition merges
    kref: add kref_test_and_get
    bio-integrity: mark kintegrityd_wq highpri and CPU intensive
    block: make kblockd_workqueue smarter
    Revert "sd: implement sd_check_events()"
    block: Clean up exit_io_context() source code.
    Fix compile warnings due to missing removal of a 'ret' variable
    fs/block: type signature of major_to_index(int) to major_to_index(unsigned)
    block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p)
    cfq-iosched: don't check cfqg in choose_service_tree()
    fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors
    cdrom: export cdrom_check_events()
    sd: implement sd_check_events()
    sr: implement sr_check_events()
    ...

    Linus Torvalds
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    Documentation/trace/events.txt: Remove obsolete sched_signal_send.
    writeback: fix global_dirty_limits comment runtime -> real-time
    ppc: fix comment typo singal -> signal
    drivers: fix comment typo diable -> disable.
    m68k: fix comment typo diable -> disable.
    wireless: comment typo fix diable -> disable.
    media: comment typo fix diable -> disable.
    remove doc for obsolete dynamic-printk kernel-parameter
    remove extraneous 'is' from Documentation/iostats.txt
    Fix spelling milisec -> ms in snd_ps3 module parameter description
    Fix spelling mistakes in comments
    Revert conflicting V4L changes
    i7core_edac: fix typos in comments
    mm/rmap.c: fix comment
    sound, ca0106: Fix assignment to 'channel'.
    hrtimer: fix a typo in comment
    init/Kconfig: fix typo
    anon_inodes: fix wrong function name in comment
    fix comment typos concerning "consistent"
    poll: fix a typo in comment
    ...

    Fix up trivial conflicts in:
    - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
    - fs/ext4/ext4.h

    Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.

    Linus Torvalds
     

31 Dec, 2010

2 commits


23 Dec, 2010

1 commit


22 Dec, 2010

6 commits

  • This patch adds a handful of missing CDBs defs that are used by TCM
    persistent reservation logic in the SPC-4 defined CDB exclusion table for
    registrations and reservations.

    This includes a number of missing MI_* and MO_* prefixed service actions defs
    for MAINTENANCE_IN and MAINTENANCE_OUT that are mentioned wrt to persistent
    registration and reservation status for the SCSI Initiator Port.

    Signed-off-by: Nicholas A. Bellinger
    Signed-off-by: James Bottomley

    Nicholas Bellinger
     
  • The statistics for InputMegabytes and OutputMegabytes are
    misnamed. They're accumulating bytes, not megabytes.

    The statistic returned via /sys must be in megabytes, however,
    which is what the HBA-API wants. The FCP code needs to accumulate
    it in bytes and then divide by 1,000,000 (not 2^20) before it
    presented via sysfs.

    This affects fcoe.ko only, not fnic. The fnic driver
    correctly by accumulating bytes and then converts to megabytes.

    I checked that libhbalinux is using the /sys file directly without
    conversion.

    BTW, qla2xxx does divide by 2^20, which I'm not fixing here.

    Signed-off-by: Joe Eykholt
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • Switches using multiple-FCFs may reject FLOGI in order to
    balance the load between multiple FCFs. Even though the FCF
    was available, it may have more load at the point we actually
    send the FLOGI.

    If the FLOGI fails, select a different FCF
    if possible, among those with the same priority. If no other
    FCF is available, just deliver the reject to libfc for retry.

    Signed-off-by: Joe Eykholt
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • We can easily remove the tgt_flags from fc_fcp_pkt struct
    and use rpriv->tgt_flags directly where needed.

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

    john fastabend
     
  • The patch fixes the following situations where NOP-Out pkt is called for:
    - local unsolicited NOP-Out requests (requesting no NOP-In response)
    - local NOP-Out responses to unsolicited NOP-In requests

    kernel panic is observed due to double session spin_lock requests; one in the
    bnx2i_process_nopin_local_cmpl routine in bnx2i_hwi.c and the other in the
    iscsi_put_task routine in libiscsi.c

    The proposed fix is to export the currently static __iscsi_put_task() routine
    and have bnx2i call it directly instead of the iscsi_put_task() routine which
    holds the session spin lock.

    Signed-off-by: Eddie Wai
    Reviewed-by: Michael Chan
    Reviewed-by: Anil Veerabhadrappa
    Acked-by: Benjamin Li
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Eddie Wai
     
  • To date libsas has only looked at the attached sas address when
    determining the formation of wide ports. The specification and some
    hardware expects that phys with different addresses will not form a wide
    port unless the local peer phys also match each other. Introduce a flag
    to select stricter behavior at sas_register_ha() time. The flag can be
    dropped once it is known that all libsas users expect the same behavior.

    Current drivers just initialize this field to zero and get the
    traditional behavior.

    Reported-by: Patrick Thomson
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     

17 Dec, 2010

1 commit

  • Replace sr_media_change() with sr_check_events(). It normally only
    uses GET_EVENT_STATUS_NOTIFICATION to check both media change and
    eject request. If @clearing includes DISK_EVENT_MEDIA_CHANGE, it
    issues TUR and compares whether media presence has changed. The SCSI
    specific media change uevent is kept for compatibility.

    sr_media_change() was doing both media change check and revalidation.
    The revalidation part is split into sr_block_revalidate_disk().

    Signed-off-by: Tejun Heo
    Cc: Kay Sievers
    Signed-off-by: Jens Axboe

    Tejun Heo
     

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
     

02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

01 Nov, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (70 commits)
    [SCSI] pmcraid: add support for set timestamp command and other fixes
    [SCSI] pmcraid: remove duplicate struct member
    [SCSI] qla4xxx: Fix cmd check in qla4xxx_cmd_wait
    [SCSI] megaraid_sas: Version and documentation update
    [SCSI] megaraid_sas: Add three times Online controller reset
    [SCSI] megaraid_sas: Add input parameter for max_sectors
    [SCSI] megaraid_sas: support devices update flag
    [SCSI] libosd: write/read_sg_kern API
    [SCSI] libosd: Support for scatter gather write/read commands
    [SCSI] libosd: Free resources in reverse order of allocation
    [SCSI] libosd: Fix bug in attr_page handling
    [SCSI] lpfc 8.3.18: Update lpfc driver version to 8.3.18
    [SCSI] lpfc 8.3.18: Add new WQE support
    [SCSI] lpfc 8.3.18: Fix critical errors
    [SCSI] lpfc 8.3.18: Adapter Shutdown and Unregistration cleanup
    [SCSI] lpfc 8.3.18: Add logic to detect last devloss timeout
    [SCSI] lpfc 8.3.18: Add support of received ELS commands
    [SCSI] lpfc 8.3.18: FC/FCoE Discovery fixes
    [SCSI] ipr: add definitions for a new adapter
    [SCSI] bfa: fix comments for c files
    ...

    Linus Torvalds