git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
drivers
/
net
/
tulip
/
eeprom.c
diff --git
a/drivers/net/tulip/eeprom.c
b/drivers/net/tulip/eeprom.c
index
1736c1d
..
512deba
100644
(file)
--- a/
drivers/net/tulip/eeprom.c
+++ b/
drivers/net/tulip/eeprom.c
@@
-62,7
+62,7
@@
static struct eeprom_fixup eeprom_fixups[] __devinitdata = {
*/
{ 0x1e00, 0x0000, 0x000b, 0x8f01, 0x0103, 0x0300, 0x0821, 0x000, 0x0001, 0x0000, 0x01e1 }
},
*/
{ 0x1e00, 0x0000, 0x000b, 0x8f01, 0x0103, 0x0300, 0x0821, 0x000, 0x0001, 0x0000, 0x01e1 }
},
- {
0, 0, 0, 0, {}
}};
+ {
NULL
}};
static const char *block_name[] __devinitdata = {
static const char *block_name[] __devinitdata = {
@@
-90,12
+90,8
@@
static const char *block_name[] __devinitdata = {
*/
static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp)
{
*/
static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp)
{
-#ifdef __hppa__
- unsigned char *ee_data = tp->eeprom;
-
- if (ee_data[0] == 0x3c && ee_data[1] == 0x10 &&
- (ee_data[2] == 0x63 || ee_data[2] == 0x61) && ee_data[3] == 0x10) {
-
+#ifdef CONFIG_GSC
+ if (tp->flags & NEEDS_FAKE_MEDIA_TABLE) {
static unsigned char leafdata[] =
{ 0x01, /* phy number */
0x02, /* gpr setup sequence length */
static unsigned char leafdata[] =
{ 0x01, /* phy number */
0x02, /* gpr setup sequence length */
@@
-140,7
+136,7
@@
void __devinit tulip_parse_eeprom(struct net_device *dev)
unsigned char *ee_data = tp->eeprom;
int i;
unsigned char *ee_data = tp->eeprom;
int i;
- tp->mtable =
0
;
+ tp->mtable =
NULL
;
/* Detect an old-style (SA only) EEPROM layout:
memcmp(eedata, eedata+16, 8). */
for (i = 0; i < 8; i ++)
/* Detect an old-style (SA only) EEPROM layout:
memcmp(eedata, eedata+16, 8). */
for (i = 0; i < 8; i ++)
@@
-306,12
+302,12
@@
subsequent_board:
/* EEPROM_Ctrl bits. */
#define EE_SHIFT_CLK 0x02 /* EEPROM shift clock. */
/* EEPROM_Ctrl bits. */
#define EE_SHIFT_CLK 0x02 /* EEPROM shift clock. */
-#define EE_CS
0x01 /* EEPROM chip select. */
+#define EE_CS 0x01 /* EEPROM chip select. */
#define EE_DATA_WRITE 0x04 /* Data from the Tulip to EEPROM. */
#define EE_DATA_WRITE 0x04 /* Data from the Tulip to EEPROM. */
-#define EE_WRITE_0
0x01
-#define EE_WRITE_1
0x05
+#define EE_WRITE_0 0x01
+#define EE_WRITE_1 0x05
#define EE_DATA_READ 0x08 /* Data from the EEPROM chip. */
#define EE_DATA_READ 0x08 /* Data from the EEPROM chip. */
-#define EE_ENB
(0x4800 | EE_CS)
+#define EE_ENB (0x4800 | EE_CS)
/* Delay between EEPROM clock transitions.
Even at 33Mhz current PCI implementations don't overrun the EEPROM clock.
/* Delay between EEPROM clock transitions.
Even at 33Mhz current PCI implementations don't overrun the EEPROM clock.
@@
-322,11
+318,12
@@
subsequent_board:
#define EE_READ_CMD (6)
/* Note: this routine returns extra data bits for size detection. */
#define EE_READ_CMD (6)
/* Note: this routine returns extra data bits for size detection. */
-int __devinit tulip_read_eeprom(
long ioaddr
, int location, int addr_len)
+int __devinit tulip_read_eeprom(
struct net_device *dev
, int location, int addr_len)
{
int i;
unsigned retval = 0;
{
int i;
unsigned retval = 0;
- long ee_addr = ioaddr + CSR9;
+ struct tulip_private *tp = dev->priv;
+ long ee_addr = tp->base_addr + CSR9;
int read_cmd = location | (EE_READ_CMD << addr_len);
outl(EE_ENB & ~EE_CS, ee_addr);
int read_cmd = location | (EE_READ_CMD << addr_len);
outl(EE_ENB & ~EE_CS, ee_addr);
@@
-354,6
+351,6
@@
int __devinit tulip_read_eeprom(long ioaddr, int location, int addr_len)
/* Terminate the EEPROM access. */
outl(EE_ENB & ~EE_CS, ee_addr);
/* Terminate the EEPROM access. */
outl(EE_ENB & ~EE_CS, ee_addr);
- return retval;
+ return
(tp->flags & HAS_SWAPPED_SEEPROM) ? swab16(retval) :
retval;
}
}