From: Ron Mercer <ron.mercer@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-driver@qlogic.com, ron.mercer@qlogic.com
Subject: [PATCH 15/21] [next] qlge: Get rid of local xgmac control.
Date: Fri, 23 Jan 2009 07:16:33 -0800 [thread overview]
Message-ID: <1232723799-8620-15-git-send-email-ron.mercer@qlogic.com> (raw)
In-Reply-To: <20090123151513.GA8526@linux-ox1b.qlogic.org>
It's done by firmware now.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
drivers/net/qlge/qlge_main.c | 106 ------------------------------------------
1 files changed, 0 insertions(+), 106 deletions(-)
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index ec01dbf..ea9ca3f 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -720,25 +720,6 @@ exit:
* register pair. Each read/write requires us to wait for the ready
* bit before reading/writing the data.
*/
-static int ql_write_xgmac_reg(struct ql_adapter *qdev, u32 reg, u32 data)
-{
- int status;
- /* wait for reg to come ready */
- status = ql_wait_reg_rdy(qdev,
- XGMAC_ADDR, XGMAC_ADDR_RDY, XGMAC_ADDR_XME);
- if (status)
- return status;
- /* write the data to the data reg */
- ql_write32(qdev, XGMAC_DATA, data);
- /* trigger the write */
- ql_write32(qdev, XGMAC_ADDR, reg);
- return status;
-}
-
-/* xgmac register are located behind the xgmac_addr and xgmac_data
- * register pair. Each read/write requires us to wait for the ready
- * bit before reading/writing the data.
- */
int ql_read_xgmac_reg(struct ql_adapter *qdev, u32 reg, u32 *data)
{
int status = 0;
@@ -781,87 +762,6 @@ exit:
return status;
}
-/* Take the MAC Core out of reset.
- * Enable statistics counting.
- * Take the transmitter/receiver out of reset.
- * This functionality may be done in the MPI firmware at a
- * later date.
- */
-static int ql_port_initialize(struct ql_adapter *qdev)
-{
- int status = 0;
- u32 data;
-
- if (ql_sem_trylock(qdev, qdev->xg_sem_mask)) {
- /* Another function has the semaphore, so
- * wait for the port init bit to come ready.
- */
- QPRINTK(qdev, LINK, INFO,
- "Another function has the semaphore, so wait for the port init bit to come ready.\n");
- status = ql_wait_reg_rdy(qdev, STS, qdev->port_init, 0);
- if (status) {
- QPRINTK(qdev, LINK, CRIT,
- "Port initialize timed out.\n");
- }
- return status;
- }
-
- QPRINTK(qdev, LINK, INFO, "Got xgmac semaphore!.\n");
- /* Set the core reset. */
- status = ql_read_xgmac_reg(qdev, GLOBAL_CFG, &data);
- if (status)
- goto end;
- data |= GLOBAL_CFG_RESET;
- status = ql_write_xgmac_reg(qdev, GLOBAL_CFG, data);
- if (status)
- goto end;
-
- /* Clear the core reset and turn on jumbo for receiver. */
- data &= ~GLOBAL_CFG_RESET; /* Clear core reset. */
- data |= GLOBAL_CFG_JUMBO; /* Turn on jumbo. */
- data |= GLOBAL_CFG_TX_STAT_EN;
- data |= GLOBAL_CFG_RX_STAT_EN;
- status = ql_write_xgmac_reg(qdev, GLOBAL_CFG, data);
- if (status)
- goto end;
-
- /* Enable transmitter, and clear it's reset. */
- status = ql_read_xgmac_reg(qdev, TX_CFG, &data);
- if (status)
- goto end;
- data &= ~TX_CFG_RESET; /* Clear the TX MAC reset. */
- data |= TX_CFG_EN; /* Enable the transmitter. */
- status = ql_write_xgmac_reg(qdev, TX_CFG, data);
- if (status)
- goto end;
-
- /* Enable receiver and clear it's reset. */
- status = ql_read_xgmac_reg(qdev, RX_CFG, &data);
- if (status)
- goto end;
- data &= ~RX_CFG_RESET; /* Clear the RX MAC reset. */
- data |= RX_CFG_EN; /* Enable the receiver. */
- status = ql_write_xgmac_reg(qdev, RX_CFG, data);
- if (status)
- goto end;
-
- /* Turn on jumbo. */
- status =
- ql_write_xgmac_reg(qdev, MAC_TX_PARAMS, MAC_TX_PARAMS_JUMBO | (0x2580 << 16));
- if (status)
- goto end;
- status =
- ql_write_xgmac_reg(qdev, MAC_RX_PARAMS, 0x2580);
- if (status)
- goto end;
-
- /* Signal to the world that the port is enabled. */
- ql_write32(qdev, STS, ((qdev->port_init << 16) | qdev->port_init));
-end:
- ql_sem_unlock(qdev, qdev->xg_sem_mask);
- return status;
-}
-
/* Get the next large buffer. */
static struct bq_desc *ql_get_curr_lbuf(struct rx_ring *rx_ring)
{
@@ -3023,12 +2923,6 @@ static int ql_adapter_initialize(struct ql_adapter *qdev)
}
}
- status = ql_port_initialize(qdev);
- if (status) {
- QPRINTK(qdev, IFUP, ERR, "Failed to start port.\n");
- return status;
- }
-
/* Set up the MAC address and frame routing filter. */
status = ql_cam_route_initialize(qdev);
if (status) {
--
1.6.0.2
next prev parent reply other threads:[~2009-01-23 15:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 15:15 [PATCH 0/21][next] qlge: Clean up and add firmware support Ron Mercer
2009-01-23 15:16 ` [PATCH 01/21] [next] qlge: Change to device ID 8000 and corresponding flash access Ron Mercer
2009-01-23 23:28 ` Ben Hutchings
2009-01-24 19:29 ` Ron Mercer
2009-01-25 1:45 ` Ben Hutchings
2009-01-23 15:16 ` [PATCH 02/21] [next] qlge: Add new functions for signaling link up/down Ron Mercer
2009-01-23 23:23 ` Ben Hutchings
2009-01-24 19:32 ` Ron Mercer
2009-01-23 15:16 ` [PATCH 03/21] [next] qlge: Clean and optimize rx buf queue refill Ron Mercer
2009-01-23 15:16 ` [PATCH 04/21] [next] qlge: Clean up adapter reset function Ron Mercer
2009-01-23 15:16 ` [PATCH 05/21] [next] qlge: Add new function for MAC address and frame routing Ron Mercer
2009-01-23 15:16 ` [PATCH 06/21] [next] qlge: Expand granularity on holding hardware semaphore Ron Mercer
2009-01-23 15:16 ` [PATCH 07/21] [next] qlge: Remove lock protection in adapter up/down Ron Mercer
2009-01-23 15:16 ` [PATCH 08/21] [next] qlge: Move interrupt enable to end of adapter up function Ron Mercer
2009-01-23 15:16 ` [PATCH 09/21] [next] qlge: Upgrade print priority for hardware event handler Ron Mercer
2009-01-23 15:16 ` [PATCH 10/21] [next] qlge: Cleanup rx buffer allocations Ron Mercer
2009-01-23 15:16 ` [PATCH 11/21] [next] qlge: Cleanup spin lock usage for some register accesses Ron Mercer
2009-01-23 15:16 ` [PATCH 12/21] [next] qlge: Clean up chip reset path Ron Mercer
2009-01-23 15:16 ` [PATCH 13/21] [next] qlge: Cleanup MPI RISC " Ron Mercer
2009-01-23 15:16 ` [PATCH 14/21] [next] qlge: Clean up MPI firware event handler Ron Mercer
2009-01-23 15:16 ` Ron Mercer [this message]
2009-01-23 15:16 ` [PATCH 16/21] [next] qlge: Add some constants for firmware support Ron Mercer
2009-01-23 15:16 ` [PATCH 17/21] [next] qlge: Use new link up/down func FW event handler Ron Mercer
2009-01-23 15:16 ` [PATCH 18/21] [next] qlge: Add new firmware event handlers for SFP Ron Mercer
2009-01-23 15:16 ` [PATCH 19/21] [next] qlge: Set the MAC addr/frame routing after a firmware event Ron Mercer
2009-01-23 15:16 ` [PATCH 20/21] [next] qlge: Add mailbox command support Ron Mercer
2009-01-23 15:16 ` [PATCH 21/21] [next] qlge: Add port config mailbox command Ron Mercer
2009-01-26 6:17 ` [PATCH 0/21][next] qlge: Clean up and add firmware support David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232723799-8620-15-git-send-email-ron.mercer@qlogic.com \
--to=ron.mercer@qlogic.com \
--cc=davem@davemloft.net \
--cc=linux-driver@qlogic.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).