Skip to contentSkip to conversation

ide: it821x in pass-through mode segfaults in 2.6.26-stable

PATCH In review Dimitri Gorokhovik 2 participants 2 messages Jul 14, 2008 – Jul 15, 2008 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ide: it821x in pass-through mode segfaults in 2.6.26-stable

(Let me know if you need the kernel config for this.)
---
The driver of ITE8212 in pass-through mode (it8212.noraid=1 on cmndline) attempts to use the field .dma_host_set' of the struct ide_dma_ops in ide_config_drive_speed' which is set to NULL by default.

So give a value to all fields of the struct ide_dma_ops.

---

drivers/ide/pci/it821x.c +6 -0
index 6ab0411..cbf6472 100644
@@ -512,8 +512,14 @@ static void __devinit it821x_quirkproc(ide_drive_t *drive)
 }
 
 static struct ide_dma_ops it821x_pass_through_dma_ops = {
+	.dma_host_set		= ide_dma_host_set,
+	.dma_setup		= ide_dma_setup,
+	.dma_exec_cmd		= ide_dma_exec_cmd,
 	.dma_start		= it821x_dma_start,
 	.dma_end		= it821x_dma_end,
+	.dma_test_irq		= ide_dma_test_irq,
+	.dma_timeout		= ide_dma_timeout,
+	.dma_lost_irq		= ide_dma_lost_irq,
 };
 
 /**
#1 lore raw

Hi,

Quoted 7 lines · Dimitri Gorokhovik

(Let me know if you need the kernel config for this.)
---
The driver of ITE8212 in pass-through mode (it8212.noraid=1 on cmndline) attempts to use the field .dma_host_set' of the struct ide_dma_ops in ide_config_drive_speed' which is set to NULL by default.

So give a value to all fields of the struct ide_dma_ops.

Thank your for fixing it.

Please resend with your Signed-off-by: so I could apply it.

Quoted 20 lines

---

drivers/ide/pci/it821x.c +6 -0
index 6ab0411..cbf6472 100644
@@ -512,8 +512,14 @@ static void __devinit it821x_quirkproc(ide_drive_t *drive)
 }
 
 static struct ide_dma_ops it821x_pass_through_dma_ops = {
+	.dma_host_set		= ide_dma_host_set,
+	.dma_setup		= ide_dma_setup,
+	.dma_exec_cmd		= ide_dma_exec_cmd,
 	.dma_start		= it821x_dma_start,
 	.dma_end		= it821x_dma_end,
+	.dma_test_irq		= ide_dma_test_irq,
+	.dma_timeout		= ide_dma_timeout,
+	.dma_lost_irq		= ide_dma_lost_irq,
 };
 
 /**