cxgbe(4): Let caller specify whether it's ok to sleep in
t4_sched_config and t4_sched_params. MFC after: 2 weeks
This commit is contained in:
parent
385b4265fc
commit
bc22dc708f
@ -614,8 +614,10 @@ int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type cty
|
||||
int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox);
|
||||
int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
|
||||
int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val);
|
||||
int t4_sched_config(struct adapter *adapter, int type, int minmaxen);
|
||||
int t4_sched_config(struct adapter *adapter, int type, int minmaxen,
|
||||
int sleep_ok);
|
||||
int t4_sched_params(struct adapter *adapter, int type, int level, int mode,
|
||||
int rateunit, int ratemode, int channel, int cl,
|
||||
int minrate, int maxrate, int weight, int pktsize);
|
||||
int minrate, int maxrate, int weight, int pktsize,
|
||||
int sleep_ok);
|
||||
#endif /* __CHELSIO_COMMON_H */
|
||||
|
@ -5717,7 +5717,8 @@ int __devinit t4_port_init(struct port_info *p, int mbox, int pf, int vf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int t4_sched_config(struct adapter *adapter, int type, int minmaxen)
|
||||
int t4_sched_config(struct adapter *adapter, int type, int minmaxen,
|
||||
int sleep_ok)
|
||||
{
|
||||
struct fw_sched_cmd cmd;
|
||||
|
||||
@ -5732,12 +5733,13 @@ int t4_sched_config(struct adapter *adapter, int type, int minmaxen)
|
||||
cmd.u.config.minmaxen = minmaxen;
|
||||
|
||||
return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd),
|
||||
NULL, 1);
|
||||
NULL, sleep_ok);
|
||||
}
|
||||
|
||||
int t4_sched_params(struct adapter *adapter, int type, int level, int mode,
|
||||
int rateunit, int ratemode, int channel, int cl,
|
||||
int minrate, int maxrate, int weight, int pktsize)
|
||||
int minrate, int maxrate, int weight, int pktsize,
|
||||
int sleep_ok)
|
||||
{
|
||||
struct fw_sched_cmd cmd;
|
||||
|
||||
@ -5761,5 +5763,5 @@ int t4_sched_params(struct adapter *adapter, int type, int level, int mode,
|
||||
cmd.u.params.pktsize = cpu_to_be16(pktsize);
|
||||
|
||||
return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd),
|
||||
NULL, 1);
|
||||
NULL, sleep_ok);
|
||||
}
|
||||
|
@ -7617,7 +7617,7 @@ set_sched_class(struct adapter *sc, struct t4_sched_params *p)
|
||||
}
|
||||
|
||||
/* And pass the request to the firmware ...*/
|
||||
rc = -t4_sched_config(sc, fw_type, p->u.config.minmax);
|
||||
rc = -t4_sched_config(sc, fw_type, p->u.config.minmax, 1);
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -7715,7 +7715,7 @@ set_sched_class(struct adapter *sc, struct t4_sched_params *p)
|
||||
rc = -t4_sched_params(sc, fw_type, fw_level, fw_mode,
|
||||
fw_rateunit, fw_ratemode, p->u.params.channel,
|
||||
p->u.params.cl, p->u.params.minrate, p->u.params.maxrate,
|
||||
p->u.params.weight, p->u.params.pktsize);
|
||||
p->u.params.weight, p->u.params.pktsize, 1);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user