Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66373
b: refs/heads/master
c: ab0049b
h: refs/heads/master
i:
  66371: ee6581b
v: v3
  • Loading branch information
Andy Gospodarek authored and David S. Miller committed Oct 10, 2007
1 parent 94c4a21 commit 1a26910
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: 50f17787e9b0222ce65cc831407c3ba4790db3ff
refs/heads/master: ab0049b4a2f66074dff6af851b35bba888f53972
13 changes: 5 additions & 8 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -4870,7 +4870,6 @@ static void tg3_restore_pci_state(struct tg3 *tp)
pci_write_config_dword(tp->pdev, TG3PCI_X_CAPS, val);

if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) {
u32 val;

/* Chip reset on 5780 will reset MSI enable bit,
* so need to restore it.
Expand Down Expand Up @@ -5027,7 +5026,7 @@ static int tg3_chip_reset(struct tg3 *tp)
tw32(GRC_MODE, tp->grc_mode);

if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0) {
u32 val = tr32(0xc4);
val = tr32(0xc4);

tw32(0xc4, val | (1 << 15));
}
Expand Down Expand Up @@ -5056,7 +5055,7 @@ static int tg3_chip_reset(struct tg3 *tp)

if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) &&
tp->pci_chip_rev_id != CHIPREV_ID_5750_A0) {
u32 val = tr32(0x7c00);
val = tr32(0x7c00);

tw32(0x7c00, val | (1 << 25));
}
Expand Down Expand Up @@ -7991,7 +7990,7 @@ static int tg3_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
buf = data;
if (b_offset || odd_len) {
buf = kmalloc(len, GFP_KERNEL);
if (buf == 0)
if (!buf)
return -ENOMEM;
if (b_offset)
memcpy(buf, &start, 4);
Expand Down Expand Up @@ -8420,7 +8419,7 @@ static void tg3_get_ethtool_stats (struct net_device *dev,
static int tg3_test_nvram(struct tg3 *tp)
{
u32 *buf, csum, magic;
int i, j, err = 0, size;
int i, j, k, err = 0, size;

if (tg3_nvram_read_swab(tp, 0, &magic) != 0)
return -EIO;
Expand Down Expand Up @@ -8474,7 +8473,6 @@ static int tg3_test_nvram(struct tg3 *tp)
u8 data[NVRAM_SELFBOOT_DATA_SIZE];
u8 parity[NVRAM_SELFBOOT_DATA_SIZE];
u8 *buf8 = (u8 *) buf;
int j, k;

/* Separate the parity bits and the data bytes. */
for (i = 0, j = 0, k = 0; i < NVRAM_SELFBOOT_HW_SIZE; i++) {
Expand Down Expand Up @@ -10730,7 +10728,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
*/
if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5700_BX) {
u32 pm_reg;
u16 pci_cmd;

tp->tg3_flags |= TG3_FLAG_PCIX_TARGET_HWBUG;

Expand Down Expand Up @@ -11876,7 +11873,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
INIT_WORK(&tp->reset_task, tg3_reset_task);

tp->regs = ioremap_nocache(tg3reg_base, tg3reg_len);
if (tp->regs == 0UL) {
if (!tp->regs) {
printk(KERN_ERR PFX "Cannot map device registers, "
"aborting.\n");
err = -ENOMEM;
Expand Down

0 comments on commit 1a26910

Please sign in to comment.