mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 02:01:29 +00:00
qlge: Add firmware support for insert/remove SFP.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
38d408152a
commit
eae6b58fb2
@ -200,6 +200,36 @@ exit:
|
||||
ql_write32(qdev, CSR, CSR_CMD_CLR_R2PCI_INT);
|
||||
}
|
||||
|
||||
static int ql_sfp_in(struct ql_adapter *qdev, struct mbox_params *mbcp)
|
||||
{
|
||||
int status;
|
||||
|
||||
mbcp->out_count = 5;
|
||||
|
||||
status = ql_get_mb_sts(qdev, mbcp);
|
||||
if (status)
|
||||
QPRINTK(qdev, DRV, ERR, "SFP in AEN broken!\n");
|
||||
else
|
||||
QPRINTK(qdev, DRV, ERR, "SFP insertion detected.\n");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static int ql_sfp_out(struct ql_adapter *qdev, struct mbox_params *mbcp)
|
||||
{
|
||||
int status;
|
||||
|
||||
mbcp->out_count = 1;
|
||||
|
||||
status = ql_get_mb_sts(qdev, mbcp);
|
||||
if (status)
|
||||
QPRINTK(qdev, DRV, ERR, "SFP out AEN broken!\n");
|
||||
else
|
||||
QPRINTK(qdev, DRV, ERR, "SFP removal detected.\n");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp)
|
||||
{
|
||||
mbcp->out_count = 2;
|
||||
@ -284,6 +314,14 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
|
||||
ql_init_fw_done(qdev, mbcp);
|
||||
break;
|
||||
|
||||
case AEN_AEN_SFP_IN:
|
||||
ql_sfp_in(qdev, mbcp);
|
||||
break;
|
||||
|
||||
case AEN_AEN_SFP_OUT:
|
||||
ql_sfp_out(qdev, mbcp);
|
||||
break;
|
||||
|
||||
case AEN_FW_INIT_FAIL:
|
||||
case AEN_SYS_ERR:
|
||||
ql_queue_fw_error(qdev);
|
||||
|
Loading…
Reference in New Issue
Block a user