1. 20 May, 2006 24 commits
  2. 10 May, 2006 6 commits
  3. 20 Apr, 2006 1 commit
  4. 15 Apr, 2006 1 commit
  5. 14 Apr, 2006 8 commits
    • Guennadi Liakhovetski's avatar
      [SCSI] dc395x: dynamically map scatter-gather for PIO · cdb8c2a6
      Guennadi Liakhovetski authored
      The current dc395x driver uses PIO to transfer up to 4 bytes which do not
      get transferred by DMA (under unclear circumstances). For this the driver
      uses page_address() which is broken on highmem. Apart from this the
      actual calculation of the virtual address is wrong (even without highmem).
      So, e.g., for reading it reads bytes from the driver to a wrong address
      and returns wrong data, I guess, for writing it would just output random
      data to the device.
      
      The proper fix, as suggested by many, is to dynamically map data using
      kmap_atomic(page, KM_BIO_SRC_IRQ) / kunmap_atomic(virt). The reason why it
      has not been done until now, although I've done some preliminary patches
      more than a year ago was that nobody interested in fixing this problem was
      able to reliably reproduce it. Now it changed - with the help from
      Sebastian Frei (CC'ed) I was able to trigger the PIO path. Thus, I was
      also able to test and debug it.
      
      There are 4 cases when PIO is used in dc395x - data-in / -out with and
      without scatter-gather. I was able to reproduce and test only data-in with
      and without SG. So, the data-out path is still untested, but it is also
      somewhat simpler than the data-in. Fredrik Roubert (also CC'ed) also had
      PIO triggering on his system, and in his case it was data-out without SG.
      It would be great if he could test the attached patch on his system, but
      even if he cannot, I would still request to apply the patch and just wait
      if anybody cries...
      
      Implementation: I put 2 new functions in scsi_lib.c and their declarations
      in scsi_cmnd.h. I exported them without _GPL, although, I don't feel
      strongly about that - not many drivers are likely to use them. But there
      is at least one more - I want to use them in tmscsim.c. Whether these are
      the right files for the functions and their declarations - not sure
      either. Actually, they are not scsi-specific, so, might go somewhere
      around other scattergather magic? They are not platform specific either,
      and most SG functions are defined under arch/*/... As these issues were
      discussed previously there were some more routines suggested to manipulate
      scattergather buffers, I think, some of them were needed around
      crypto code... So, might be a common place reasonable, like
      lib/scattergather.c? I am open here.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      cdb8c2a6
    • FUJITA Tomonori's avatar
      [SCSI] ibmvscsi: convert kmalloc + memset to kcalloc · 4c021dd1
      FUJITA Tomonori authored
      Convert kmalloc + memset to kcalloc in ibmvscsi
      Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: default avatarDave Boutcher <sleddog@us.ibm.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      4c021dd1
    • James Bottomley's avatar
      Merge ../scsi-rc-fixes-2.6 · 84d891d6
      James Bottomley authored
      Conflicts:
      
      	include/scsi/scsi_devinfo.h
      
      Same number for two BLIST flags:  BLIST_MAX_512 and BLIST_ATTACH_PQ3
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      84d891d6
    • James Bottomley's avatar
      [SCSI] scsi_transport_sas: don't scan a non-existent end device · 7676f83a
      James Bottomley authored
      Any end device that can't support any of the scanning protocols
      shouldn't be scanned, so set its id to -1 to prevent
      scsi_scan_target() being called for it.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      7676f83a
    • Mike Christie's avatar
      [SCSI] iscsi: convert iscsi tcp to libiscsi · 5bb0b55a
      Mike Christie authored
      This just converts iscsi_tcp to the lib
      Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      5bb0b55a
    • Mike Christie's avatar
      [SCSI] iscsi: add libiscsi · 7996a778
      Mike Christie authored
      There is a lot of code duplcited between iscsi_tcp
      and the upcoming iscsi_iser driver. This patch puts
      the duplicated code in a lib. There is more code
      to move around but this takes care of the
      basics. For iscsi_offload if they use the lib we will
      probably move some things around. For example in the
      queuecommand we will not assume that the LLD wants
      to do queue_work, but it is better to handle that
      later when we know for sure what iscsi_offload looks
      like (we could probably do this for iscsi_iser though to).
      
      Ideally I would like to get the iscsi_transports modules
      to a place where all they really have to do is put data
      on the wire, but how to do that will hopefully be more clear
      when we see other modules like iscsi_offload. Or maybe
      iscsi_offload will not use the lib and it will just be
      iscsi_iser and iscsi_tcp and maybe the iscsi_tcp_tgt if that
      is allowed in mainline.
      Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      7996a778
    • Mike Christie's avatar
      [SCSI] iscsi: fix up iscsi eh · 30a6c652
      Mike Christie authored
      The current iscsi_tcp eh is not nicely setup for dm-multipath
      and performs some extra task management functions when they
      are not needed.
      
      The attached patch:
      
      - Fixes the TMF issues. If a session is rebuilt
      then we do not send aborts.
      
      - Fixes the problem where if the host reset fired, we would
      return SUCCESS even though we had not really done anything
      yet. This ends up causing problem with scsi_error.c's TUR.
      
      - If someone has turned on the userspace nop daemon code to try
      and detect network problems before the scsi command timeout
      we can now drop and clean up the session before the scsi command
      timesout and fires the eh speeding up the time it takes for a
      command to go from one patch to another. For network problems
      we fail the command with DID_BUS_BUSY so if failfast is set
      scsi_decide_disposition fails the command up to dm for it to
      try on another path.
      
      - And we had to add some basic iscsi session block code. Previously
      if we were trying to repair a session we would retrun a MLQUEUE code
      in the queuecommand. This worked but it was not the most efficient
      or pretty thing to do since it would take a while to relogin
      to the target. For iscsi_tcp/open-iscsi a lot of the iscsi error handler
      is in userspace the block code is pretty bare. We will be
      adding to that for qla4xxx.
      Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      30a6c652
    • Mike Christie's avatar
      [SCSI] iscsi: add sysfs attrs for uspace sync up · fd7255f5
      Mike Christie authored
      For iscsi boot when going from initramfs to the real root we
      need to stop the userpsace iscsi daemon. To later restart it
      iscsid needs to be able to rebuild itself and part of that
      process is matching a session running the kernel with the
      iscsid representation. To do this the attached patch
      adds several required iscsi values. If the LLD does not provide
      them becuase, login is done in userspace, then the transport
      class and userspace set ths up for the LLD.
      Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      fd7255f5