diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-03-02 03:07:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-03 01:45:24 -0500 |
commit | bcc2cb3b97e37317c301309d7052bb61e6cce2c4 (patch) | |
tree | e1eed42ab44980713cc6b8d38e917e0d27ff9bcd /drivers/net/qlge/qlge_main.c | |
parent | cdca8d02ea4229c2ccf3c27fb537b150843f67c9 (diff) |
qlge: Add support for getting/setting port config.
This patch adds functionality to get and set port parameters.
Currently it is used to set maximum TX/RX frame sizes. This process is
also capable of setting:
1) Pause type: Standard or Priority based.
2) Loop back mode.
3) Enable Jumbo frame mode (included here...)
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_main.c')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 29334d99b430..7c1ce5765759 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -837,7 +837,14 @@ exit: | |||
837 | 837 | ||
838 | static int ql_8000_port_initialize(struct ql_adapter *qdev) | 838 | static int ql_8000_port_initialize(struct ql_adapter *qdev) |
839 | { | 839 | { |
840 | return ql_mb_get_fw_state(qdev); | 840 | int status; |
841 | status = ql_mb_get_fw_state(qdev); | ||
842 | if (status) | ||
843 | goto exit; | ||
844 | /* Wake up a worker to get/set the TX/RX frame sizes. */ | ||
845 | queue_delayed_work(qdev->workqueue, &qdev->mpi_port_cfg_work, 0); | ||
846 | exit: | ||
847 | return status; | ||
841 | } | 848 | } |
842 | 849 | ||
843 | /* Take the MAC Core out of reset. | 850 | /* Take the MAC Core out of reset. |
@@ -3188,6 +3195,7 @@ static int ql_adapter_down(struct ql_adapter *qdev) | |||
3188 | cancel_delayed_work_sync(&qdev->asic_reset_work); | 3195 | cancel_delayed_work_sync(&qdev->asic_reset_work); |
3189 | cancel_delayed_work_sync(&qdev->mpi_reset_work); | 3196 | cancel_delayed_work_sync(&qdev->mpi_reset_work); |
3190 | cancel_delayed_work_sync(&qdev->mpi_work); | 3197 | cancel_delayed_work_sync(&qdev->mpi_work); |
3198 | cancel_delayed_work_sync(&qdev->mpi_port_cfg_work); | ||
3191 | 3199 | ||
3192 | /* The default queue at index 0 is always processed in | 3200 | /* The default queue at index 0 is always processed in |
3193 | * a workqueue. | 3201 | * a workqueue. |
@@ -3462,6 +3470,8 @@ static int qlge_change_mtu(struct net_device *ndev, int new_mtu) | |||
3462 | 3470 | ||
3463 | if (ndev->mtu == 1500 && new_mtu == 9000) { | 3471 | if (ndev->mtu == 1500 && new_mtu == 9000) { |
3464 | QPRINTK(qdev, IFUP, ERR, "Changing to jumbo MTU.\n"); | 3472 | QPRINTK(qdev, IFUP, ERR, "Changing to jumbo MTU.\n"); |
3473 | queue_delayed_work(qdev->workqueue, | ||
3474 | &qdev->mpi_port_cfg_work, 0); | ||
3465 | } else if (ndev->mtu == 9000 && new_mtu == 1500) { | 3475 | } else if (ndev->mtu == 9000 && new_mtu == 1500) { |
3466 | QPRINTK(qdev, IFUP, ERR, "Changing to normal MTU.\n"); | 3476 | QPRINTK(qdev, IFUP, ERR, "Changing to normal MTU.\n"); |
3467 | } else if ((ndev->mtu == 1500 && new_mtu == 1500) || | 3477 | } else if ((ndev->mtu == 1500 && new_mtu == 1500) || |
@@ -3771,7 +3781,9 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
3771 | INIT_DELAYED_WORK(&qdev->asic_reset_work, ql_asic_reset_work); | 3781 | INIT_DELAYED_WORK(&qdev->asic_reset_work, ql_asic_reset_work); |
3772 | INIT_DELAYED_WORK(&qdev->mpi_reset_work, ql_mpi_reset_work); | 3782 | INIT_DELAYED_WORK(&qdev->mpi_reset_work, ql_mpi_reset_work); |
3773 | INIT_DELAYED_WORK(&qdev->mpi_work, ql_mpi_work); | 3783 | INIT_DELAYED_WORK(&qdev->mpi_work, ql_mpi_work); |
3784 | INIT_DELAYED_WORK(&qdev->mpi_port_cfg_work, ql_mpi_port_cfg_work); | ||
3774 | mutex_init(&qdev->mpi_mutex); | 3785 | mutex_init(&qdev->mpi_mutex); |
3786 | init_completion(&qdev->ide_completion); | ||
3775 | 3787 | ||
3776 | if (!cards_found) { | 3788 | if (!cards_found) { |
3777 | dev_info(&pdev->dev, "%s\n", DRV_STRING); | 3789 | dev_info(&pdev->dev, "%s\n", DRV_STRING); |