From 930e99bd1320d78c7d8866595e81b8fc7dc8739b Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 13 Feb 2007 23:21:52 +0900 Subject: [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 Signed-off-by: James Bottomley --- include/scsi/scsi_tgt_if.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/scsi/scsi_tgt_if.h b/include/scsi/scsi_tgt_if.h index 46d5e70d721..07d6e77ae89 100644 --- a/include/scsi/scsi_tgt_if.h +++ b/include/scsi/scsi_tgt_if.h @@ -83,8 +83,5 @@ struct tgt_event { } __attribute__ ((aligned (sizeof(uint64_t)))); #define TGT_RING_SIZE (1UL << 16) -#define TGT_RING_PAGES (TGT_RING_SIZE >> PAGE_SHIFT) -#define TGT_EVENT_PER_PAGE (PAGE_SIZE / sizeof(struct tgt_event)) -#define TGT_MAX_EVENTS (TGT_EVENT_PER_PAGE * TGT_RING_PAGES) #endif -- cgit v1.2.3 From a9b7320294f885be6087bdef7a0e25922c36eb1b Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 16 Feb 2007 01:46:25 -0800 Subject: [SCSI] scsi_transport.h should include scsi_device.h scsi_transport.h defines the inline function scsi_transport_device_data() that dereferences a pointer of "struct scsi_device *". Since the struct is not known by the header this might break compilation. Include scsi/scsi_device.h to not rely on users doing the correct magic include order. Signed-off-by: Rolf Eike Beer Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- include/scsi/scsi_transport.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index cca1d4926d2..3c18baa65a7 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h @@ -22,6 +22,7 @@ #include #include +#include struct scsi_transport_template { /* the attribute containers */ -- cgit v1.2.3