Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267635
b: refs/heads/master
c: 10f00a4
h: refs/heads/master
i:
  267633: 194d6a0
  267631: 6ad25b2
v: v3
  • Loading branch information
Mark Einon authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 84615ad commit a088a08
Show file tree
Hide file tree
Showing 10 changed files with 655 additions and 655 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc8585fc063da29aae17351f7f63c9419b4daaad
refs/heads/master: 10f00a49b048abf759b789a84c4c3431360aa38f
32 changes: 16 additions & 16 deletions trunk/drivers/staging/et131x/et1310_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ static int eeprom_wait_ready(struct pci_dev *pdev, u32 *status)

/**
* eeprom_write - Write a byte to the ET1310's EEPROM
* @etdev: pointer to our private adapter structure
* @adapter: pointer to our private adapter structure
* @addr: the address to write
* @data: the value to write
*
* Returns 1 for a successful write.
*/
static int eeprom_write(struct et131x_adapter *etdev, u32 addr, u8 data)
static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data)
{
struct pci_dev *pdev = etdev->pdev;
struct pci_dev *pdev = adapter->pdev;
int index = 0;
int retries;
int err = 0;
Expand Down Expand Up @@ -222,7 +222,7 @@ static int eeprom_write(struct et131x_adapter *etdev, u32 addr, u8 data)
* 1, this is so we do a blind write for load bug.
*/
if ((status & LBCIF_STATUS_GENERAL_ERROR)
&& etdev->pdev->revision == 0)
&& adapter->pdev->revision == 0)
break;

/*
Expand Down Expand Up @@ -280,17 +280,17 @@ static int eeprom_write(struct et131x_adapter *etdev, u32 addr, u8 data)

/**
* eeprom_read - Read a byte from the ET1310's EEPROM
* @etdev: pointer to our private adapter structure
* @adapter: pointer to our private adapter structure
* @addr: the address from which to read
* @pdata: a pointer to a byte in which to store the value of the read
* @eeprom_id: the ID of the EEPROM
* @addrmode: how the EEPROM is to be accessed
*
* Returns 1 for a successful read
*/
static int eeprom_read(struct et131x_adapter *etdev, u32 addr, u8 *pdata)
static int eeprom_read(struct et131x_adapter *adapter, u32 addr, u8 *pdata)
{
struct pci_dev *pdev = etdev->pdev;
struct pci_dev *pdev = adapter->pdev;
int err;
u32 status;

Expand Down Expand Up @@ -337,9 +337,9 @@ static int eeprom_read(struct et131x_adapter *etdev, u32 addr, u8 *pdata)
return (status & LBCIF_STATUS_ACK_ERROR) ? -EIO : 0;
}

int et131x_init_eeprom(struct et131x_adapter *etdev)
int et131x_init_eeprom(struct et131x_adapter *adapter)
{
struct pci_dev *pdev = etdev->pdev;
struct pci_dev *pdev = adapter->pdev;
u8 eestatus;

/* We first need to check the EEPROM Status code located at offset
Expand Down Expand Up @@ -374,7 +374,7 @@ int et131x_init_eeprom(struct et131x_adapter *etdev)
* corruption seen with 1310 B Silicon
*/
for (i = 0; i < 3; i++)
if (eeprom_write(etdev, i, eedata[i]) < 0)
if (eeprom_write(adapter, i, eedata[i]) < 0)
write_failed = 1;
}
if (pdev->revision != 0x01 || write_failed) {
Expand All @@ -387,21 +387,21 @@ int et131x_init_eeprom(struct et131x_adapter *etdev)
* gather additional information that normally would
* come from the eeprom, like MAC Address
*/
etdev->has_eeprom = 0;
adapter->has_eeprom = 0;
return -EIO;
}
}
etdev->has_eeprom = 1;
adapter->has_eeprom = 1;

/* Read the EEPROM for information regarding LED behavior. Refer to
* ET1310_phy.c, et131x_xcvr_init(), for its use.
*/
eeprom_read(etdev, 0x70, &etdev->eeprom_data[0]);
eeprom_read(etdev, 0x71, &etdev->eeprom_data[1]);
eeprom_read(adapter, 0x70, &adapter->eeprom_data[0]);
eeprom_read(adapter, 0x71, &adapter->eeprom_data[1]);

if (etdev->eeprom_data[0] != 0xcd)
if (adapter->eeprom_data[0] != 0xcd)
/* Disable all optional features */
etdev->eeprom_data[1] = 0x00;
adapter->eeprom_data[1] = 0x00;

return 0;
}
Loading

0 comments on commit a088a08

Please sign in to comment.