30 Jul, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (28 commits)
    [SCSI] mpt fusion: Changes in mptctl.c for logging support
    [SCSI] mpt fusion: Changes in mptfc.c mptlan.c mptsas.c and mptspi.c for logging support
    [SCSI] mpt fusion: Changes in mptscsih.c for logging support
    [SCSI] mpt fusion: Changes in mptbase.c for logging support
    [SCSI] mpt fusion: logging support in Kconfig, Makefile, mptbase.h and addition of mptdebug.h
    [SCSI] libsas: Fix potential NULL dereference in sas_smp_get_phy_events()
    [SCSI] bsg: Fix build for CONFIG_BLOCK=n
    [SCSI] aacraid: fix Sunrise Lake reset handling
    [SCSI] aacraid: add SCSI SYNCHONIZE_CACHE range checking
    [SCSI] add easyRAID to the no report luns blacklist
    [SCSI] advansys: lindent and other large, uninteresting changes
    [SCSI] aic79xx, aic7xxx: Fix incorrect width setting
    [SCSI] qla2xxx: fix to honor ignored parameters in sysfs attributes
    [SCSI] aacraid: draw line in sand, sundry cleanup and version update
    [SCSI] iscsi_tcp: Turn off bounce buffers
    [SCSI] libiscsi: fix cmd seqeunce number checking
    [SCSI] iscsi_tcp, ib_iser Enable module refcounting for iscsi host template
    [SCSI] libiscsi: make sure session is not blocked when removing host
    [SCSI] libsas: Remove PCI dependencies
    [SCSI] simscsi: convert to use the data buffer accessors
    ...

    Linus Torvalds
     

27 Jul, 2007

1 commit


26 Jul, 2007

1 commit


24 Jul, 2007

1 commit

  • Some of the code has been gradually transitioned to using the proper
    struct request_queue, but there's lots left. So do a full sweet of
    the kernel and get rid of this typedef and replace its uses with
    the proper type.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

23 Jul, 2007

1 commit


21 Jul, 2007

1 commit

  • There's currently no destructor for the bsg components. If you insert
    and remove the module, you see the bsg devices building up and up. This
    patch adds the destructor in the correct place in the transport class so
    that the bsg and request queue are removed just before the device
    destruction.

    Acked-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    James Bottomley
     

20 Jul, 2007

1 commit


19 Jul, 2007

6 commits

  • This patch adds support for SAS Management Protocol (SMP) passthrough
    support via bsg. aic94xx can use this.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • The sas transport class attaches one bsg device to every SAS object
    (host, device, expander, etc). LLDs can define a function to handle
    SMP requests via sas_function_template::smp_handler.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • 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
     
  • ATA devices need special handling for sas_task_abort. If the ATA command
    came from SCSI, then we merely need to tell SCSI to abort the scsi_cmnd.
    However, internal commands require a bit more work--we need to fill the qc
    with the appropriate error status and complete the command, and eventually
    post_internal will issue the actual ABORT TASK.

    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • This is a respin of my earlier patch that migrates the ATA support code
    into a separate file. For now, the controversial linking bits have
    been removed per James Bottomley's request for a patch that contains
    only the migration diffs, which means that libsas continues to require
    libata. I intend to address that problem in a separate patch.

    This patch is against the aic94xx-sas-2.6 git tree, and it has been
    sanity tested on my x206m with Seagate SATA and SAS disks without
    uncovering any new problems.

    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
     

15 Jul, 2007

1 commit


20 Jun, 2007

1 commit

  • When reporting SCSI devices to the SCSI midlayer, use the FCP LUN as
    LUN reported to the SCSI layer. With this approach, zfcp does not have
    to create unique LUNS, and this code can be removed.

    Signed-off-by: Christof Schmitt
    Signed-off-by: Swen Schillig
    Signed-off-by: James Bottomley

    Christof Schmitt
     

03 Jun, 2007

5 commits

  • iSCSI must support software iscsi (iscsi_tcp, iser), hardware iscsi (qla4xxx),
    and partial offload (broadcom). To be able to allow each stack or driver
    or port (virtual or physical) to be able to log into the same target portal
    we use the initiator tuple [[HWADDRESS | NETDEVNAME], INITIATOR_NAME] and
    the target tuple [TARGETNAME, CONN_ADDRESS, CONN_PORT] to id a session.
    This patch adds the netdev name, which is used by software iscsi when
    it binds a session to a netdevice using the SO_BINDTODEVICE sock opt.
    It cannot use HWADDRESS because if someone did vlans then the same netdevice
    will have the same mac and the initiator,target id will not be unique.

    Signed-off-by: Mike Christie
    Cc: Roland Dreier
    Cc: David C Somayajulu
    Signed-off-by: James Bottomley

    Mike Christie
     
  • This patch exports the local address for the session. For
    qla4xxx this is the ip of the hba's port. For software
    this is the src addr of the socket.

    Signed-off-by: Mike Christie
    Cc: David C Somayajulu
    Signed-off-by: James Bottomley

    Mike Christie
     
  • Userspace will want to know what the driver/FW/HW capabilites
    when it comes to some operations like if the hardware can
    do discovery or if it can store iscsi info like what target
    was used for boot. This patch adds some new caps so userspace
    can tell if the driver supports hardware/fw based sendtargets
    discovery and if the hardware has some flash which may be
    holding or can contain some iscsi target info
    .
    Signed-off-by: Mike Christie
    Cc: David C Somayajulu
    Signed-off-by: James Bottomley

    Mike Christie
     
  • This patch allows us to set can_queue and cmds_per_lun from userspace
    when we create the session/host. From there we can set it on a per
    target basis. The patch fully converts iscsi_tcp, but only hooks
    up ib_iser for cmd_per_lun since it currently has a lots of preallocations
    based on can_queue.

    Signed-off-by: Mike Christie
    Cc: Roland Dreier
    Signed-off-by: James Bottomley

    Mike Christie
     
  • The cmdsn allocation and pdu transmit code can race, and we can end
    up sending a pdu with cmdsn 10 before a pdu with 5. The target will
    then fail the connection/session. This patch fixes the problem by
    delaying the cmdsn allocation until we are about to send the pdu.

    This also removes the xmitmutex. We were using the connection xmitmutex
    during error handling to handle races with mtask and ctask cleanup and
    completion. For ctasks we now have nice refcounting and for the mtask,
    if we hit the case where the mtask timesout and it is floating
    around somewhere in the driver, we end up dropping the session.
    And to handle session level cleanup, we use the xmit suspend bit
    along with scsi_flush_queue and the session lock to make sure
    that the xmit thread is not possibly transmitting a task while
    we are trying to kill it.

    Signed-off-by: Mike Christie
    Cc: Roland Dreier
    Signed-off-by: James Bottomley

    Mike Christie
     

02 Jun, 2007

8 commits


01 Jun, 2007

1 commit

  • Currently accessing the scsi host private data is rather messy because
    it comes as an unsigned long that always needs a cast first. This patch
    introduces a helper that does the cast called shost_priv. It's similar
    in spirit to netdev_priv for network drivers.

    This is the first patch introducing the macro, and the second patch
    in the series will convert esp and it's subdrivers as an example.
    Further conversion will wait until the helper is in the tree to make
    patch juggling easier.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: James Bottomley

    Christoph Hellwig
     

27 May, 2007

2 commits

  • This adds a set of accessors for the scsi data buffer. This is in
    preparation for chaining sg lists and bidirectional requests (and
    possibly, the mid-layer dma mapping).

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • When the vport attribute "delete" is used to delete the vport, sysfs
    deadlocks waiting for the write to complete, which is waiting for the
    sysfs teardown to complete. Moved this effort to a work_q element.

    Took the opportunity to make some other cosmetic changes:
    - removed tabs in Doc file - replaced with expanded spaces
    - minor copyright text and author text updates
    - removed a bunch of trailing whitespace

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

    James Smart
     

22 May, 2007

1 commit

  • With libata converted to use sdev->manage_start_stop for suspend and
    resume, sht->suspend/resume() has no user left and low level
    suspend/ressume should be taken care of by low level driver's
    suspend/resume callbacks (e.g. PCI or PCMCIA driver callbacks). This
    patch removes sht->suspend/resume() callbacks.

    This change is suggested by Christoph Hellwig.

    Signed-off-by: Tejun Heo
    Cc: Christoph Hellwig
    Signed-off-by: James Bottomley

    Tejun Heo
     

16 May, 2007

1 commit

  • This patch provides support for FC virtual ports based on NPIV.
    For information on the interfaces and design, please read the
    Documentation/scsi/scsi_fc_transport.txt file enclosed within
    the patch.

    The RFC was originally posted here:
    http://marc.info/?l=linux-scsi&m=117226959918393&w=2

    Changes from the initial RFC:
    - Bug fix: needed a transport_class_unregister() for the vport class
    - Create a symlink to the vport in the shost device if it is not the
    parent of the vport.
    - Made symbolic name writable so it can be set after creation
    - Made the temporary fc_vport_identifiers struct private to the
    transport.
    - Deleted the vport_id field from the vport. I couldn't find any good
    use for it (and symname is a good replacement).
    - Made the vport_state and vport_last_state "private" attributes.
    Added the fc_vport_set_state() helper function to manage state
    transitions
    - Updated vport_create() to allow a vport to be created in a disabled
    state.
    - Added INITIALIZING and FAILED vport states
    - Added VPCERR_xxx defines for errors to be returned from vport_create()
    - Created a Documentation/scsi/scsi_fc_transport.txt file that describes
    the interfaces and expected LLDD behaviors.

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

    James Smart
     

06 May, 2007

1 commit


18 Apr, 2007

1 commit

  • The following patch adds support for sysfs/uevent modalias
    attribute for scsi devices (like disks, tapes, cdroms etc),
    based on whatever current sd.c, sr.c, st.c and osst.c drivers
    supports.

    The modalias format is like this:

    scsi:type-0x04

    (for TYPE_WORM, handled by sr.c now).

    Several comments.

    o This hexadecimal type value is because all TYPE_XXX constants
    in include/scsi/scsi.h are given in hex, but __stringify() will
    not convert them to decimal (so it will NOT be scsi:type-4).
    Since it does not really matter in which format it is, while
    both modalias in module and modalias attribute match each other,
    I descided to go for that 0x%02x format (and added a comment in
    include/scsi/scsi.h to keep them that way), instead of changing
    them all to decimal.

    o There was no .uevent routine for SCSI bus. It might be a good
    idea to add some more ueven environment variables in there.

    o osst.c driver handles tapes too, like st.c, but only SOME tapes.
    With this setup, hotplug scripts (or whatever is used by the
    user) will try to load both st and osst modules for all SCSI
    tapes found, because both modules have scsi:type-0x01 alias).
    It is not harmful, but one extra module is no good either.
    It is possible to solve this, by exporting more info in
    modalias attribute, including vendor and device identification
    strings, so that modalias becomes something like
    scsi:type-0x12:vendor-Adaptec LTD:device-OnStream Tape Drive
    and having that, match for all 3 attributes, not only device
    type. But oh well, vendor and device strings may be large,
    and they do contain spaces and whatnot.
    So I left them for now, awaiting for comments first.

    Signed-off-by: Michael Tokarev
    Signed-off-by: James Bottomley

    Michael Tokarev
     

21 Mar, 2007

1 commit

  • Implement SBC START/STOP management. sdev->mange_start_stop is added.
    When it's set to one, sd STOPs the device on suspend and shutdown and
    STARTs it on resume. sdev->manage_start_stop defaults is in sdev
    instead of scsi_disk cdev to allow ->slave_config() override the
    default configuration but is exported under scsi_disk sysfs node as
    sdev->allow_restart is.

    When manage_start_stop is zero (the default value), this patch doesn't
    introduce any behavior change.

    Signed-off-by: Tejun Heo

    Rejections fixed and
    Signed-off-by: James Bottomley

    Tejun Heo
     

20 Mar, 2007

2 commits

  • It looks like megaraid_sas at least needs this to throttle its commands
    as they begin to time out. The code keeps the existing transport
    template use of eh_timed_out (and allows the transport to override the
    host if they both have this callback).

    Signed-off-by: James Bottomley

    James Bottomley
     
  • This patch updates the FC transport for all speeds identified in
    SM-HBA. Note: it does not sync the "bit" definitions, as that is
    actually insulated from user-space via the sysfs text string. (I could
    do it, but it does introduce a potential binary-incompatibility).

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

    James Smart
     

12 Mar, 2007

2 commits

  • This patch simplify the way to notify LLDs of the command completion
    and addresses the following sense buffer problems:

    - can't handle both data and sense.
    - forces user-space to use aligned sense buffer

    tgt copies sense_data from userspace to cmnd->sense_buffer (if
    necessary), maps user-space pages (if necessary) and then calls
    host->transfer_response (host->transfer_data is removed).

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

    FUJITA Tomonori
     
  • scsi tgt breaks up a command into multple scatterlists
    if we cannot fit all the data in one. This was because
    the block rq helpers did not support large requests and
    because we can get a command of any old size so it is
    hard to preallocate pages for scatterlist large enough
    (we cannot really preallocate pages with the bio map
    user path). In 2.6.20, we added large request support to
    the block layer helper, blk_rq_map_user. And at LSF,
    we talked about increasing SCSI_MAX_PHYS_SEGMENTS for
    scsi tgt if we want to support really really :) large
    (greater than 256 * PAGE_SIZE in the worst mapping case)
    requests.

    The only target currently implemented does not even support
    the multiple scatterlists stuff and only supports smaller
    requests, so this patch just coverts scsi tgt to use
    blk_rq_map_user.

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

    Mike Christie