* [PATCH] ide-floppy fix
@ 2008-07-15 5:33 Borislav Petkov
2008-07-15 5:40 ` Borislav Petkov
2008-07-16 15:59 ` Bartlomiej Zolnierkiewicz
0 siblings, 2 replies; 44+ messages in thread
From: Borislav Petkov @ 2008-07-15 5:33 UTC (permalink / raw)
To: bzolnier; +Cc: linux-kernel, linux-ide, stable
Hi Bart,
i broke ide-floppy for Iomega ZIP drives with the last round of generic patches
and now it works only sometimes during write requests. The reason for it is that
the command issue path is not being delayed with a 50msec timeout, for details
see the comment in idefloppy_start_pc(). Anyway, attached is a fix that should
go into the -stable kernel too since the driver is now broken in 2.6.26.
On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
up here with the following error:
[ 4.296729] Uniform Multi-Platform E-IDE driver
[ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
[ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
[ 4.298153] ICH4: not 100% native mode: will probe irqs later
[ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
[ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
[ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
[ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
[ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
[ 4.868027] hda: UDMA/33 mode selected
[ 4.868441] hdb: UDMA/100 mode selected
[ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
[ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
[ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
[ 5.847362] hdd: UDMA/33 mode selected
[ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
[ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
[ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
[ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
[ 11.342504] hde: no response (status = 0xa1), resetting drive
[ 17.206535] hdf: no response (status = 0xa1), resetting drive
[ 17.614474] ------------[ cut here ]------------
[ 17.614528] WARNING: at lib/kref.c:43 kref_get+0x1a/0x20()
[ 17.614586] Modules linked in:
[ 17.614681] Pid: 1, comm: swapper Not tainted 2.6.26 #33
[ 17.614738] [<c01220e9>] warn_on_slowpath+0x41/0x7b
[ 17.614839] [<c02efa9a>] ? _spin_unlock_irq+0x2d/0x42
[ 17.614980] [<c011d1e7>] ? finish_task_switch+0x47/0x94
[ 17.615118] [<c011d1cb>] ? finish_task_switch+0x2b/0x94
[ 17.615257] [<c02effa8>] ? __reacquire_kernel_lock+0x33/0x37
[ 17.615396] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.615552] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.615693] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.615830] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.615968] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.616107] [<c01d86ae>] kref_get+0x1a/0x20
[ 17.616204] [<c01d7c39>] kobject_get+0x12/0x17
[ 17.616301] [<c01d7ce0>] kobject_add_internal+0x44/0x14f
[ 17.616399] [<c01d7e69>] kobject_add_varg+0x4a/0x4c
[ 17.617153] [<c01d7ed0>] kobject_add+0x43/0x49
[ 17.617252] [<c022a5dd>] device_add+0x91/0x48e
[ 17.617353] [<c022a2aa>] ? device_initialize+0xd7/0xf8
[ 17.617510] [<c022a9ec>] device_register+0x12/0x15
[ 17.617606] [<c02376b1>] ide_host_register+0x284/0x537
[ 17.617706] [<c0237af8>] ? ide_host_alloc_all+0x123/0x178
[ 17.617845] [<c04227ba>] ide_generic_init+0x142/0x1e7
[ 17.617946] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.618084] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.618226] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.618363] [<c02efa9a>] ? _spin_unlock_irq+0x2d/0x42
[ 17.618516] [<c011d1e7>] ? finish_task_switch+0x47/0x94
[ 17.618655] [<c02effa8>] ? __reacquire_kernel_lock+0x33/0x37
[ 17.618796] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.618938] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.619077] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.619218] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.619357] [<c02eeb4d>] ? mutex_unlock+0x8/0xa
[ 17.619512] [<c01a0334>] ? sysfs_addrm_finish+0x17/0x1cd
[ 17.619649] [<c02efb2e>] ? _spin_unlock+0x27/0x3c
[ 17.619788] [<c017bad9>] ? ifind+0x7e/0x88
[ 17.619926] [<c019fdd8>] ? sysfs_ilookup_test+0x0/0x11
[ 17.620068] [<c019ffa7>] ? sysfs_find_dirent+0x16/0x27
[ 17.620206] [<c01a00a0>] ? sysfs_add_one+0x14/0x85
[ 17.620344] [<c019fc8e>] ? sysfs_add_file_mode+0x4e/0x6d
[ 17.620502] [<c019fcbb>] ? sysfs_add_file+0xe/0x13
[ 17.620637] [<c040d2eb>] kernel_init+0x127/0x257
[ 17.620739] [<c0422678>] ? ide_generic_init+0x0/0x1e7
[ 17.620879] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.621019] [<c01dbe18>] ? trace_hardirqs_on_thunk+0xc/0x10
[ 17.621159] [<c0102eb6>] ? restore_nocheck_notrace+0x0/0xe
[ 17.621298] [<c040d1c4>] ? kernel_init+0x0/0x257
[ 17.621438] [<c040d1c4>] ? kernel_init+0x0/0x257
[ 17.621591] [<c0103a8f>] kernel_thread_helper+0x7/0x10
[ 17.621691] =======================
[ 17.621759] ---[ end trace 01bb572fb1fb92e8 ]---
[ 17.621835] BUG: unable to handle kernel paging request at 6f690074
[ 17.621968] IP: [<6f690074>]
[ 17.622060] *pde = 00000000
[ 17.622153] Oops: 0000 [#1] PREEMPT SMP
[ 17.622370] Modules linked in:
[ 17.622458]
[ 17.622506] Pid: 1, comm: swapper Tainted: G W (2.6.26 #33)
[ 17.622617] EIP: 0060:[<6f690074>] EFLAGS: 00010206 CPU: 0
[ 17.622670] EIP is at 0x6f690074
[ 17.622720] EAX: dfa1b5c8 EBX: c03e630c ECX: 6f690074 EDX: c01ec367
[ 17.622774] ESI: dfa1b5c8 EDI: c069bd4c EBP: df82fc24 ESP: df82fc14
[ 17.622884] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[ 17.622937] Process swapper (pid: 1, ti=df82e000 task=df830000 task.ti=df82e000)
[ 17.622992] Stack: c01ec382 c03e630c dfa1b614 00000000 df82fc34 c02e11c6 c03e630c dfa1b614
[ 17.623379] df82fc44 c02e1255 dfa1b5e8 dfa1b5e8 df82fc74 c022a8cf dfa1b6e4 dfa1b6c0
[ 17.623379] c03e630c dfa1b5e8 00000000 00000000 c022a2aa dfa1b5e8 dfa1b5e8 00000006
[ 17.623379] Call Trace:
[ 17.623379] [<c01ec382>] ? pci_device_suspend+0x1b/0x4d
[ 17.623379] [<c02e11c6>] ? klist_node_init+0x36/0x3a
[ 17.623379] [<c02e1255>] ? klist_add_tail+0x12/0x38
[ 17.623379] [<c022a8cf>] ? device_add+0x383/0x48e
[ 17.623379] [<c022a2aa>] ? device_initialize+0xd7/0xf8
[ 17.623379] [<c022a9ec>] ? device_register+0x12/0x15
[ 17.623379] [<c02376b1>] ? ide_host_register+0x284/0x537
[ 17.623379] [<c0237af8>] ? ide_host_alloc_all+0x123/0x178
[ 17.623379] [<c04227ba>] ? ide_generic_init+0x142/0x1e7
[ 17.623379] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.623379] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.623379] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.623379] [<c02efa9a>] ? _spin_unlock_irq+0x2d/0x42
[ 17.623379] [<c011d1e7>] ? finish_task_switch+0x47/0x94
[ 17.623379] [<c02effa8>] ? __reacquire_kernel_lock+0x33/0x37
[ 17.623379] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.623379] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.623379] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.623379] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
[ 17.623379] [<c02eeb4d>] ? mutex_unlock+0x8/0xa
[ 17.623379] [<c01a0334>] ? sysfs_addrm_finish+0x17/0x1cd
[ 17.623379] [<c02efb2e>] ? _spin_unlock+0x27/0x3c
[ 17.623379] [<c017bad9>] ? ifind+0x7e/0x88
[ 17.623379] [<c019fdd8>] ? sysfs_ilookup_test+0x0/0x11
[ 17.623379] [<c019ffa7>] ? sysfs_find_dirent+0x16/0x27
[ 17.623379] [<c01a00a0>] ? sysfs_add_one+0x14/0x85
[ 17.623379] [<c019fc8e>] ? sysfs_add_file_mode+0x4e/0x6d
[ 17.623379] [<c019fcbb>] ? sysfs_add_file+0xe/0x13
[ 17.623379] [<c040d2eb>] ? kernel_init+0x127/0x257
[ 17.623379] [<c0422678>] ? ide_generic_init+0x0/0x1e7
[ 17.623379] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
[ 17.623379] [<c01dbe18>] ? trace_hardirqs_on_thunk+0xc/0x10
[ 17.623379] [<c0102eb6>] ? restore_nocheck_notrace+0x0/0xe
[ 17.623379] [<c040d1c4>] ? kernel_init+0x0/0x257
[ 17.623379] [<c040d1c4>] ? kernel_init+0x0/0x257
[ 17.623379] [<c0103a8f>] ? kernel_thread_helper+0x7/0x10
[ 17.623379] =======================
[ 17.623379] Code: Bad EIP value.
[ 17.623379] EIP: [<6f690074>] 0x6f690074 SS:ESP 0068:df82fc14
[ 17.630502] ---[ end trace 01bb572fb1fb92e8 ]---
[ 17.630557] Kernel panic - not syncing: Attempted to kill init!
I tracked the error down to the call to ide_register_port(hwif) in
ide-probe.c:ide_host_register() which does device_register(&hwif->gendev) and
the hwif->gendev->kobj seems unitialized thus the WARN_ON on its refcount in
kref_get(). Will look into it more when i get some free time.
--
From: Borislav Petkov <petkovbb@gmail.com>
Check the correct flags-location for set features.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 97cabfd..ddabad9 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -257,7 +257,7 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc,
}
/* Send the actual packet */
- if ((pc->flags & IDE_DFLAG_ZIP_DRIVE) == 0)
+ if ((drive->dev_flags & IDE_DFLAG_ZIP_DRIVE) == 0)
hwif->tp_ops->output_data(drive, NULL, rq->cmd, 12);
return ide_started;
--
Regards/Gruß,
Boris.
^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-15 5:33 [PATCH] ide-floppy fix Borislav Petkov
@ 2008-07-15 5:40 ` Borislav Petkov
2008-07-16 15:59 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 44+ messages in thread
From: Borislav Petkov @ 2008-07-15 5:40 UTC (permalink / raw)
To: bzolnier, linux-kernel, linux-ide, stable
On Tue, Jul 15, 2008 at 07:33:56AM +0200, Borislav Petkov wrote:
> Hi Bart,
>
> i broke ide-floppy for Iomega ZIP drives with the last round of generic patches
> and now it works only sometimes during write requests. The reason for it is that
> the command issue path is not being delayed with a 50msec timeout, for details
> see the comment in idefloppy_start_pc(). Anyway, attached is a fix that should
> go into the -stable kernel too since the driver is now broken in 2.6.26.
>
> On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> up here with the following error:
>
>
> [ 4.296729] Uniform Multi-Platform E-IDE driver
> [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> [ 4.868027] hda: UDMA/33 mode selected
> [ 4.868441] hdb: UDMA/100 mode selected
> [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> [ 5.847362] hdd: UDMA/33 mode selected
> [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> [ 11.342504] hde: no response (status = 0xa1), resetting drive
> [ 17.206535] hdf: no response (status = 0xa1), resetting drive
> [ 17.614474] ------------[ cut here ]------------
> [ 17.614528] WARNING: at lib/kref.c:43 kref_get+0x1a/0x20()
> [ 17.614586] Modules linked in:
> [ 17.614681] Pid: 1, comm: swapper Not tainted 2.6.26 #33
> [ 17.614738] [<c01220e9>] warn_on_slowpath+0x41/0x7b
> [ 17.614839] [<c02efa9a>] ? _spin_unlock_irq+0x2d/0x42
> [ 17.614980] [<c011d1e7>] ? finish_task_switch+0x47/0x94
> [ 17.615118] [<c011d1cb>] ? finish_task_switch+0x2b/0x94
> [ 17.615257] [<c02effa8>] ? __reacquire_kernel_lock+0x33/0x37
> [ 17.615396] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.615552] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.615693] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.615830] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.615968] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.616107] [<c01d86ae>] kref_get+0x1a/0x20
> [ 17.616204] [<c01d7c39>] kobject_get+0x12/0x17
> [ 17.616301] [<c01d7ce0>] kobject_add_internal+0x44/0x14f
> [ 17.616399] [<c01d7e69>] kobject_add_varg+0x4a/0x4c
> [ 17.617153] [<c01d7ed0>] kobject_add+0x43/0x49
> [ 17.617252] [<c022a5dd>] device_add+0x91/0x48e
> [ 17.617353] [<c022a2aa>] ? device_initialize+0xd7/0xf8
> [ 17.617510] [<c022a9ec>] device_register+0x12/0x15
> [ 17.617606] [<c02376b1>] ide_host_register+0x284/0x537
> [ 17.617706] [<c0237af8>] ? ide_host_alloc_all+0x123/0x178
> [ 17.617845] [<c04227ba>] ide_generic_init+0x142/0x1e7
> [ 17.617946] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.618084] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.618226] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.618363] [<c02efa9a>] ? _spin_unlock_irq+0x2d/0x42
> [ 17.618516] [<c011d1e7>] ? finish_task_switch+0x47/0x94
> [ 17.618655] [<c02effa8>] ? __reacquire_kernel_lock+0x33/0x37
> [ 17.618796] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.618938] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.619077] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.619218] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.619357] [<c02eeb4d>] ? mutex_unlock+0x8/0xa
> [ 17.619512] [<c01a0334>] ? sysfs_addrm_finish+0x17/0x1cd
> [ 17.619649] [<c02efb2e>] ? _spin_unlock+0x27/0x3c
> [ 17.619788] [<c017bad9>] ? ifind+0x7e/0x88
> [ 17.619926] [<c019fdd8>] ? sysfs_ilookup_test+0x0/0x11
> [ 17.620068] [<c019ffa7>] ? sysfs_find_dirent+0x16/0x27
> [ 17.620206] [<c01a00a0>] ? sysfs_add_one+0x14/0x85
> [ 17.620344] [<c019fc8e>] ? sysfs_add_file_mode+0x4e/0x6d
> [ 17.620502] [<c019fcbb>] ? sysfs_add_file+0xe/0x13
> [ 17.620637] [<c040d2eb>] kernel_init+0x127/0x257
> [ 17.620739] [<c0422678>] ? ide_generic_init+0x0/0x1e7
> [ 17.620879] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.621019] [<c01dbe18>] ? trace_hardirqs_on_thunk+0xc/0x10
> [ 17.621159] [<c0102eb6>] ? restore_nocheck_notrace+0x0/0xe
> [ 17.621298] [<c040d1c4>] ? kernel_init+0x0/0x257
> [ 17.621438] [<c040d1c4>] ? kernel_init+0x0/0x257
> [ 17.621591] [<c0103a8f>] kernel_thread_helper+0x7/0x10
> [ 17.621691] =======================
> [ 17.621759] ---[ end trace 01bb572fb1fb92e8 ]---
> [ 17.621835] BUG: unable to handle kernel paging request at 6f690074
> [ 17.621968] IP: [<6f690074>]
> [ 17.622060] *pde = 00000000
> [ 17.622153] Oops: 0000 [#1] PREEMPT SMP
> [ 17.622370] Modules linked in:
> [ 17.622458]
> [ 17.622506] Pid: 1, comm: swapper Tainted: G W (2.6.26 #33)
> [ 17.622617] EIP: 0060:[<6f690074>] EFLAGS: 00010206 CPU: 0
> [ 17.622670] EIP is at 0x6f690074
> [ 17.622720] EAX: dfa1b5c8 EBX: c03e630c ECX: 6f690074 EDX: c01ec367
> [ 17.622774] ESI: dfa1b5c8 EDI: c069bd4c EBP: df82fc24 ESP: df82fc14
> [ 17.622884] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> [ 17.622937] Process swapper (pid: 1, ti=df82e000 task=df830000 task.ti=df82e000)
> [ 17.622992] Stack: c01ec382 c03e630c dfa1b614 00000000 df82fc34 c02e11c6 c03e630c dfa1b614
> [ 17.623379] df82fc44 c02e1255 dfa1b5e8 dfa1b5e8 df82fc74 c022a8cf dfa1b6e4 dfa1b6c0
> [ 17.623379] c03e630c dfa1b5e8 00000000 00000000 c022a2aa dfa1b5e8 dfa1b5e8 00000006
> [ 17.623379] Call Trace:
> [ 17.623379] [<c01ec382>] ? pci_device_suspend+0x1b/0x4d
> [ 17.623379] [<c02e11c6>] ? klist_node_init+0x36/0x3a
> [ 17.623379] [<c02e1255>] ? klist_add_tail+0x12/0x38
> [ 17.623379] [<c022a8cf>] ? device_add+0x383/0x48e
> [ 17.623379] [<c022a2aa>] ? device_initialize+0xd7/0xf8
> [ 17.623379] [<c022a9ec>] ? device_register+0x12/0x15
> [ 17.623379] [<c02376b1>] ? ide_host_register+0x284/0x537
> [ 17.623379] [<c0237af8>] ? ide_host_alloc_all+0x123/0x178
> [ 17.623379] [<c04227ba>] ? ide_generic_init+0x142/0x1e7
> [ 17.623379] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.623379] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.623379] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.623379] [<c02efa9a>] ? _spin_unlock_irq+0x2d/0x42
> [ 17.623379] [<c011d1e7>] ? finish_task_switch+0x47/0x94
> [ 17.623379] [<c02effa8>] ? __reacquire_kernel_lock+0x33/0x37
> [ 17.623379] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.623379] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.623379] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.623379] [<c013d1d9>] ? trace_hardirqs_on+0xb/0xd
> [ 17.623379] [<c02eeb4d>] ? mutex_unlock+0x8/0xa
> [ 17.623379] [<c01a0334>] ? sysfs_addrm_finish+0x17/0x1cd
> [ 17.623379] [<c02efb2e>] ? _spin_unlock+0x27/0x3c
> [ 17.623379] [<c017bad9>] ? ifind+0x7e/0x88
> [ 17.623379] [<c019fdd8>] ? sysfs_ilookup_test+0x0/0x11
> [ 17.623379] [<c019ffa7>] ? sysfs_find_dirent+0x16/0x27
> [ 17.623379] [<c01a00a0>] ? sysfs_add_one+0x14/0x85
> [ 17.623379] [<c019fc8e>] ? sysfs_add_file_mode+0x4e/0x6d
> [ 17.623379] [<c019fcbb>] ? sysfs_add_file+0xe/0x13
> [ 17.623379] [<c040d2eb>] ? kernel_init+0x127/0x257
> [ 17.623379] [<c0422678>] ? ide_generic_init+0x0/0x1e7
> [ 17.623379] [<c013d1ad>] ? trace_hardirqs_on_caller+0xe1/0x102
> [ 17.623379] [<c01dbe18>] ? trace_hardirqs_on_thunk+0xc/0x10
> [ 17.623379] [<c0102eb6>] ? restore_nocheck_notrace+0x0/0xe
> [ 17.623379] [<c040d1c4>] ? kernel_init+0x0/0x257
> [ 17.623379] [<c040d1c4>] ? kernel_init+0x0/0x257
> [ 17.623379] [<c0103a8f>] ? kernel_thread_helper+0x7/0x10
> [ 17.623379] =======================
> [ 17.623379] Code: Bad EIP value.
> [ 17.623379] EIP: [<6f690074>] 0x6f690074 SS:ESP 0068:df82fc14
> [ 17.630502] ---[ end trace 01bb572fb1fb92e8 ]---
> [ 17.630557] Kernel panic - not syncing: Attempted to kill init!
>
> I tracked the error down to the call to ide_register_port(hwif) in
> ide-probe.c:ide_host_register() which does device_register(&hwif->gendev) and
> the hwif->gendev->kobj seems unitialized thus the WARN_ON on its refcount in
i mean hwif->gendev->kobj->parent here.
> kref_get(). Will look into it more when i get some free time.
>
> --
> From: Borislav Petkov <petkovbb@gmail.com>
>
> Check the correct flags-location for set features.
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>
> ---
>
> diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> index 97cabfd..ddabad9 100644
> --- a/drivers/ide/ide-atapi.c
> +++ b/drivers/ide/ide-atapi.c
> @@ -257,7 +257,7 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc,
> }
>
> /* Send the actual packet */
> - if ((pc->flags & IDE_DFLAG_ZIP_DRIVE) == 0)
> + if ((drive->dev_flags & IDE_DFLAG_ZIP_DRIVE) == 0)
> hwif->tp_ops->output_data(drive, NULL, rq->cmd, 12);
>
> return ide_started;
> --
> Regards/Gruß,
> Boris.
--
Regards/Gruß,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-16 15:59 ` Bartlomiej Zolnierkiewicz
@ 2008-07-15 20:39 ` Borislav Petkov
2008-07-15 20:58 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-07-15 20:39 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide, stable
On Wed, Jul 16, 2008 at 05:59:16PM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> Hi,
>
> On Tuesday 15 July 2008, Borislav Petkov wrote:
>
> [...]
>
> > On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> > up here with the following error:
> >
> > [ 4.296729] Uniform Multi-Platform E-IDE driver
> > [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> > [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> > [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> > [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> > [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> > [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> > [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> > [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> > [ 4.868027] hda: UDMA/33 mode selected
> > [ 4.868441] hdb: UDMA/100 mode selected
> > [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> > [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> > [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> > [ 5.847362] hdd: UDMA/33 mode selected
> > [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> > [ 11.342504] hde: no response (status = 0xa1), resetting drive
> > [ 17.206535] hdf: no response (status = 0xa1), resetting drive
>
> hde? hdf?
>
> [...]
yep, looks strange to me too. Isn't that the MAX_HWIFS upper bound of a loop.. ?
>
> > I tracked the error down to the call to ide_register_port(hwif) in
> > ide-probe.c:ide_host_register() which does device_register(&hwif->gendev) and
> > the hwif->gendev->kobj seems unitialized thus the WARN_ON on its refcount in
> > kref_get(). Will look into it more when i get some free time.
>
> Unfortunately I couldn't reproduce this problem here (2.6.26 + pata tree)
> so please try to debug it and/or narrow it down to the guilty change.
Will do.
> > --
> > From: Borislav Petkov <petkovbb@gmail.com>
> >
> > Check the correct flags-location for set features.
> >
> > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>
> Thanks, I folded the fix into original patch (->dev_flags is not yet
> upstream so -stable fix shouldn't be necessary).
>
> While on it: I later noticed that there will be also need for common
> ATA/ATAPI ->dev_flags in the future so I wonder whether current
> ->dev_flags should be renamed to ->atapi_flags (& s/*DFLAG*/*AFLAG*/).
>
> If there is agreement on this I'll fix it in pata tree.
... or if there's room, use a single ->dev_flags for all possible flag settings?
--
Regards/Gruß,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-15 20:39 ` Borislav Petkov
@ 2008-07-15 20:58 ` Bartlomiej Zolnierkiewicz
2008-07-16 5:20 ` Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-15 20:58 UTC (permalink / raw)
To: petkovbb; +Cc: linux-kernel, linux-ide, stable
On Tuesday 15 July 2008, Borislav Petkov wrote:
> On Wed, Jul 16, 2008 at 05:59:16PM +0200, Bartlomiej Zolnierkiewicz wrote:
> >
> > Hi,
> >
> > On Tuesday 15 July 2008, Borislav Petkov wrote:
> >
> > [...]
> >
> > > On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> > > up here with the following error:
> > >
> > > [ 4.296729] Uniform Multi-Platform E-IDE driver
> > > [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> > > [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> > > [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> > > [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> > > [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> > > [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> > > [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> > > [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> > > [ 4.868027] hda: UDMA/33 mode selected
> > > [ 4.868441] hdb: UDMA/100 mode selected
> > > [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> > > [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> > > [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> > > [ 5.847362] hdd: UDMA/33 mode selected
> > > [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > > [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> > > [ 11.342504] hde: no response (status = 0xa1), resetting drive
> > > [ 17.206535] hdf: no response (status = 0xa1), resetting drive
> >
> > hde? hdf?
> >
> > [...]
>
> yep, looks strange to me too. Isn't that the MAX_HWIFS upper bound of a loop.. ?
Close, it is related to MAX_HWIFS being upper bound on hws[]
in ide_generic.c but now we loop for ARRAY_SIZE(legacy_bases).
IOW there is a memset(hws, 0, MAX_HWIFS) missing at the top of
ide_generic_init() (please re-test after adding it).
This may also explain the later problems with ide_host_register().
> > > From: Borislav Petkov <petkovbb@gmail.com>
> > >
> > > Check the correct flags-location for set features.
> > >
> > > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> >
> > Thanks, I folded the fix into original patch (->dev_flags is not yet
> > upstream so -stable fix shouldn't be necessary).
> >
> > While on it: I later noticed that there will be also need for common
> > ATA/ATAPI ->dev_flags in the future so I wonder whether current
> > ->dev_flags should be renamed to ->atapi_flags (& s/*DFLAG*/*AFLAG*/).
> >
> > If there is agreement on this I'll fix it in pata tree.
>
> ... or if there's room, use a single ->dev_flags for all possible flag settings?
Unfortunately there isn't enough room left (27 bits are occupied ATM)
and having u64 ->dev_flags sucks...
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-15 20:58 ` Bartlomiej Zolnierkiewicz
@ 2008-07-16 5:20 ` Borislav Petkov
2008-07-16 17:56 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-07-16 5:20 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide, stable
On Tue, Jul 15, 2008 at 10:58:48PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Tuesday 15 July 2008, Borislav Petkov wrote:
> > On Wed, Jul 16, 2008 at 05:59:16PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > >
> > > Hi,
> > >
> > > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > >
> > > [...]
> > >
> > > > On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> > > > up here with the following error:
> > > >
> > > > [ 4.296729] Uniform Multi-Platform E-IDE driver
> > > > [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> > > > [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> > > > [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> > > > [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> > > > [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> > > > [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> > > > [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> > > > [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > [ 4.868027] hda: UDMA/33 mode selected
> > > > [ 4.868441] hdb: UDMA/100 mode selected
> > > > [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> > > > [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> > > > [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > [ 5.847362] hdd: UDMA/33 mode selected
> > > > [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > > > [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> > > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> > > > [ 11.342504] hde: no response (status = 0xa1), resetting drive
> > > > [ 17.206535] hdf: no response (status = 0xa1), resetting drive
> > >
> > > hde? hdf?
> > >
> > > [...]
> >
> > yep, looks strange to me too. Isn't that the MAX_HWIFS upper bound of a loop.. ?
>
> Close, it is related to MAX_HWIFS being upper bound on hws[]
> in ide_generic.c but now we loop for ARRAY_SIZE(legacy_bases).
>
> IOW there is a memset(hws, 0, MAX_HWIFS) missing at the top of
> ide_generic_init() (please re-test after adding it).
>
> This may also explain the later problems with ide_host_register().
>
> > > > From: Borislav Petkov <petkovbb@gmail.com>
> > > >
> > > > Check the correct flags-location for set features.
> > > >
> > > > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> > >
> > > Thanks, I folded the fix into original patch (->dev_flags is not yet
> > > upstream so -stable fix shouldn't be necessary).
> > >
> > > While on it: I later noticed that there will be also need for common
> > > ATA/ATAPI ->dev_flags in the future so I wonder whether current
> > > ->dev_flags should be renamed to ->atapi_flags (& s/*DFLAG*/*AFLAG*/).
> > >
> > > If there is agreement on this I'll fix it in pata tree.
> >
> > ... or if there's room, use a single ->dev_flags for all possible flag settings?
>
> Unfortunately there isn't enough room left (27 bits are occupied ATM)
> and having u64 ->dev_flags sucks...
I'm pretty sure some of the 27 will be removed later but yeah, u64 flags is
kinda bad since it has to be always atomically updated and this has to be
explicitly staged on 32bit cpus due to the wordsize. I guess two flags members
are the easiest thing to do for now, you might add some comments to both so we
know which is which.
--
Regards/Gruß,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-15 5:33 [PATCH] ide-floppy fix Borislav Petkov
2008-07-15 5:40 ` Borislav Petkov
@ 2008-07-16 15:59 ` Bartlomiej Zolnierkiewicz
2008-07-15 20:39 ` Borislav Petkov
1 sibling, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-16 15:59 UTC (permalink / raw)
To: petkovbb; +Cc: linux-kernel, linux-ide, stable
Hi,
On Tuesday 15 July 2008, Borislav Petkov wrote:
[...]
> On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> up here with the following error:
>
> [ 4.296729] Uniform Multi-Platform E-IDE driver
> [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> [ 4.868027] hda: UDMA/33 mode selected
> [ 4.868441] hdb: UDMA/100 mode selected
> [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> [ 5.847362] hdd: UDMA/33 mode selected
> [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> [ 11.342504] hde: no response (status = 0xa1), resetting drive
> [ 17.206535] hdf: no response (status = 0xa1), resetting drive
hde? hdf?
[...]
> I tracked the error down to the call to ide_register_port(hwif) in
> ide-probe.c:ide_host_register() which does device_register(&hwif->gendev) and
> the hwif->gendev->kobj seems unitialized thus the WARN_ON on its refcount in
> kref_get(). Will look into it more when i get some free time.
Unfortunately I couldn't reproduce this problem here (2.6.26 + pata tree)
so please try to debug it and/or narrow it down to the guilty change.
> --
> From: Borislav Petkov <petkovbb@gmail.com>
>
> Check the correct flags-location for set features.
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Thanks, I folded the fix into original patch (->dev_flags is not yet
upstream so -stable fix shouldn't be necessary).
While on it: I later noticed that there will be also need for common
ATA/ATAPI ->dev_flags in the future so I wonder whether current
->dev_flags should be renamed to ->atapi_flags (& s/*DFLAG*/*AFLAG*/).
If there is agreement on this I'll fix it in pata tree.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-16 5:20 ` Borislav Petkov
@ 2008-07-16 17:56 ` Bartlomiej Zolnierkiewicz
2008-07-20 12:06 ` Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-16 17:56 UTC (permalink / raw)
To: petkovbb; +Cc: linux-kernel, linux-ide, stable
On Wednesday 16 July 2008, Borislav Petkov wrote:
> On Tue, Jul 15, 2008 at 10:58:48PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > > On Wed, Jul 16, 2008 at 05:59:16PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > > >
> > > > [...]
> > > >
> > > > > On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> > > > > up here with the following error:
> > > > >
> > > > > [ 4.296729] Uniform Multi-Platform E-IDE driver
> > > > > [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> > > > > [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> > > > > [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> > > > > [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> > > > > [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> > > > > [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> > > > > [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> > > > > [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > > [ 4.868027] hda: UDMA/33 mode selected
> > > > > [ 4.868441] hdb: UDMA/100 mode selected
> > > > > [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> > > > > [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> > > > > [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > > [ 5.847362] hdd: UDMA/33 mode selected
> > > > > [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > > > > [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> > > > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> > > > > [ 11.342504] hde: no response (status = 0xa1), resetting drive
> > > > > [ 17.206535] hdf: no response (status = 0xa1), resetting drive
> > > >
> > > > hde? hdf?
> > > >
> > > > [...]
> > >
> > > yep, looks strange to me too. Isn't that the MAX_HWIFS upper bound of a loop.. ?
> >
> > Close, it is related to MAX_HWIFS being upper bound on hws[]
> > in ide_generic.c but now we loop for ARRAY_SIZE(legacy_bases).
> >
> > IOW there is a memset(hws, 0, MAX_HWIFS) missing at the top of
> > ide_generic_init() (please re-test after adding it).
> >
> > This may also explain the later problems with ide_host_register().
I fixed this in pata tree now with:
"ide-generic: remove ide_default_{io_base,irq}() inlines (take 2)" patch
> > > > > From: Borislav Petkov <petkovbb@gmail.com>
> > > > >
> > > > > Check the correct flags-location for set features.
> > > > >
> > > > > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> > > >
> > > > Thanks, I folded the fix into original patch (->dev_flags is not yet
> > > > upstream so -stable fix shouldn't be necessary).
> > > >
> > > > While on it: I later noticed that there will be also need for common
> > > > ATA/ATAPI ->dev_flags in the future so I wonder whether current
> > > > ->dev_flags should be renamed to ->atapi_flags (& s/*DFLAG*/*AFLAG*/).
> > > >
> > > > If there is agreement on this I'll fix it in pata tree.
> > >
> > > ... or if there's room, use a single ->dev_flags for all possible flag settings?
> >
> > Unfortunately there isn't enough room left (27 bits are occupied ATM)
> > and having u64 ->dev_flags sucks...
>
> I'm pretty sure some of the 27 will be removed later but yeah, u64 flags is
> kinda bad since it has to be always atomically updated and this has to be
> explicitly staged on 32bit cpus due to the wordsize. I guess two flags members
->dev_flags -> ->atapi_flags & co. are also in pata tree now
> are the easiest thing to do for now, you might add some comments to both so we
> know which is which.
Sure, I will remember about this when it comes time for ->dev_flags.
Thanks,
Bart
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-16 17:56 ` Bartlomiej Zolnierkiewicz
@ 2008-07-20 12:06 ` Borislav Petkov
2008-07-21 19:03 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-07-20 12:06 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide, stable
Hi Bart,
On Wed, Jul 16, 2008 at 07:56:46PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Wednesday 16 July 2008, Borislav Petkov wrote:
> > On Tue, Jul 15, 2008 at 10:58:48PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > > > On Wed, Jul 16, 2008 at 05:59:16PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > > > >
> > > > > [...]
> > > > >
> > > > > > On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> > > > > > up here with the following error:
> > > > > >
> > > > > > [ 4.296729] Uniform Multi-Platform E-IDE driver
> > > > > > [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> > > > > > [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> > > > > > [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> > > > > > [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> > > > > > [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> > > > > > [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> > > > > > [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> > > > > > [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > > > [ 4.868027] hda: UDMA/33 mode selected
> > > > > > [ 4.868441] hdb: UDMA/100 mode selected
> > > > > > [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> > > > > > [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> > > > > > [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > > > [ 5.847362] hdd: UDMA/33 mode selected
> > > > > > [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > > > > > [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> > > > > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > > > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > > > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> > > > > > [ 11.342504] hde: no response (status = 0xa1), resetting drive
> > > > > > [ 17.206535] hdf: no response (status = 0xa1), resetting drive
> > > > >
> > > > > hde? hdf?
> > > > >
> > > > > [...]
> > > >
> > > > yep, looks strange to me too. Isn't that the MAX_HWIFS upper bound of a loop.. ?
> > >
> > > Close, it is related to MAX_HWIFS being upper bound on hws[]
> > > in ide_generic.c but now we loop for ARRAY_SIZE(legacy_bases).
> > >
> > > IOW there is a memset(hws, 0, MAX_HWIFS) missing at the top of
> > > ide_generic_init() (please re-test after adding it).
> > >
> > > This may also explain the later problems with ide_host_register().
>
> I fixed this in pata tree now with:
>
> "ide-generic: remove ide_default_{io_base,irq}() inlines (take 2)" patch
here's the root cause for the problem: I had both Intel ICH chipset
(BLK_DEV_PIIX) und generic ide (BLK_DEV_GENERIC) selected in Kconfig and since
ICH4 uses the generic driver detection routine, the second(!) generic detection after the
ICH4 one failed and died. This is why request_region()-resources are shown as
not being free above:
> > > > > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > > > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > > > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
One of the possible fixes is adding
depends on !BLK_DEV_GENERIC
after each IDE chipset driver using the generic detection in drivers/ide/Kconfig
but it's a not-that-elegant one. Another thing would be using a dummy one like
BLK_DEV_IDEDMA_PCI, but I'm not that sure. Will look into it. I'm pretty sure
you have a better idea...
>
> > > > > > From: Borislav Petkov <petkovbb@gmail.com>
> > > > > >
> > > > > > Check the correct flags-location for set features.
> > > > > >
> > > > > > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> > > > >
> > > > > Thanks, I folded the fix into original patch (->dev_flags is not yet
> > > > > upstream so -stable fix shouldn't be necessary).
> > > > >
> > > > > While on it: I later noticed that there will be also need for common
> > > > > ATA/ATAPI ->dev_flags in the future so I wonder whether current
> > > > > ->dev_flags should be renamed to ->atapi_flags (& s/*DFLAG*/*AFLAG*/).
> > > > >
> > > > > If there is agreement on this I'll fix it in pata tree.
> > > >
> > > > ... or if there's room, use a single ->dev_flags for all possible flag settings?
> > >
> > > Unfortunately there isn't enough room left (27 bits are occupied ATM)
> > > and having u64 ->dev_flags sucks...
> >
> > I'm pretty sure some of the 27 will be removed later but yeah, u64 flags is
> > kinda bad since it has to be always atomically updated and this has to be
> > explicitly staged on 32bit cpus due to the wordsize. I guess two flags members
>
> ->dev_flags -> ->atapi_flags & co. are also in pata tree now
>
> > are the easiest thing to do for now, you might add some comments to both so we
> > know which is which.
>
> Sure, I will remember about this when it comes time for ->dev_flags.
>
> Thanks,
> Bart
--
Regards/Gruß,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-20 12:06 ` Borislav Petkov
@ 2008-07-21 19:03 ` Bartlomiej Zolnierkiewicz
2008-07-22 5:27 ` Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-21 19:03 UTC (permalink / raw)
To: petkovbb; +Cc: linux-kernel, linux-ide, stable
On Sunday 20 July 2008, Borislav Petkov wrote:
> Hi Bart,
>
> On Wed, Jul 16, 2008 at 07:56:46PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > On Wednesday 16 July 2008, Borislav Petkov wrote:
> > > On Tue, Jul 15, 2008 at 10:58:48PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > > > > On Wed, Jul 16, 2008 at 05:59:16PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > > > > >
> > > > > > [...]
> > > > > >
> > > > > > > On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> > > > > > > up here with the following error:
> > > > > > >
> > > > > > > [ 4.296729] Uniform Multi-Platform E-IDE driver
> > > > > > > [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> > > > > > > [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> > > > > > > [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> > > > > > > [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> > > > > > > [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> > > > > > > [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> > > > > > > [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> > > > > > > [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > > > > [ 4.868027] hda: UDMA/33 mode selected
> > > > > > > [ 4.868441] hdb: UDMA/100 mode selected
> > > > > > > [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> > > > > > > [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> > > > > > > [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > > > > [ 5.847362] hdd: UDMA/33 mode selected
> > > > > > > [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > > > > > > [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> > > > > > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > > > > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > > > > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> > > > > > > [ 11.342504] hde: no response (status = 0xa1), resetting drive
> > > > > > > [ 17.206535] hdf: no response (status = 0xa1), resetting drive
> > > > > >
> > > > > > hde? hdf?
> > > > > >
> > > > > > [...]
> > > > >
> > > > > yep, looks strange to me too. Isn't that the MAX_HWIFS upper bound of a loop.. ?
> > > >
> > > > Close, it is related to MAX_HWIFS being upper bound on hws[]
> > > > in ide_generic.c but now we loop for ARRAY_SIZE(legacy_bases).
> > > >
> > > > IOW there is a memset(hws, 0, MAX_HWIFS) missing at the top of
> > > > ide_generic_init() (please re-test after adding it).
> > > >
> > > > This may also explain the later problems with ide_host_register().
> >
> > I fixed this in pata tree now with:
> >
> > "ide-generic: remove ide_default_{io_base,irq}() inlines (take 2)" patch
>
> here's the root cause for the problem: I had both Intel ICH chipset
> (BLK_DEV_PIIX) und generic ide (BLK_DEV_GENERIC) selected in Kconfig and since
> ICH4 uses the generic driver detection routine, the second(!) generic detection after the
> ICH4 one failed and died. This is why request_region()-resources are shown as
> not being free above:
>
> > > > > > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > > > > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > > > > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
I also use BLK_DEV_PIIX + BLK_DEV_GENERIC configuration
(for testing purposes) and it works fine here.
[ Besides it shouldn't result in phantom hde & hdf devices
and ide_generic blowing up on failure. ]
Have you tried the memset() fix that I proposed
(pata tree contains the revised patch now)?
> One of the possible fixes is adding
>
> depends on !BLK_DEV_GENERIC
>
> after each IDE chipset driver using the generic detection in drivers/ide/Kconfig
> but it's a not-that-elegant one. Another thing would be using a dummy one like
> BLK_DEV_IDEDMA_PCI, but I'm not that sure. Will look into it. I'm pretty sure
> you have a better idea...
pata_legacy.c has a proper fix which needs porting into ide-generic.c
(it should be pretty easy thing to do).
[ The fix is to skip automatic-probing of primary port and/or secondary
one if a PCI controller using legacy I/O bases is detected:
for_each_pci_dev(p) {
int r;
/* Check for any overlap of the system ATA mappings. Native
mode controllers stuck on these addresses or some devices
in 'raid' mode won't be found by the storage class test */
for (r = 0; r < 6; r++) {
if (pci_resource_start(p, r) == 0x1f0)
primary = 1;
if (pci_resource_start(p, r) == 0x170)
secondary = 1;
}
/* Check for special cases */
legacy_check_special_cases(p, &primary, &secondary); ]
Thanks,
Bart
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-21 19:03 ` Bartlomiej Zolnierkiewicz
@ 2008-07-22 5:27 ` Borislav Petkov
2008-07-22 19:49 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-07-22 5:27 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide, stable
[-- Attachment #1: Type: text/plain, Size: 9315 bytes --]
On Mon, Jul 21, 2008 at 09:03:36PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Sunday 20 July 2008, Borislav Petkov wrote:
> > Hi Bart,
> >
> > On Wed, Jul 16, 2008 at 07:56:46PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > On Wednesday 16 July 2008, Borislav Petkov wrote:
> > > > On Tue, Jul 15, 2008 at 10:58:48PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > > > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > > > > > On Wed, Jul 16, 2008 at 05:59:16PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > On Tuesday 15 July 2008, Borislav Petkov wrote:
> > > > > > >
> > > > > > > [...]
> > > > > > >
> > > > > > > > On a different note, the current pata tree on top of v2.6.25-2125-g50515af blows
> > > > > > > > up here with the following error:
> > > > > > > >
> > > > > > > > [ 4.296729] Uniform Multi-Platform E-IDE driver
> > > > > > > > [ 4.297905] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
> > > > > > > > [ 4.297986] ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18
> > > > > > > > [ 4.298153] ICH4: not 100% native mode: will probe irqs later
> > > > > > > > [ 4.298213] ide0: BM-DMA at 0xfc00-0xfc07
> > > > > > > > [ 4.298282] ide1: BM-DMA at 0xfc08-0xfc0f
> > > > > > > > [ 4.561768] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
> > > > > > > > [ 4.816724] hdb: SAMSUNG SP2014N, ATA DISK drive
> > > > > > > > [ 4.867959] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > > > > > [ 4.868027] hda: UDMA/33 mode selected
> > > > > > > > [ 4.868441] hdb: UDMA/100 mode selected
> > > > > > > > [ 5.540683] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
> > > > > > > > [ 5.795564] hdd: IC35L120AVV207-0, ATA DISK drive
> > > > > > > > [ 5.847295] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
> > > > > > > > [ 5.847362] hdd: UDMA/33 mode selected
> > > > > > > > [ 5.847715] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > > > > > > > [ 5.855487] ide1 at 0x170-0x177,0x376 on irq 15
> > > > > > > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > > > > > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > > > > > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
> > > > > > > > [ 11.342504] hde: no response (status = 0xa1), resetting drive
> > > > > > > > [ 17.206535] hdf: no response (status = 0xa1), resetting drive
> > > > > > >
> > > > > > > hde? hdf?
> > > > > > >
> > > > > > > [...]
> > > > > >
> > > > > > yep, looks strange to me too. Isn't that the MAX_HWIFS upper bound of a loop.. ?
> > > > >
> > > > > Close, it is related to MAX_HWIFS being upper bound on hws[]
> > > > > in ide_generic.c but now we loop for ARRAY_SIZE(legacy_bases).
> > > > >
> > > > > IOW there is a memset(hws, 0, MAX_HWIFS) missing at the top of
> > > > > ide_generic_init() (please re-test after adding it).
> > > > >
> > > > > This may also explain the later problems with ide_host_register().
> > >
> > > I fixed this in pata tree now with:
> > >
> > > "ide-generic: remove ide_default_{io_base,irq}() inlines (take 2)" patch
> >
> > here's the root cause for the problem: I had both Intel ICH chipset
> > (BLK_DEV_PIIX) und generic ide (BLK_DEV_GENERIC) selected in Kconfig and since
> > ICH4 uses the generic driver detection routine, the second(!) generic detection after the
> > ICH4 one failed and died. This is why request_region()-resources are shown as
> > not being free above:
> >
> > > > > > > > [ 5.875927] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > > > > > > > [ 5.876012] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > > > > > > > [ 5.876074] ide_generic: I/O resource 0x170-0x177 not free.
>
> I also use BLK_DEV_PIIX + BLK_DEV_GENERIC configuration
> (for testing purposes) and it works fine here.
Well, I added some more debug printk's to see how the hosts get initialized and here's
what it looks like here:
[ 4.297031] netconsole: network logging started
[ 4.297086] Uniform Multi-Platform E-IDE driver
[ 4.297457] ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot 0000:00:1f.1
[ 4.297547] pci 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 4.297658] ICH4: not 100% native mode: will probe irqs later
[ 4.297714] ide_host_register: loop0: i=0, hwif=dfa19000
[ 4.297774] ide0: BM-DMA at 0xfc00-0xfc07
[ 4.297835] ide_host_register: loop0: i=1, hwif=dfa19800
[ 4.298041] ide1: BM-DMA at 0xfc08-0xfc0f
[ 4.298102] ide_host_register: loop0: i=2, hwif=00000000
[ 4.298157] ide_host_register: loop0: i=3, hwif=00000000
[ 4.298211] ide_host_register: loop0: i=4, hwif=00000000
[ 4.298267] ide_host_register: loop0: i=5, hwif=00000000
[ 4.298321] ide_host_register: loop0: i=6, hwif=00000000
[ 4.298375] ide_host_register: loop0: i=7, hwif=00000000
[ 4.298429] ide_host_register: loop0: i=8, hwif=00000000
[ 4.298483] ide_host_register: loop0: i=9, hwif=00000000
[ 4.298538] ide_host_register: loop1: i=0, hwif=dfa19000
[ 4.562086] hda: QUANTUM FIREBALLlct10 20, ATA DISK drive
[ 4.817043] hdb: SAMSUNG SP2014N, ATA DISK drive
[ 4.867892] ide_host_register: hwif=dfa19000
[ 4.868350] hda: drive side 80-wire cable detection failed, limiting max speed to UDMA33
[ 4.868419] hda: UDMA/33 mode selected
[ 4.868827] hdb: UDMA/100 mode selected
[ 4.868974] ide_host_register: loop1: i=1, hwif=dfa19800
[ 5.541001] hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
[ 5.795879] hdd: IC35L120AVV207-0, ATA DISK drive
[ 5.846729] ide_host_register: hwif=dfa19800
[ 5.847673] hdd: host side 80-wire cable detection failed, limiting max speed to UDMA33
[ 5.847756] hdd: UDMA/33 mode selected
[ 5.848002] ide_host_register: loop1: i=2, hwif=00000000
[ 5.848056] ide_host_register: loop1: i=3, hwif=00000000
[ 5.848111] ide_host_register: loop1: i=4, hwif=00000000
[ 5.848165] ide_host_register: loop1: i=5, hwif=00000000
[ 5.848219] ide_host_register: loop1: i=6, hwif=00000000
[ 5.848925] ide_host_register: loop1: i=7, hwif=00000000
[ 5.848981] ide_host_register: loop1: i=8, hwif=00000000
...
and this is where ide_host_register() goes through all the loops in there doing
all inits until it finishes. Then it is called again from ide_generic_init() and
here's what happens:
[ 5.879917] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
[ 5.879997] probe_mask=0x3, i=0x0, io_addr=0x1f0
[ 5.880057] ide_generic: I/O resource 0x1F0-0x1F7 not free.
[ 5.880115] probe_mask=0x3, i=0x1, io_addr=0x170
[ 5.880173] ide_generic: I/O resource 0x170-0x177 not free.
[ 5.880246] ide_host_register: loop0: i=0, hwif=00000000
[ 5.880299] ide_host_register: loop0: i=1, hwif=00000000
[ 5.880357] ide_host_register: loop0: i=2, hwif=00000000
and then it goes KABOOM!
I tested both with BLK_DEV_GENERIC on and off and the
error happens only when it is on:
--- config.ok 2008-07-22 06:58:48.000000000 +0200
+++ config.b0rked 2008-07-22 06:59:31.000000000 +0200
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.26
-# Tue Jul 22 06:58:28 2008
+# Tue Jul 22 06:59:24 2008
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
@@ -600,7 +600,7 @@ CONFIG_IDE_PROC_FS=y
#
# IDE chipset support/bugfixes
#
-# CONFIG_IDE_GENERIC is not set
+CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_PLATFORM is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set
I've also attached the .config that breaks the machine. Please take a look in
case i'm missing something.
> [ Besides it shouldn't result in phantom hde & hdf devices
> and ide_generic blowing up on failure. ]
>
> Have you tried the memset() fix that I proposed
> (pata tree contains the revised patch now)?
yep, test runs ontop of your tree from Sunday which already has the fix.
>
> > One of the possible fixes is adding
> >
> > depends on !BLK_DEV_GENERIC
> >
> > after each IDE chipset driver using the generic detection in drivers/ide/Kconfig
> > but it's a not-that-elegant one. Another thing would be using a dummy one like
> > BLK_DEV_IDEDMA_PCI, but I'm not that sure. Will look into it. I'm pretty sure
> > you have a better idea...
>
> pata_legacy.c has a proper fix which needs porting into ide-generic.c
> (it should be pretty easy thing to do).
(is this a hint^^? :))
> [ The fix is to skip automatic-probing of primary port and/or secondary
> one if a PCI controller using legacy I/O bases is detected:
>
> for_each_pci_dev(p) {
> int r;
> /* Check for any overlap of the system ATA mappings. Native
> mode controllers stuck on these addresses or some devices
> in 'raid' mode won't be found by the storage class test */
> for (r = 0; r < 6; r++) {
> if (pci_resource_start(p, r) == 0x1f0)
> primary = 1;
> if (pci_resource_start(p, r) == 0x170)
> secondary = 1;
> }
> /* Check for special cases */
> legacy_check_special_cases(p, &primary, &secondary); ]
>
> Thanks,
> Bart
--
Regards/Gruß,
Boris.
[-- Attachment #2: config.b0rked --]
[-- Type: text/plain, Size: 42884 bytes --]
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.26
# Tue Jul 22 06:59:24 2008
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
# CONFIG_GENERIC_LOCKBREAK is not set
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_FAST_CMPXCHG_LOCAL=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
# CONFIG_GENERIC_GPIO is not set
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_X86_SMP=y
CONFIG_X86_32_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_X86_TRAMPOLINE=y
CONFIG_KTIME_SCALAR=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
# CONFIG_CGROUPS is not set
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
# CONFIG_GROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
# CONFIG_COMPAT_BRK is not set
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
# CONFIG_MARKERS is not set
CONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not set
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
# CONFIG_HAVE_DMA_ATTRS is not set
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
# CONFIG_LBD is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_LSF is not set
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_INTEGRITY is not set
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_DEFAULT_AS is not set
CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline"
CONFIG_CLASSIC_RCU=y
#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_RDC321X is not set
# CONFIG_X86_VSMP is not set
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
# CONFIG_PARAVIRT_GUEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
CONFIG_MPENTIUM4=y
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_GENERIC_CPU is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CPU=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_P6_NOP=y
CONFIG_X86_TSC=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=6
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
# CONFIG_IOMMU_HELPER is not set
CONFIG_NR_CPUS=2
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
# CONFIG_PREEMPT_RCU is not set
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_NONFATAL=y
CONFIG_X86_MCE_P4THERMAL=y
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_X86_PAE is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
CONFIG_X86_PAT=y
# CONFIG_EFI is not set
CONFIG_IRQBALANCE=y
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
# CONFIG_SCHED_HRTICK is not set
# CONFIG_KEXEC is not set
CONFIG_PHYSICAL_START=0x100000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x100000
CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set
#
# Power management options
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION="/dev/hda2"
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS is not set
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not set
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_WMI is not set
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=m
# CONFIG_ACPI_SBS is not set
# CONFIG_APM is not set
#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set
# CONFIG_CPU_IDLE is not set
#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
# CONFIG_PCI_GOOLPC is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCIEPORTBUS is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_HT_IRQ is not set
CONFIG_ISA_DMA_API=y
CONFIG_ISA=y
# CONFIG_EISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
# CONFIG_OLPC is not set
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set
#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=m
CONFIG_BINFMT_MISC=m
#
# Networking
#
CONFIG_NET=y
#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
CONFIG_INET_TUNNEL=m
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IP_VS is not set
CONFIG_IPV6=m
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
# CONFIG_IPV6_ROUTE_INFO is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_IPV6_MIP6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
CONFIG_INET6_TUNNEL=m
# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_BEET is not set
# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
CONFIG_IPV6_SIT=m
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_IPV6_MROUTE is not set
# CONFIG_NETLABEL is not set
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_NETFILTER_ADVANCED is not set
#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_IRC=m
CONFIG_NF_CONNTRACK_SIP=m
# CONFIG_NF_CT_NETLINK is not set
CONFIG_NETFILTER_XTABLES=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
CONFIG_NETFILTER_XT_MATCH_MARK=m
CONFIG_NETFILTER_XT_MATCH_STATE=m
#
# IP: Netfilter Configuration
#
CONFIG_NF_CONNTRACK_IPV4=m
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_NF_NAT=m
CONFIG_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_NF_NAT_FTP=m
CONFIG_NF_NAT_IRC=m
# CONFIG_NF_NAT_TFTP is not set
# CONFIG_NF_NAT_AMANDA is not set
# CONFIG_NF_NAT_PPTP is not set
# CONFIG_NF_NAT_H323 is not set
CONFIG_NF_NAT_SIP=m
CONFIG_IP_NF_MANGLE=m
#
# IPv6: Netfilter Configuration
#
CONFIG_NF_CONNTRACK_IPV6=m
CONFIG_IP6_NF_IPTABLES=m
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
CONFIG_IP6_NF_FILTER=m
CONFIG_IP6_NF_TARGET_LOG=m
CONFIG_IP6_NF_TARGET_REJECT=m
CONFIG_IP6_NF_MANGLE=m
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
CONFIG_BRIDGE=m
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
CONFIG_LLC=m
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_SCHED is not set
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
#
# Wireless
#
# CONFIG_CFG80211 is not set
# CONFIG_WIRELESS_EXT is not set
# CONFIG_MAC80211 is not set
CONFIG_IEEE80211=m
# CONFIG_IEEE80211_DEBUG is not set
CONFIG_IEEE80211_CRYPT_WEP=m
CONFIG_IEEE80211_CRYPT_CCMP=m
# CONFIG_IEEE80211_CRYPT_TKIP is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
#
# Device Drivers
#
#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PARPORT_1284 is not set
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set
#
# Protocols
#
# CONFIG_ISAPNP is not set
# CONFIG_PNPBIOS is not set
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_XIP is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_BLK_DEV_HD is not set
# CONFIG_MISC_DEVICES is not set
CONFIG_HAVE_IDE=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide/ide.txt for help/info on IDE drives
#
CONFIG_IDE_ATAPI=y
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
CONFIG_BLK_DEV_IDETAPE=m
CONFIG_BLK_DEV_IDEFLOPPY=m
# CONFIG_BLK_DEV_IDESCSI is not set
CONFIG_BLK_DEV_IDEACPI=y
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y
#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_PLATFORM is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set
CONFIG_BLK_DEV_IDEDMA_SFF=y
#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_PCIBUS_ORDER is not set
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_CS5535 is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
#
# Other IDE chipsets support
#
#
# Note: most of these also require special kernel boot parameters
#
# CONFIG_BLK_DEV_4DRIVES is not set
# CONFIG_BLK_DEV_ALI14XX is not set
# CONFIG_BLK_DEV_DTC2278 is not set
# CONFIG_BLK_DEV_HT6560B is not set
# CONFIG_BLK_DEV_QD65XX is not set
# CONFIG_BLK_DEV_UMC8672 is not set
CONFIG_BLK_DEV_IDEDMA=y
#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=m
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
CONFIG_SCSI_NETLINK=y
# CONFIG_SCSI_PROC_FS is not set
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m
#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
CONFIG_SCSI_FC_ATTRS=m
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_SCSI_DH is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#
#
# Enable only one of the two stacks, unless you know what you are doing
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
# CONFIG_NETDEVICES_MULTIQUEUE is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_NET_TULIP is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_CS89x0 is not set
# CONFIG_EEPRO100 is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
CONFIG_8139TOO=y
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 is not set
# CONFIG_NET_POCKET is not set
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set
#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set
# CONFIG_IWLWIFI_LEDS is not set
#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
CONFIG_PPPOL2TP=m
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLHC=m
# CONFIG_SLIP_SMART is not set
# CONFIG_SLIP_MODE_SLIP6 is not set
# CONFIG_NET_FC is not set
CONFIG_NETCONSOLE=y
CONFIG_NETCONSOLE_DYNAMIC=y
CONFIG_NETPOLL=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set
#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set
#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set
#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_SERIAL=m
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_INPORT is not set
# CONFIG_MOUSE_LOGIBM is not set
# CONFIG_MOUSE_PC110PAD is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=m
# CONFIG_INPUT_WISTRON_BTNS is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
# CONFIG_INPUT_ATI_REMOTE is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_UINPUT is not set
#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
# CONFIG_DEVKMEM is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set
#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
CONFIG_RTC=m
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_CS5535_GPIO is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HPET is not set
# CONFIG_HANGCHECK_TIMER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
# CONFIG_I2C is not set
# CONFIG_SPI is not set
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_BATTERY_DS2760 is not set
# CONFIG_HWMON is not set
CONFIG_THERMAL=m
# CONFIG_WATCHDOG is not set
#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set
#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set
# CONFIG_HTC_PASIC3 is not set
#
# Multimedia devices
#
#
# Multimedia core support
#
# CONFIG_VIDEO_DEV is not set
# CONFIG_DVB_CORE is not set
# CONFIG_VIDEO_MEDIA is not set
#
# Multimedia drivers
#
# CONFIG_DAB is not set
#
# Graphics support
#
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=m
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
CONFIG_DRM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
CONFIG_DRM_RADEON=m
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_I830 is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
# CONFIG_VIDEO_SELECT is not set
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=y
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m
CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
# CONFIG_SND_DYNAMIC_MINORS is not set
CONFIG_SND_SUPPORT_OLD_API=y
# CONFIG_SND_VERBOSE_PROCFS is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
CONFIG_SND_VMASTER=y
CONFIG_SND_MPU401_UART=y
CONFIG_SND_OPL3_LIB=y
CONFIG_SND_AC97_CODEC=y
# CONFIG_SND_DRIVERS is not set
# CONFIG_SND_ISA is not set
CONFIG_SND_PCI=y
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
CONFIG_SND_BT87X=m
# CONFIG_SND_BT87X_OVERCLOCK is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5530 is not set
# CONFIG_SND_CS5535AUDIO is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_HDA_INTEL is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_HIFIER is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SIS7019 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
CONFIG_SND_YMFPCI=y
# CONFIG_SND_USB is not set
# CONFIG_SND_SOC is not set
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=y
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
# CONFIG_HIDRAW is not set
#
# USB Input Devices
#
CONFIG_USB_HID=m
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set
#
# USB HID Boot Protocol drivers
#
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_OTG is not set
#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_ROOT_HUB_TT=y
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
CONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=m
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
#
# USB Device Class drivers
#
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
# CONFIG_USB_WDM is not set
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#
#
# may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_LIBUSUAL is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
CONFIG_USB_MON=y
#
# USB port drivers
#
# CONFIG_USB_USS720 is not set
CONFIG_USB_SERIAL=m
# CONFIG_USB_EZUSB is not set
CONFIG_USB_SERIAL_GENERIC=y
# CONFIG_USB_SERIAL_AIRCABLE is not set
# CONFIG_USB_SERIAL_AIRPRIME is not set
# CONFIG_USB_SERIAL_ARK3116 is not set
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_CH341 is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_CP2101 is not set
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
# CONFIG_USB_SERIAL_FUNSOFT is not set
# CONFIG_USB_SERIAL_VISOR is not set
# CONFIG_USB_SERIAL_IPAQ is not set
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
# CONFIG_USB_SERIAL_GARMIN is not set
# CONFIG_USB_SERIAL_IPW is not set
# CONFIG_USB_SERIAL_IUU is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_MOS7720 is not set
# CONFIG_USB_SERIAL_MOS7840 is not set
# CONFIG_USB_SERIAL_MOTOROLA is not set
# CONFIG_USB_SERIAL_NAVMAN is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_OTI6858 is not set
# CONFIG_USB_SERIAL_SPCP8X5 is not set
# CONFIG_USB_SERIAL_HP4X is not set
# CONFIG_USB_SERIAL_SAFE is not set
# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
# CONFIG_USB_SERIAL_TI is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
CONFIG_USB_SERIAL_OPTION=m
# CONFIG_USB_SERIAL_OMNINET is not set
# CONFIG_USB_SERIAL_DEBUG is not set
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_BERRY_CHARGE is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGET is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_GADGET is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
# CONFIG_RTC_CLASS is not set
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set
#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y
# CONFIG_ISCSI_IBFT_FIND is not set
#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4DEV_FS=m
CONFIG_EXT4DEV_FS_XATTR=y
CONFIG_EXT4DEV_FS_POSIX_ACL=y
# CONFIG_EXT4DEV_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=m
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_OCFS2_FS is not set
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y
#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
CONFIG_NTFS_DEBUG=y
CONFIG_NTFS_RW=y
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_CONFIGFS_FS=y
#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
CONFIG_SMB_FS=m
# CONFIG_SMB_NLS_DEFAULT is not set
CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_XATTR is not set
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_EXPERIMENTAL is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-15"
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_862=m
CONFIG_NLS_CODEPAGE_863=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_949=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1250=m
CONFIG_NLS_CODEPAGE_1251=m
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
# CONFIG_DLM is not set
#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
# CONFIG_TIMER_STATS is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_PROVE_LOCKING=y
CONFIG_LOCKDEP=y
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_LOCKDEP is not set
CONFIG_TRACE_IRQFLAGS=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_WRITECOUNT is not set
# CONFIG_DEBUG_LIST is not set
CONFIG_DEBUG_SG=y
CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
CONFIG_RCU_TORTURE_TEST=m
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
CONFIG_HAVE_FTRACE=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
# CONFIG_FTRACE is not set
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set
# CONFIG_SYSPROF_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_CONTEXT_SWITCH_TRACER is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
# CONFIG_NONPROMISC_DEVMEM is not set
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_DEBUG_STACK_USAGE=y
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_DEBUG_PER_CPU_MAPS is not set
# CONFIG_X86_PTDUMP is not set
# CONFIG_DEBUG_RODATA is not set
# CONFIG_DEBUG_NX_TEST is not set
# CONFIG_4KSTACKS is not set
CONFIG_DOUBLEFAULT=y
# CONFIG_MMIOTRACE is not set
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
# CONFIG_IO_DELAY_0X80 is not set
CONFIG_IO_DELAY_0XED=y
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=1
# CONFIG_DEBUG_BOOT_PARAMS is not set
# CONFIG_CPA_DEBUG is not set
#
# Security options
#
# CONFIG_KEYS is not set
CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
# CONFIG_SECURITY_ROOTPLUG is not set
CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
CONFIG_CRYPTO=y
#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_MANAGER=m
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_NULL=m
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
CONFIG_CRYPTO_TEST=m
#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set
#
# Block modes
#
CONFIG_CRYPTO_CBC=m
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_XTS is not set
#
# Hash modes
#
# CONFIG_CRYPTO_HMAC is not set
CONFIG_CRYPTO_XCBC=m
#
# Digest
#
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_RMD128=m
# CONFIG_CRYPTO_RMD160 is not set
CONFIG_CRYPTO_RMD256=m
CONFIG_CRYPTO_RMD320=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_WP512=m
#
# Ciphers
#
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_AES_586=m
CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_BLOWFISH=m
# CONFIG_CRYPTO_CAMELLIA is not set
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
CONFIG_CRYPTO_KHAZAD=m
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_586 is not set
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m
# CONFIG_CRYPTO_TWOFISH_586 is not set
#
# Compression
#
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_LZO=m
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_DEV_PADLOCK=m
CONFIG_CRYPTO_DEV_PADLOCK_AES=m
CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
CONFIG_CRYPTO_DEV_GEODE=m
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
CONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not set
#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
# CONFIG_CRC_T10DIF is not set
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=m
CONFIG_ZLIB_DEFLATE=m
CONFIG_LZO_COMPRESS=m
CONFIG_LZO_DECOMPRESS=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-22 5:27 ` Borislav Petkov
@ 2008-07-22 19:49 ` Bartlomiej Zolnierkiewicz
2008-07-23 6:32 ` Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-22 19:49 UTC (permalink / raw)
To: petkovbb; +Cc: linux-kernel, linux-ide, stable
Hi,
On Tuesday 22 July 2008, Borislav Petkov wrote:
[...]
> [ 5.879917] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> [ 5.879997] probe_mask=0x3, i=0x0, io_addr=0x1f0
> [ 5.880057] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> [ 5.880115] probe_mask=0x3, i=0x1, io_addr=0x170
> [ 5.880173] ide_generic: I/O resource 0x170-0x177 not free.
> [ 5.880246] ide_host_register: loop0: i=0, hwif=00000000
> [ 5.880299] ide_host_register: loop0: i=1, hwif=00000000
> [ 5.880357] ide_host_register: loop0: i=2, hwif=00000000
>
> and then it goes KABOOM!
>
>
>
> I tested both with BLK_DEV_GENERIC on and off and the
> error happens only when it is on:
>
> --- config.ok 2008-07-22 06:58:48.000000000 +0200
> +++ config.b0rked 2008-07-22 06:59:31.000000000 +0200
> @@ -1,7 +1,7 @@
> #
> # Automatically generated make config: don't edit
> # Linux kernel version: 2.6.26
> -# Tue Jul 22 06:58:28 2008
> +# Tue Jul 22 06:59:24 2008
> #
> # CONFIG_64BIT is not set
> CONFIG_X86_32=y
> @@ -600,7 +600,7 @@ CONFIG_IDE_PROC_FS=y
> #
> # IDE chipset support/bugfixes
> #
> -# CONFIG_IDE_GENERIC is not set
> +CONFIG_IDE_GENERIC=y
> # CONFIG_BLK_DEV_PLATFORM is not set
> # CONFIG_BLK_DEV_CMD640 is not set
> # CONFIG_BLK_DEV_IDEPNP is not set
>
> I've also attached the .config that breaks the machine. Please take a look in
> case i'm missing something.
Thanks, with this config I can reproduce the problem.
> > [ Besides it shouldn't result in phantom hde & hdf devices
> > and ide_generic blowing up on failure. ]
> >
> > Have you tried the memset() fix that I proposed
> > (pata tree contains the revised patch now)?
>
> yep, test runs ontop of your tree from Sunday which already has the fix.
*sigh*
The previous fix was garbage and contained brown-paper-bag bug:
diff -u b/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
--- b/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -114,7 +114,7 @@
printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
"parameter for probing all legacy ISA IDE ports\n");
- memset(hws, 0, MAX_HWIFS);
+ memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
for (i = 0; i < ARRAY_SIZE(legacy_bases); i++) {
io_addr = legacy_bases[i];
Now it should be finally fixed.
> > > One of the possible fixes is adding
> > >
> > > depends on !BLK_DEV_GENERIC
> > >
> > > after each IDE chipset driver using the generic detection in drivers/ide/Kconfig
> > > but it's a not-that-elegant one. Another thing would be using a dummy one like
> > > BLK_DEV_IDEDMA_PCI, but I'm not that sure. Will look into it. I'm pretty sure
> > > you have a better idea...
> >
> > pata_legacy.c has a proper fix which needs porting into ide-generic.c
> > (it should be pretty easy thing to do).
>
> (is this a hint^^? :))
It has *HINT* written all over it. ;)
Thanks,
Bart
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-22 19:49 ` Bartlomiej Zolnierkiewicz
@ 2008-07-23 6:32 ` Borislav Petkov
2008-07-23 18:51 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-07-23 6:32 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide, stable
On Tue, Jul 22, 2008 at 09:49:19PM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> Hi,
>
> On Tuesday 22 July 2008, Borislav Petkov wrote:
>
> [...]
>
> > [ 5.879917] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> > [ 5.879997] probe_mask=0x3, i=0x0, io_addr=0x1f0
> > [ 5.880057] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> > [ 5.880115] probe_mask=0x3, i=0x1, io_addr=0x170
> > [ 5.880173] ide_generic: I/O resource 0x170-0x177 not free.
> > [ 5.880246] ide_host_register: loop0: i=0, hwif=00000000
> > [ 5.880299] ide_host_register: loop0: i=1, hwif=00000000
> > [ 5.880357] ide_host_register: loop0: i=2, hwif=00000000
> >
> > and then it goes KABOOM!
> >
> >
> >
> > I tested both with BLK_DEV_GENERIC on and off and the
> > error happens only when it is on:
> >
> > --- config.ok 2008-07-22 06:58:48.000000000 +0200
> > +++ config.b0rked 2008-07-22 06:59:31.000000000 +0200
> > @@ -1,7 +1,7 @@
> > #
> > # Automatically generated make config: don't edit
> > # Linux kernel version: 2.6.26
> > -# Tue Jul 22 06:58:28 2008
> > +# Tue Jul 22 06:59:24 2008
> > #
> > # CONFIG_64BIT is not set
> > CONFIG_X86_32=y
> > @@ -600,7 +600,7 @@ CONFIG_IDE_PROC_FS=y
> > #
> > # IDE chipset support/bugfixes
> > #
> > -# CONFIG_IDE_GENERIC is not set
> > +CONFIG_IDE_GENERIC=y
> > # CONFIG_BLK_DEV_PLATFORM is not set
> > # CONFIG_BLK_DEV_CMD640 is not set
> > # CONFIG_BLK_DEV_IDEPNP is not set
> >
> > I've also attached the .config that breaks the machine. Please take a look in
> > case i'm missing something.
>
> Thanks, with this config I can reproduce the problem.
>
> > > [ Besides it shouldn't result in phantom hde & hdf devices
> > > and ide_generic blowing up on failure. ]
> > >
> > > Have you tried the memset() fix that I proposed
> > > (pata tree contains the revised patch now)?
> >
> > yep, test runs ontop of your tree from Sunday which already has the fix.
>
> *sigh*
>
> The previous fix was garbage and contained brown-paper-bag bug:
>
> diff -u b/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
> --- b/drivers/ide/ide-generic.c
> +++ b/drivers/ide/ide-generic.c
> @@ -114,7 +114,7 @@
> printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
> "parameter for probing all legacy ISA IDE ports\n");
>
> - memset(hws, 0, MAX_HWIFS);
> + memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
>
> for (i = 0; i < ARRAY_SIZE(legacy_bases); i++) {
> io_addr = legacy_bases[i];
>
>
> Now it should be finally fixed.
True story. Works here too.
>
> > > > One of the possible fixes is adding
> > > >
> > > > depends on !BLK_DEV_GENERIC
> > > >
> > > > after each IDE chipset driver using the generic detection in drivers/ide/Kconfig
> > > > but it's a not-that-elegant one. Another thing would be using a dummy one like
> > > > BLK_DEV_IDEDMA_PCI, but I'm not that sure. Will look into it. I'm pretty sure
> > > > you have a better idea...
> > >
> > > pata_legacy.c has a proper fix which needs porting into ide-generic.c
> > > (it should be pretty easy thing to do).
> >
> > (is this a hint^^? :))
>
> It has *HINT* written all over it. ;)
Hm, let's see whether there's time during the weekend. I already have something
stolen from pata_legacy but I'll do some more testing first. By the way, what
are the chances of exporting those pieces of code from drivers/ata/pata_legacy.c
and adding the function def into some header instead of duplicating the code into
ide_generic.c?
--
Regards/Gruß,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-floppy fix
2008-07-23 6:32 ` Borislav Petkov
@ 2008-07-23 18:51 ` Bartlomiej Zolnierkiewicz
2008-08-01 5:48 ` [PATCH] ide-generic: skip automatic probing of legacy iobases (was: Re: [PATCH] ide-floppy fix) Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-23 18:51 UTC (permalink / raw)
To: petkovbb; +Cc: linux-kernel, linux-ide, stable
On Wednesday 23 July 2008, Borislav Petkov wrote:
[...]
> > Now it should be finally fixed.
>
> True story. Works here too.
Thanks for verifying it.
> Hm, let's see whether there's time during the weekend. I already have something
> stolen from pata_legacy but I'll do some more testing first. By the way, what
> are the chances of exporting those pieces of code from drivers/ata/pata_legacy.c
> and adding the function def into some header instead of duplicating the code into
> ide_generic.c?
Good idea (<linux/ata.h> sounds like a perfect spot).
Thanks,
Bart
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH] ide-generic: skip automatic probing of legacy iobases (was: Re: [PATCH] ide-floppy fix)
2008-07-23 18:51 ` Bartlomiej Zolnierkiewicz
@ 2008-08-01 5:48 ` Borislav Petkov
2008-08-02 17:02 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-08-01 5:48 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide
[ removed stable@kernel.org from the CC-list ]
On Wed, Jul 23, 2008 at 08:51:11PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Wednesday 23 July 2008, Borislav Petkov wrote:
>
> [...]
>
> > > Now it should be finally fixed.
> >
> > True story. Works here too.
>
> Thanks for verifying it.
>
> > Hm, let's see whether there's time during the weekend. I already have something
> > stolen from pata_legacy but I'll do some more testing first. By the way, what
> > are the chances of exporting those pieces of code from drivers/ata/pata_legacy.c
> > and adding the function def into some header instead of duplicating the code into
> > ide_generic.c?
>
> Good idea (<linux/ata.h> sounds like a perfect spot).
Hi Bart,
i finally found some time to work on the iobase-exclusion. Actually, i dropped
the original idea of reusing pata_legacy code without duplicating it since this
got the whole SATA pulled in in Kconfig, which, imo, outweighs the savings from
not duplicating one function. I ended up refitting the pata_legacy iobase checks
into ide-generic.
As a result, i have now a new bool-Kconfig option BLK_DEV_GENERIC_ONLY which
gets reverse-selected only when no pci ide controller which is using the generic
ide_host_register() from within ide_pci_init_one() is selected in Kconfig. This
is tested both with and without a pci ide driver selected in addition to
ide-generic.
---
From: Borislav Petkov <petkovbb@gmail.com>
Date: Fri, 1 Aug 2008 07:33:13 +0200
Subject: [PATCH] ide-generic: skip automatic probing of legacy iobases
A number of pci ide controllers use legacy IO bases for their primary
and secondary ports. Skip probing those when both a specific host
driver _and_ ide-generic are enabled. The checking code originates from
drivers/ata/pata_legacy.c and is only reorganized into ide-generic.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/Kconfig | 4 +++
drivers/ide/ide-generic.c | 49 +++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index 611319b..f103f5f 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -386,10 +386,14 @@ config BLK_DEV_OFFBOARD
config BLK_DEV_GENERIC
tristate "Generic PCI IDE Chipset Support"
select BLK_DEV_IDEPCI
+ select BLK_DEV_GENERIC_ONLY if !(BLK_DEV_AEC62XX || BLK_DEV_ALI15X3 || BLK_DEV_AMD74XX || BLK_DEV_ATIIXP || BLK_DEV_CMD64X || BLK_DEV_CS5530 || BLK_DEV_CS5535 || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_IT821X || BLK_DEV_IT8213 || BLK_DEV_JMICRON || BLK_DEV_NS87415 || BLK_DEV_OPTI621 || BLK_DEV_PDC202XX_OLD || BLK_DEV_PDC202XX_NEW || BLK_DEV_PIIX || BLK_DEV_RZ1000 || BLK_DEV_SC1200 || BLK_DEV_SVWKS || BLK_DEV_SIIMAGE || BLK_DEV_SIS5513 || BLK_DEV_SL82C105 || BLK_DEV_SLC90E66 || BLK_DEV_TC86C001 || BLK_DEV_TRIFLEX || BLK_DEV_TRM290 || BLK_DEV_VIA82CXXX)
help
This option provides generic support for various PCI IDE Chipsets
which otherwise might not be supported.
+config BLK_DEV_GENERIC_ONLY
+ bool
+
config BLK_DEV_OPTI621
tristate "OPTi 82C621 chipset enhanced support (EXPERIMENTAL)"
depends on EXPERIMENTAL
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 8fe8b5b..3ce78f9 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -100,12 +100,55 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
#endif
+static void ide_generic_check_pci_uses_legacy_iobases(int *primary,
+ int *secondary)
+{
+
+#if !defined(CONFIG_BLK_DEV_GENERIC_ONLY)
+ struct pci_dev *p = NULL;
+ u16 val;
+
+ for_each_pci_dev(p) {
+ int r;
+
+ for (r = 0; r < 6; r++) {
+ if (pci_resource_start(p, r) == 0x1f0)
+ *primary = 1;
+ if (pci_resource_start(p, r) == 0x170)
+ *secondary = 1;
+ }
+
+ /* Cyrix CS5510 pre SFF MWDMA ATA on the bridge */
+ if (p->vendor == 0x1078 && p->device == 0x0000)
+ *primary = *secondary = 1;
+
+ /* Cyrix CS5520 pre SFF MWDMA ATA on the bridge */
+ if (p->vendor == 0x1078 && p->device == 0x0002)
+ *primary = *secondary = 1;
+
+ /* Intel MPIIX - PIO ATA on non PCI side of bridge */
+ if (p->vendor == 0x8086 && p->device == 0x1234) {
+
+ pci_read_config_word(p, 0x6C, &val);
+ if (val & 0x8000) {
+ /* ATA port enabled */
+ if (val & 0x4000)
+ *secondary = 1;
+ else
+ *primary = 1;
+ }
+ }
+ }
+#endif
+
+}
+
static int __init ide_generic_init(void)
{
hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
struct ide_host *host;
unsigned long io_addr;
- int i, rc;
+ int i, rc, primary = 0, secondary = 0;
#ifdef CONFIG_MIPS
if (!ide_probe_legacy())
@@ -116,7 +159,9 @@ static int __init ide_generic_init(void)
memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
- for (i = 0; i < ARRAY_SIZE(legacy_bases); i++) {
+ ide_generic_check_pci_uses_legacy_iobases(&primary, &secondary);
+
+ for (i = primary + secondary; i < ARRAY_SIZE(legacy_bases); i++) {
io_addr = legacy_bases[i];
hws[i] = NULL;
--
1.5.5.4
--
Regards/Gruss,
Boris.
^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-generic: skip automatic probing of legacy iobases (was: Re: [PATCH] ide-floppy fix)
2008-08-01 5:48 ` [PATCH] ide-generic: skip automatic probing of legacy iobases (was: Re: [PATCH] ide-floppy fix) Borislav Petkov
@ 2008-08-02 17:02 ` Bartlomiej Zolnierkiewicz
2008-08-02 18:32 ` Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-02 17:02 UTC (permalink / raw)
To: petkovbb; +Cc: linux-kernel, linux-ide
Hi,
On Friday 01 August 2008, Borislav Petkov wrote:
>
> [ removed stable@kernel.org from the CC-list ]
>
> On Wed, Jul 23, 2008 at 08:51:11PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > On Wednesday 23 July 2008, Borislav Petkov wrote:
> >
> > [...]
> >
> > > > Now it should be finally fixed.
> > >
> > > True story. Works here too.
> >
> > Thanks for verifying it.
> >
> > > Hm, let's see whether there's time during the weekend. I already have something
> > > stolen from pata_legacy but I'll do some more testing first. By the way, what
> > > are the chances of exporting those pieces of code from drivers/ata/pata_legacy.c
> > > and adding the function def into some header instead of duplicating the code into
> > > ide_generic.c?
> >
> > Good idea (<linux/ata.h> sounds like a perfect spot).
>
> Hi Bart,
>
> i finally found some time to work on the iobase-exclusion. Actually, i dropped
> the original idea of reusing pata_legacy code without duplicating it since this
> got the whole SATA pulled in in Kconfig, which, imo, outweighs the savings from
> not duplicating one function. I ended up refitting the pata_legacy iobase checks
> into ide-generic.
Why not try <linux/ata.h> + inline trick instead?
[ <linux/ata.h> is shared by both stacks so by moving the function there
+ making it inline it can also be shared without the need for dependency
on libata. ]
> As a result, i have now a new bool-Kconfig option BLK_DEV_GENERIC_ONLY which
> gets reverse-selected only when no pci ide controller which is using the generic
> ide_host_register() from within ide_pci_init_one() is selected in Kconfig. This
> is tested both with and without a pci ide driver selected in addition to
> ide-generic.
How's about just leaving the final decision up to the user with changing
probe_mask in ide_generic from 0x3 to 0x0 and automatically probing for
ports 0-1 iff there is no IDE PCI controller present (otherwise check
probe_mask).
This is should remove the need for Kconfig magic and is a sane default
since a lot of people get caught using ide_generic by mistake and not by
intent (IOW they forgot to enable the right IDE PCI host driver).
[ The small minority which may use it by intent (I don't see any practical
reasons for doing it though) would still be able to override the default
with ide_generic.probe_mask=0x3 kernel parameter. ]
> ---
> From: Borislav Petkov <petkovbb@gmail.com>
> Date: Fri, 1 Aug 2008 07:33:13 +0200
> Subject: [PATCH] ide-generic: skip automatic probing of legacy iobases
>
> A number of pci ide controllers use legacy IO bases for their primary
> and secondary ports. Skip probing those when both a specific host
> driver _and_ ide-generic are enabled. The checking code originates from
> drivers/ata/pata_legacy.c and is only reorganized into ide-generic.
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> ---
> drivers/ide/Kconfig | 4 +++
> drivers/ide/ide-generic.c | 49 +++++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 51 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
> index 611319b..f103f5f 100644
> --- a/drivers/ide/Kconfig
> +++ b/drivers/ide/Kconfig
> @@ -386,10 +386,14 @@ config BLK_DEV_OFFBOARD
> config BLK_DEV_GENERIC
> tristate "Generic PCI IDE Chipset Support"
> select BLK_DEV_IDEPCI
> + select BLK_DEV_GENERIC_ONLY if !(BLK_DEV_AEC62XX || BLK_DEV_ALI15X3 || BLK_DEV_AMD74XX || BLK_DEV_ATIIXP || BLK_DEV_CMD64X || BLK_DEV_CS5530 || BLK_DEV_CS5535 || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_IT821X || BLK_DEV_IT8213 || BLK_DEV_JMICRON || BLK_DEV_NS87415 || BLK_DEV_OPTI621 || BLK_DEV_PDC202XX_OLD || BLK_DEV_PDC202XX_NEW || BLK_DEV_PIIX || BLK_DEV_RZ1000 || BLK_DEV_SC1200 || BLK_DEV_SVWKS || BLK_DEV_SIIMAGE || BLK_DEV_SIS5513 || BLK_DEV_SL82C105 || BLK_DEV_SLC90E66 || BLK_DEV_TC86C001 || BLK_DEV_TRIFLEX || BLK_DEV_TRM290 || BLK_DEV_VIA82CXXX)
> help
> This option provides generic support for various PCI IDE Chipsets
> which otherwise might not be supported.
>
> +config BLK_DEV_GENERIC_ONLY
> + bool
> +
> config BLK_DEV_OPTI621
> tristate "OPTi 82C621 chipset enhanced support (EXPERIMENTAL)"
> depends on EXPERIMENTAL
> diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
> index 8fe8b5b..3ce78f9 100644
> --- a/drivers/ide/ide-generic.c
> +++ b/drivers/ide/ide-generic.c
> @@ -100,12 +100,55 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
> static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
> #endif
>
> +static void ide_generic_check_pci_uses_legacy_iobases(int *primary,
> + int *secondary)
> +{
> +
> +#if !defined(CONFIG_BLK_DEV_GENERIC_ONLY)
> + struct pci_dev *p = NULL;
> + u16 val;
> +
> + for_each_pci_dev(p) {
> + int r;
> +
> + for (r = 0; r < 6; r++) {
> + if (pci_resource_start(p, r) == 0x1f0)
> + *primary = 1;
> + if (pci_resource_start(p, r) == 0x170)
> + *secondary = 1;
> + }
> +
> + /* Cyrix CS5510 pre SFF MWDMA ATA on the bridge */
> + if (p->vendor == 0x1078 && p->device == 0x0000)
> + *primary = *secondary = 1;
> +
> + /* Cyrix CS5520 pre SFF MWDMA ATA on the bridge */
> + if (p->vendor == 0x1078 && p->device == 0x0002)
> + *primary = *secondary = 1;
> +
> + /* Intel MPIIX - PIO ATA on non PCI side of bridge */
> + if (p->vendor == 0x8086 && p->device == 0x1234) {
> +
> + pci_read_config_word(p, 0x6C, &val);
> + if (val & 0x8000) {
> + /* ATA port enabled */
> + if (val & 0x4000)
> + *secondary = 1;
> + else
> + *primary = 1;
> + }
> + }
> + }
> +#endif
> +
> +}
> +
> static int __init ide_generic_init(void)
> {
> hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
> struct ide_host *host;
> unsigned long io_addr;
> - int i, rc;
> + int i, rc, primary = 0, secondary = 0;
>
> #ifdef CONFIG_MIPS
> if (!ide_probe_legacy())
> @@ -116,7 +159,9 @@ static int __init ide_generic_init(void)
>
> memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
>
> - for (i = 0; i < ARRAY_SIZE(legacy_bases); i++) {
> + ide_generic_check_pci_uses_legacy_iobases(&primary, &secondary);
> +
> + for (i = primary + secondary; i < ARRAY_SIZE(legacy_bases); i++) {
> io_addr = legacy_bases[i];
>
> hws[i] = NULL;
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-generic: skip automatic probing of legacy iobases (was: Re: [PATCH] ide-floppy fix)
2008-08-02 17:02 ` Bartlomiej Zolnierkiewicz
@ 2008-08-02 18:32 ` Borislav Petkov
2008-08-02 18:46 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-08-02 18:32 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide
On Sat, Aug 02, 2008 at 07:02:12PM +0200, Bartlomiej Zolnierkiewicz wrote:
[.. ]
> Why not try <linux/ata.h> + inline trick instead?
>
> [ <linux/ata.h> is shared by both stacks so by moving the function there
> + making it inline it can also be shared without the need for dependency
> on libata. ]
I hadn't thought of that, will try it out later.
> > As a result, i have now a new bool-Kconfig option BLK_DEV_GENERIC_ONLY which
> > gets reverse-selected only when no pci ide controller which is using the generic
> > ide_host_register() from within ide_pci_init_one() is selected in Kconfig. This
> > is tested both with and without a pci ide driver selected in addition to
> > ide-generic.
>
> How's about just leaving the final decision up to the user with changing
> probe_mask in ide_generic from 0x3 to 0x0 and automatically probing for
> ports 0-1 iff there is no IDE PCI controller present (otherwise check
> probe_mask).
Wait, let me get this straight: you want to set probe_mask to 0x0 as a default,
which skips probing of the primary and secondary ports, and to do the checking
whether the IDE PCI controller uses legacy iobases only when the user has
enforced it by setting probe_mask to 0x3? At least this is how i understand
it...
> This is should remove the need for Kconfig magic and is a sane default
> since a lot of people get caught using ide_generic by mistake and not by
> intent (IOW they forgot to enable the right IDE PCI host driver).
[.. ]
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-generic: skip automatic probing of legacy iobases (was: Re: [PATCH] ide-floppy fix)
2008-08-02 18:32 ` Borislav Petkov
@ 2008-08-02 18:46 ` Bartlomiej Zolnierkiewicz
2008-08-03 7:37 ` [PATCH 1/2] pata_legacy: export functionality to ide Borislav Petkov
2008-08-03 7:38 ` [PATCH 2/2] ide-generic: handle probing of legacy io-ports Borislav Petkov
0 siblings, 2 replies; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-02 18:46 UTC (permalink / raw)
To: petkovbb; +Cc: linux-kernel, linux-ide
On Saturday 02 August 2008, Borislav Petkov wrote:
> On Sat, Aug 02, 2008 at 07:02:12PM +0200, Bartlomiej Zolnierkiewicz wrote:
[...]
> > > As a result, i have now a new bool-Kconfig option BLK_DEV_GENERIC_ONLY which
> > > gets reverse-selected only when no pci ide controller which is using the generic
> > > ide_host_register() from within ide_pci_init_one() is selected in Kconfig. This
> > > is tested both with and without a pci ide driver selected in addition to
> > > ide-generic.
> >
> > How's about just leaving the final decision up to the user with changing
> > probe_mask in ide_generic from 0x3 to 0x0 and automatically probing for
> > ports 0-1 iff there is no IDE PCI controller present (otherwise check
> > probe_mask).
>
> Wait, let me get this straight: you want to set probe_mask to 0x0 as a default,
> which skips probing of the primary and secondary ports, and to do the checking
Yes.
> whether the IDE PCI controller uses legacy iobases only when the user has
> enforced it by setting probe_mask to 0x3? At least this is how i understand
> it...
Nope, always do the checking and if there is no IDE PCI controller do the
probing (& if there is IDE PCI controller present check probe_mask bits).
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-02 18:46 ` Bartlomiej Zolnierkiewicz
@ 2008-08-03 7:37 ` Borislav Petkov
2008-08-03 11:59 ` Alan Cox
2008-08-03 7:38 ` [PATCH 2/2] ide-generic: handle probing of legacy io-ports Borislav Petkov
1 sibling, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-08-03 7:37 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: alan, linux-kernel, linux-ide
Ok, here's a definitely better solution:
---
From: Borislav Petkov <petkovbb@gmail.com>
Date: Sun, 3 Aug 2008 08:31:20 +0200
Subject: [PATCH 1/2] pata_legacy: export functionality to ide
export the legacy iobases checking code to other
users (ide) by pushing it up into the header.
CC: Alan Cox <alan@redhat.com>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ata/pata_legacy.c | 63 +-----------------------------------------
include/linux/ata.h | 67 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 62 deletions(-)
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index bc037ff..14d187e 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -50,7 +50,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/pci.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
@@ -1040,47 +1039,6 @@ fail:
return ret;
}
-/**
- * legacy_check_special_cases - ATA special cases
- * @p: PCI device to check
- * @master: set this if we find an ATA master
- * @master: set this if we find an ATA secondary
- *
- * A small number of vendors implemented early PCI ATA interfaces
- * on bridge logic without the ATA interface being PCI visible.
- * Where we have a matching PCI driver we must skip the relevant
- * device here. If we don't know about it then the legacy driver
- * is the right driver anyway.
- */
-
-static void __init legacy_check_special_cases(struct pci_dev *p, int *primary,
- int *secondary)
-{
- /* Cyrix CS5510 pre SFF MWDMA ATA on the bridge */
- if (p->vendor == 0x1078 && p->device == 0x0000) {
- *primary = *secondary = 1;
- return;
- }
- /* Cyrix CS5520 pre SFF MWDMA ATA on the bridge */
- if (p->vendor == 0x1078 && p->device == 0x0002) {
- *primary = *secondary = 1;
- return;
- }
- /* Intel MPIIX - PIO ATA on non PCI side of bridge */
- if (p->vendor == 0x8086 && p->device == 0x1234) {
- u16 r;
- pci_read_config_word(p, 0x6C, &r);
- if (r & 0x8000) {
- /* ATA port enabled */
- if (r & 0x4000)
- *secondary = 1;
- else
- *primary = 1;
- }
- return;
- }
-}
-
static __init void probe_opti_vlb(void)
{
/* If an OPTI 82C46X is present find out where the channels are */
@@ -1210,26 +1168,7 @@ static __init int legacy_init(void)
struct legacy_probe *pl = &probe_list[0];
int slot = 0;
- struct pci_dev *p = NULL;
-
- for_each_pci_dev(p) {
- int r;
- /* Check for any overlap of the system ATA mappings. Native
- mode controllers stuck on these addresses or some devices
- in 'raid' mode won't be found by the storage class test */
- for (r = 0; r < 6; r++) {
- if (pci_resource_start(p, r) == 0x1f0)
- primary = 1;
- if (pci_resource_start(p, r) == 0x170)
- secondary = 1;
- }
- /* Check for special cases */
- legacy_check_special_cases(p, &primary, &secondary);
-
- /* If PCI bus is present then don't probe for tertiary
- legacy ports */
- pci_present = 1;
- }
+ ata_legacy_check_iobases(&primary, &secondary, &pci_present);
if (winbond == 1)
winbond = 0x130; /* Default port, alt is 1B0 */
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 11de32c..0470562 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -30,6 +30,7 @@
#define __LINUX_ATA_H__
#include <linux/types.h>
+#include <linux/pci.h>
/* defines only for the constants which don't work well as enums */
#define ATA_DMA_BOUNDARY 0xffffUL
@@ -776,4 +777,70 @@ static inline int lba_48_ok(u64 block, u32 n_block)
#define sata_pmp_gscr_rev(gscr) (((gscr)[SATA_PMP_GSCR_REV] >> 8) & 0xff)
#define sata_pmp_gscr_ports(gscr) ((gscr)[SATA_PMP_GSCR_PORT_INFO] & 0xf)
+/**
+ * legacy_check_special_cases - ATA special cases
+ * @p: PCI device to check
+ * @master: set this if we find an ATA master
+ * @master: set this if we find an ATA secondary
+ *
+ * A small number of vendors implemented early PCI ATA interfaces
+ * on bridge logic without the ATA interface being PCI visible.
+ * Where we have a matching PCI driver we must skip the relevant
+ * device here. If we don't know about it then the legacy driver
+ * is the right driver anyway.
+ */
+static inline void __init ata_legacy_check_special_cases(struct pci_dev *p,
+ int *primary,
+ int *secondary)
+{
+ /* Cyrix CS5510 pre SFF MWDMA ATA on the bridge */
+ if (p->vendor == 0x1078 && p->device == 0x0000) {
+ *primary = *secondary = 1;
+ return;
+ }
+ /* Cyrix CS5520 pre SFF MWDMA ATA on the bridge */
+ if (p->vendor == 0x1078 && p->device == 0x0002) {
+ *primary = *secondary = 1;
+ return;
+ }
+ /* Intel MPIIX - PIO ATA on non PCI side of bridge */
+ if (p->vendor == 0x8086 && p->device == 0x1234) {
+ u16 r;
+ pci_read_config_word(p, 0x6C, &r);
+ if (r & 0x8000) {
+ /* ATA port enabled */
+ if (r & 0x4000)
+ *secondary = 1;
+ else
+ *primary = 1;
+ }
+ return;
+ }
+}
+
+static inline void __init ata_legacy_check_iobases(int *primary, int *secondary,
+ int *pci_present)
+{
+ struct pci_dev *p = NULL;
+
+ for_each_pci_dev(p) {
+ int r;
+ /* Check for any overlap of the system ATA mappings. Native
+ mode controllers stuck on these addresses or some devices
+ in 'raid' mode won't be found by the storage class test */
+ for (r = 0; r < 6; r++) {
+ if (pci_resource_start(p, r) == 0x1f0)
+ *primary = 1;
+ if (pci_resource_start(p, r) == 0x170)
+ *secondary = 1;
+ }
+ /* Check for special cases */
+ ata_legacy_check_special_cases(p, primary, secondary);
+
+ /* If PCI bus is present then don't probe for tertiary
+ legacy ports */
+ *pci_present = 1;
+ }
+}
+
#endif /* __LINUX_ATA_H__ */
--
1.5.5.4
--
Regards/Gruss,
Boris.
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 2/2] ide-generic: handle probing of legacy io-ports
2008-08-02 18:46 ` Bartlomiej Zolnierkiewicz
2008-08-03 7:37 ` [PATCH 1/2] pata_legacy: export functionality to ide Borislav Petkov
@ 2008-08-03 7:38 ` Borislav Petkov
2008-08-03 14:11 ` Bartlomiej Zolnierkiewicz
1 sibling, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-08-03 7:38 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: alan, linux-kernel, linux-ide
From: Borislav Petkov <petkovbb@gmail.com>
Date: Sun, 3 Aug 2008 09:28:53 +0200
Subject: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
Avoid probing the io-ports in case an IDE PCI controller is present and it uses
the legacy iobases. If we still want to enforce the probing, we do
ide_generic.probe_mask=0x3f
on the kernel command line.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-generic.c | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 8fe8b5b..7d79616 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -27,7 +27,7 @@
#define DRV_NAME "ide_generic"
-static int probe_mask = 0x03;
+static int probe_mask = 0x00;
module_param(probe_mask, int, 0);
MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
@@ -105,18 +105,31 @@ static int __init ide_generic_init(void)
hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
struct ide_host *host;
unsigned long io_addr;
- int i, rc;
+ int i, rc, dummy, primary = 0, secondary = 0;
#ifdef CONFIG_MIPS
if (!ide_probe_legacy())
return -ENODEV;
#endif
- printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
- "parameter for probing all legacy ISA IDE ports\n");
+ ata_legacy_check_iobases(&primary, &secondary, &dummy);
+
+ if (primary) {
+ if (probe_mask) {
+ printk(KERN_WARNING "%s: enforcing probing of io ports "
+ "upon user request.\n", DRV_NAME);
+ primary = 0;
+ secondary = 0;
+ } else
+ printk(KERN_INFO DRV_NAME ": please use "
+ \"probe_mask=0x3f\" module parameter for probing"
+ "all legacy ISA IDE ports\n");
+
+ } else
+ probe_mask = 0x3;
memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
- for (i = 0; i < ARRAY_SIZE(legacy_bases); i++) {
+ for (i = primary + secondary; i < ARRAY_SIZE(legacy_bases); i++) {
io_addr = legacy_bases[i];
hws[i] = NULL;
--
1.5.5.4
--
Regards/Gruss,
Boris.
^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-03 7:37 ` [PATCH 1/2] pata_legacy: export functionality to ide Borislav Petkov
@ 2008-08-03 11:59 ` Alan Cox
2008-08-03 13:37 ` Bartlomiej Zolnierkiewicz
2008-08-03 14:38 ` Borislav Petkov
0 siblings, 2 replies; 44+ messages in thread
From: Alan Cox @ 2008-08-03 11:59 UTC (permalink / raw)
To: petkovbb; +Cc: petkovbb, Bartlomiej Zolnierkiewicz, alan, linux-kernel,
linux-ide
On Sun, 3 Aug 2008 09:37:56 +0200
Borislav Petkov <petkovbb@googlemail.com> wrote:
> Ok, here's a definitely better solution:
Please don't stuff large important pieces of code in header files where
they will be overlooked
NAK this.
I'm happy to have a shared library directory for ATA stuff, containing
useful C code, but hiding stuff in headers like that is just plain wrong.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-03 11:59 ` Alan Cox
@ 2008-08-03 13:37 ` Bartlomiej Zolnierkiewicz
2008-08-03 13:39 ` Alan Cox
2008-08-03 14:38 ` Borislav Petkov
1 sibling, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-03 13:37 UTC (permalink / raw)
To: Alan Cox; +Cc: petkovbb, petkovbb, alan, linux-kernel, linux-ide, Jeff Garzik
On Sunday 03 August 2008, Alan Cox wrote:
> On Sun, 3 Aug 2008 09:37:56 +0200
> Borislav Petkov <petkovbb@googlemail.com> wrote:
>
> > Ok, here's a definitely better solution:
>
> Please don't stuff large important pieces of code in header files where
> they will be overlooked
>
> NAK this.
>
> I'm happy to have a shared library directory for ATA stuff, containing
> useful C code, but hiding stuff in headers like that is just plain wrong.
The code in question is 65 LOC total (43 LOC without counting comments)
so having a shared library just for it sounds like an overkill and we may
just copy that one function from pata_legacy to ide_generic instead.
Jeff, what is your stance here?
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-03 13:37 ` Bartlomiej Zolnierkiewicz
@ 2008-08-03 13:39 ` Alan Cox
2008-08-03 23:43 ` Jeff Garzik
0 siblings, 1 reply; 44+ messages in thread
From: Alan Cox @ 2008-08-03 13:39 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: petkovbb, petkovbb, alan, linux-kernel, linux-ide, Jeff Garzik
> The code in question is 65 LOC total (43 LOC without counting comments)
> so having a shared library just for it sounds like an overkill and we may
People expect code in C files, so in headers it gets missed as well as
dumped in a directory with no correlation between file name and subsystem.
> just copy that one function from pata_legacy to ide_generic instead.
If you are going to #include two copies you might as well just copy it.
Alan
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
2008-08-03 7:38 ` [PATCH 2/2] ide-generic: handle probing of legacy io-ports Borislav Petkov
@ 2008-08-03 14:11 ` Bartlomiej Zolnierkiewicz
2008-08-03 14:45 ` Borislav Petkov
2008-08-03 15:08 ` Borislav Petkov
0 siblings, 2 replies; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-03 14:11 UTC (permalink / raw)
To: petkovbb; +Cc: alan, linux-kernel, linux-ide
On Sunday 03 August 2008, Borislav Petkov wrote:
> From: Borislav Petkov <petkovbb@gmail.com>
> Date: Sun, 3 Aug 2008 09:28:53 +0200
> Subject: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
>
> Avoid probing the io-ports in case an IDE PCI controller is present and it uses
> the legacy iobases. If we still want to enforce the probing, we do
>
> ide_generic.probe_mask=0x3f
>
> on the kernel command line.
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Thanks for reworking the patch, looks much better now.
There are still some issues to address though.
> ---
> drivers/ide/ide-generic.c | 23 ++++++++++++++++++-----
> 1 files changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
> index 8fe8b5b..7d79616 100644
> --- a/drivers/ide/ide-generic.c
> +++ b/drivers/ide/ide-generic.c
> @@ -27,7 +27,7 @@
>
> #define DRV_NAME "ide_generic"
>
> -static int probe_mask = 0x03;
> +static int probe_mask = 0x00;
No need to initialize it now.
> module_param(probe_mask, int, 0);
> MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
>
> @@ -105,18 +105,31 @@ static int __init ide_generic_init(void)
> hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
> struct ide_host *host;
> unsigned long io_addr;
> - int i, rc;
> + int i, rc, dummy, primary = 0, secondary = 0;
>
> #ifdef CONFIG_MIPS
> if (!ide_probe_legacy())
> return -ENODEV;
> #endif
> - printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
> - "parameter for probing all legacy ISA IDE ports\n");
> + ata_legacy_check_iobases(&primary, &secondary, &dummy);
> +
> + if (primary) {
Shouldn't this also check for secondary?
> + if (probe_mask) {
> + printk(KERN_WARNING "%s: enforcing probing of io ports "
> + "upon user request.\n", DRV_NAME);
> + primary = 0;
> + secondary = 0;
> + } else
> + printk(KERN_INFO DRV_NAME ": please use "
> + \"probe_mask=0x3f\" module parameter for probing"
> + "all legacy ISA IDE ports\n");
Help message is no longer printed for !primary
(we always want to have it unless probe_mask is set).
> +
> + } else
> + probe_mask = 0x3;
I think this was meant to be 'probe_mask |= 3;'?
> memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
>
> - for (i = 0; i < ARRAY_SIZE(legacy_bases); i++) {
> + for (i = primary + secondary; i < ARRAY_SIZE(legacy_bases); i++) {
No need for primary/secondary checking here now as everything
is controlled by probe_mask.
Thus we can check for probe_mask first in the previous chunk
and it can be rewritten/simplified to something like:
ata_legacy_check_iobases(&primary, &secondary, &dummy);
if (probe_mask == 0) {
printk(KERN_INFO DRV_NAME ": please use "
\"probe_mask=0x3f\" module parameter for probing"
"all legacy ISA IDE ports\n");
if (primary == 0)
probe_mask |= 1;
if (secondary == 0)
probe_mask |= 2;
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-03 11:59 ` Alan Cox
2008-08-03 13:37 ` Bartlomiej Zolnierkiewicz
@ 2008-08-03 14:38 ` Borislav Petkov
2008-08-03 15:22 ` Alan Cox
1 sibling, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-08-03 14:38 UTC (permalink / raw)
To: Alan Cox; +Cc: petkovbb, Bartlomiej Zolnierkiewicz, alan, linux-kernel,
linux-ide
On Sun, Aug 03, 2008 at 12:59:07PM +0100, Alan Cox wrote:
> On Sun, 3 Aug 2008 09:37:56 +0200
> Borislav Petkov <petkovbb@googlemail.com> wrote:
>
> > Ok, here's a definitely better solution:
>
> Please don't stuff large important pieces of code in header files where
> they will be overlooked
What do you mean by "overlooked"? If you're looking for the function defintion,
any sensible code indexing tool will point you to the right place.
And linux/ata.h already contains several c one liners/helpers. What is the
difference between the two new functions and the ones already present there?
Although the solution i propose is not adhering to some header/c file
conventions, it is still the best one considering the other possibilities:
a) code duplication: dumb idea, bloated kernel for no reason
b) evil Kconfig SELECT pulling in core libata just so that ide might be calling
a function or two.
[.. ]
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
2008-08-03 14:11 ` Bartlomiej Zolnierkiewicz
@ 2008-08-03 14:45 ` Borislav Petkov
2008-08-03 14:54 ` Borislav Petkov
2008-08-03 14:59 ` Bartlomiej Zolnierkiewicz
2008-08-03 15:08 ` Borislav Petkov
1 sibling, 2 replies; 44+ messages in thread
From: Borislav Petkov @ 2008-08-03 14:45 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: alan, linux-kernel, linux-ide
On Sun, Aug 03, 2008 at 04:11:10PM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> On Sunday 03 August 2008, Borislav Petkov wrote:
> > From: Borislav Petkov <petkovbb@gmail.com>
> > Date: Sun, 3 Aug 2008 09:28:53 +0200
> > Subject: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
> >
> > Avoid probing the io-ports in case an IDE PCI controller is present and it uses
> > the legacy iobases. If we still want to enforce the probing, we do
> >
> > ide_generic.probe_mask=0x3f
> >
> > on the kernel command line.
> >
> > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>
> Thanks for reworking the patch, looks much better now.
>
> There are still some issues to address though.
>
> > ---
> > drivers/ide/ide-generic.c | 23 ++++++++++++++++++-----
> > 1 files changed, 18 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
> > index 8fe8b5b..7d79616 100644
> > --- a/drivers/ide/ide-generic.c
> > +++ b/drivers/ide/ide-generic.c
> > @@ -27,7 +27,7 @@
> >
> > #define DRV_NAME "ide_generic"
> >
> > -static int probe_mask = 0x03;
> > +static int probe_mask = 0x00;
>
> No need to initialize it now.
right, static.
> > module_param(probe_mask, int, 0);
> > MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
> >
> > @@ -105,18 +105,31 @@ static int __init ide_generic_init(void)
> > hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
> > struct ide_host *host;
> > unsigned long io_addr;
> > - int i, rc;
> > + int i, rc, dummy, primary = 0, secondary = 0;
> >
> > #ifdef CONFIG_MIPS
> > if (!ide_probe_legacy())
> > return -ENODEV;
> > #endif
> > - printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
> > - "parameter for probing all legacy ISA IDE ports\n");
> > + ata_legacy_check_iobases(&primary, &secondary, &dummy);
> > +
> > + if (primary) {
>
> Shouldn't this also check for secondary?
you don't have to since primary is set to one in all cases.
> > + if (probe_mask) {
> > + printk(KERN_WARNING "%s: enforcing probing of io ports "
> > + "upon user request.\n", DRV_NAME);
> > + primary = 0;
> > + secondary = 0;
> > + } else
> > + printk(KERN_INFO DRV_NAME ": please use "
> > + \"probe_mask=0x3f\" module parameter for probing"
> > + "all legacy ISA IDE ports\n");
>
> Help message is no longer printed for !primary
> (we always want to have it unless probe_mask is set).
How about moving that info to Documentation/ide/ide.txt instead? Do we want to
issue that on every boot, seems like a too unimportant message to be in the
bootlog to me...
> > +
> > + } else
> > + probe_mask = 0x3;
>
> I think this was meant to be 'probe_mask |= 3;'?
true.
> > memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
> >
> > - for (i = 0; i < ARRAY_SIZE(legacy_bases); i++) {
> > + for (i = primary + secondary; i < ARRAY_SIZE(legacy_bases); i++) {
>
> No need for primary/secondary checking here now as everything
> is controlled by probe_mask.
>
> Thus we can check for probe_mask first in the previous chunk
> and it can be rewritten/simplified to something like:
>
> ata_legacy_check_iobases(&primary, &secondary, &dummy);
>
> if (probe_mask == 0) {
> printk(KERN_INFO DRV_NAME ": please use "
> \"probe_mask=0x3f\" module parameter for probing"
> "all legacy ISA IDE ports\n");
>
> if (primary == 0)
> probe_mask |= 1;
>
> if (secondary == 0)
> probe_mask |= 2;
True, this version is more readable. Reworked one coming up :) ...
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
2008-08-03 14:45 ` Borislav Petkov
@ 2008-08-03 14:54 ` Borislav Petkov
2008-08-03 14:59 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 44+ messages in thread
From: Borislav Petkov @ 2008-08-03 14:54 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: alan, linux-kernel, linux-ide
On Sun, Aug 03, 2008 at 04:45:39PM +0200, Borislav Petkov wrote:
> On Sun, Aug 03, 2008 at 04:11:10PM +0200, Bartlomiej Zolnierkiewicz wrote:
> >
> > On Sunday 03 August 2008, Borislav Petkov wrote:
> > > From: Borislav Petkov <petkovbb@gmail.com>
> > > Date: Sun, 3 Aug 2008 09:28:53 +0200
> > > Subject: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
> > >
> > > Avoid probing the io-ports in case an IDE PCI controller is present and it uses
> > > the legacy iobases. If we still want to enforce the probing, we do
> > >
> > > ide_generic.probe_mask=0x3f
> > >
> > > on the kernel command line.
> > >
> > > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> >
> > Thanks for reworking the patch, looks much better now.
> >
> > There are still some issues to address though.
> >
> > > ---
> > > drivers/ide/ide-generic.c | 23 ++++++++++++++++++-----
> > > 1 files changed, 18 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
> > > index 8fe8b5b..7d79616 100644
> > > --- a/drivers/ide/ide-generic.c
> > > +++ b/drivers/ide/ide-generic.c
> > > @@ -27,7 +27,7 @@
> > >
> > > #define DRV_NAME "ide_generic"
> > >
> > > -static int probe_mask = 0x03;
> > > +static int probe_mask = 0x00;
> >
> > No need to initialize it now.
>
> right, static.
>
> > > module_param(probe_mask, int, 0);
> > > MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
> > >
> > > @@ -105,18 +105,31 @@ static int __init ide_generic_init(void)
> > > hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
> > > struct ide_host *host;
> > > unsigned long io_addr;
> > > - int i, rc;
> > > + int i, rc, dummy, primary = 0, secondary = 0;
> > >
> > > #ifdef CONFIG_MIPS
> > > if (!ide_probe_legacy())
> > > return -ENODEV;
> > > #endif
> > > - printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
> > > - "parameter for probing all legacy ISA IDE ports\n");
> > > + ata_legacy_check_iobases(&primary, &secondary, &dummy);
> > > +
> > > + if (primary) {
> >
> > Shouldn't this also check for secondary?
>
> you don't have to since primary is set to one in all cases.
crap, forget what i said here ^ :(.
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
2008-08-03 14:45 ` Borislav Petkov
2008-08-03 14:54 ` Borislav Petkov
@ 2008-08-03 14:59 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-03 14:59 UTC (permalink / raw)
To: petkovbb; +Cc: alan, linux-kernel, linux-ide
On Sunday 03 August 2008, Borislav Petkov wrote:
[...]
> > > + if (probe_mask) {
> > > + printk(KERN_WARNING "%s: enforcing probing of io ports "
> > > + "upon user request.\n", DRV_NAME);
> > > + primary = 0;
> > > + secondary = 0;
> > > + } else
> > > + printk(KERN_INFO DRV_NAME ": please use "
> > > + \"probe_mask=0x3f\" module parameter for probing"
> > > + "all legacy ISA IDE ports\n");
> >
> > Help message is no longer printed for !primary
> > (we always want to have it unless probe_mask is set).
>
> How about moving that info to Documentation/ide/ide.txt instead? Do we want to
> issue that on every boot, seems like a too unimportant message to be in the
> bootlog to me...
Some time ago we've changed the default from probing all ports to probe
only safe ones (we had to do it because probing all ports may break other
ISA devices) so there may be very unlikely cases when this bugfix caused
regression and we would like people to be able to deduce the workaround
from just reading kernel messages.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 2/2] ide-generic: handle probing of legacy io-ports
2008-08-03 14:11 ` Bartlomiej Zolnierkiewicz
2008-08-03 14:45 ` Borislav Petkov
@ 2008-08-03 15:08 ` Borislav Petkov
1 sibling, 0 replies; 44+ messages in thread
From: Borislav Petkov @ 2008-08-03 15:08 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: alan, linux-kernel, linux-ide
On Sun, Aug 03, 2008 at 04:11:10PM +0200, Bartlomiej Zolnierkiewicz wrote:
[.. ]
> There are still some issues to address though.
Issues addressed. Here's v2:
---
From: Borislav Petkov <petkovbb@gmail.com>
Date: Sun, 3 Aug 2008 09:28:53 +0200
Subject: [PATCH] ide-generic: handle probing of legacy io-ports v2
Avoid probing the io-ports in case an IDE PCI controller is present and it uses
the legacy iobases. If we still want to enforce the probing, we do
ide_generic.probe_mask=0x3f
on the kernel command line.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-generic.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 8fe8b5b..1beb51b 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -27,7 +27,7 @@
#define DRV_NAME "ide_generic"
-static int probe_mask = 0x03;
+static int probe_mask;
module_param(probe_mask, int, 0);
MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
@@ -105,14 +105,27 @@ static int __init ide_generic_init(void)
hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
struct ide_host *host;
unsigned long io_addr;
- int i, rc;
+ int i, rc, dummy, primary = 0, secondary = 0;
#ifdef CONFIG_MIPS
if (!ide_probe_legacy())
return -ENODEV;
#endif
- printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
- "parameter for probing all legacy ISA IDE ports\n");
+ ata_legacy_check_iobases(&primary, &secondary, &dummy);
+
+ if (!probe_mask) {
+ printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" "
+ "module parameter for probing all legacy ISA IDE ports\n");
+
+ if (primary == 0)
+ probe_mask |= 0x1;
+
+ if (secondary == 0)
+ probe_mask |= 0x2;
+ } else {
+ printk(KERN_WARNING "%s: enforcing probing of io ports upon "
+ "user request.\n", DRV_NAME);
+ }
memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
--
1.5.5.4
--
Regards/Gruss,
Boris.
^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-03 14:38 ` Borislav Petkov
@ 2008-08-03 15:22 ` Alan Cox
2008-08-03 16:51 ` Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Alan Cox @ 2008-08-03 15:22 UTC (permalink / raw)
To: petkovbb; +Cc: petkovbb, Bartlomiej Zolnierkiewicz, alan, linux-kernel,
linux-ide
> conventions, it is still the best one considering the other possibilities:
>
> a) code duplication: dumb idea, bloated kernel for no reason
I think you might want to start somewhere else if that worries you. Its
also a mostly bogus reasoning as almost nobody builds with both, in fact
you have to be pretty careful if you do that or it all falls over in a
heap.
For previous cases (eg ide timing) it has actually made more sense to
split the code. The moment you get future different behaviour between
libata and old IDE on any of these devices the sharing will just break
again (eg if one or the other drops chipset support for one of those
devices or adds one for another device)
> b) evil Kconfig SELECT pulling in core libata just so that ide might be calling
> a function or two.
That would be stunningly dumb. I happen to think we have developers whose
minds extent to adding libata-common.c and pulling in a single file if we
do that. Yes people have the past done stupid stuff like pulling all of
CONFIG_IDE in for a single USB device but that was because nobody noticed
and fixed it promptly not because it was a good idea.
Alan
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-03 15:22 ` Alan Cox
@ 2008-08-03 16:51 ` Borislav Petkov
2008-08-05 14:26 ` Sergei Shtylyov
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-08-03 16:51 UTC (permalink / raw)
To: Alan Cox, bzolnier; +Cc: linux-kernel, linux-ide
[shortened up CC list]
On Sun, Aug 03, 2008 at 04:22:14PM +0100, Alan Cox wrote:
> > conventions, it is still the best one considering the other possibilities:
> >
> > a) code duplication: dumb idea, bloated kernel for no reason
>
> I think you might want to start somewhere else if that worries you. Its
> also a mostly bogus reasoning as almost nobody builds with both, in fact
> you have to be pretty careful if you do that or it all falls over in a
> heap.
>
> For previous cases (eg ide timing) it has actually made more sense to
> split the code. The moment you get future different behaviour between
> libata and old IDE on any of these devices the sharing will just break
> again (eg if one or the other drops chipset support for one of those
> devices or adds one for another device)
>
> > b) evil Kconfig SELECT pulling in core libata just so that ide might be calling
> > a function or two.
>
> That would be stunningly dumb. I happen to think we have developers whose
> minds extent to adding libata-common.c and pulling in a single file if we
> do that. Yes people have the past done stupid stuff like pulling all of
> CONFIG_IDE in for a single USB device but that was because nobody noticed
> and fixed it promptly not because it was a good idea.
>
> Alan
Ok then, so we duplicate. This seems like the easiest solution. Sharing code
between libata and IDE is not that smart in case the two development directions
divert, as you said. Bart, here's v3:
---
From: Borislav Petkov <petkovbb@gmail.com>
Date: Sun, 3 Aug 2008 18:46:35 +0200
Subject: [PATCH] ide-generic: handle probing of legacy io-ports v3
Avoid probing the io-ports in case an IDE PCI controller is present and it uses
the legacy iobases. If we still want to enforce the probing, we do
ide_generic.probe_mask=0x3f
on the kernel command line. The iobase checking code is adapted from
drivers/ata/pata_legacy.c
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-generic.c | 60 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 56 insertions(+), 4 deletions(-)
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 8fe8b5b..e9b7b69 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -27,7 +27,7 @@
#define DRV_NAME "ide_generic"
-static int probe_mask = 0x03;
+static int probe_mask;
module_param(probe_mask, int, 0);
MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
@@ -100,19 +100,71 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
#endif
+
+static void ide_generic_check_pci_legacy_iobases(int *primary, int *secondary)
+{
+ struct pci_dev *p = NULL;
+ u16 val;
+
+ for_each_pci_dev(p) {
+ int r;
+
+ for (r = 0; r < 6; r++) {
+ if (pci_resource_start(p, r) == 0x1f0)
+ *primary = 1;
+ if (pci_resource_start(p, r) == 0x170)
+ *secondary = 1;
+ }
+
+ /* Cyrix CS5510 pre SFF MWDMA ATA on the bridge */
+ if (p->vendor == 0x1078 && p->device == 0x0000)
+ *primary = *secondary = 1;
+
+ /* Cyrix CS5520 pre SFF MWDMA ATA on the bridge */
+ if (p->vendor == 0x1078 && p->device == 0x0002)
+ *primary = *secondary = 1;
+
+ /* Intel MPIIX - PIO ATA on non PCI side of bridge */
+ if (p->vendor == 0x8086 && p->device == 0x1234) {
+
+ pci_read_config_word(p, 0x6C, &val);
+ if (val & 0x8000) {
+ /* ATA port enabled */
+ if (val & 0x4000)
+ *secondary = 1;
+ else
+ *primary = 1;
+ }
+ }
+ }
+}
+
static int __init ide_generic_init(void)
{
hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
struct ide_host *host;
unsigned long io_addr;
- int i, rc;
+ int i, rc, primary = 0, secondary = 0;
#ifdef CONFIG_MIPS
if (!ide_probe_legacy())
return -ENODEV;
#endif
- printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
- "parameter for probing all legacy ISA IDE ports\n");
+ ide_generic_check_pci_legacy_iobases(&primary, &secondary);
+
+ if (!probe_mask) {
+ printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" "
+ "module parameter for probing all legacy ISA IDE ports\n");
+
+ if (primary == 0)
+ probe_mask |= 0x1;
+
+ if (secondary == 0)
+ probe_mask |= 0x2;
+ } else {
+ printk(KERN_WARNING "%s: enforcing probing of io ports upon "
+ "user request.\n", DRV_NAME);
+ }
memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
--
1.5.5.4
--
Regards/Gruss,
Boris.
^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-03 13:39 ` Alan Cox
@ 2008-08-03 23:43 ` Jeff Garzik
0 siblings, 0 replies; 44+ messages in thread
From: Jeff Garzik @ 2008-08-03 23:43 UTC (permalink / raw)
To: Alan Cox
Cc: Bartlomiej Zolnierkiewicz, petkovbb, petkovbb, alan, linux-kernel,
linux-ide
Alan Cox wrote:
>> The code in question is 65 LOC total (43 LOC without counting comments)
>> so having a shared library just for it sounds like an overkill and we may
>
> People expect code in C files, so in headers it gets missed as well as
> dumped in a directory with no correlation between file name and subsystem.
>
>> just copy that one function from pata_legacy to ide_generic instead.
>
> If you are going to #include two copies you might as well just copy it.
That's pretty much my feeling... just copy the code.
If the shared code grows larger, create a kernel module with the stuff
shared by both libata and drivers/ide.
liblibata? libata-core-core? :)
Jeff
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-03 16:51 ` Borislav Petkov
@ 2008-08-05 14:26 ` Sergei Shtylyov
2008-08-05 14:32 ` Boris Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Sergei Shtylyov @ 2008-08-05 14:26 UTC (permalink / raw)
To: petkovbb; +Cc: Alan Cox, bzolnier, linux-kernel, linux-ide
Hello.
Borislav Petkov wrote:
> Avoid probing the io-ports in case an IDE PCI controller is present and it uses
> the legacy iobases. If we still want to enforce the probing, we do
> ide_generic.probe_mask=0x3f
> on the kernel command line. The iobase checking code is adapted from
> drivers/ata/pata_legacy.c
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
> index 8fe8b5b..e9b7b69 100644
> --- a/drivers/ide/ide-generic.c
> +++ b/drivers/ide/ide-generic.c
[...]
> @@ -100,19 +100,71 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
> static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
> #endif
>
> +
Extra newline...
> +static void ide_generic_check_pci_legacy_iobases(int *primary, int *secondary)
> +{
> + struct pci_dev *p = NULL;
> + u16 val;
> +
> + for_each_pci_dev(p) {
> + int r;
> +
> + for (r = 0; r < 6; r++) {
> + if (pci_resource_start(p, r) == 0x1f0)
> + *primary = 1;
> + if (pci_resource_start(p, r) == 0x170)
> + *secondary = 1;
> + }
> +
> + /* Cyrix CS5510 pre SFF MWDMA ATA on the bridge */
> + if (p->vendor == 0x1078 && p->device == 0x0000)
> + *primary = *secondary = 1;
> +
> + /* Cyrix CS5520 pre SFF MWDMA ATA on the bridge */
> + if (p->vendor == 0x1078 && p->device == 0x0002)
> + *primary = *secondary = 1;
I think the above two if statements should be collapsed into a single one.
> +
> + /* Intel MPIIX - PIO ATA on non PCI side of bridge */
> + if (p->vendor == 0x8086 && p->device == 0x1234) {
Also, perhaps it makes sense to #include <linux/pci_ids.h> and use the
macros defined there...
MBR, Sergei
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-05 14:26 ` Sergei Shtylyov
@ 2008-08-05 14:32 ` Boris Petkov
2008-08-05 14:41 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 44+ messages in thread
From: Boris Petkov @ 2008-08-05 14:32 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Alan Cox, bzolnier, linux-kernel, linux-ide
On Tue, Aug 5, 2008 at 4:26 PM, Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> Hello.
>
> Borislav Petkov wrote:
>
>> Avoid probing the io-ports in case an IDE PCI controller is present and it
>> uses
>> the legacy iobases. If we still want to enforce the probing, we do
>
>> ide_generic.probe_mask=0x3f
>
>> on the kernel command line. The iobase checking code is adapted from
>> drivers/ata/pata_legacy.c
>
>> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>
>> diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
>> index 8fe8b5b..e9b7b69 100644
>> --- a/drivers/ide/ide-generic.c
>> +++ b/drivers/ide/ide-generic.c
>
> [...]
>>
>> @@ -100,19 +100,71 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170,
>> 0x1e8, 0x168, 0x1e0, 0x160 };
>> static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
>> #endif
>> +
>
> Extra newline...
>
>> +static void ide_generic_check_pci_legacy_iobases(int *primary, int
>> *secondary)
>> +{
>> + struct pci_dev *p = NULL;
>> + u16 val;
>> +
>> + for_each_pci_dev(p) {
>> + int r;
>> +
>> + for (r = 0; r < 6; r++) {
>> + if (pci_resource_start(p, r) == 0x1f0)
>> + *primary = 1;
>> + if (pci_resource_start(p, r) == 0x170)
>> + *secondary = 1;
>> + }
>> +
>> + /* Cyrix CS5510 pre SFF MWDMA ATA on the bridge */
>> + if (p->vendor == 0x1078 && p->device == 0x0000)
>> + *primary = *secondary = 1;
>> +
>> + /* Cyrix CS5520 pre SFF MWDMA ATA on the bridge */
>> + if (p->vendor == 0x1078 && p->device == 0x0002)
>> + *primary = *secondary = 1;
>
> I think the above two if statements should be collapsed into a single one.
This is code is actually from the pata_legacy.c but yep, you're right,
those can merge.
>
>> +
>> + /* Intel MPIIX - PIO ATA on non PCI side of bridge */
>> + if (p->vendor == 0x8086 && p->device == 0x1234) {
>
> Also, perhaps it makes sense to #include <linux/pci_ids.h> and use the
> macros defined there...
Will look into it later and redo the patch, thanks for reviewing. I
still haven't heard from
Bart, though, whether he's OK with the code duplication...?
--
Regards/Gruß,
Boris
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-05 14:32 ` Boris Petkov
@ 2008-08-05 14:41 ` Bartlomiej Zolnierkiewicz
2008-08-06 6:10 ` Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-05 14:41 UTC (permalink / raw)
To: petkovbb; +Cc: Sergei Shtylyov, Alan Cox, linux-kernel, linux-ide
On Tue, Aug 5, 2008 at 4:32 PM, Boris Petkov <petkovbb@googlemail.com> wrote:
[...]
> Will look into it later and redo the patch, thanks for reviewing. I
> still haven't heard from
> Bart, though, whether he's OK with the code duplication...?
Given Alan & Jeff concerns about moving it to <linux/ata.h>, just
copying the function to ide_generic seems like a best solution for now.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-05 14:41 ` Bartlomiej Zolnierkiewicz
@ 2008-08-06 6:10 ` Borislav Petkov
2008-08-06 11:34 ` Sergei Shtylyov
0 siblings, 1 reply; 44+ messages in thread
From: Borislav Petkov @ 2008-08-06 6:10 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz, Sergei Shtylyov
Cc: Alan Cox, linux-kernel, linux-ide
On Tue, Aug 05, 2008 at 04:41:54PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Tue, Aug 5, 2008 at 4:32 PM, Boris Petkov <petkovbb@googlemail.com> wrote:
>
> [...]
>
> > Will look into it later and redo the patch, thanks for reviewing. I
> > still haven't heard from
> > Bart, though, whether he's OK with the code duplication...?
>
> Given Alan & Jeff concerns about moving it to <linux/ata.h>, just
> copying the function to ide_generic seems like a best solution for now.
---
From: Borislav Petkov <petkovbb@gmail.com>
Date: Sun, 3 Aug 2008 18:46:35 +0200
Subject: [PATCH] ide-generic: handle probing of legacy io-ports v4
Avoid probing the io-ports in case an IDE PCI controller is present and it uses
the legacy iobases. If we still want to enforce the probing, we do
ide_generic.probe_mask=0x3f
on the kernel command line. The iobase checking code is adapted from
drivers/ata/pata_legacy.c after converting hex pci ids into their corresponding
macros in <linux/pci_ids.h>.
CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-generic.c | 59 +++++++++++++++++++++++++++++++++++++++++---
1 files changed, 55 insertions(+), 4 deletions(-)
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 8fe8b5b..efce159 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -19,6 +19,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/ide.h>
+#include <linux/pci_ids.h>
/* FIXME: convert m32r to use ide_platform host driver */
#ifdef CONFIG_M32R
@@ -27,7 +28,7 @@
#define DRV_NAME "ide_generic"
-static int probe_mask = 0x03;
+static int probe_mask;
module_param(probe_mask, int, 0);
MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
@@ -100,19 +101,69 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
#endif
+static void ide_generic_check_pci_legacy_iobases(int *primary, int *secondary)
+{
+ struct pci_dev *p = NULL;
+ u16 val;
+
+ for_each_pci_dev(p) {
+ int r;
+
+ for (r = 0; r < 6; r++) {
+ if (pci_resource_start(p, r) == 0x1f0)
+ *primary = 1;
+ if (pci_resource_start(p, r) == 0x170)
+ *secondary = 1;
+ }
+
+ /* Cyrix CS55{1,2}0 pre SFF MWDMA ATA on the bridge */
+ if (p->vendor == PCI_VENDOR_ID_CYRIX &&
+ (p->device == PCI_DEVICE_ID_CYRIX_5510 ||
+ p->device == PCI_DEVICE_ID_CYRIX_5520))
+ *primary = *secondary = 1;
+
+ /* Intel MPIIX - PIO ATA on non PCI side of bridge */
+ if (p->vendor == PCI_VENDOR_ID_INTEL &&
+ p->device == PCI_DEVICE_ID_INTEL_82371MX) {
+
+ pci_read_config_word(p, 0x6C, &val);
+ if (val & 0x8000) {
+ /* ATA port enabled */
+ if (val & 0x4000)
+ *secondary = 1;
+ else
+ *primary = 1;
+ }
+ }
+ }
+}
+
static int __init ide_generic_init(void)
{
hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
struct ide_host *host;
unsigned long io_addr;
- int i, rc;
+ int i, rc, primary = 0, secondary = 0;
#ifdef CONFIG_MIPS
if (!ide_probe_legacy())
return -ENODEV;
#endif
- printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
- "parameter for probing all legacy ISA IDE ports\n");
+ ide_generic_check_pci_legacy_iobases(&primary, &secondary);
+
+ if (!probe_mask) {
+ printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" "
+ "module parameter for probing all legacy ISA IDE ports\n");
+
+ if (primary == 0)
+ probe_mask |= 0x1;
+
+ if (secondary == 0)
+ probe_mask |= 0x2;
+ } else {
+ printk(KERN_WARNING "%s: enforcing probing of io ports upon "
+ "user request.\n", DRV_NAME);
+ }
memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
--
1.5.5.4
--
Regards/Gruss,
Boris.
^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-06 6:10 ` Borislav Petkov
@ 2008-08-06 11:34 ` Sergei Shtylyov
2008-08-06 14:03 ` Boris Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Sergei Shtylyov @ 2008-08-06 11:34 UTC (permalink / raw)
To: petkovbb, Bartlomiej Zolnierkiewicz, Sergei Shtylyov, Alan Cox,
linux-kernel
Hello.
Borislav Petkov wrote:
> From: Borislav Petkov <petkovbb@gmail.com>
> Date: Sun, 3 Aug 2008 18:46:35 +0200
> Subject: [PATCH] ide-generic: handle probing of legacy io-ports v4
>
> Avoid probing the io-ports in case an IDE PCI controller is present and it uses
> the legacy iobases. If we still want to enforce the probing, we do
>
> ide_generic.probe_mask=0x3f
>
> on the kernel command line. The iobase checking code is adapted from
> drivers/ata/pata_legacy.c after converting hex pci ids into their corresponding
> macros in <linux/pci_ids.h>.
>
> CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
> index 8fe8b5b..efce159 100644
> --- a/drivers/ide/ide-generic.c
> +++ b/drivers/ide/ide-generic.c
>
[...]
> @@ -100,19 +101,69 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
> static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
> #endif
>
> +static void ide_generic_check_pci_legacy_iobases(int *primary, int *secondary)
> +{
> + struct pci_dev *p = NULL;
> + u16 val;
> +
> + for_each_pci_dev(p) {
> + int r;
> +
> + for (r = 0; r < 6; r++) {
> + if (pci_resource_start(p, r) == 0x1f0)
> + *primary = 1;
> + if (pci_resource_start(p, r) == 0x170)
> + *secondary = 1;
> + }
>
Would have been probably enough to test only BAR0/2, don't you think?
MBR, Sergei
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-06 11:34 ` Sergei Shtylyov
@ 2008-08-06 14:03 ` Boris Petkov
2008-08-06 15:57 ` Sergei Shtylyov
0 siblings, 1 reply; 44+ messages in thread
From: Boris Petkov @ 2008-08-06 14:03 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Bartlomiej Zolnierkiewicz, Alan Cox, linux-kernel, linux-ide
On Wed, Aug 6, 2008 at 1:34 PM, Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> Hello.
>
> Borislav Petkov wrote:
>>
>> From: Borislav Petkov <petkovbb@gmail.com>
>> Date: Sun, 3 Aug 2008 18:46:35 +0200
>> Subject: [PATCH] ide-generic: handle probing of legacy io-ports v4
>>
>> Avoid probing the io-ports in case an IDE PCI controller is present and it
>> uses
>> the legacy iobases. If we still want to enforce the probing, we do
>>
>> ide_generic.probe_mask=0x3f
>>
>> on the kernel command line. The iobase checking code is adapted from
>> drivers/ata/pata_legacy.c after converting hex pci ids into their
>> corresponding
>> macros in <linux/pci_ids.h>.
>>
>> CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>>
>
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
>> diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
>> index 8fe8b5b..efce159 100644
>> --- a/drivers/ide/ide-generic.c
>> +++ b/drivers/ide/ide-generic.c
>>
>
> [...]
>>
>> @@ -100,19 +101,69 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170,
>> 0x1e8, 0x168, 0x1e0, 0x160 };
>> static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
>> #endif
>> +static void ide_generic_check_pci_legacy_iobases(int *primary, int
>> *secondary)
>> +{
>> + struct pci_dev *p = NULL;
>> + u16 val;
>> +
>> + for_each_pci_dev(p) {
>> + int r;
>> +
>> + for (r = 0; r < 6; r++) {
>> + if (pci_resource_start(p, r) == 0x1f0)
>> + *primary = 1;
>> + if (pci_resource_start(p, r) == 0x170)
>> + *secondary = 1;
>> + }
>>
>
> Would have been probably enough to test only BAR0/2, don't you think?
I assume you're referring to the legacy ioports fixup in
drivers/pci/probe.c:pci_setup_device(). Yes, there's no need to go all the way
to BAR5 since those are guaranteed unused in compatibility mode, so actually the
loop should go till 4. Bart, can you please change that when applying?
--
Regards/Gruß,
Boris
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-06 14:03 ` Boris Petkov
@ 2008-08-06 15:57 ` Sergei Shtylyov
2008-08-06 19:47 ` Borislav Petkov
0 siblings, 1 reply; 44+ messages in thread
From: Sergei Shtylyov @ 2008-08-06 15:57 UTC (permalink / raw)
To: petkovbb; +Cc: Bartlomiej Zolnierkiewicz, Alan Cox, linux-kernel, linux-ide
Boris Petkov wrote:
>>>From: Borislav Petkov <petkovbb@gmail.com>
>>>Date: Sun, 3 Aug 2008 18:46:35 +0200
>>>Subject: [PATCH] ide-generic: handle probing of legacy io-ports v4
>>>Avoid probing the io-ports in case an IDE PCI controller is present and it uses
>>>the legacy iobases. If we still want to enforce the probing, we do
>>>ide_generic.probe_mask=0x3f
>>>on the kernel command line. The iobase checking code is adapted from
>>>drivers/ata/pata_legacy.c after converting hex pci ids into their
>>>corresponding
>>>macros in <linux/pci_ids.h>.
>>>CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>>>Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>>Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>>>diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
>>>index 8fe8b5b..efce159 100644
>>>--- a/drivers/ide/ide-generic.c
>>>+++ b/drivers/ide/ide-generic.c
>>[...]
>>>@@ -100,19 +101,69 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170,
>>>0x1e8, 0x168, 0x1e0, 0x160 };
>>> static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
>>> #endif
>>> +static void ide_generic_check_pci_legacy_iobases(int *primary, int
>>>*secondary)
>>>+{
>>>+ struct pci_dev *p = NULL;
>>>+ u16 val;
>>>+
>>>+ for_each_pci_dev(p) {
>>>+ int r;
>>>+
>>>+ for (r = 0; r < 6; r++) {
>>>+ if (pci_resource_start(p, r) == 0x1f0)
>>>+ *primary = 1;
>>>+ if (pci_resource_start(p, r) == 0x170)
>>>+ *secondary = 1;
>>>+ }
>> Would have been probably enough to test only BAR0/2, don't you think?
> I assume you're referring to the legacy ioports fixup in
> drivers/pci/probe.c:pci_setup_device().
And to the fact that the value 0x1f0 should only be ever seen in BAR0 and
0x170 in BAR2 even if they would have been read off the chips (some chips have
these values reading back even in legacy mode, and even could malfunction if
other values are written there), not fixed up there, and certainly not in BAR1
or BAR3, so it's quite pointless to look in these BARs too.
WBR, Sergei
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-06 19:47 ` Borislav Petkov
@ 2008-08-06 19:46 ` Alan Cox
2008-08-06 20:04 ` Sergei Shtylyov
1 sibling, 0 replies; 44+ messages in thread
From: Alan Cox @ 2008-08-06 19:46 UTC (permalink / raw)
To: petkovbb
Cc: petkovbb, Sergei Shtylyov, Bartlomiej Zolnierkiewicz,
linux-kernel, linux-ide
> So the comment in there saying that in some cases BAR0-3 could contain junk is a
> bogus? In other words, can we assume that one will always read 0x1f0 from BAR0
> and 0x170 from BAR2 in compatibility mode. If so, the check is even simpler:
>
> if (pci_resource_start(p, 0) == 0x1f0)
> *primary = 1;
> if (pci_resource_start(p, 2) == 0x170)
> *secondary = 1;
In theory, but for the sake of about 30 bytes of code in an obscure 'last
resort work everywhere' driver it seemed a bit pointless.
Alan
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-06 15:57 ` Sergei Shtylyov
@ 2008-08-06 19:47 ` Borislav Petkov
2008-08-06 19:46 ` Alan Cox
2008-08-06 20:04 ` Sergei Shtylyov
0 siblings, 2 replies; 44+ messages in thread
From: Borislav Petkov @ 2008-08-06 19:47 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Bartlomiej Zolnierkiewicz, Alan Cox, linux-kernel, linux-ide
On Wed, Aug 06, 2008 at 07:57:40PM +0400, Sergei Shtylyov wrote:
> Boris Petkov wrote:
>
>>>> From: Borislav Petkov <petkovbb@gmail.com>
>>>> Date: Sun, 3 Aug 2008 18:46:35 +0200
>>>> Subject: [PATCH] ide-generic: handle probing of legacy io-ports v4
>
>>>> Avoid probing the io-ports in case an IDE PCI controller is present and it uses
>>>> the legacy iobases. If we still want to enforce the probing, we do
>
>>>> ide_generic.probe_mask=0x3f
>
>>>> on the kernel command line. The iobase checking code is adapted from
>>>> drivers/ata/pata_legacy.c after converting hex pci ids into their
>>>> corresponding
>>>> macros in <linux/pci_ids.h>.
>
>>>> CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>>>> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>
>>> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
>>>> diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
>>>> index 8fe8b5b..efce159 100644
>>>> --- a/drivers/ide/ide-generic.c
>>>> +++ b/drivers/ide/ide-generic.c
>
>>> [...]
>
>>>> @@ -100,19 +101,69 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170,
>>>> 0x1e8, 0x168, 0x1e0, 0x160 };
>>>> static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
>>>> #endif
>>>> +static void ide_generic_check_pci_legacy_iobases(int *primary, int
>>>> *secondary)
>>>> +{
>>>> + struct pci_dev *p = NULL;
>>>> + u16 val;
>>>> +
>>>> + for_each_pci_dev(p) {
>>>> + int r;
>>>> +
>>>> + for (r = 0; r < 6; r++) {
>>>> + if (pci_resource_start(p, r) == 0x1f0)
>>>> + *primary = 1;
>>>> + if (pci_resource_start(p, r) == 0x170)
>>>> + *secondary = 1;
>>>> + }
>
>>> Would have been probably enough to test only BAR0/2, don't you think?
>
>> I assume you're referring to the legacy ioports fixup in
>> drivers/pci/probe.c:pci_setup_device().
>
> And to the fact that the value 0x1f0 should only be ever seen in BAR0
> and 0x170 in BAR2 even if they would have been read off the chips (some
> chips have these values reading back even in legacy mode, and even could
> malfunction if other values are written there), not fixed up there, and
> certainly not in BAR1 or BAR3, so it's quite pointless to look in these
> BARs too.
So the comment in there saying that in some cases BAR0-3 could contain junk is a
bogus? In other words, can we assume that one will always read 0x1f0 from BAR0
and 0x170 from BAR2 in compatibility mode. If so, the check is even simpler:
if (pci_resource_start(p, 0) == 0x1f0)
*primary = 1;
if (pci_resource_start(p, 2) == 0x170)
*secondary = 1;
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 1/2] pata_legacy: export functionality to ide
2008-08-06 19:47 ` Borislav Petkov
2008-08-06 19:46 ` Alan Cox
@ 2008-08-06 20:04 ` Sergei Shtylyov
2008-08-07 4:36 ` [PATCH] ide-generic: handle probing of legacy io-ports v5 (was: Re: [PATCH 1/2] pata_legacy: export functionality to ide) Borislav Petkov
1 sibling, 1 reply; 44+ messages in thread
From: Sergei Shtylyov @ 2008-08-06 20:04 UTC (permalink / raw)
To: petkovbb; +Cc: Bartlomiej Zolnierkiewicz, Alan Cox, linux-kernel, linux-ide
Borislav Petkov wrote:
>>>>>From: Borislav Petkov <petkovbb@gmail.com>
>>>>>Date: Sun, 3 Aug 2008 18:46:35 +0200
>>>>>Subject: [PATCH] ide-generic: handle probing of legacy io-ports v4
>>>>>Avoid probing the io-ports in case an IDE PCI controller is present and it uses
>>>>>the legacy iobases. If we still want to enforce the probing, we do
>>>>>ide_generic.probe_mask=0x3f
>>>>>on the kernel command line. The iobase checking code is adapted from
>>>>>drivers/ata/pata_legacy.c after converting hex pci ids into their
>>>>>corresponding
>>>>>macros in <linux/pci_ids.h>.
>>>>>CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>>>>>Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
>>>>Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>>>>>diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
>>>>>index 8fe8b5b..efce159 100644
>>>>>--- a/drivers/ide/ide-generic.c
>>>>>+++ b/drivers/ide/ide-generic.c
>>>>[...]
>>>>>@@ -100,19 +101,69 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170,
>>>>>0x1e8, 0x168, 0x1e0, 0x160 };
>>>>>static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
>>>>>#endif
>>>>>+static void ide_generic_check_pci_legacy_iobases(int *primary, int
>>>>>*secondary)
>>>>>+{
>>>>>+ struct pci_dev *p = NULL;
>>>>>+ u16 val;
>>>>>+
>>>>>+ for_each_pci_dev(p) {
>>>>>+ int r;
>>>>>+
>>>>>+ for (r = 0; r < 6; r++) {
>>>>>+ if (pci_resource_start(p, r) == 0x1f0)
>>>>>+ *primary = 1;
>>>>>+ if (pci_resource_start(p, r) == 0x170)
>>>>>+ *secondary = 1;
>>>>>+ }
>>>>Would have been probably enough to test only BAR0/2, don't you think?
>>>I assume you're referring to the legacy ioports fixup in
>>>drivers/pci/probe.c:pci_setup_device().
>> And to the fact that the value 0x1f0 should only be ever seen in BAR0
>>and 0x170 in BAR2 even if they would have been read off the chips (some
>>chips have these values reading back even in legacy mode, and even could
>>malfunction if other values are written there), not fixed up there, and
>>certainly not in BAR1 or BAR3, so it's quite pointless to look in these
>>BARs too.
> So the comment in there saying that in some cases BAR0-3 could contain junk is a
> bogus?
Don't know. The PCI IDE spec. said that those should be 0 in compatibility
mode but I know that some controllers require the standard values of 0x1[f7]0
to be in BAR0/2 in compatibility mode. If my memory serves, NatSemi PC8741x
were ones of those...
> In other words, can we assume that one will always read 0x1f0 from BAR0
> and 0x170 from BAR2 in compatibility mode.
Certainly not. We can only rely on the workaround putting 0x1[f7]0 in the
resources 0/2.
> If so, the check is even simpler:
> if (pci_resource_start(p, 0) == 0x1f0)
> *primary = 1;
> if (pci_resource_start(p, 2) == 0x170)
> *secondary = 1;
Yes, I think that should be enough...
WBR, Sergei
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH] ide-generic: handle probing of legacy io-ports v5 (was: Re: [PATCH 1/2] pata_legacy: export functionality to ide)
2008-08-06 20:04 ` Sergei Shtylyov
@ 2008-08-07 4:36 ` Borislav Petkov
2008-08-07 17:06 ` Bartlomiej Zolnierkiewicz
2008-08-08 10:04 ` [PATCH] ide-generic: handle probing of legacy io-ports v5 Sergei Shtylyov
0 siblings, 2 replies; 44+ messages in thread
From: Borislav Petkov @ 2008-08-07 4:36 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Bartlomiej Zolnierkiewicz, Alan Cox, linux-kernel, linux-ide
On Thu, Aug 07, 2008 at 12:04:19AM +0400, Sergei Shtylyov wrote:
[.. ]
>>>>> Would have been probably enough to test only BAR0/2, don't you think?
>
>>>> I assume you're referring to the legacy ioports fixup in
>>>> drivers/pci/probe.c:pci_setup_device().
>
>>> And to the fact that the value 0x1f0 should only be ever seen in
>>> BAR0 and 0x170 in BAR2 even if they would have been read off the
>>> chips (some chips have these values reading back even in legacy mode,
>>> and even could malfunction if other values are written there), not
>>> fixed up there, and certainly not in BAR1 or BAR3, so it's quite
>>> pointless to look in these BARs too.
>
>> So the comment in there saying that in some cases BAR0-3 could contain junk is a
>> bogus?
>
> Don't know. The PCI IDE spec. said that those should be 0 in
> compatibility mode but I know that some controllers require the standard
> values of 0x1[f7]0 to be in BAR0/2 in compatibility mode. If my memory
> serves, NatSemi PC8741x were ones of those...
>
>> In other words, can we assume that one will always read 0x1f0 from BAR0
>> and 0x170 from BAR2 in compatibility mode.
>
> Certainly not. We can only rely on the workaround putting 0x1[f7]0 in
> the resources 0/2.
>
>> If so, the check is even simpler:
>
>> if (pci_resource_start(p, 0) == 0x1f0)
>> *primary = 1;
>> if (pci_resource_start(p, 2) == 0x170)
>> *secondary = 1;
>
> Yes, I think that should be enough...
Here's v5:
---
From: Borislav Petkov <petkovbb@gmail.com>
Date: Sun, 3 Aug 2008 18:46:35 +0200
Subject: [PATCH] ide-generic: handle probing of legacy io-ports v5
Avoid probing the io-ports in case an IDE PCI controller is present and it
uses the legacy iobases. If we still want to enforce the probing, we do
ide_generic.probe_mask=0x3f
on the kernel command line. The iobase checking code is
adapted from drivers/ata/pata_legacy.c after converting hex
pci ids into their corresponding macros in <linux/pci_ids.h>.
Also, check only BAR0/2 resources since those are guaranteed
by the workaround in drivers/pci/probe.c:pci_setup_device().
CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-generic.c | 56 +++++++++++++++++++++++++++++++++++++++++---
1 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 8fe8b5b..608f353 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -19,6 +19,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/ide.h>
+#include <linux/pci_ids.h>
/* FIXME: convert m32r to use ide_platform host driver */
#ifdef CONFIG_M32R
@@ -27,7 +28,7 @@
#define DRV_NAME "ide_generic"
-static int probe_mask = 0x03;
+static int probe_mask;
module_param(probe_mask, int, 0);
MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
@@ -100,19 +101,66 @@ static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
#endif
+static void ide_generic_check_pci_legacy_iobases(int *primary, int *secondary)
+{
+ struct pci_dev *p = NULL;
+ u16 val;
+
+ for_each_pci_dev(p) {
+
+ if (pci_resource_start(p, 0) == 0x1f0)
+ *primary = 1;
+ if (pci_resource_start(p, 2) == 0x170)
+ *secondary = 1;
+
+ /* Cyrix CS55{1,2}0 pre SFF MWDMA ATA on the bridge */
+ if (p->vendor == PCI_VENDOR_ID_CYRIX &&
+ (p->device == PCI_DEVICE_ID_CYRIX_5510 ||
+ p->device == PCI_DEVICE_ID_CYRIX_5520))
+ *primary = *secondary = 1;
+
+ /* Intel MPIIX - PIO ATA on non PCI side of bridge */
+ if (p->vendor == PCI_VENDOR_ID_INTEL &&
+ p->device == PCI_DEVICE_ID_INTEL_82371MX) {
+
+ pci_read_config_word(p, 0x6C, &val);
+ if (val & 0x8000) {
+ /* ATA port enabled */
+ if (val & 0x4000)
+ *secondary = 1;
+ else
+ *primary = 1;
+ }
+ }
+ }
+}
+
static int __init ide_generic_init(void)
{
hw_regs_t hw[MAX_HWIFS], *hws[MAX_HWIFS];
struct ide_host *host;
unsigned long io_addr;
- int i, rc;
+ int i, rc, primary = 0, secondary = 0;
#ifdef CONFIG_MIPS
if (!ide_probe_legacy())
return -ENODEV;
#endif
- printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
- "parameter for probing all legacy ISA IDE ports\n");
+ ide_generic_check_pci_legacy_iobases(&primary, &secondary);
+
+ if (!probe_mask) {
+ printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" "
+ "module parameter for probing all legacy ISA IDE ports\n");
+
+ if (primary == 0)
+ probe_mask |= 0x1;
+
+ if (secondary == 0)
+ probe_mask |= 0x2;
+ } else {
+ printk(KERN_WARNING "%s: enforcing probing of io ports upon "
+ "user request.\n", DRV_NAME);
+ }
memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
--
1.5.5.4
--
Regards/Gruss,
Boris.
^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-generic: handle probing of legacy io-ports v5 (was: Re: [PATCH 1/2] pata_legacy: export functionality to ide)
2008-08-07 4:36 ` [PATCH] ide-generic: handle probing of legacy io-ports v5 (was: Re: [PATCH 1/2] pata_legacy: export functionality to ide) Borislav Petkov
@ 2008-08-07 17:06 ` Bartlomiej Zolnierkiewicz
2008-08-08 10:04 ` [PATCH] ide-generic: handle probing of legacy io-ports v5 Sergei Shtylyov
1 sibling, 0 replies; 44+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-07 17:06 UTC (permalink / raw)
To: petkovbb; +Cc: Sergei Shtylyov, Alan Cox, linux-kernel, linux-ide
On Thursday 07 August 2008, Borislav Petkov wrote:
[...]
> Here's v5:
>
> ---
> From: Borislav Petkov <petkovbb@gmail.com>
> Date: Sun, 3 Aug 2008 18:46:35 +0200
> Subject: [PATCH] ide-generic: handle probing of legacy io-ports v5
>
> Avoid probing the io-ports in case an IDE PCI controller is present and it
> uses the legacy iobases. If we still want to enforce the probing, we do
>
> ide_generic.probe_mask=0x3f
>
> on the kernel command line. The iobase checking code is
> adapted from drivers/ata/pata_legacy.c after converting hex
> pci ids into their corresponding macros in <linux/pci_ids.h>.
>
> Also, check only BAR0/2 resources since those are guaranteed
> by the workaround in drivers/pci/probe.c:pci_setup_device().
>
> CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
applied, thanks
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH] ide-generic: handle probing of legacy io-ports v5
2008-08-07 4:36 ` [PATCH] ide-generic: handle probing of legacy io-ports v5 (was: Re: [PATCH 1/2] pata_legacy: export functionality to ide) Borislav Petkov
2008-08-07 17:06 ` Bartlomiej Zolnierkiewicz
@ 2008-08-08 10:04 ` Sergei Shtylyov
1 sibling, 0 replies; 44+ messages in thread
From: Sergei Shtylyov @ 2008-08-08 10:04 UTC (permalink / raw)
To: petkovbb, Sergei Shtylyov, Bartlomiej Zolnierkiewicz, Alan Cox,
linux-kernel
Hello.
Borislav Petkov wrote:
> From: Borislav Petkov <petkovbb@gmail.com>
> Date: Sun, 3 Aug 2008 18:46:35 +0200
> Subject: [PATCH] ide-generic: handle probing of legacy io-ports v5
>
> Avoid probing the io-ports in case an IDE PCI controller is present and it
> uses the legacy iobases. If we still want to enforce the probing, we do
>
> ide_generic.probe_mask=0x3f
>
> on the kernel command line. The iobase checking code is
> adapted from drivers/ata/pata_legacy.c after converting hex
> pci ids into their corresponding macros in <linux/pci_ids.h>.
>
> Also, check only BAR0/2 resources since those are guaranteed
> by the workaround in drivers/pci/probe.c:pci_setup_device().
>
> CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
MBR, Sergei
^ permalink raw reply [flat|nested] 44+ messages in thread
end of thread, other threads:[~2008-08-08 10:04 UTC | newest]
Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 5:33 [PATCH] ide-floppy fix Borislav Petkov
2008-07-15 5:40 ` Borislav Petkov
2008-07-16 15:59 ` Bartlomiej Zolnierkiewicz
2008-07-15 20:39 ` Borislav Petkov
2008-07-15 20:58 ` Bartlomiej Zolnierkiewicz
2008-07-16 5:20 ` Borislav Petkov
2008-07-16 17:56 ` Bartlomiej Zolnierkiewicz
2008-07-20 12:06 ` Borislav Petkov
2008-07-21 19:03 ` Bartlomiej Zolnierkiewicz
2008-07-22 5:27 ` Borislav Petkov
2008-07-22 19:49 ` Bartlomiej Zolnierkiewicz
2008-07-23 6:32 ` Borislav Petkov
2008-07-23 18:51 ` Bartlomiej Zolnierkiewicz
2008-08-01 5:48 ` [PATCH] ide-generic: skip automatic probing of legacy iobases (was: Re: [PATCH] ide-floppy fix) Borislav Petkov
2008-08-02 17:02 ` Bartlomiej Zolnierkiewicz
2008-08-02 18:32 ` Borislav Petkov
2008-08-02 18:46 ` Bartlomiej Zolnierkiewicz
2008-08-03 7:37 ` [PATCH 1/2] pata_legacy: export functionality to ide Borislav Petkov
2008-08-03 11:59 ` Alan Cox
2008-08-03 13:37 ` Bartlomiej Zolnierkiewicz
2008-08-03 13:39 ` Alan Cox
2008-08-03 23:43 ` Jeff Garzik
2008-08-03 14:38 ` Borislav Petkov
2008-08-03 15:22 ` Alan Cox
2008-08-03 16:51 ` Borislav Petkov
2008-08-05 14:26 ` Sergei Shtylyov
2008-08-05 14:32 ` Boris Petkov
2008-08-05 14:41 ` Bartlomiej Zolnierkiewicz
2008-08-06 6:10 ` Borislav Petkov
2008-08-06 11:34 ` Sergei Shtylyov
2008-08-06 14:03 ` Boris Petkov
2008-08-06 15:57 ` Sergei Shtylyov
2008-08-06 19:47 ` Borislav Petkov
2008-08-06 19:46 ` Alan Cox
2008-08-06 20:04 ` Sergei Shtylyov
2008-08-07 4:36 ` [PATCH] ide-generic: handle probing of legacy io-ports v5 (was: Re: [PATCH 1/2] pata_legacy: export functionality to ide) Borislav Petkov
2008-08-07 17:06 ` Bartlomiej Zolnierkiewicz
2008-08-08 10:04 ` [PATCH] ide-generic: handle probing of legacy io-ports v5 Sergei Shtylyov
2008-08-03 7:38 ` [PATCH 2/2] ide-generic: handle probing of legacy io-ports Borislav Petkov
2008-08-03 14:11 ` Bartlomiej Zolnierkiewicz
2008-08-03 14:45 ` Borislav Petkov
2008-08-03 14:54 ` Borislav Petkov
2008-08-03 14:59 ` Bartlomiej Zolnierkiewicz
2008-08-03 15:08 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).