Skip to contentSkip to conversation

pata_platform: don't use generic ata_port_start

PATCH Applied Olof Johansson 3 participants 3 messages May 10, 2007 – May 11, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pata_platform: don't use generic ata_port_start

Hi,

I have a system where I have a simple IDE controller that sits on a local bus without bus master dma capability, and thus no dma_mapping ops defined for the device/bus.

pata_platform works great for me, with the exception of using the generic ata_port_start which tries to do a dmam_alloc_coherent.

Looks like it doesn't need to allocate a prd table at all, so replace it with a dummy function instead.

drivers/ata/pata_platform.c +3 -1
index 4b82a54..a0aede1 100644
@@ -48,6 +48,8 @@ static int pata_platform_set_mode(struct ata_port *ap, struct ata_device **unuse
 	return 0;
 }
 
+static int ata_dummy_ret0(struct ata_port *ap)	{ return 0; }
+
 static struct scsi_host_template pata_platform_sht = {
 	.module			= THIS_MODULE,
 	.name			= DRV_NAME,
@@ -91,7 +93,7 @@ static struct ata_port_operations pata_platform_port_ops = {
 	.irq_on			= ata_irq_on,
 	.irq_ack		= ata_irq_ack,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_dummy_ret0,
 };
 
 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Olof Johansson

pata_platform works great for me, with the exception of using the generic ata_port_start which tries to do a dmam_alloc_coherent.

Looks like it doesn't need to allocate a prd table at all, so replace it with a dummy function instead.

Looks fine, and works for me.

Quoted 2 lines
Applied
#2 lore raw
In reply to Olof Johansson
Quoted 6 lines · Olof Johansson

Hi,

I have a system where I have a simple IDE controller that sits on a local bus without bus master dma capability, and thus no dma_mapping ops defined for the device/bus.

Quoted 8 lines

pata_platform works great for me, with the exception of using the generic ata_port_start which tries to do a dmam_alloc_coherent.

Looks like it doesn't need to allocate a prd table at all, so replace it with a dummy function instead.

applied.

Please move comments like "Hi," down before the "---" separator, so that they are not included in the permanent kernel changelog. See Documentation/SubmittingPatches for more info.

Jeff