Re: [RFC] SCSI target for IBM Power5 LPAR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux