aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ipg.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ipg.h')
-rw-r--r--drivers/net/ipg.h83
1 files changed, 4 insertions, 79 deletions
diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h
index cda53887d4db..e0e718ab4c2e 100644
--- a/drivers/net/ipg.h
+++ b/drivers/net/ipg.h
@@ -536,83 +536,6 @@ enum ipg_regs {
536 */ 536 */
537#define IPG_FRAMESBETWEENTXDMACOMPLETES 0x1 537#define IPG_FRAMESBETWEENTXDMACOMPLETES 0x1
538 538
539#ifdef JUMBO_FRAME
540
541# ifdef JUMBO_FRAME_SIZE_2K
542# define JUMBO_FRAME_SIZE 2048
543# define __IPG_RXFRAG_SIZE 2048
544# else
545# ifdef JUMBO_FRAME_SIZE_3K
546# define JUMBO_FRAME_SIZE 3072
547# define __IPG_RXFRAG_SIZE 3072
548# else
549# ifdef JUMBO_FRAME_SIZE_4K
550# define JUMBO_FRAME_SIZE 4096
551# define __IPG_RXFRAG_SIZE 4088
552# else
553# ifdef JUMBO_FRAME_SIZE_5K
554# define JUMBO_FRAME_SIZE 5120
555# define __IPG_RXFRAG_SIZE 4088
556# else
557# ifdef JUMBO_FRAME_SIZE_6K
558# define JUMBO_FRAME_SIZE 6144
559# define __IPG_RXFRAG_SIZE 4088
560# else
561# ifdef JUMBO_FRAME_SIZE_7K
562# define JUMBO_FRAME_SIZE 7168
563# define __IPG_RXFRAG_SIZE 4088
564# else
565# ifdef JUMBO_FRAME_SIZE_8K
566# define JUMBO_FRAME_SIZE 8192
567# define __IPG_RXFRAG_SIZE 4088
568# else
569# ifdef JUMBO_FRAME_SIZE_9K
570# define JUMBO_FRAME_SIZE 9216
571# define __IPG_RXFRAG_SIZE 4088
572# else
573# ifdef JUMBO_FRAME_SIZE_10K
574# define JUMBO_FRAME_SIZE 10240
575# define __IPG_RXFRAG_SIZE 4088
576# else
577# define JUMBO_FRAME_SIZE 4096
578# endif
579# endif
580# endif
581# endif
582# endif
583# endif
584# endif
585# endif
586# endif
587#endif
588
589/* Size of allocated received buffers. Nominally 0x0600.
590 * Define larger if expecting jumbo frames.
591 */
592#ifdef JUMBO_FRAME
593/* IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash */
594#define IPG_TXFRAG_SIZE JUMBO_FRAME_SIZE
595#endif
596
597/* Size of allocated received buffers. Nominally 0x0600.
598 * Define larger if expecting jumbo frames.
599 */
600#ifdef JUMBO_FRAME
601/* 4088 = 4096 - 8 */
602#define IPG_RXFRAG_SIZE __IPG_RXFRAG_SIZE
603#define IPG_RXSUPPORT_SIZE IPG_MAX_RXFRAME_SIZE
604#else
605#define IPG_RXFRAG_SIZE 0x0600
606#define IPG_RXSUPPORT_SIZE IPG_RXFRAG_SIZE
607#endif
608
609/* IPG_MAX_RXFRAME_SIZE <= IPG_RXFRAG_SIZE */
610#ifdef JUMBO_FRAME
611#define IPG_MAX_RXFRAME_SIZE JUMBO_FRAME_SIZE
612#else
613#define IPG_MAX_RXFRAME_SIZE 0x0600
614#endif
615
616#define IPG_RFDLIST_LENGTH 0x100 539#define IPG_RFDLIST_LENGTH 0x100
617 540
618/* Maximum number of RFDs to process per interrupt. 541/* Maximum number of RFDs to process per interrupt.
@@ -786,9 +709,11 @@ struct ipg_nic_private {
786 unsigned int tx_dirty; 709 unsigned int tx_dirty;
787 unsigned int rx_current; 710 unsigned int rx_current;
788 unsigned int rx_dirty; 711 unsigned int rx_dirty;
789#ifdef JUMBO_FRAME 712 bool is_jumbo;
790 struct ipg_jumbo jumbo; 713 struct ipg_jumbo jumbo;
791#endif 714 unsigned long rxfrag_size;
715 unsigned long rxsupport_size;
716 unsigned long max_rxframe_size;
792 unsigned int rx_buf_sz; 717 unsigned int rx_buf_sz;
793 struct pci_dev *pdev; 718 struct pci_dev *pdev;
794 struct net_device *dev; 719 struct net_device *dev;