summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2007-04-12 04:48:54 +0000
committerkmacy <kmacy@FreeBSD.org>2007-04-12 04:48:54 +0000
commit73a329aba9ad65cca9c77c74aeb6b147e8e9a191 (patch)
tree0ed0ff55cbaf8d80604e77e8065489732462592c /sys/dev
parentdd496676aa007d9e34b633ada826e27ebec897c8 (diff)
downloadFreeBSD-src-73a329aba9ad65cca9c77c74aeb6b147e8e9a191.zip
FreeBSD-src-73a329aba9ad65cca9c77c74aeb6b147e8e9a191.tar.gz
restore sense to get_imm_packet
MFC after: 3 days
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cxgb/cxgb_sge.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c
index f363810..971e1f4 100644
--- a/sys/dev/cxgb/cxgb_sge.c
+++ b/sys/dev/cxgb/cxgb_sge.c
@@ -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;
OpenPOWER on IntegriCloud