Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752314AbZA0Xql (ORCPT ); Tue, 27 Jan 2009 18:46:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751121AbZA0Xqb (ORCPT ); Tue, 27 Jan 2009 18:46:31 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:57128 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbZA0Xqa (ORCPT ); Tue, 27 Jan 2009 18:46:30 -0500 X-Envelope-From: stefanr@s5r6.in-berlin.de Message-ID: <497F9CC5.8080807@s5r6.in-berlin.de> Date: Wed, 28 Jan 2009 00:46:13 +0100 From: Stefan Richter User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20090104 SeaMonkey/1.1.14 MIME-Version: 1.0 To: FUJITA Tomonori CC: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: swiotlb default size (64 MB) too small? References: <20090127165508L.fujita.tomonori@lab.ntt.co.jp> <20090127183723W.fujita.tomonori@lab.ntt.co.jp> <20090128083135Y.fujita.tomonori@lab.ntt.co.jp> In-Reply-To: <20090128083135Y.fujita.tomonori@lab.ntt.co.jp> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1556 Lines: 46 FUJITA Tomonori wrote: > On Tue, 27 Jan 2009 18:03:40 +0100 (CET) > Stefan Richter wrote: >> +static void sbp2_unmap_scatterlist(struct device *card_device, >> + struct sbp2_command_orb *orb) >> +{ >> + if (scsi_sg_count(orb->cmd)) >> + dma_unmap_sg(card_device, scsi_sglist(orb->cmd), >> + scsi_sg_count(orb->cmd), >> + orb->cmd->sc_data_direction); >> + >> + if (orb->page_table_bus) >> + dma_unmap_single(card_device, orb->page_table_bus, >> + sizeof(orb->page_table), DMA_TO_DEVICE); > > Well, this does not look correct since zero can be a valid dma > address. Hmm. > static void sbp2_unmap_scatterlist(struct device *card_device, > struct sbp2_command_orb *orb) > { > if (scsi_sg_count(orb->cmd)) > dma_unmap_sg(card_device, scsi_sglist(orb->cmd), > scsi_sg_count(orb->cmd), > orb->cmd->sc_data_direction); > > if (scsi_sg_count(orb->cmd) > 1) > dma_unmap_single(card_device, orb->page_table_bus, > sizeof(orb->page_table), DMA_TO_DEVICE); > > > Well, looks cranky a bit but firewire is cranky for me :) Even if scsi_sg_count(cmd) > 1, the outcome of dma_map_sg() could have been 1, couldn't it? So I need to take note of that in another way. -- Stefan Richter -=====-==--= ---= ===-- http://arcgraph.de/sr/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/