summaryrefslogtreecommitdiffstats
path: root/include/linux/bsg.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2009-03-281-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (119 commits) [SCSI] scsi_dh_rdac: Retry for NOT_READY check condition [SCSI] mpt2sas: make global symbols unique [SCSI] sd: Make revalidate less chatty [SCSI] sd: Try READ CAPACITY 16 first for SBC-2 devices [SCSI] sd: Refactor sd_read_capacity() [SCSI] mpt2sas v00.100.11.15 [SCSI] mpt2sas: add MPT2SAS_MINOR(221) to miscdevice.h [SCSI] ch: Add scsi type modalias [SCSI] 3w-9xxx: add power management support [SCSI] bsg: add linux/types.h include to bsg.h [SCSI] cxgb3i: fix function descriptions [SCSI] libiscsi: fix possbile null ptr session command cleanup [SCSI] iscsi class: remove host no argument from session creation callout [SCSI] libiscsi: pass session failure a session struct [SCSI] iscsi lib: remove qdepth param from iscsi host allocation [SCSI] iscsi lib: have lib create work queue for transmitting IO [SCSI] iscsi class: fix lock dep warning on logout [SCSI] libiscsi: don't cap queue depth in iscsi modules [SCSI] iscsi_tcp: replace scsi_debug/tcp_debug logging with iscsi conn logging [SCSI] libiscsi_tcp: replace tcp_debug/scsi_debug logging with session/conn logging ...
| * [SCSI] bsg: add linux/types.h include to bsg.hDouglas Gilbert2009-03-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Since bsg.h has recently been added to the list of kernel headers that should be exported to the user space, this attachment makes bsg.h more user space "friendly". Specifically autotools dislike headers that don't compile freestanding and bsg.h's use of __u32 types (and friends) are not standard C (C90 or C99). The inclusion of linux/types.h fixes that. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | bsg: add support for tail queuingBoaz Harrosh2009-03-241-0/+8
|/ | | | | | | | | | | | | | | | | | | | | | | Currently inherited from sg.c bsg will submit asynchronous request at the head-of-the-queue, (using "at_head" set in the call to blk_execute_rq_nowait()). This is bad in situation where the queues are full, requests will execute out of order, and can cause starvation of the first submitted requests. The sg_io_v4->flags member is used and a bit is allocated to denote the Q_AT_TAIL. Zero is to queue at_head as before, to be compatible with old code at the write/read path. SG_IO code path behavior was changed so to be the same as write/read behavior. SG_IO was very rarely used and breaking compatibility with it is OK at this stage. sg_io_hdr at sg.h also has a flags member and uses 3 bits from the first nibble and one bit from the last nibble. Even though none of these bits are supported by bsg, The second nibble is allocated for use by bsg. Just in case. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> CC: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [SCSI] bsg: add release callback supportFUJITA Tomonori2008-04-221-4/+10
| | | | | | | | | | | | | | | | | | | This patch adds release callback support, which is called when a bsg device goes away. bsg_register_queue() takes a pointer to a callback function. This feature is useful for stuff like sas_host that can't use the release callback in struct device. If a caller doesn't need bsg's release callback, it can call bsg_register_queue() with NULL pointer (e.g. scsi devices can use release callback in struct device so they don't need bsg's callback). With this patch, bsg uses kref for refcounts on bsg devices instead of get/put_device in fops->open/release. bsg calls put_device and the caller's release callback (if it was registered) in kref_put's release. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* SCSI: convert struct class_device to struct deviceTony Jones2008-04-191-1/+1
| | | | | | | | | | | | | It's big, but there doesn't seem to be a way to split it up smaller... Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [SCSI] bsg: update sg_io_v4 structureFUJITA Tomonori2007-07-311-4/+9
| | | | | | | | | | | | | | | | | This updates sg_io_v4 structure (based on Doug's RFC, release 1.3). The major changes are: - add dout_resid field - increase tag size to 64 bits to comply with SAM-4 and SRP - add dout_iovec_count and din_iovec_count dout_iovec_count and din_iovec_count aren't supported now. I'm not sure whether they will be supported or not but they were added for the possible future changes. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] bsg: fix unused variable warnings for BLK_DEV_BSG=nJames Bottomley2007-07-241-2/+7
| | | | | | | | | Just using #defines for the bsg_register_queue()/bsg_unregister_queue() can cause undefined variables when they're defined to nothing. Use dummy inline functions instead. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] bsg: use lib/idr.c to find a unique minor numberFUJITA Tomonori2007-07-231-1/+0
| | | | | | | | | This replaces the current linear search for a unique minor number with lib/idr.c. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] bsg: make class backlinksJames Bottomley2007-07-211-2/+2
| | | | | | | | | | | | | Currently, bsg doesn't make class backlinks (a process whereby you'd get a link to bsg in the device directory in the same way you get one for sg). This is because the bsg device is uninitialised, so the class device has nothing it can attach to. The fix is to make the bsg device point to the cdevice of the entity creating the bsg, necessitating changing the bsg_register_queue() prototype into a form that takes the generic device. Acked-by: FUJITA Tomonori <tomof@acm.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSGGeert Uytterhoeven2007-07-171-1/+0
| | | | | | | | | | | | | | | Don't define an empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG. It's embedded in struct request_queue, but there we have #if defined(CONFIG_BLK_DEV_BSG) struct bsg_class_device bsg_dev; #endif anyway. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* bsg: add SCSI transport-level request supportFUJITA Tomonori2007-07-161-0/+6
| | | | | | | | | | | This enables bsg to handle SCSI transport-level request like SAS management protocol (SMP). - add BSG_SUB_PROTOCOL_{SCSI_CMD, SCSI_TMF, SCSI_TRANSPORT} definitions. - SCSI transport-level requests skip blk_verify_command(). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* bsg: minor bug fixesFUJITA Tomonori2007-07-161-1/+1
| | | | | | | | | | | | This fixes the following minor issues: - add EXPORT_SYMBOL_GPL for bsg_register_queue and bsg_unregister_queue. - shut up gcc warnings Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <axboe@nelson.home.kernel.dk>
* bsg: bind bsg to request_queue instead of gendiskFUJITA Tomonori2007-07-161-5/+5
| | | | | | | | | This patch binds bsg devices to request_queue instead of gendisk. Any objects (like transport entities) can define own request_handler and create own bsg device. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Replace s32, u32 and u64 with __s32, __u32 and __u64 in bsg.h for userspaceFUJITA Tomonori2007-07-161-29/+29
| | | | | Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* bsg: use u32 etc instead of uint32_tJens Axboe2007-07-161-29/+29
| | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* bsg: add sg_io_v4 structureFUJITA Tomonori2007-07-161-0/+43
| | | | | | | | | | | | | This patch adds sg_io_v4 structure that Doug proposed last month. There's one major change from the RFC. I dropped iovec, which needs compat stuff. The bsg code simply calls blk_rq_map_user against dout_xferp/din_xferp. So if possible, the page frames are directly mapped. If not possible, the block layer allocates new page frames and does memory copies. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* bsg: support for full generic block layer SG v3Jens Axboe2007-07-161-0/+21
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
OpenPOWER on IntegriCloud