public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	linuxppc64-dev@ozlabs.org, Santiago Leon <santil@us.ibm.com>,
	Linda Xie <lxiep@us.ibm.com>
Subject: Re: [RFC] SCSI target for IBM Power5 LPAR
Date: Wed, 7 Sep 2005 12:59:32 +1000	[thread overview]
Message-ID: <20050907025932.GU6945@krispykreme> (raw)
In-Reply-To: <20050906212801.GB14057@cs.umn.edu>


Hi Dave,

> This device driver provides the SCSI target side of the "virtual
> SCSI" on IBM Power5 systems.  The initiator side has been in mainline
> for a while now (drivers/scsi/ibmvscsi/ibmvscsi.c.)  Targets already
> exist for AIX and OS/400.

Good stuff. Got a couple of small suggestions.

+/* Allocate a buffer with a dma_address.  Don't use dma_alloc_coherent
+ * since that uses GFP_ATOMIC internally and we can tollerate a delay
+ */
+static void *alloc_coherent_buffer(struct server_adapter *adapter, size_t size,
+				   dma_addr_t *dma_handle)
+{
+	void *buffer = kmalloc(size, GFP_KERNEL);
+
+	if (buffer) {
+		*dma_handle = dma_map_single(adapter->dev, buffer, size,
+					     DMA_BIDIRECTIONAL);
+
+		if (dma_mapping_error(*dma_handle)) {
+			kfree(buffer);
+			buffer = NULL;
+		}
+	}
+
+	return buffer;
+}

This should be fixed in mainline, on ppc64 we no longer build the dma_*
ops on top of the pci_* ops. This means we actually look at the flags :)

+	adapter->max_sectors = MAX_SECTORS;

Does this mean we are limited to 128kB transfers? Would it be OK to
bump the default?

Anton

       reply	other threads:[~2005-09-07  3:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050906212801.GB14057@cs.umn.edu>
2005-09-07  2:59 ` Anton Blanchard [this message]
2005-09-07 14:57   ` [RFC] SCSI target for IBM Power5 LPAR Santiago Leon
2005-09-13 15:00     ` Anton Blanchard
2005-09-07 10:49 ` Christoph Hellwig
2005-09-07 12:45   ` Dave C Boutcher
2005-09-07 12:58     ` FUJITA Tomonori
2005-09-07 17:17       ` Mike Christie
2005-09-07 17:04     ` Mike Christie
2005-09-07 18:47     ` Vladislav Bolkhovitin
2005-09-07 18:56       ` Mike Christie
2005-09-07 20:07         ` [RFC] SCSI target for IBM Power5 LPAR/SCST 0.9.3-pre1 published Vladislav Bolkhovitin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050907025932.GU6945@krispykreme \
    --to=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.org \
    --cc=lxiep@us.ibm.com \
    --cc=santil@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox