aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ps3_gelic_net.c
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2009-12-01 07:15:53 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-02 03:52:30 -0500
commitd4d7f1f9116089a4ae5102dcda35e8120308a515 (patch)
tree7c528e319d653a32ca84564f472f5a6843c14ab9 /drivers/net/ps3_gelic_net.c
parent0dffc83e5b831df1df83dfe32a0c267347f9950b (diff)
net/ps3: Cleanup gelic enums
Cleanup of the gelic driver enumerations: o Add some missing commas. o Add an Ether port post fix (PS3 currently only supports PORT_0). o Add a new enum gelic_lv1_phy to use when interacting with the PHY. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ps3_gelic_net.c')
-rw-r--r--drivers/net/ps3_gelic_net.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index b211613e9dbd..06a29768a864 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -95,11 +95,11 @@ static void gelic_card_get_ether_port_status(struct gelic_card *card,
95 95
96 lv1_net_control(bus_id(card), dev_id(card), 96 lv1_net_control(bus_id(card), dev_id(card),
97 GELIC_LV1_GET_ETH_PORT_STATUS, 97 GELIC_LV1_GET_ETH_PORT_STATUS,
98 GELIC_LV1_VLAN_TX_ETHERNET, 0, 0, 98 GELIC_LV1_VLAN_TX_ETHERNET_0, 0, 0,
99 &card->ether_port_status, &v2); 99 &card->ether_port_status, &v2);
100 100
101 if (inform) { 101 if (inform) {
102 ether_netdev = card->netdev[GELIC_PORT_ETHERNET]; 102 ether_netdev = card->netdev[GELIC_PORT_ETHERNET_0];
103 if (card->ether_port_status & GELIC_LV1_ETHER_LINK_UP) 103 if (card->ether_port_status & GELIC_LV1_ETHER_LINK_UP)
104 netif_carrier_on(ether_netdev); 104 netif_carrier_on(ether_netdev);
105 else 105 else
@@ -451,14 +451,14 @@ static void gelic_descr_release_tx(struct gelic_card *card,
451 451
452static void gelic_card_stop_queues(struct gelic_card *card) 452static void gelic_card_stop_queues(struct gelic_card *card)
453{ 453{
454 netif_stop_queue(card->netdev[GELIC_PORT_ETHERNET]); 454 netif_stop_queue(card->netdev[GELIC_PORT_ETHERNET_0]);
455 455
456 if (card->netdev[GELIC_PORT_WIRELESS]) 456 if (card->netdev[GELIC_PORT_WIRELESS])
457 netif_stop_queue(card->netdev[GELIC_PORT_WIRELESS]); 457 netif_stop_queue(card->netdev[GELIC_PORT_WIRELESS]);
458} 458}
459static void gelic_card_wake_queues(struct gelic_card *card) 459static void gelic_card_wake_queues(struct gelic_card *card)
460{ 460{
461 netif_wake_queue(card->netdev[GELIC_PORT_ETHERNET]); 461 netif_wake_queue(card->netdev[GELIC_PORT_ETHERNET_0]);
462 462
463 if (card->netdev[GELIC_PORT_WIRELESS]) 463 if (card->netdev[GELIC_PORT_WIRELESS])
464 netif_wake_queue(card->netdev[GELIC_PORT_WIRELESS]); 464 netif_wake_queue(card->netdev[GELIC_PORT_WIRELESS]);
@@ -999,7 +999,7 @@ static int gelic_card_decode_one_descr(struct gelic_card *card)
999 goto refill; 999 goto refill;
1000 } 1000 }
1001 } else 1001 } else
1002 netdev = card->netdev[GELIC_PORT_ETHERNET]; 1002 netdev = card->netdev[GELIC_PORT_ETHERNET_0];
1003 1003
1004 if ((status == GELIC_DESCR_DMA_RESPONSE_ERROR) || 1004 if ((status == GELIC_DESCR_DMA_RESPONSE_ERROR) ||
1005 (status == GELIC_DESCR_DMA_PROTECTION_ERROR) || 1005 (status == GELIC_DESCR_DMA_PROTECTION_ERROR) ||
@@ -1369,7 +1369,7 @@ static void gelic_net_tx_timeout_task(struct work_struct *work)
1369{ 1369{
1370 struct gelic_card *card = 1370 struct gelic_card *card =
1371 container_of(work, struct gelic_card, tx_timeout_task); 1371 container_of(work, struct gelic_card, tx_timeout_task);
1372 struct net_device *netdev = card->netdev[GELIC_PORT_ETHERNET]; 1372 struct net_device *netdev = card->netdev[GELIC_PORT_ETHERNET_0];
1373 1373
1374 dev_info(ctodev(card), "%s:Timed out. Restarting... \n", __func__); 1374 dev_info(ctodev(card), "%s:Timed out. Restarting... \n", __func__);
1375 1375
@@ -1531,10 +1531,10 @@ static struct gelic_card * __devinit gelic_alloc_card_net(struct net_device **ne
1531 /* gelic_port */ 1531 /* gelic_port */
1532 port->netdev = *netdev; 1532 port->netdev = *netdev;
1533 port->card = card; 1533 port->card = card;
1534 port->type = GELIC_PORT_ETHERNET; 1534 port->type = GELIC_PORT_ETHERNET_0;
1535 1535
1536 /* gelic_card */ 1536 /* gelic_card */
1537 card->netdev[GELIC_PORT_ETHERNET] = *netdev; 1537 card->netdev[GELIC_PORT_ETHERNET_0] = *netdev;
1538 1538
1539 INIT_WORK(&card->tx_timeout_task, gelic_net_tx_timeout_task); 1539 INIT_WORK(&card->tx_timeout_task, gelic_net_tx_timeout_task);
1540 init_waitqueue_head(&card->waitq); 1540 init_waitqueue_head(&card->waitq);
@@ -1554,9 +1554,9 @@ static void __devinit gelic_card_get_vlan_info(struct gelic_card *card)
1554 int tx; 1554 int tx;
1555 int rx; 1555 int rx;
1556 } vlan_id_ix[2] = { 1556 } vlan_id_ix[2] = {
1557 [GELIC_PORT_ETHERNET] = { 1557 [GELIC_PORT_ETHERNET_0] = {
1558 .tx = GELIC_LV1_VLAN_TX_ETHERNET, 1558 .tx = GELIC_LV1_VLAN_TX_ETHERNET_0,
1559 .rx = GELIC_LV1_VLAN_RX_ETHERNET 1559 .rx = GELIC_LV1_VLAN_RX_ETHERNET_0
1560 }, 1560 },
1561 [GELIC_PORT_WIRELESS] = { 1561 [GELIC_PORT_WIRELESS] = {
1562 .tx = GELIC_LV1_VLAN_TX_WIRELESS, 1562 .tx = GELIC_LV1_VLAN_TX_WIRELESS,
@@ -1601,7 +1601,7 @@ static void __devinit gelic_card_get_vlan_info(struct gelic_card *card)
1601 i, card->vlan[i].tx, card->vlan[i].rx); 1601 i, card->vlan[i].tx, card->vlan[i].rx);
1602 } 1602 }
1603 1603
1604 if (card->vlan[GELIC_PORT_ETHERNET].tx) { 1604 if (card->vlan[GELIC_PORT_ETHERNET_0].tx) {
1605 BUG_ON(!card->vlan[GELIC_PORT_WIRELESS].tx); 1605 BUG_ON(!card->vlan[GELIC_PORT_WIRELESS].tx);
1606 card->vlan_required = 1; 1606 card->vlan_required = 1;
1607 } else 1607 } else
@@ -1790,7 +1790,7 @@ static int ps3_gelic_driver_remove(struct ps3_system_bus_device *dev)
1790 gelic_card_free_chain(card, card->tx_top); 1790 gelic_card_free_chain(card, card->tx_top);
1791 gelic_card_free_chain(card, card->rx_top); 1791 gelic_card_free_chain(card, card->rx_top);
1792 1792
1793 netdev0 = card->netdev[GELIC_PORT_ETHERNET]; 1793 netdev0 = card->netdev[GELIC_PORT_ETHERNET_0];
1794 /* disconnect event port */ 1794 /* disconnect event port */
1795 free_irq(card->irq, card); 1795 free_irq(card->irq, card);
1796 netdev0->irq = NO_IRQ; 1796 netdev0->irq = NO_IRQ;