1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-29 16:44:03 +00:00

restore sense to get_imm_packet

MFC after: 3 days
This commit is contained in:
Kip Macy 2007-04-12 04:48:54 +00:00
parent f6df491097
commit aa84193acf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168650

View File

@ -282,22 +282,20 @@ get_imm_packet(adapter_t *sc, const struct rsp_desc *resp, struct mbuf *m, void
if (sopeop == RSPQ_NSOP_NEOP || sopeop == RSPQ_SOP)
return (0);
m = m_gethdr(M_NOWAIT, MT_DATA);
len = G_RSPD_LEN(ntohl(resp->len_cq));
if (m) {
MH_ALIGN(m, IMMED_PKT_SIZE);
memcpy(m->m_data, resp->imm_data, IMMED_PKT_SIZE);
m->m_len = len;
switch (sopeop) {
case RSPQ_SOP_EOP:
m = m_gethdr(M_NOWAIT, MT_DATA);
m->m_len = m->m_pkthdr.len = len;
m->m_flags |= M_PKTHDR;
memcpy(m->m_data, resp->imm_data, IMMED_PKT_SIZE);
MH_ALIGN(m, IMMED_PKT_SIZE);
break;
case RSPQ_EOP:
case RSPQ_EOP:
memcpy(cl, resp->imm_data, len);
m_iovappend(m, cl, MSIZE, len, 0);
break;