1. 10 5月, 2016 1 次提交
    • C
      target: make ->shutdown_session optional · 22d11759
      Christoph Hellwig 提交于
      Turns out the template and thus many drivers got the return value wrong:
      0 means the fabrics driver needs to put a session reference, which no
      driver except for the iSCSI target drivers did.  Fortunately none of these
      drivers supports explicit Node ACLs, so the bug was harmless.
      
      Even without that only qla2xxx and iscsi every did real work in
      shutdown_session, so get rid of the boilerplate code in all other
      drivers.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      22d11759
  2. 11 3月, 2016 3 次提交
  3. 04 3月, 2016 1 次提交
  4. 08 1月, 2016 1 次提交
  5. 21 12月, 2015 13 次提交
  6. 15 12月, 2015 1 次提交
  7. 14 10月, 2015 1 次提交
  8. 27 9月, 2015 1 次提交
    • R
      usb: gadget: legacy: tcm: eliminate abuse of ep->driver data · 5cd22f80
      Robert Baldyga 提交于
      Since ep->driver_data is not used for endpoint claiming, neither for
      enabled/disabled state storing, we can reduce number of places where
      we read or modify it's value, as now it has no particular meaning for
      function or framework logic.
      
      In case of tcm, ep->driver_data was used only for endpoint claiming so
      we can simplify code by reducing it. We also remove give_back_ep()
      function which is not needed after all - when error code is returned
      from bind() function, composite will release all endpoints anyway.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5cd22f80
  9. 16 6月, 2015 1 次提交
    • N
      target: Drop unnecessary core_tpg_register TFO parameter · bc0c94b1
      Nicholas Bellinger 提交于
      This patch drops unnecessary target_core_fabric_ops parameter usage
      for core_tpg_register() during fabric driver TFO->fabric_make_tpg()
      se_portal_group creation callback execution.
      
      Instead, use the existing se_wwn->wwn_tf->tf_ops pointer to ensure
      fabric driver is really using the same TFO provided at module_init
      time.
      
      Also go ahead and drop the forward TFO declarations tree-wide, and
      handling the special case for iscsi-target discovery TPG.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bc0c94b1
  10. 02 6月, 2015 1 次提交
    • B
      target: Minimize SCSI header #include directives · ba929992
      Bart Van Assche 提交于
      Only include SCSI initiator header files in target code that needs
      these header files, namely the SCSI pass-through code and the tcm_loop
      driver. Change SCSI_SENSE_BUFFERSIZE into TRANSPORT_SENSE_BUFFER in
      target code because the former is intended for initiator code and the
      latter for target code. With this patch the only initiator include
      directives in target code that remain are as follows:
      
      $ git grep -nHE 'include .scsi/(scsi.h|scsi_host.h|scsi_device.h|scsi_cmnd.h)' drivers/target drivers/infiniband/ulp/{isert,srpt} drivers/usb/gadget/legacy/tcm_*.[ch] drivers/{vhost,xen} include/{target,trace/events/target.h}
      drivers/target/loopback/tcm_loop.c:29:#include <scsi/scsi.h>
      drivers/target/loopback/tcm_loop.c:31:#include <scsi/scsi_host.h>
      drivers/target/loopback/tcm_loop.c:32:#include <scsi/scsi_device.h>
      drivers/target/loopback/tcm_loop.c:33:#include <scsi/scsi_cmnd.h>
      drivers/target/target_core_pscsi.c:39:#include <scsi/scsi_device.h>
      drivers/target/target_core_pscsi.c:40:#include <scsi/scsi_host.h>
      drivers/xen/xen-scsiback.c:52:#include <scsi/scsi_host.h> /* SG_ALL */
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      ba929992
  11. 31 5月, 2015 9 次提交
  12. 28 4月, 2015 1 次提交
    • A
      usb: gadget: remove incorrect __init/__exit annotations · c94e289f
      Arnd Bergmann 提交于
      A recent change introduced a link error for the composite
      printer gadget driver:
      
      `printer_unbind' referenced in section `.ref.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
      
      Evidently the unbind function should not be marked __exit here,
      because it is called through a callback pointer that is not necessarily
      discarded, __composite_unbind() is indeed called from the error path of
      composite_bind(), which can never work for a built-in driver.
      
      Looking at the surrounding code, I found the same problem in all other
      composite gadget drivers in both the bind and unbind functions, as
      well as the udc platform driver 'remove' functions. Those will break
      if anyone uses the 'unbind' sysfs attribute to detach a device from a
      built-in driver.
      
      This patch removes the incorrect annotations from all the gadget
      drivers.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c94e289f
  13. 15 4月, 2015 1 次提交
    • C
      target: simplify the target template registration API · 9ac8928e
      Christoph Hellwig 提交于
      Instead of calling target_fabric_configfs_init() +
      target_fabric_configfs_register() / target_fabric_configfs_deregister()
      target_fabric_configfs_free() from every target driver, rewrite the API
      so that we have simple register/unregister functions that operate on
      a const operations vector.
      
      This patch also fixes a memory leak in several target drivers. Several
      target drivers namely called target_fabric_configfs_deregister()
      without calling target_fabric_configfs_free().
      
      A large part of this patch is based on earlier changes from
      Bart Van Assche <bart.vanassche@sandisk.com>.
      
      (v2: Add a new TF_CIT_SETUP_DRV macro so that the core configfs code
      can declare attributes as either core only or for drivers)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9ac8928e
  14. 20 3月, 2015 1 次提交
    • B
      loop/usb/vhost-scsi/xen-scsiback: Fix use of __transport_register_session · 2f450cc1
      Bart Van Assche 提交于
      This patch changes loopback, usb-gadget, vhost-scsi and xen-scsiback
      fabric code to invoke transport_register_session() instead of the
      unprotected flavour, to ensure se_tpg->session_lock is taken when
      adding new session list nodes to se_tpg->tpg_sess_list.
      
      Note that since these four fabric drivers already hold their own
      internal TPG mutexes when accessing se_tpg->tpg_sess_list, and
      consist of a single se_session created through configfs attribute
      access, no list corruption can currently occur.
      
      So for correctness sake, go ahead and use the se_tpg->session_lock
      protected version for these four fabric drivers.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2f450cc1
  15. 04 12月, 2014 1 次提交
  16. 25 11月, 2014 1 次提交
  17. 17 7月, 2014 1 次提交
  18. 14 5月, 2014 1 次提交