25 Feb, 2011

12 commits


19 Feb, 2011

13 commits

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

    James Smart
     
  • - Add the driver debugfs framework for supporting debugfs read and write
    operations, and iDiag command structure.
    - Add read and write to SLI4 device PCI config space registers.
    - Add the driver support of debugfs PCI config space register bits set/clear
    methods to the provided bitmask.
    - Add iDiag driver support for SLI4 device queue diagnostic.

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

    James Smart
     
  • - Make link speed not supported by port message an error message.
    - Add support for new SLI failure codes add sysfs parameter to reflect the
    security setting and current state.
    - Add all lpfc module parameters to the /sys/modules/lpfc/parameters directory.

    [jejb: fix up compile failure]
    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • FC Discovery changes

    - Treat received PLOGI while logged in as a relogin (unregister and reregister).
    - Added a timer to delay Nport discovery when clean bit is cleared and Fabric
    portname/nodename/FCID is changed.
    - Invalidate Port's DID when receiving PLOGI from p2p port with CONFIG_PORT
    mailbox command.

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

    James Smart
     
  • RRQ Implementation fixes

    - Added checks to prevent a call to findnode_did in clr_active_rrq
    - Added the del_sync_timer call for the rrq_tmr to the stop_hba_timers routine.
    - Added a check in __lpfc_set_active_rrq for the driver unloading to prevent
    adding an rrq when the driver is being removed.
    - Add code to scsi_iocb_cmpl to check for the remote stop and add the rrq.
    - Added the same check to els retry.
    - Added code to compare the source did in the els rrq to the vports did and
    chose the right exchange ID.
    - Initialize the start_cmd pointer to indicate when we have looped through
    all of the scsi buffers.
    - Remove the need for the lock around the clearing of the active bit in the
    rrq.
    - Added code to clean the els and fcp xri aborted list and remove the all of
    the RRQs for a deleted vport.

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

    James Smart
     
  • Critical Errors:
    - Correctly handle non-zero return lpfc_workq_post_event and return ENOMEM
    - Save the irq level when locking the host_lock in lpfc_findnode_did

    Bug Fixes:
    - Adjust payload_length and request_length for sli4_config mailbox commands.
    - Add the freed sgl/XRI to the tail of the list rather than to the head.
    - Set the FC_VPORT_NEEDS_INIT_VPI on vport deletes and check it before
    issuing a fdisc on an els retry.
    - Only call lpfc_hba_init_link() if phba->cfg_suppress_link_up
    is LPFC_INITIALIZE_LINK.
    - Add support for SLI-4 Performance Hints

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

    James Smart
     
  • '!' has higher precedence than '&'. CFGTBL_ChangeReq is 0x1 so the
    original code is equivelent to if (!doorbell_value) {...

    Signed-off-by: Dan Carpenter
    Acked-by: Stephen M. Cameron
    Signed-off-by: James Bottomley

    Dan Carpenter
     
  • We can get completions left over from before the attempted reset which
    will interfere with the kdump. Better to just not make the attempt in
    that case.

    Signed-off-by: Stephen M. Cameron
    Signed-off-by: James Bottomley

    Stephen M. Cameron
     
  • Controller will transfer only 32-bits on completion if it
    knows we are only using 32-bit tags. Also, some newer controllers
    apparently (and erroneously) require that we only use 32-bit tags,
    and that we inform the controller of this.

    Signed-off-by: Stephen M. Cameron
    Signed-off-by: James Bottomley

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

    Stephen M. Cameron
     
  • It's not enough to simple avoid putting the board into performant
    mode, as we have to set up the interrupts differently, etc. When
    I originally tested this module parameter, I tested it incorrectly
    without realizing it, and the driver was running in performant mode
    the whole time unbeknownst to me.

    Signed-off-by: Stephen M. Cameron
    Signed-off-by: James Bottomley

    Stephen M. Cameron
     
  • Driver's internal queues should be FIFO, not LIFO.
    This is a port of an almost identical patch from cciss by Jens Axboe.

    Signed-off-by: Stephen M. Cameron
    Signed-off-by: James Bottomley

    Stephen M. Cameron
     
  • In a multiple configuration change scenario a remove notification can be
    followed by an immediate add notification for the same device, which
    will cause the device to be removed but never added back. This patch
    fixes the problem by ensuring that in such situations the device will be
    added back.

    Signed-off-by: Kleber Sacilotto de Souza
    Acked-by: Brian King
    Signed-off-by: James Bottomley

    Kleber Sacilotto de Souza
     

14 Feb, 2011

5 commits

  • 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
     
  • Right at the moment, the libata error handler is incredibly
    monolithic. This makes it impossible to use from composite drivers
    like libsas and ipr which have to handle error themselves in the first
    instance.

    The essence of the change is to split the monolithic error handler
    into two components: one which handles a queue of ata commands for
    processing and the other which handles the back end of readying a
    port. This allows the upper error handler fine grained control in
    calling libsas functions (and making sure they only get called for ATA
    commands whose lower errors have been fixed up).

    Cc: Tejun Heo
    Cc: Jeff Garzik
    Signed-off-by: James Bottomley

    James Bottomley
     
  • The SCSI host eh_cmd_q should be protected by the host lock (not the
    port lock). This probably doesn't matter that much at the moment,
    since we try to serialise the add and eh pieces, but it might matter
    in future for more convenient error handling. Plus this switches
    libata to the standard eh pattern where you lock, remove from the cmd
    queue to a local list and unlock and then operate on the local list.

    Cc: Tejun Heo
    Cc: Jeff Garzik
    Signed-off-by: James Bottomley

    James Bottomley
     
  • For historical reasons, libsas uses the scsi host lock as the ata port
    lock, and libata always uses the ata host. For the old eh, this was
    largely irrelevant since the two locks were never mixed inside the
    code. However, the new eh has a case where it nests acquisition of
    the host lock inside the port lock (this does look rather deadlock
    prone). Obviously this would be an instant deadlock if the port lock
    were the host lock, so switch the libsas paths to use the ata host
    lock as well.

    Cc: Tejun Heo
    Cc: Jeff Garzik
    Signed-off-by: James Bottomley

    James Bottomley
     
  • The function ata_sas_port_init() has always really done its own thing.
    However, as a precursor to moving to the libata new eh, it has to be
    properly using the standard libata scan paths. This means separating
    the current libata scan paths into pieces which can be shared with
    libsas and pieces which cant (really just the async call and the host
    scan).

    Cc: Tejun Heo
    Cc: Jeff Garzik
    Signed-off-by: James Bottomley

    James Bottomley
     

13 Feb, 2011

10 commits

  • Adding MODULE_VERSION for scsi_dh_rdac. This will be helpful sometimes
    to get the code level without looking at the code.

    Signed-off-by: Babu Moger
    Signed-off-by: James Bottomley

    Moger, Babu
     
  • instead of doing sizeof(struct X) it's better to do sizeof(*v) where v
    is the variable pointing to struct X.

    Signed-off-by: Hillf Danton
    Signed-off-by: Babu Moger
    Signed-off-by: James Bottomley

    Hillf Danton
     
  • During one of our testing, we noticed that mode select command sent
    from the host did not have the lun_table updated.

    Problem is root caused to the way lun table is updated. Lun table
    update was done after the call to blk_rq_map_kern is made. This was
    causing problem because kernel uses bounce buffer(bio_copy_kern) if
    the address is not aligned. The command buffer updated after the
    call(blk_rq_map_kern) was not going on the wire. Moved the code to
    update the lun_table before the call to fix the problem.

    Signed-off-by: Babu Moger
    Signed-off-by: Somasundaram Krishnasamy
    Signed-off-by: Yanling Qi
    Signed-off-by: James Bottomley

    Moger, Babu
     
  • Bus reset is not required for SAS Controller. It is valid for mptspi
    and mptfc, but for mptsas it is not required. It is an extra work for
    Error handling escallation for mptsas. Removing bus reset from error
    handling will eventually speedup Error handling for SAS controller.

    Signed-off-by: Kashyap Desai
    Signed-off-by: James Bottomley

    Kashyap, Desai
     
  • SAS1.0 Controller was not able to detect SAS2.0 Expanders due to Link
    RATE detection was limited to 1.5 Gbps and 3.0 Gbps for SAS1
    controllers. Added detection for 6.0 Gbps link. Now, user can mix-up
    6.0 Gpbs links with SAS1.0 controller.

    e.g SAS1.0 HBA SAS2.0 Expander SAS2.0 Expander SAS1.0 Drive.

    Signed-off-by: Kashyap Desai
    Signed-off-by: James Bottomley

    Kashyap, Desai
     
  • 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
     
  • fcoe uses the system_wq to destroy ports and the work items need to be
    flushed before the driver is unloaded. As the work items free the
    containing data structure, they can't be flushed directly. The
    workqueue should be flushed instead.

    Also, the destruction works can be chained - ie. destruction of a port
    may lead to destruction of another port where the work item for the
    former queues the work for the latter. Currently, the depth of chain
    can be at most two and fcoe_exit() makes sure everything is complete
    by calling flush_scheduled_work() twice.

    With commit c8efcc25 (workqueue: allow chained queueing during
    destruction), destroy_workqueue() can take care of chained works on
    workqueue destruction. Add and use fcoe_wq instead. Simply
    destroying fcoe_wq on driver unload takes care of flushing.

    Signed-off-by: Tejun Heo
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Tejun Heo
     
  • 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
     
  • Problem:

    From initaitor machine, when queried role of target (other end of connection),
    it is "initiator", hence SCSI-ml doesn't send any LUN Inquiry commands.

    Fix:

    If there is a registered target for FC_TYPE_FCP, extend lport's params
    (capability) to be target as well, By default lport params are
    INITIATOR only. Having this fix, caused initiator to send SCSI LUN
    inquiry command to target.

    Signed-off-by: Kiran Patil
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Kiran Patil
     
  • Remove the existing sysfs entry points of the fcoe.ko module parameters that
    are used to create/destroy/enable/disable an FCoE instance, rather, use the
    newly added fcoe transport code to attach itself as an FCoE transport provider
    when fcoe.ko gets loaded. There is no functionality change on the logic of
    fcoe interacts with upper libfc and lower netdev. The fcoe transport only acts
    as thin layer to provide a unified interface for all fcoe transport providers
    so all FCoE instances on any network interfaces from all vendors can be
    managed through the same Open-FCoE.org's user space tool package, which also
    has full DCB support.

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

    Yi Zou