From 8d7b3b95663c9e5cc072da6ec30bfac27ebd0030 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 1 Nov 2006 15:36:47 +0000 Subject: [PATCH] Fix botch in last commit (I tested on 6.x which doesn't have TSO): - Test the mac_type rather than if_hwassist (since ifp doesn't exist yet) to determine if the adapter supports TSO and thus to change the sizes for the bus_dma tag. Reviewed by: glebius --- sys/dev/em/if_em.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index abaf797dbaa0..15b4ad6c0134 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -1100,10 +1100,6 @@ em_init_locked(struct adapter *adapter) if (adapter->hw.mac_type >= em_82543) { if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist = EM_CHECKSUM_FEATURES; - /* - * em_setup_transmit_structures() will behave differently - * based on the state of TSO. - */ if (ifp->if_capenable & IFCAP_TSO) ifp->if_hwassist |= EM_TCPSEG_FEATURES; } @@ -2626,7 +2622,8 @@ em_allocate_transmit_structures(struct adapter *adapter) segsize = size = roundup2(adapter->hw.max_frame_size, MCLBYTES); /* Overrides for TSO - want large sizes */ - if (ifp->if_hwassist & EM_TCPSEG_FEATURES) { + if ((adapter->hw.mac_type > em_82544) && + (adapter->hw.mac_type != em_82547)) { size = EM_TSO_SIZE; segsize = PAGE_SIZE; }