Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83648
b: refs/heads/master
c: 39dbd95
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Feb 5, 2008
1 parent 4f6502c commit 46564ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 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: 57f78ab3b0e9338a9241aeff6ee92aecc8f8bcbb
refs/heads/master: 39dbd9587bebedbd72be9a8a30a8c4783f3ef7eb
17 changes: 7 additions & 10 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON);

/* On chips without ram buffer, pause is controled by MAC level */
if (sky2_read8(hw, B2_E_0) == 0) {
if (!(hw->flags & SKY2_HW_RAM_BUFFER)) {
sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8);
sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8);

Expand Down Expand Up @@ -1194,7 +1194,7 @@ static struct sk_buff *sky2_rx_alloc(struct sky2_port *sky2)
struct sk_buff *skb;
int i;

if (sky2->hw->flags & SKY2_HW_FIFO_HANG_CHECK) {
if (sky2->hw->flags & SKY2_HW_RAM_BUFFER) {
unsigned char *start;
/*
* Workaround for a bug in FIFO that cause hang
Expand Down Expand Up @@ -1387,6 +1387,7 @@ static int sky2_up(struct net_device *dev)
if (ramsize > 0) {
u32 rxspace;

hw->flags |= SKY2_HW_RAM_BUFFER;
pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize);
if (ramsize < 16)
rxspace = ramsize / 2;
Expand Down Expand Up @@ -2026,7 +2027,7 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu)

synchronize_irq(hw->pdev->irq);

if (sky2_read8(hw, B2_E_0) == 0)
if (!(hw->flags & SKY2_HW_RAM_BUFFER))
sky2_set_tx_stfwd(hw, port);

ctl = gma_read16(hw, port, GM_GP_CTRL);
Expand Down Expand Up @@ -2566,7 +2567,7 @@ static void sky2_watchdog(unsigned long arg)
++active;

/* For chips with Rx FIFO, check if stuck */
if ((hw->flags & SKY2_HW_FIFO_HANG_CHECK) &&
if ((hw->flags & SKY2_HW_RAM_BUFFER) &&
sky2_rx_hung(dev)) {
pr_info(PFX "%s: receiver hang detected\n",
dev->name);
Expand Down Expand Up @@ -2722,11 +2723,7 @@ static int __devinit sky2_init(struct sky2_hw *hw)

switch(hw->chip_id) {
case CHIP_ID_YUKON_XL:
hw->flags = SKY2_HW_GIGABIT
| SKY2_HW_NEWER_PHY;
if (hw->chip_rev < 3)
hw->flags |= SKY2_HW_FIFO_HANG_CHECK;

hw->flags = SKY2_HW_GIGABIT | SKY2_HW_NEWER_PHY;
break;

case CHIP_ID_YUKON_EC_U:
Expand All @@ -2752,7 +2749,7 @@ static int __devinit sky2_init(struct sky2_hw *hw)
dev_err(&hw->pdev->dev, "unsupported revision Yukon-EC rev A1\n");
return -EOPNOTSUPP;
}
hw->flags = SKY2_HW_GIGABIT | SKY2_HW_FIFO_HANG_CHECK;
hw->flags = SKY2_HW_GIGABIT;
break;

case CHIP_ID_YUKON_FE:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sky2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ struct sky2_hw {
#define SKY2_HW_FIBRE_PHY 0x00000002
#define SKY2_HW_GIGABIT 0x00000004
#define SKY2_HW_NEWER_PHY 0x00000008
#define SKY2_HW_FIFO_HANG_CHECK 0x00000010
#define SKY2_HW_RAM_BUFFER 0x00000010
#define SKY2_HW_NEW_LE 0x00000020 /* new LSOv2 format */
#define SKY2_HW_AUTO_TX_SUM 0x00000040 /* new IP decode for Tx */
#define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */
Expand Down

0 comments on commit 46564ad

Please sign in to comment.