Skip to contentSkip to conversation

skge: remove unused declarations

PATCH Dave Jones 2 participants 2 messages Jul 1, 2005 – Jul 5, 2005 1 message not in the archive Network drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Dave Jones

author
#1 lore raw
Quoted 12 lines · Linux Kernel

tree 6154380f95d261126525fc95eb149ddc8478eeea
parent 4707953454677f985289b4e4bcbea41f0cc651c2
author Stephen Hemminger <[email protected]> Tue, 28 Jun 2005 01:33:08 -0700 committer Jeff Garzik <[email protected]> Tue, 28 Jun 2005 02:05:06 -0400

[PATCH] skge: remove unused declarations

Get rid of definitions for chip versions and PHY chips that this driver does not support.

...

Review

Quoted 4 lines
(quoted diff) +0 -4
-	PCI_EN_DUMMY_RD = 1<<3, /* Enable Dummy Read */
-	PCI_REV_DESC    = 1<<2, /* Reverse Desc. Bytes */
-	PCI_USEDATA64   = 1<<0, /* Use 64Bit Data bus ext */
-};

This bit breaks PPC builds, due to ..

   3145 #ifdef __BIG_ENDIAN
   3146     /* byte swap decriptors in hardware */
   3147     {
   3148         u32 reg;
   3149
   3150         pci_read_config_dword(pdev, PCI_DEV_REG2, &reg);
   3151         reg |= 1 << 2;  /* PCI_REV_DESC */
   3152         pci_write_config_dword(pdev, PCI_DEV_REG2, reg);
   3153     }
   3154 #endif

For my builds, I've just hardcoded it, I don't know if you prefer to put the enum back or not..

Dave

#2 lore raw

Here is a patch that adds back the dev reg enum's.
BTW: I haven't tested this driver on big endian systems yet.

drivers/net/skge.h +13 -0
Index: sky2/drivers/net/skge.h
===================================================================
@@ -8,6 +8,19 @@
 #define PCI_DEV_REG1	0x40
 #define PCI_DEV_REG2	0x44
 
+enum pci_dev_reg_2 {
+	PCI_VPD_WR_THR	= 0xffL<<24,	/* Bit 31..24:	VPD Write Threshold */
+	PCI_DEV_SEL	= 0x7fL<<17,	/* Bit 23..17:	EEPROM Device Select */
+	PCI_VPD_ROM_SZ	= 7L<<14,	/* Bit 16..14:	VPD ROM Size	*/
+
+	PCI_PATCH_DIR	= 0xfL<<8,	/* Bit 11.. 8:	Ext Patches dir 3..0 */
+	PCI_EXT_PATCHS	= 0xfL<<4,	/* Bit	7.. 4:	Extended Patches 3..0 */
+	PCI_EN_DUMMY_RD	= 1<<3,		/* Enable Dummy Read */
+	PCI_REV_DESC	= 1<<2,		/* Reverse Desc. Bytes */
+
+	PCI_USEDATA64	= 1<<0,		/* Use 64Bit Data bus ext */
+};
+
 #define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \
 			       PCI_STATUS_SIG_SYSTEM_ERROR | \
 			       PCI_STATUS_REC_MASTER_ABORT | \