From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753964AbaIXKOQ (ORCPT ); Wed, 24 Sep 2014 06:14:16 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:53049 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753858AbaIXKOL (ORCPT ); Wed, 24 Sep 2014 06:14:11 -0400 Date: Wed, 24 Sep 2014 06:13:59 -0400 From: Neil Horman To: "Sylvain 'ythier' Hitier" Cc: "David S. Miller" , Linux Kernel list , Meelis Roos Subject: Re: [PATCH] 3c59x: fix bad split of cpu_to_le32(pci_map_single()) Message-ID: <20140924101359.GC4446@hmsreliant.think-freely.org> References: <20140924093021.GA7929@erable> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140924093021.GA7929@erable> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 24, 2014 at 09:30:21AM +0000, Sylvain 'ythier' Hitier wrote: > Author: Sylvain "ythier" Hitier > Date: Wed Sep 24 09:22:16 2014 +0000 > > 3c59x: fix bad split of cpu_to_le32(pci_map_single()) > > Change the #else branch like the #if DO_ZEROCOPY branch was changed. > > Fixes: 6f2b6a3005b2c34c39f207a87667564f64f2f91a > # 3c59x: Add dma error checking and recovery > > Signed-off-by: Sylvain "ythier" Hitier > > diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c > index 8ca49f04..0a3108b3 100644 > --- a/drivers/net/ethernet/3com/3c59x.c > +++ b/drivers/net/ethernet/3com/3c59x.c > @@ -2214,7 +2214,7 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev) > } > } > #else > - dma_addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, skb->len, PCI_DMA_TODEVICE)); > + dma_addr = pci_map_single(VORTEX_PCI(vp), skb->data, skb->len, PCI_DMA_TODEVICE); > if (dma_mapping_error(&VORTEX_PCI(vp)->dev, dma_addr)) > goto out_dma_err; > vp->tx_ring[entry].addr = cpu_to_le32(dma_addr); > > > > Regards, > Sylvain "ythier" Hitier > NAK, this isn't how the other side of that was changed. I added an assignmnt of the dma_addr to check mapping errors, but still used cpu_to_le32 when assigning dma_addr to tx_ring[entry].addr. No change is needed here as far as I see. Neil > -- > Business is about being busy, not being rich... > Lived 777 days in a Debian package => http://en.wikipedia.org/wiki/Apt,_Vaucluse > There's THE room for ideals in this mechanical place! >