diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2007-02-13 09:21:52 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-02-16 10:40:56 -0500 |
commit | 930e99bd1320d78c7d8866595e81b8fc7dc8739b (patch) | |
tree | e079f35c0aa2b58cf41675c66b7cfa96e6b068f6 /include/scsi/scsi_tgt_if.h | |
parent | 8f3334edae93f8b664417f4140d4d9dc9a003fe4 (diff) |
[SCSI] tgt: fix the user/kernel ring buffer interface
This patches fixes two bugs in the scsi target infrastructure's
user/kernel interface.
- It wrongly assumes that the ring buffer size of the interface (64KB)
is larger than or equal to the system page size. This patch sets the
ring buffer size to PAGE_SIZE if the system page size is larger.
- It uses PAGE_SIZE in the header file exported to userspace. This
patch removes it.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/scsi_tgt_if.h')
-rw-r--r-- | include/scsi/scsi_tgt_if.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/scsi/scsi_tgt_if.h b/include/scsi/scsi_tgt_if.h index 46d5e70d7215..07d6e77ae895 100644 --- a/include/scsi/scsi_tgt_if.h +++ b/include/scsi/scsi_tgt_if.h | |||
@@ -83,8 +83,5 @@ struct tgt_event { | |||
83 | } __attribute__ ((aligned (sizeof(uint64_t)))); | 83 | } __attribute__ ((aligned (sizeof(uint64_t)))); |
84 | 84 | ||
85 | #define TGT_RING_SIZE (1UL << 16) | 85 | #define TGT_RING_SIZE (1UL << 16) |
86 | #define TGT_RING_PAGES (TGT_RING_SIZE >> PAGE_SHIFT) | ||
87 | #define TGT_EVENT_PER_PAGE (PAGE_SIZE / sizeof(struct tgt_event)) | ||
88 | #define TGT_MAX_EVENTS (TGT_EVENT_PER_PAGE * TGT_RING_PAGES) | ||
89 | 86 | ||
90 | #endif | 87 | #endif |