Re: IDE CMD 64x PCI driver (BUG REPORT; CMD 648 DMA INITIALIZATION)

2005-04-08 Thread Rob Gubler
Quick follow up:  I decided to disable the DMA controller as a near term
solution.  This works but it is not optimal for obvious reasons.

I believe that the chipset initialization for utilizing the DMA controller
is incorrectly setup, for the particular model I am using (CMD 648).  I
don't know when/if I will look into this further.

For more information regarding my analysis of the problem refer to my
first email, with the email subject as "IDE CMD 64x PCI driver."

-Rob

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


IDE CMD 64x PCI driver

2005-04-08 Thread Rob Gubler
Hello,

I am having difficultly getting the IDE CMD 64x PCI driver to work for the
CMD PCI-648 device.  I have decided to dig through kernel and driver code
to find out why and hopefully correct the problem.

I am running linux, version 2.4.21, on a PowerPC in the PCI Mezzanine Card
(PMC) form factor.  The CompactPCI Carrier board that this PowerPC card
sits in supports 2 PMC devices.  One of which is of course the PowerPC440,
provided by Artesyn, the other is the Compact Flash to IDE device provided
by CMD Technology; CMD PCI-648.

It appears that the kernel is unable to use the IRQ associated with the
CMD PCI-648 device.  I’ve traced the kernel output messages back to the
do_ide_setup_pci_device() function in drivers/ide/setup-pci.c.  In this
portion of the code it seems to...

  1.  Determine if the device can be brought up in '100% native mode'
(whatever this means)

  2.  If it cannot bring it up in native mode it then, on a function
pointer, calls init_chipset_cmd64x() defined in the CMD68{3|6|8|9} driver
code (drivers/ide/pci/cmd64x.c).  It uses the return value of this
function to assign the IRQ the system uses when communicating to the CMD
device.  The init_chipset_cmd64x() function ALWAYS returns 0.

I decided that it would be beneficial to modify the return value of this
function hoping that everything would magically work.  Needless to say
this wasn't the case.  Before having modified the cmd64x.c driver code I
found, through `lspci` that the CMD device was configured to use IRQ 25. 
So I modified the init_chipset_cmd64x() function to return the values 23 -
26 (in separate kernel builds).

I've attached portions of 3 `dmesg` outputs to this email; the first one
is the kernel with no changes, the second uses IRQ 25, and the third uses
IRQ 24.  It seems that IRQ 24 yields results that appear slightly better
than IRQ 25.  I've also attached the output of `lspci -vv`.

This is the first time I have been exposed to linux device driver / kernel
development.  I am hoping someone may have some insight as to what I
should be looking for as I dig through the kernel code, IDE code, and
cmd64x driver code.  At this point all recommendations are appreciated. 
Thank you.

Regards,

Rob Gubler



DMESG: KERNEL WITH NO CHANGES

# dmesg
Linux version 2.4.21-pmppc440 ([EMAIL PROTECTED]) (gcc version
3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a_1)5
Artesyn PM/PPC440 Copyright 2003, Artesyn Communication Products, LLC

... snip ...

PCI: Probing PCI hardware
PCI: Cannot allocate resource region 0 of device 00:02.0
PCI: Cannot allocate resource region 1 of device 00:02.0
PCI: Cannot allocate resource region 2 of device 00:02.0
PCI: Cannot allocate resource region 3 of device 00:02.0
PCI: Cannot allocate resource region 4 of device 00:02.0
PCI: Cannot allocate resource region 4 of device 00:03.0
PCI: Cannot allocate resource region 4 of device 00:03.1
PCI: moved device 00:02.0 resource 0 (101) to 1000
PCI: moved device 00:02.0 resource 1 (101) to 1000
PCI: moved device 00:02.0 resource 2 (101) to 1010
PCI: moved device 00:02.0 resource 3 (101) to 1000
PCI: moved device 00:02.0 resource 4 (101) to 1020
PCI: moved device 00:03.0 resource 4 (101) to 1040
PCI: moved device 00:03.1 resource 4 (101) to 1080

... snip ...

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx CMD648: IDE controller at PCI slot 00:02.0
CMD648: chipset revision 1
CMD648: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:pio, hdb:pio ide1:
BM-DMA at 0x1028-0x102f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SanDisk SDCFH-1024, CFA DISK drive
hda: IRQ probe failed (0x0)
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx blk: queue c01cbcd8, I/O limit 4095Mb (mask 0x)
Probing IDE interface ide1...
ide0: DISABLED, NO IRQ

... snip ...




DMESG: KERNEL USING IRQ 25

# dmesg

... snip ...

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx CMD648: IDE controller at PCI slot 00:02.0
CMD648: chipset revision 1
CMD648: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:pio, hdb:pio ide1:
BM-DMA at 0x1028-0x102f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SanDisk SDCFH-1024, CFA DISK drive
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx blk: queue c01cbcd8, I/O limit 4095Mb (mask 0x)
Probing IDE interface ide1...
ide0 at 0x1000-0x1007,0x100a on irq 25
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } hda:
task_no_data_intr: error=0x04 { DriveStatusError }
hda: 2001888 sectors (1025 MB) w/1KiB Cache, CHS=1986/16/63, DMA
Partition check:
 /dev/ide/host0/bus0/target0/lun0:<4&

IDE CMD 64x PCI driver

2005-04-08 Thread Rob Gubler
Hello,

I am having difficultly getting the IDE CMD 64x PCI driver to work for the
CMD PCI-648 device.  I have decided to dig through kernel and driver code
to find out why and hopefully correct the problem.

I am running linux, version 2.4.21, on a PowerPC in the PCI Mezzanine Card
(PMC) form factor.  The CompactPCI Carrier board that this PowerPC card
sits in supports 2 PMC devices.  One of which is of course the PowerPC440,
provided by Artesyn, the other is the Compact Flash to IDE device provided
by CMD Technology; CMD PCI-648.

It appears that the kernel is unable to use the IRQ associated with the
CMD PCI-648 device.  I’ve traced the kernel output messages back to the
do_ide_setup_pci_device() function in drivers/ide/setup-pci.c.  In this
portion of the code it seems to...

  1.  Determine if the device can be brought up in '100% native mode'
(whatever this means)

  2.  If it cannot bring it up in native mode it then, on a function
pointer, calls init_chipset_cmd64x() defined in the CMD68{3|6|8|9} driver
code (drivers/ide/pci/cmd64x.c).  It uses the return value of this
function to assign the IRQ the system uses when communicating to the CMD
device.  The init_chipset_cmd64x() function ALWAYS returns 0.

I decided that it would be beneficial to modify the return value of this
function hoping that everything would magically work.  Needless to say
this wasn't the case.  Before having modified the cmd64x.c driver code I
found, through `lspci` that the CMD device was configured to use IRQ 25. 
So I modified the init_chipset_cmd64x() function to return the values 23 -
26 (in separate kernel builds).

I've attached portions of 3 `dmesg` outputs to this email; the first one
is the kernel with no changes, the second uses IRQ 25, and the third uses
IRQ 24.  It seems that IRQ 24 yields results that appear slightly better
than IRQ 25.  I've also attached the output of `lspci -vv`.

This is the first time I have been exposed to linux device driver / kernel
development.  I am hoping someone may have some insight as to what I
should be looking for as I dig through the kernel code, IDE code, and
cmd64x driver code.  At this point all recommendations are appreciated. 
Thank you.

Regards,

Rob Gubler



DMESG: KERNEL WITH NO CHANGES

# dmesg
Linux version 2.4.21-pmppc440 ([EMAIL PROTECTED]) (gcc version
3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a_1)5
Artesyn PM/PPC440 Copyright 2003, Artesyn Communication Products, LLC

... snip ...

PCI: Probing PCI hardware
PCI: Cannot allocate resource region 0 of device 00:02.0
PCI: Cannot allocate resource region 1 of device 00:02.0
PCI: Cannot allocate resource region 2 of device 00:02.0
PCI: Cannot allocate resource region 3 of device 00:02.0
PCI: Cannot allocate resource region 4 of device 00:02.0
PCI: Cannot allocate resource region 4 of device 00:03.0
PCI: Cannot allocate resource region 4 of device 00:03.1
PCI: moved device 00:02.0 resource 0 (101) to 1000
PCI: moved device 00:02.0 resource 1 (101) to 1000
PCI: moved device 00:02.0 resource 2 (101) to 1010
PCI: moved device 00:02.0 resource 3 (101) to 1000
PCI: moved device 00:02.0 resource 4 (101) to 1020
PCI: moved device 00:03.0 resource 4 (101) to 1040
PCI: moved device 00:03.1 resource 4 (101) to 1080

... snip ...

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx CMD648: IDE controller at PCI slot 00:02.0
CMD648: chipset revision 1
CMD648: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:pio, hdb:pio ide1:
BM-DMA at 0x1028-0x102f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SanDisk SDCFH-1024, CFA DISK drive
hda: IRQ probe failed (0x0)
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx blk: queue c01cbcd8, I/O limit 4095Mb (mask 0x)
Probing IDE interface ide1...
ide0: DISABLED, NO IRQ

... snip ...




DMESG: KERNEL USING IRQ 25

# dmesg

... snip ...

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx CMD648: IDE controller at PCI slot 00:02.0
CMD648: chipset revision 1
CMD648: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:pio, hdb:pio ide1:
BM-DMA at 0x1028-0x102f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SanDisk SDCFH-1024, CFA DISK drive
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx blk: queue c01cbcd8, I/O limit 4095Mb (mask 0x)
Probing IDE interface ide1...
ide0 at 0x1000-0x1007,0x100a on irq 25
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } hda:
task_no_data_intr: error=0x04 { DriveStatusError }
hda: 2001888 sectors (1025 MB) w/1KiB Cache, CHS=1986/16/63, DMA
Partition check:
 /dev/ide/host0/bus0/target0/lun0:4hda

Re: IDE CMD 64x PCI driver (BUG REPORT; CMD 648 DMA INITIALIZATION)

2005-04-08 Thread Rob Gubler
Quick follow up:  I decided to disable the DMA controller as a near term
solution.  This works but it is not optimal for obvious reasons.

I believe that the chipset initialization for utilizing the DMA controller
is incorrectly setup, for the particular model I am using (CMD 648).  I
don't know when/if I will look into this further.

For more information regarding my analysis of the problem refer to my
first email, with the email subject as IDE CMD 64x PCI driver.

-Rob

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


IDE CMD 64x PCI driver

2005-04-06 Thread rob . mlist
Hello,

I am having difficultly getting the IDE CMD 64x PCI driver to work for the
CMD PCI-648 device.  I have decided to dig through kernel and driver code
to find out why and hopefully correct the problem.

I am running linux, version 2.4.21, on a PowerPC in the PCI Mezzanine Card
(PMC) form factor.  The CompactPCI Carrier board that this PowerPC card
sits in supports 2 PMC devices.  One of which is of course the PowerPC440,
provided by Artesyn, the other is the Compact Flash to IDE device provided
by CMD Technology; CMD PCI-648.

It appears that the kernel is unable to use the IRQ associated with the
CMD PCI-648 device.  I’ve traced the kernel output messages back to the
do_ide_setup_pci_device() function in drivers/ide/setup-pci.c.  In this
portion of the code it seems to...

  1.  Determine if the device can be brought up in '100% native mode'
(whatever this means)

  2.  If it cannot bring it up in native mode it then, on a function
pointer, calls init_chipset_cmd64x() defined in the CMD68{3|6|8|9}
driver code (drivers/ide/pci/cmd64x.c).  It uses the return value of
this function to assign the IRQ the system uses when communicating to
the CMD device.  The init_chipset_cmd64x() function ALWAYS returns 0.

I decided that it would be beneficial to modify the return value of this
function hoping that everything would magically work.  Needless to say
this wasn't the case.  Before having modified the cmd64x.c driver code I
found, through `lspci` that the CMD device was configured to use IRQ 25. 
So I modified the init_chipset_cmd64x() function to return the values 23 -
26 (in separate kernel builds).

I've attached portions of 3 `dmesg` outputs to this email; the first one
is the kernel with no changes, the second uses IRQ 25, and the third uses
IRQ 24.  It seems that IRQ 24 yields results that appear slightly better
than IRQ 25.  I've also attached the output of `lspci -vv`.

This is the first time I have been exposed to linux device driver / kernel
development.  I am hoping someone may have some insight as to what I
should be looking for as I dig through the kernel code, IDE code, and
cmd64x driver code.  At this point all recommendations are appreciated. 
Thank you.

Regards,

Rob Gubler



DMESG: KERNEL WITH NO CHANGES

# dmesg
Linux version 2.4.21-pmppc440 ([EMAIL PROTECTED]) (gcc version
3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a_1)5
Artesyn PM/PPC440 Copyright 2003, Artesyn Communication Products, LLC

... snip ...

PCI: Probing PCI hardware
PCI: Cannot allocate resource region 0 of device 00:02.0
PCI: Cannot allocate resource region 1 of device 00:02.0
PCI: Cannot allocate resource region 2 of device 00:02.0
PCI: Cannot allocate resource region 3 of device 00:02.0
PCI: Cannot allocate resource region 4 of device 00:02.0
PCI: Cannot allocate resource region 4 of device 00:03.0
PCI: Cannot allocate resource region 4 of device 00:03.1
PCI: moved device 00:02.0 resource 0 (101) to 1000
PCI: moved device 00:02.0 resource 1 (101) to 1000
PCI: moved device 00:02.0 resource 2 (101) to 1010
PCI: moved device 00:02.0 resource 3 (101) to 1000
PCI: moved device 00:02.0 resource 4 (101) to 1020
PCI: moved device 00:03.0 resource 4 (101) to 1040
PCI: moved device 00:03.1 resource 4 (101) to 1080

... snip ...

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD648: IDE controller at PCI slot 00:02.0
CMD648: chipset revision 1
CMD648: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x1028-0x102f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SanDisk SDCFH-1024, CFA DISK drive
hda: IRQ probe failed (0x0)
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
blk: queue c01cbcd8, I/O limit 4095Mb (mask 0x)
Probing IDE interface ide1...
ide0: DISABLED, NO IRQ

... snip ...




DMESG: KERNEL USING IRQ 25

# dmesg

... snip ...

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD648: IDE controller at PCI slot 00:02.0
CMD648: chipset revision 1
CMD648: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x1028-0x102f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SanDisk SDCFH-1024, CFA DISK drive
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
blk: queue c01cbcd8, I/O limit 4095Mb (mask 0x)
Probing IDE interface ide1...
ide0 at 0x1000-0x1007,0x100a on irq 25
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: 2001888 sectors (1025 MB) w/1KiB Cache, CHS=1986/16/63, DMA
Partition check:
 /dev/ide/host0/bus0/target0/lun0:<4&

IDE CMD 64x PCI driver

2005-04-06 Thread rob . mlist
Hello,

I am having difficultly getting the IDE CMD 64x PCI driver to work for the
CMD PCI-648 device.  I have decided to dig through kernel and driver code
to find out why and hopefully correct the problem.

I am running linux, version 2.4.21, on a PowerPC in the PCI Mezzanine Card
(PMC) form factor.  The CompactPCI Carrier board that this PowerPC card
sits in supports 2 PMC devices.  One of which is of course the PowerPC440,
provided by Artesyn, the other is the Compact Flash to IDE device provided
by CMD Technology; CMD PCI-648.

It appears that the kernel is unable to use the IRQ associated with the
CMD PCI-648 device.  I’ve traced the kernel output messages back to the
do_ide_setup_pci_device() function in drivers/ide/setup-pci.c.  In this
portion of the code it seems to...

  1.  Determine if the device can be brought up in '100% native mode'
(whatever this means)

  2.  If it cannot bring it up in native mode it then, on a function
pointer, calls init_chipset_cmd64x() defined in the CMD68{3|6|8|9}
driver code (drivers/ide/pci/cmd64x.c).  It uses the return value of
this function to assign the IRQ the system uses when communicating to
the CMD device.  The init_chipset_cmd64x() function ALWAYS returns 0.

I decided that it would be beneficial to modify the return value of this
function hoping that everything would magically work.  Needless to say
this wasn't the case.  Before having modified the cmd64x.c driver code I
found, through `lspci` that the CMD device was configured to use IRQ 25. 
So I modified the init_chipset_cmd64x() function to return the values 23 -
26 (in separate kernel builds).

I've attached portions of 3 `dmesg` outputs to this email; the first one
is the kernel with no changes, the second uses IRQ 25, and the third uses
IRQ 24.  It seems that IRQ 24 yields results that appear slightly better
than IRQ 25.  I've also attached the output of `lspci -vv`.

This is the first time I have been exposed to linux device driver / kernel
development.  I am hoping someone may have some insight as to what I
should be looking for as I dig through the kernel code, IDE code, and
cmd64x driver code.  At this point all recommendations are appreciated. 
Thank you.

Regards,

Rob Gubler



DMESG: KERNEL WITH NO CHANGES

# dmesg
Linux version 2.4.21-pmppc440 ([EMAIL PROTECTED]) (gcc version
3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a_1)5
Artesyn PM/PPC440 Copyright 2003, Artesyn Communication Products, LLC

... snip ...

PCI: Probing PCI hardware
PCI: Cannot allocate resource region 0 of device 00:02.0
PCI: Cannot allocate resource region 1 of device 00:02.0
PCI: Cannot allocate resource region 2 of device 00:02.0
PCI: Cannot allocate resource region 3 of device 00:02.0
PCI: Cannot allocate resource region 4 of device 00:02.0
PCI: Cannot allocate resource region 4 of device 00:03.0
PCI: Cannot allocate resource region 4 of device 00:03.1
PCI: moved device 00:02.0 resource 0 (101) to 1000
PCI: moved device 00:02.0 resource 1 (101) to 1000
PCI: moved device 00:02.0 resource 2 (101) to 1010
PCI: moved device 00:02.0 resource 3 (101) to 1000
PCI: moved device 00:02.0 resource 4 (101) to 1020
PCI: moved device 00:03.0 resource 4 (101) to 1040
PCI: moved device 00:03.1 resource 4 (101) to 1080

... snip ...

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD648: IDE controller at PCI slot 00:02.0
CMD648: chipset revision 1
CMD648: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x1028-0x102f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SanDisk SDCFH-1024, CFA DISK drive
hda: IRQ probe failed (0x0)
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
blk: queue c01cbcd8, I/O limit 4095Mb (mask 0x)
Probing IDE interface ide1...
ide0: DISABLED, NO IRQ

... snip ...




DMESG: KERNEL USING IRQ 25

# dmesg

... snip ...

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD648: IDE controller at PCI slot 00:02.0
CMD648: chipset revision 1
CMD648: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1020-0x1027, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x1028-0x102f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SanDisk SDCFH-1024, CFA DISK drive
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
blk: queue c01cbcd8, I/O limit 4095Mb (mask 0x)
Probing IDE interface ide1...
ide0 at 0x1000-0x1007,0x100a on irq 25
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: 2001888 sectors (1025 MB) w/1KiB Cache, CHS=1986/16/63, DMA
Partition check:
 /dev/ide/host0/bus0/target0/lun0:4hda