diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-10-21 07:07:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-22 00:45:40 -0400 |
commit | d8eb59dc8b9e77bb4fa5420ff80142759ad5cd7b (patch) | |
tree | d0b331eca84dabceae8463ec119743907fabcd3b /drivers/net/qlge/qlge_mpi.c | |
parent | 1d30df24ec85477368e6e38fe1b4d1b67b3be9d4 (diff) |
qlge: Add ethtool blink function.
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_mpi.c')
-rw-r--r-- | drivers/net/qlge/qlge_mpi.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c index 81a8489fe21a..14d76f13d1db 100644 --- a/drivers/net/qlge/qlge_mpi.c +++ b/drivers/net/qlge/qlge_mpi.c | |||
@@ -751,6 +751,61 @@ static int ql_idc_wait(struct ql_adapter *qdev) | |||
751 | return status; | 751 | return status; |
752 | } | 752 | } |
753 | 753 | ||
754 | int ql_mb_set_led_cfg(struct ql_adapter *qdev, u32 led_config) | ||
755 | { | ||
756 | struct mbox_params mbc; | ||
757 | struct mbox_params *mbcp = &mbc; | ||
758 | int status; | ||
759 | |||
760 | memset(mbcp, 0, sizeof(struct mbox_params)); | ||
761 | |||
762 | mbcp->in_count = 2; | ||
763 | mbcp->out_count = 1; | ||
764 | |||
765 | mbcp->mbox_in[0] = MB_CMD_SET_LED_CFG; | ||
766 | mbcp->mbox_in[1] = led_config; | ||
767 | |||
768 | |||
769 | status = ql_mailbox_command(qdev, mbcp); | ||
770 | if (status) | ||
771 | return status; | ||
772 | |||
773 | if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { | ||
774 | QPRINTK(qdev, DRV, ERR, | ||
775 | "Failed to set LED Configuration.\n"); | ||
776 | status = -EIO; | ||
777 | } | ||
778 | |||
779 | return status; | ||
780 | } | ||
781 | |||
782 | int ql_mb_get_led_cfg(struct ql_adapter *qdev) | ||
783 | { | ||
784 | struct mbox_params mbc; | ||
785 | struct mbox_params *mbcp = &mbc; | ||
786 | int status; | ||
787 | |||
788 | memset(mbcp, 0, sizeof(struct mbox_params)); | ||
789 | |||
790 | mbcp->in_count = 1; | ||
791 | mbcp->out_count = 2; | ||
792 | |||
793 | mbcp->mbox_in[0] = MB_CMD_GET_LED_CFG; | ||
794 | |||
795 | status = ql_mailbox_command(qdev, mbcp); | ||
796 | if (status) | ||
797 | return status; | ||
798 | |||
799 | if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { | ||
800 | QPRINTK(qdev, DRV, ERR, | ||
801 | "Failed to get LED Configuration.\n"); | ||
802 | status = -EIO; | ||
803 | } else | ||
804 | qdev->led_config = mbcp->mbox_out[1]; | ||
805 | |||
806 | return status; | ||
807 | } | ||
808 | |||
754 | int ql_mb_set_mgmnt_traffic_ctl(struct ql_adapter *qdev, u32 control) | 809 | int ql_mb_set_mgmnt_traffic_ctl(struct ql_adapter *qdev, u32 control) |
755 | { | 810 | { |
756 | struct mbox_params mbc; | 811 | struct mbox_params mbc; |