diff options
author | simokawa <simokawa@FreeBSD.org> | 2007-03-16 01:23:36 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2007-03-16 01:23:36 +0000 |
commit | 5b347b5d7f8b83d8160bf6249a208059fc06149f (patch) | |
tree | 61194ee66608464037cfbfdb92bba5e4efe5c0f8 | |
parent | cbfbccd2212ab1f4583b0b44881cb991088c238b (diff) | |
download | FreeBSD-src-5b347b5d7f8b83d8160bf6249a208059fc06149f.zip FreeBSD-src-5b347b5d7f8b83d8160bf6249a208059fc06149f.tar.gz |
Support MAXPHYS up to 512KB
- We need at least two OCBs with indirect pointers allocated in a 4KB page.
- SBP_MAXPHYS can increase to 1MB once we separate management OCB/ORB
which usually does not need indirect pointers.
- We have to increase SBP_DMA_SIZE for MAXPHYS larger than 1MB.
MFC after: 3 days
-rw-r--r-- | sys/dev/firewire/sbp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index 2f6dbf3..0967652 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -91,6 +91,7 @@ * because of CAM_SCSI2_MAXLUN in cam_xpt.c */ #define SBP_NUM_LUNS 64 +#define SBP_MAXPHYS MIN(MAXPHYS, (512*1024) /* 512KB */) #define SBP_DMA_SIZE PAGE_SIZE #define SBP_LOGIN_SIZE sizeof(struct sbp_login_res) #define SBP_QUEUE_LEN ((SBP_DMA_SIZE - SBP_LOGIN_SIZE) / sizeof(struct sbp_ocb)) @@ -161,9 +162,9 @@ TUNABLE_INT("hw.firewire.sbp.tags", &sbp_tags); #define SBP_SEG_MAX rounddown(0xffff, PAGE_SIZE) #ifdef __sparc64__ /* iommu */ -#define SBP_IND_MAX howmany(MAXPHYS, SBP_SEG_MAX) +#define SBP_IND_MAX howmany(SBP_MAXPHYS, SBP_SEG_MAX) #else -#define SBP_IND_MAX howmany(MAXPHYS, PAGE_SIZE) +#define SBP_IND_MAX howmany(SBP_MAXPHYS, PAGE_SIZE) #endif struct sbp_ocb { STAILQ_ENTRY(sbp_ocb) ocb; |