1. 10 May, 2006 1 commit
    • mdr@sgi.com's avatar
      [SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc · 6dd727da
      mdr@sgi.com authored
      A race condition exists in mptfc between the thread registering a device
      with the fc transport and the scan work generated by the transport.
      This race existed prior to the application of the mptfc bug fix patch.
      
      mptfc_register_dev() calls fc_remote_port_add() with the FC_RPORT_ROLE_TARGET
      bit set in the rport ids passed to the function.  Having this bit set causes
      fc_remote_port_add() to schedule a scan of the device.
      
      This scan can execute before mptfc_register_dev() can fill in the dd_data
      in the rport structure.  When this happens, mptfc_target_alloc() will fail
      because dd_data is null.
      
      Attached is a patch which fixes the problem.  The patch changes the rport ids
      passed to fc_remote_port_add() to not have the TARGET bit set.  This prevents
      the scan from being scheduled.  After mptfc_register_dev() fills in the rport
      dd_data field, fc_remote_port_rolechg() is called, changing the role of the
      rport to TARGET.  Thus, the scan is scheduled after dd_data is filled
      in which prevents the failure in mptfc_target_alloc().
      Signed-off-by: default avatarMichael Reed <mdr@sgi.com>
      Signed-off-by: default avatarEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      6dd727da
  2. 03 May, 2006 2 commits
  3. 28 Apr, 2006 2 commits
  4. 27 Apr, 2006 5 commits
  5. 25 Apr, 2006 3 commits
    • Jesper Juhl's avatar
      [SCSI] SCSI: aic7xxx_osm_pci resource leak fix. · 4a6fae1d
      Jesper Juhl authored
      Fix resource leak in
      drivers/scsi/aic7xxx/aic7xxx_osm_pci.c::ahc_linux_pci_dev_probe()
      
      Found by the coverity checker (#668)
      Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      4a6fae1d
    • Moore, Eric's avatar
      [SCSI] - fusion - mptfc bug fix's to prevent deadlock situations · 65207fed
      Moore, Eric authored
      mptbase.h
      
      	bump version number to 3.03.09
      
      	remove unneeded flags
      	define workq and remove old fc specific locks
      
      mptbase.c
      
      	initialize new lock and don't initialize two removed locks
      
      mptscsih.c
      
      	when firmware reports target is no longer there, return
              DID_REQUEUE for fc hosts so that i/o doesn't get killed until
              the transport has an opportunity to manage the loss via its
              dev loss timer
      
      	when the "eh_abort" routine is called, check to see if the
              driver has the command or not before looking to see if a reset
              is pending.  James Smart and I talked about this and believe
              that the API for this routine is: if driver doesn't have
              command, return SUCCESS.  This change helps prevent a target
              from being taken offline.  SUCCESS is returned because it's
              likely that the command completed after error recovery timed
              it out but before it could be aborted.
      
      	provide a routine to queue work to newly created workq, and
              use it.
      
      	remove "ioc" from mptscsih_abort() it was only used one time.
      	the other references were via hd->ioc, so I just moved it....
      	net change in references to ioc via hd->ioc is zero
      
      	move hd->resetPending test and hd->timeouts increment to after
      	the test for whether the command to be aborted remains known
      	to the driver
      
      	Make certain that the workq exists before queuing work to it.
      
      mptfc.c
      
      	no longer need to lock rport data structures as I was able to
      	single thread the code!  I fixed up the debug code to
      	eliminate compilation messages due to type mismatch in the
      	printk.  Got rid of some no longer needed rport flags.
      	Initialize and destroy the workq used for the rescan work.
      
      	simplify the logic regarding the increment of
              fc_rescan_work_count.  use post increment and test for zero
              vs. pre increment and test for one; eliminate work_count
              variable: queue_work can be called with the work_lock held as
              it doesn't sleep
      Signed-off-by: default avatarMichael Reed <mdr@sgi.com>
      Signed-off-by: default avatarEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      65207fed
    • Moore, Eric's avatar
      [SCSI] mptfusion: bug fix's for raid components adding/deleting · bd23e94c
      Moore, Eric authored
      This patch handles case where raid hidden components
      are not being removed when power turned off to device
      attached to expander, as well as the case of
      exposing raid components when power is turned back on
      to devices attached to an expander.  (This is a repost
      of this patch, with  mptsas_is_end_device declared
      further up in the code.)
      
      This patch contains some other miscellaneous bug fix's.
      Signed-off-by: default avatarEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      bd23e94c
  6. 20 Apr, 2006 12 commits
  7. 19 Apr, 2006 15 commits