s390/qeth: make cmd/reply matching more flexible
When data is received on the READ channel, the matching logic for cmds that are waiting for a reply is currently hard-coded into the channel's main IO callback. Move this into a per-cmd callback, so that we can apply custom matching logic for each individual cmd. This also allows us to remove the coarse-grained check for unexpected non-IPA replies, since they will no longer match against _all_ pending cmds. Note that IDX cmds use _no_ matcher, since their reply is synchronously received as part of the cmd's IO. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
91003f354e
commit
7f92316c53
@@ -896,7 +896,8 @@ int qeth_osn_assist(struct net_device *dev, void *data, int data_len)
|
||||
if (!iob)
|
||||
return -ENOMEM;
|
||||
|
||||
qeth_prepare_ipa_cmd(card, iob, (u16) data_len);
|
||||
qeth_prepare_ipa_cmd(card, iob, (u16) data_len, NULL);
|
||||
|
||||
memcpy(__ipa_cmd(iob), data, data_len);
|
||||
iob->callback = qeth_osn_assist_cb;
|
||||
return qeth_send_ipa_cmd(card, iob, NULL, NULL);
|
||||
|
Reference in New Issue
Block a user