1. 11 9月, 2005 5 次提交
  2. 10 9月, 2005 5 次提交
    • J
    • A
      [SCSI] 3ware 9000: handle use_sg != 0 for emulated commands · d327d082
      adam radford 提交于
      The attached patch updates the driver for the 3ware 9000 series to do
      the following:
      
      - Correctly handle single sgl's with use_sg = 1.
      
      This is needed with the latest scsi-block-2.6 merge otherwise the 3w-9xxx
      driver will not work.  I tested the patch James sent a few weeks back to fix
      this, and it had a bug where the request_buffer was accessed in
      twa_scsiop_execute_scsi_complete() when it was invalid.  This is a corrected
      variation of that patch.
      Signed-off-by: NAdam Radford <linuxraid@amcc.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d327d082
    • C
      [SCSI] SAS transport class · c7ebbbce
      Christoph Hellwig 提交于
      The SAS transport class contains common code to deal with SAS HBAs, an
      aproximated representation of SAS topologies in the driver model,
      and various sysfs attributes to expose these topologies and managment
      interfaces to userspace.
      
      In addition to the basic SCSI core objects this transport class introduces
      two additional intermediate objects:  The SAS PHY as represented by struct
      sas_phy defines an "outgoing" PHY on a SAS HBA or Expander, and the SAS
      remote PHY represented by struct sas_rphy defines an "incoming" PHY on a
      SAS Expander or end device.  Note that this is purely a software concept, the
      underlying hardware for a PHY and a remote PHY is the exactly the same.
      
      There is no concept of a SAS port in this code, users can see what PHYs
      form a wide port based on the port_identifier attribute, which is the same
      for all PHYs in a port.
      
      This submission doesn't handle hot-plug addition or removal of SAS devices
      and thus doesn't do scanning in a workqueue yet, that will be added in
      phase2 after this submission.  In a third phase I will add additional
      managment infrastructure.
      
      I think this submission is ready for 2.6.14, but additional comments are
      of course very welcome.
      
      I'd like to thanks James Smart a lot for his very useful input on the
      design.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      c7ebbbce
    • D
      [SCSI] sg: do not set VM_IO flag on mmap-ed pages · 1c8e71d7
      Douglas Gilbert 提交于
      Further to the problem discussed in this post:
      http://marc.theaimsgroup.com/?l=linux-scsi&m=112540053711489&w=2
      
      It seems that the sg driver does not need to set the VM_IO flag
      on pages that it memory maps to the user space since they are
      not from the IO space. Ahmed Teirelbar <ahmed.teirelbar@adic.com>
      wants the facility and has tested this patch as I have without
      adverse effects.
      
      The oops protection is still important. Some users really did
      try and use dio transfers from the sg driver to memory mapped
      IO space (on a video capture card if my memory serves) during the
      lk 2.4 series. I'm not sure how successful it was but that will
      now be politely refused in lk 2.6.13+ .
      
      Changelog:
         - set the page flags for sg's reserved buffer mmap-ed
           to the user space to VM_RESERVED (rather than
           VM_RESERVED | VM_IO )
      Signed-off-by: NDouglas Gilbert <dougg@torque.net>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      1c8e71d7
    • J
      [SCSI] SCSI core: fix leakage of scsi_cmnd's · 788ce43a
      James Bottomley 提交于
      Actually, just one problem and one cosmetic fix:
      
      1) We need to dequeue for the loop and kill case (it seems easiest
      simply to dequeue in the scsi_kill_request() routine)
      2) There's no real need to drop the queue lock.  __scsi_done() is lock
      agnostic, so since there's no requirement, let's just leave it in to
      avoid any locking issues.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      788ce43a
  3. 09 9月, 2005 4 次提交
    • J
      [SCSI] SCSI core: fix leakage of scsi_cmnd's · e91442b6
      James Bottomley 提交于
      From: 	Alan Stern <stern@rowland.harvard.edu>
      
      This patch (as559b) adds a new routine, scsi_unprep_request, which
      gets called every place a request is requeued.  (That includes
      scsi_queue_insert as well as scsi_requeue_command.)  It also changes
      scsi_kill_requests to make it call __scsi_done with result equal to
      DID_NO_CONNECT << 16.  (I'm not sure if it's necessary to call
      scsi_init_cmd_errh here; maybe you can check on that.)  Finally, the
      patch changes the return value from scsi_end_request, to avoid
      returning a stale pointer in the case where the request was requeued.
      Fortunately the return value is used in only place, and the change
      actually simplified it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      
      Rejections fixed up and
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      e91442b6
    • N
      [SCSI] fix possible deadlock in scsi_lib.c · 286f3e13
      Neil Brown 提交于
        If a filesystem, while writing out data, decides that it is good
      to issue a cache flush on a SCSI drive (or other 'sd' device), it will
      call blkdev_issue_flush which calls ->issue_flush_fn which is
      scsi_issue_flush_fn.
      This calls sd_issue_flush which calls sd_sync_cache, which calls
      scsi_execute_request.
      This will (as sshdr != NULL) call
          kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL)
      
      If memory is tight, the presence of GFP_KERNEL may cause write
      requests to be sent to some filesystem to free up memory, however if
      that filesystem is waiting for the issue_flush_fn to complete, you
      could get a deadlock.
      
      I wonder if it might be more appropriate to use GFP_NOIO as in the
      following patch.
      
      I wonder if it might be even more appropriate to cope better with a
      kmalloc failure, especially as in this use, sd_sync_cache only will
      use the sense information to print out a more informative error
      message.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      286f3e13
    • A
      [SCSI] fix callers of scsi_remove_device() who already hold the scan muted · 903f4fed
      Alan Stern 提交于
      This patch (as544) adds a private entry point to scsi_remove_device, for
      use when callers already own the scan_mutex.  The appropriate callers are
      modified to use the new entry point.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      903f4fed
    • A
      [SCSI] add missing scan mutex to scsi_scan_target() · e517d313
      Alan Stern 提交于
      This patch (as543) adds a private entry point to scsi_scan_target, for use
      when the caller already owns the scan_mutex, and updates the kerneldoc for
      that routine (which was badly out-of-date).  It converts scsi_scan_channel
      to use the new entry point.  Lastly, it modifies scsi_get_host_dev to make
      it acquire the scan_mutex, necessary since the routine adds a new
      scsi_device even if it doesn't do any actual scanning.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      e517d313
  4. 08 9月, 2005 3 次提交
  5. 07 9月, 2005 12 次提交
    • J
      [libata sata_mv] fix build · ca20aa69
      Jeff Garzik 提交于
      This function will go away when pci_intx() finally makes it
      into the core PCI layer.
      ca20aa69
    • B
      [PATCH] libata: Marvell SATA support (PIO mode) · 20f733e7
      Brett Russ 提交于
      This is my libata compatible low level driver for the Marvell SATA
      family.  Currently it successfully runs in PIO mode on a 6081 chip.
      EDMA support is in the works and should be done shortly.  Review,
      testing (especially on other flavors of Marvell), comments welcome.
      Signed-off-by: NBrett Russ <russb@emc.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      20f733e7
    • B
      [PATCH] libata: fix pio_mask values (take 2) · 7da79312
      Brett Russ 提交于
      ata_get_mode_mask() uses bits 3 and 4 in the pio_mask to represent PIO
      modes 3 and 4.  The value read from the drive, which reports support
      for PIO3 and PIO4 in bits 0 and 1, is shifted left by 3 bits and OR'd
      with 0x7 (which then corresponds to PIO 2-0 in libata).  Thus, the
      drivers below need adjustments to comply with the way pio_mask is
      used.  I changed the masks from the commented values to all support
      PIO4-0, since the spec mandates that PIO0-2 are supported and there's
      no reason not to support PIO3 IMO.
      Signed-off-by: NBrett Russ <russb@emc.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      7da79312
    • J
      [kernel-doc] fix various DocBook build problems/warnings · 344babaa
      Jeff Garzik 提交于
      Most serious is fixing include/sound/pcm.h, which breaks the DocBook
      build.
      
      The other stuff is just filling in things that cause warnings.
      344babaa
    • J
      [SCSI] quieten messages on scsi_execute commands · 3173d8c3
      James Bottomley 提交于
      scsi_io_completion() can be a bit noisy about certain conditions.
      Previously this wasn't a problem for internally generated commands,
      since they never hit it.  However, since we do all SCSI commands via
      bios, now they do.  user CD testers like magicdev are now getting not
      ready messages every time they touch the CD to see if there's anything
      in it.
      
      Fix this by making all scsi_execute commands REQ_QUIET and making
      scsi_finish_io() not say anything for REQ_QUIET.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      3173d8c3
    • C
    • C
    • C
      [SCSI] fix SCSI_IOCTL_PROBE_HOST · 32993523
      Christoph Hellwig 提交于
      This returns always false with new-style drivers right now.  Make it
      return always true instead, as a host must be present if we are able
      to call the ioctl (without a host attached there would be no device
      node to call on..)
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      32993523
    • A
      [SCSI] Universal Xport no attach blacklist · 48690405
      Anton Blanchard 提交于
      On Fri, Dec 13, 2002 at 12:24:39AM +1100, Anton Blanchard wrote:
      
      > We tested 2.5.51 on a ppc64 box, qlogic 2312 and a fastt700 array. I
      > had CONFIG_SCSI_REPORT_LUNS and unfortunately it thought the management
      > LUN was a disk:
      >
      >   Vendor: IBM       Model: Universal Xport   Rev: 0520
      >   Type:   Direct-Access                      ANSI SCSI revision: 03
      >
      > ...
      >
      > SCSI device sdaj: drive cache: write through
      > SCSI device sdaj: 40960 512-byte hdwr sectors (21 MB)
      >  sdaj: unknown partition table
      > Attached scsi disk sdaj at scsi2, channel 0, id 0, lun 31
      >
      > ...
      >
      > end_request: I/O error, dev sdaj, sector 0
      
      Three years later...
      
      It looks like SGI use the same FC vendor and they already have a
      workaround for this issue. The following patch adds the IBM version of
      it.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      48690405
    • A
      [SCSI] sd: pause in sd_spinup_disk for slow USB devices · 4451e472
      Alan Stern 提交于
      This patch adds a delay tailored for USB flash devices that are slow to
      initialize their firmware.  The symptom is a repeated Unit Attention with
      ASC=0x28 (Not Ready to Ready transition).  The patch will wait for up to 5
      seconds for such devices to become ready.  Normal devices won't send the
      repeated Unit Attention sense key and hence won't trigger the patch.
      
      This fixes a problem with James Roberts-Thomson's USB device, and I've
      seen several reports of other devices exhibiting the same symptoms --
      presumably they will be helped as well.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      4451e472
    • A
      [SCSI] return success after retries in scsi_eh_tur · e47373ec
      Alan Stern 提交于
      The problem lies in the way the error handler uses TEST UNIT READY to
      tell whether error recovery has succeeded.  The scsi_eh_tur function
      gives up after one round of retrying; after that it decides that more
      error recovery is needed.
      
      However TUR is liable to report sense data indicating a retry is needed
      when in fact error recovery has succeeded.  A typical example might be
      SK=2, ASC=4, ASCQ=1 (Logical unit in process of becoming ready).  The mere
      fact that we were able to get a sensible reply to the TUR should indicate
      that the device is working well enough to stop error recovery.
      
      I ran across a case back in January where this happened.  A CD-ROM drive
      timed out the INQUIRY command, and a device reset fixed the blockage.
      But then the drive kept responding with 2/4/1 -- because it was spinning
      up I suppose -- until the error handler gave up and placed it offline.
      If the initial INQUIRY had received the 2/4/1 instead, everything would
      have worked okay.  It doesn't seem reasonable for things to fail just
      because the error handler had started running.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      e47373ec
    • J
      [SCSI] ibmvscsi: handle large scatter/gather lists · 4dddbc26
      James Bottomley 提交于
      The maximum size of a scatter-gather list that the current IBM VSCSI
      Client can handle is 10.  This patch adds large scatter-gather support
      to the client so that it is capable of handling up to SG_ALL(255)
      number of requests in the scatter-gather list.
      Signed-off-by: NLinda Xie <lxie@us.ibm.com>
      Acked by: Dave C Boutcher <sleddog@us.ibm.com>
      
      Rejections fixed up and
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      4dddbc26
  6. 05 9月, 2005 11 次提交