1. 21 5月, 2008 1 次提交
    • G
      SCSI: fix race in device_create · 24b42566
      Greg Kroah-Hartman 提交于
      There is a race from when a device is created with device_create() and
      then the drvdata is set with a call to dev_set_drvdata() in which a
      sysfs file could be open, yet the drvdata will be NULL, causing all
      sorts of bad things to happen.
      
      This patch fixes the problem by using the new function,
      device_create_drvdata().  It fixes the problem in all of the scsi
      drivers that need it.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Doug Gilbert <dgilbert@interlog.com>
      Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      24b42566
  2. 29 4月, 2008 1 次提交
  3. 20 4月, 2008 1 次提交
  4. 08 2月, 2008 1 次提交
  5. 28 1月, 2008 1 次提交
  6. 24 1月, 2008 4 次提交
  7. 29 10月, 2007 1 次提交
  8. 24 10月, 2007 1 次提交
  9. 23 10月, 2007 1 次提交
  10. 16 10月, 2007 1 次提交
  11. 13 10月, 2007 2 次提交
  12. 28 5月, 2007 1 次提交
  13. 09 5月, 2007 1 次提交
  14. 18 4月, 2007 1 次提交
    • A
      [SCSI] sg: cap reserved_size values at max_sectors · 44ec9542
      Alan Stern 提交于
      This patch (as857) modifies the SG_GET_RESERVED_SIZE and
      SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at
      the device's request_queue's max_sectors value.  This will permit
      cdrecord to obtain a legal value for the maximum transfer length,
      fixing Bugzilla #7026.
      
      The patch also caps the initial reserved_size value.  There's no
      reason to have a reserved buffer larger than max_sectors, since it
      would be impossible to use the extra space.
      
      The corresponding ioctls in the block layer are modified similarly,
      and the initial value for the reserved_size is set as large as
      possible.  This will effectively make it default to max_sectors.
      Note that the actual value is meaningless anyway, since block devices
      don't have a reserved buffer.
      
      Finally, the BLKSECTGET ioctl is added to sg, so that there will be a
      uniform way for users to determine the actual max_sectors value for
      any raw SCSI transport.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NJens Axboe <jens.axboe@oracle.com>
      Acked-by: NDouglas Gilbert <dougg@torque.net>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      44ec9542
  15. 09 11月, 2006 1 次提交
  16. 27 9月, 2006 1 次提交
    • D
      [SCSI] sg: fixes for large page_size · 6460e75a
      Douglas Gilbert 提交于
      This sg driver patch addresses the problem with larger
      page sizes reported by Brian King in this post:
      http://marc.theaimsgroup.com/?l=linux-scsi&m=115867718623631&w=2
      Some other related matters are also addressed. Some of these
      prevent oopses when the SG_SCATTER_SZ or scatter_elem_sz are
      set to inappropriate values.
      
      The scatter_elem_sz has been tested up to 4 MB which should
      make the largest data transfer with one SCSI command, 32 MB
      less one block, achievable with a relatively small number
      of elements in the scatter gather list.
      
      ChangeLog:
          - add scatter_elem_sz boot time parameter and sysfs module
            parameter that is initialized to SG_SCATTER_SZ
          - the driver will then adjust scatter_elem_sz to be the
            max(given(scatter_elem_sz), PAGE_SIZE)
            It will also round it up, if necessary, to be a power
            of two
          - clean up sg.h header, correct bad urls and some statements
            that are no longer valid
          - make the def_reserved_size sysfs module attribute writable
      Signed-off-by: NDouglas Gilbert <dougg@torque.net>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6460e75a
  17. 26 8月, 2006 1 次提交
  18. 01 7月, 2006 2 次提交
  19. 10 6月, 2006 1 次提交
  20. 13 4月, 2006 3 次提交
  21. 22 3月, 2006 1 次提交
    • N
      [PATCH] sg: use compound pages · f9aed0e2
      Nick Piggin 提交于
      sg increments the refcount of constituent pages in its higher order memory
      allocations when they are about to be mapped by userspace.  This is done so
      the subsequent get_page/put_page when doing the mapping and unmapping does not
      free the page.
      
      Move over to the preferred way, that is, using compound pages instead.  This
      fixes a whole class of possible obscure bugs where a get_user_pages on a
      constituent page may outlast the user mappings or even the driver.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Douglas Gilbert <dougg@torque.net>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f9aed0e2
  22. 12 3月, 2006 1 次提交
  23. 28 2月, 2006 3 次提交
  24. 08 2月, 2006 1 次提交
  25. 27 1月, 2006 1 次提交
    • B
      [SCSI] Prevent scsi_execute_async from guessing cdb length · bb1d1073
      brking@us.ibm.com 提交于
      When the scsi_execute_async interface was added it ended up reducing
      the flexibility of userspace to send arbitrary scsi commands through
      sg using SG_IO. The SG_IO interface allows userspace to specify the
      CDB length. This is now ignored in scsi_execute_async and it is
      guessed using the COMMAND_SIZE macro, which is not always correct,
      particularly for vendor specific commands. This patch adds a cmd_len
      parameter to the scsi_execute_async interface to allow the caller
      to specify the length of the CDB.
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      bb1d1073
  26. 10 1月, 2006 1 次提交
  27. 15 12月, 2005 1 次提交
    • M
      [SCSI] convert sg to scsi_execute_async · d6b10348
      Mike Christie 提交于
      Convert sg to always send scatterlists, and kill scsi_request usage.
      
      TODO:
      
      - move DIO code to common place or make block layers usable for ULDs.
      - move buffer allocation code to common place for all ULDs to use. And
      make buffer allocation code obey all queue limits so we can find
      out about problems before calling scsi_execute_async. Currently, sg.c
      could allocate a buffer that is too large, and send the request
      to scsi_execute_async. scsi_execute_async will then check it against
      all the queue limits and return a failure in this case. It would nicer
      to know about the queue limit violation right away.
      - move indirect (copy_to/from_user) paths commone place or make block
      layers usable for ULDs.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d6b10348
  28. 03 12月, 2005 2 次提交
  29. 09 11月, 2005 1 次提交
    • O
      [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason · 733482e4
      Olaf Hering 提交于
      This patch removes almost all inclusions of linux/version.h.  The 3
      #defines are unused in most of the touched files.
      
      A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
      unfortunatly in linux/version.h.
      
      There are also lots of #ifdef for long obsolete kernels, this was not
      touched.  In a few places, the linux/version.h include was move to where
      the LINUX_VERSION_CODE was used.
      
      quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`
      
      search pattern:
      /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h
      Signed-off-by: NOlaf Hering <olh@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      733482e4
  30. 07 11月, 2005 1 次提交