1. 19 9月, 2005 3 次提交
    • J
      [SCSI] Fix thread termination for the SCSI error handle · 3ed7a470
      James Bottomley 提交于
      From: 	Alan Stern <stern@rowland.harvard.edu>
      
      This patch (as561) fixes the error handler's thread-exit code.  The
      kthread_stop call won't wake the thread from a down_interruptible, so
      the patch gets rid of the semaphore and simply does
      
              set_current_state(TASK_INTERRUPTIBLE);
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      
      Modified to simplify the termination loop and correct the sleep condition.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      3ed7a470
    • J
      [SCSI] fix oops on usb storage device disconnect · 939647ee
      James Bottomley 提交于
      We fix the oops by enforcing the host state model.  There have also
      been two extra states added: SHOST_CANCEL_RECOVERY and
      SHOST_DEL_RECOVERY so we can take the model through host removal while
      the recovery thread is active.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      939647ee
    • A
      [SCSI] SCSI scanning and removal fixes · a64358db
      Alan Stern 提交于
      This patch (as545) fixes the list traversals in __scsi_remove_target and
      scsi_forget_host.  In each case the existing code list_for_each_entry_safe
      in an _unsafe_ manner, because the list was not protected from outside
      modification while the iteration was running.
      
      The new scsi_forget_host routine takes the moderately controversial step
      of iterating over devices for removal rather than iterating over targets.
      This makes more sense to me because the current scheme treats targets as
      second-class citizens, created and removed on demand, rather than as
      objects corresponding to actual hardware.  (Also I couldn't figure out any
      safe way to iterate over the target list, since it's not so easy to tell
      when a target has already been removed.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      a64358db
  2. 18 9月, 2005 2 次提交
  3. 16 9月, 2005 2 次提交
  4. 15 9月, 2005 4 次提交
  5. 14 9月, 2005 3 次提交
  6. 13 9月, 2005 2 次提交
  7. 11 9月, 2005 8 次提交
  8. 10 9月, 2005 8 次提交
  9. 09 9月, 2005 6 次提交
    • 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
    • J
      [libata] minor fixes · 8add7885
      Jeff Garzik 提交于
      * sata_mv: remove pci_intx(), now that the same function is in PCI core
      * sata_sis: fix variable initialization bug, trim trailing whitespace
      8add7885
    • B
      [PATCH] PCI/libata INTx cleanup · a04ce0ff
      Brett M Russ 提交于
      Simple cleanup to eliminate X copies of the pci_enable_intx() function
      in libata.  Moved ahci.c's pci_intx() to pci.c and use it throughout
      libata and msi.c.
      Signed-off-by: NBrett Russ <russb@emc.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a04ce0ff
  10. 08 9月, 2005 2 次提交