aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/sxg/sxghif.h
diff options
context:
space:
mode:
authorMithlesh Thukral <mithlesh@linsyssoft.com>2009-02-06 19:30:40 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:12 -0700
commit7c66b14b6bfd4bf1b803be5ba3cc2e2e31d784de (patch)
tree3b18a508ebf9d40d5429dbed7cdec580f0e41866 /drivers/staging/sxg/sxghif.h
parent559990c6885d988605e247981234a29ba0b2b2c9 (diff)
Staging: sxg: Add Jumbo frames support to Sahara SXG Driver
This patch adds Jumbo frame support to Sahara's SXG Driver. Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com> Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sxg/sxghif.h')
-rw-r--r--drivers/staging/sxg/sxghif.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/sxg/sxghif.h b/drivers/staging/sxg/sxghif.h
index 3675a1b5658..ae517798f6b 100644
--- a/drivers/staging/sxg/sxghif.h
+++ b/drivers/staging/sxg/sxghif.h
@@ -418,6 +418,7 @@ struct sxg_event_ring {
#define SXG_XMT_RING_SIZE 128 /* Start with 128 */
#define SXG_RCV_RING_SIZE 128 /* Start with 128 */
#define SXG_MAX_ENTRIES 4096
+#define SXG_JUMBO_RCV_RING_SIZE 32
/* Structure and macros to manage a ring */
struct sxg_ring_info {
@@ -713,6 +714,11 @@ enum sxg_buffer_type {
/* Minimum amount and when to get more */
#define SXG_MIN_RCV_DATA_BUFFERS 4096
#define SXG_MAX_RCV_BLOCKS 256 /* = 32k receive buffers */
+/* Amount to give to the card in case of jumbo frames */
+#define SXG_JUMBO_RCV_DATA_BUFFERS 2048
+/* Initial pool of buffers in case of jumbo buffers */
+#define SXG_INITIAL_JUMBO_RCV_DATA_BUFFERS 4096
+#define SXG_MIN_JUMBO_RCV_DATA_BUFFERS 1024
/* Receive buffer header */
struct sxg_rcv_data_buffer_hdr {
@@ -874,10 +880,8 @@ extern struct sxg_sgl_pool_properties SxgSglPoolProperties[];
* We currently workaround this issue by allocating SGL buffers
* in 64k blocks and skipping over buffers that straddle the boundary.
*/
-#define SXG_INVALID_SGL(_SxgSgl) \
- (((_SxgSgl)->PhysicalAddress.LowPart & 0xFFFF0000) != \
- (((_SxgSgl)->PhysicalAddress.LowPart + \
- SXG_SGL_SIZE((_SxgSgl)->Pool)) & 0xFFFF0000))
+#define SXG_INVALID_SGL(phys_addr,len) \
+ (((phys_addr >> 16) != ( (phys_addr + len) >> 16 )))
/*
* Allocate SGLs in blocks so we can skip over invalid entries.