Re: pata_amd dropping to PIO on resume

2007-02-20 Thread Alan
> places where the bit must be twiddled.  Its easier to leave the bit in 
> the BIOS-initialized state, and ignore the hardware bit's existence in 
> software, if we know the behavior in the controller is hardwired.  Less 
> room for software bugs that way, IMO.

The AMD docs don't categorically answer that question either way that I
can see. The bit appears to make no difference but.. 

Alan
-
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/


Re: pata_amd dropping to PIO on resume

2007-02-20 Thread Jeff Garzik

Alan wrote:
Deleting the ata_pci_clear_simplex() call, then adding 
ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth 
trying.


I think I know what is going on here. Firstly the simplex bits
need re-clearing on a resume. On my todo list now I'm back


If the bit does not actually alter /hardware/ operation, then
ATA_FLAG_IGN_SIMPLEX use is preferred over having to remember various 
places where the bit must be twiddled.  Its easier to leave the bit in 
the BIOS-initialized state, and ignore the hardware bit's existence in 
software, if we know the behavior in the controller is hardwired.  Less 
room for software bugs that way, IMO.


Jeff


-
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/


Re: pata_amd dropping to PIO on resume

2007-02-20 Thread Jeff Garzik

Alan wrote:
Deleting the ata_pci_clear_simplex() call, then adding 
ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth 
trying.


I think I know what is going on here. Firstly the simplex bits
need re-clearing on a resume. On my todo list now I'm back


If the bit does not actually alter /hardware/ operation, then
ATA_FLAG_IGN_SIMPLEX use is preferred over having to remember various 
places where the bit must be twiddled.  Its easier to leave the bit in 
the BIOS-initialized state, and ignore the hardware bit's existence in 
software, if we know the behavior in the controller is hardwired.  Less 
room for software bugs that way, IMO.


Jeff


-
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/


Re: pata_amd dropping to PIO on resume

2007-02-20 Thread Alan
 places where the bit must be twiddled.  Its easier to leave the bit in 
 the BIOS-initialized state, and ignore the hardware bit's existence in 
 software, if we know the behavior in the controller is hardwired.  Less 
 room for software bugs that way, IMO.

The AMD docs don't categorically answer that question either way that I
can see. The bit appears to make no difference but.. 

Alan
-
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/


Re: pata_amd dropping to PIO on resume

2007-02-19 Thread Alan
> Deleting the ata_pci_clear_simplex() call, then adding 
> ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth 
> trying.

I think I know what is going on here. Firstly the simplex bits
need re-clearing on a resume. On my todo list now I'm back
-
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/


Re: pata_amd dropping to PIO on resume

2007-02-19 Thread Alan
 Deleting the ata_pci_clear_simplex() call, then adding 
 ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth 
 trying.

I think I know what is going on here. Firstly the simplex bits
need re-clearing on a resume. On my todo list now I'm back
-
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/


Re: pata_amd dropping to PIO on resume

2007-02-17 Thread Tobias Diedrich
Jeff Garzik wrote:
> Robert Hancock wrote:
> >Yes, the fact that it's going into simplex mode is the problem, it 
> >wasn't in simplex to start with. It looks like pata_amd does an 
> >ata_pci_clear_simplex only for certain chip models, maybe this model 
> >needs it as well?
> 
> Deleting the ata_pci_clear_simplex() call, then adding 
> ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth 
> trying.

I tried the latter option and it works fine.
I didn't delete the ata_pci_clear_simplex call, since it is not
called for this model.

BTW, this the nVidia MCP55 IDE controller:
00:04.0 IDE interface: nVidia Corporation MCP55 IDE (rev a1)
00:04.0 0101: 10de:036e (rev a1)

Index: linux-2.6.20/drivers/ata/pata_amd.c
===
--- linux-2.6.20.orig/drivers/ata/pata_amd.c2007-02-17 10:27:59.0 
+0100
+++ linux-2.6.20/drivers/ata/pata_amd.c 2007-02-17 10:28:14.0 +0100
@@ -611,7 +611,7 @@
},
{   /* 8: Nvidia Nforce2 and later */
.sht = _sht,
-   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | 
ATA_FLAG_IGN_SIMPLEX,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.udma_mask = 0x7f,  /* UDMA 133, no swdma */


[ 1087.954496] ata5.00: disabled
[ 1087.954500] ata5.01: disabled
[ 1087.958725] Trying to free nonexistent resource 
<01f0-01f7>
[ 1087.958730] Trying to free nonexistent resource 
<0170-0177>
[ 1089.559228] pata_amd :00:04.0: version 0.2.7
[ 1089.559240] PCI: Setting latency timer of device :00:04.0 to 64
[ 1089.560866] ata7: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14
[ 1089.561118] ata8: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xF008 irq 15
[ 1089.561133] scsi8 : pata_amd
[ 1089.717718] ata7.00: ATAPI, max UDMA/33
[ 1089.797629] ata7.01: ATAPI, max UDMA/66
[ 1089.877519] ata7.00: configured for UDMA/33
[ 1089.957429] ata7.01: configured for UDMA/33
[ 1089.957948] scsi9 : pata_amd
[ 1089.957996] ata8: port disabled. ignoring.
[ 1089.957998] ata8: reset failed, giving up
[ 1089.960193] scsi 8:0:0:0: CD-ROM_NEC DVD_RW ND-3500AG 2.1A 
PQ: 0 ANSI: 5
[ 1089.962400] sr0: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
[ 1089.962442] sr 8:0:0:0: Attached scsi CD-ROM sr0
[ 1089.962474] sr 8:0:0:0: Attached scsi generic sg1 type 5
[ 1089.963938] scsi 8:0:1:0: CD-ROMPIONEER  DVD-ROM DVD-106  1.22 
PQ: 0 ANSI: 5
[ 1089.966730] sr1: scsi3-mmc drive: 40x/40x cd/rw xa/form2 cdda tray
[ 1089.966769] sr 8:0:1:0: Attached scsi CD-ROM sr1
[ 1089.966802] sr 8:0:1:0: Attached scsi generic sg2 type 5
[ 1096.079852] Stopping tasks ... done.
[ 1096.126558] Shrinking memory...  -\|/-done (51275 pages freed)
[ 1097.076333] Freed 205100 kbytes in 1.63 seconds (125.82 MB/s)
[ 1097.076336] Suspending console(s)
[ 1097.080211] ACPI: PCI interrupt for device :01:08.0 disabled
[ 1097.092133] ata8: port disabled. ignoring.
[ 1097.092135] ata8: reset failed, giving up
[ 1097.092153] ACPI: PCI interrupt for device :00:02.1 disabled
[ 1097.098774] ACPI: PCI interrupt for device :00:02.0 disabled
[ 1097.105558] Extended CMOS year: 20
[ 1097.105562] swsusp: critical section: 
[ 1097.119909] swsusp: Need to copy 120019 pages
[   46.569060] Extended CMOS year: 20
[   46.586207] ACPI: Unable to turn cooling device [81003fe90890] 'on'
[   46.599040] PCI: Enabling device :00:02.0 ( -> 0002)
[   46.599044] ACPI: PCI Interrupt :00:02.0[A] -> Link [APCF] -> GSI 22 
(level, low) -> IRQ 22
[   46.599050] PCI: Setting latency timer of device :00:02.0 to 64
[   46.599055] PM: Writing back config space on device :00:02.0 at offset f 
(was 1030100, writing 103010a)
[   46.599062] PM: Writing back config space on device :00:02.0 at offset 4 
(was 0, writing fe02f000)
[   46.599066] PM: Writing back config space on device :00:02.0 at offset 1 
(was b6, writing b7)
[   46.612354] ACPI: PCI Interrupt :00:02.1[B] -> Link [APCL] -> GSI 23 
(level, low) -> IRQ 23
[   46.612358] PCI: Setting latency timer of device :00:02.1 to 64
[   46.612371] usb usb1: root hub lost power or was reset
[   46.612378] ehci_hcd :00:02.1: debug port 1
[   46.612380] PCI: cache line size of 64 is not supported by device 
:00:02.1
[   46.612390] PM: Writing back config space on device :00:04.0 at offset b 
(was 82391043, writing 8239f043)
[   46.612397] PCI: Setting latency timer of device :00:04.0 to 64
[   46.612409] PCI: Setting latency timer of device :00:06.0 to 64
[   46.612441] ata8: port disabled. ignoring.
[   46.612443] ata8: reset failed, giving up
[   46.626342] PCI: Setting latency timer of device :00:0a.0 to 64
[   46.626357] PCI: Setting latency timer of device :00:0b.0 

Re: pata_amd dropping to PIO on resume

2007-02-17 Thread Tobias Diedrich
Jeff Garzik wrote:
 Robert Hancock wrote:
 Yes, the fact that it's going into simplex mode is the problem, it 
 wasn't in simplex to start with. It looks like pata_amd does an 
 ata_pci_clear_simplex only for certain chip models, maybe this model 
 needs it as well?
 
 Deleting the ata_pci_clear_simplex() call, then adding 
 ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth 
 trying.

I tried the latter option and it works fine.
I didn't delete the ata_pci_clear_simplex call, since it is not
called for this model.

BTW, this the nVidia MCP55 IDE controller:
00:04.0 IDE interface: nVidia Corporation MCP55 IDE (rev a1)
00:04.0 0101: 10de:036e (rev a1)

Index: linux-2.6.20/drivers/ata/pata_amd.c
===
--- linux-2.6.20.orig/drivers/ata/pata_amd.c2007-02-17 10:27:59.0 
+0100
+++ linux-2.6.20/drivers/ata/pata_amd.c 2007-02-17 10:28:14.0 +0100
@@ -611,7 +611,7 @@
},
{   /* 8: Nvidia Nforce2 and later */
.sht = amd_sht,
-   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | 
ATA_FLAG_IGN_SIMPLEX,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.udma_mask = 0x7f,  /* UDMA 133, no swdma */


[ 1087.954496] ata5.00: disabled
[ 1087.954500] ata5.01: disabled
[ 1087.958725] Trying to free nonexistent resource 
01f0-01f7
[ 1087.958730] Trying to free nonexistent resource 
0170-0177
[ 1089.559228] pata_amd :00:04.0: version 0.2.7
[ 1089.559240] PCI: Setting latency timer of device :00:04.0 to 64
[ 1089.560866] ata7: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14
[ 1089.561118] ata8: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xF008 irq 15
[ 1089.561133] scsi8 : pata_amd
[ 1089.717718] ata7.00: ATAPI, max UDMA/33
[ 1089.797629] ata7.01: ATAPI, max UDMA/66
[ 1089.877519] ata7.00: configured for UDMA/33
[ 1089.957429] ata7.01: configured for UDMA/33
[ 1089.957948] scsi9 : pata_amd
[ 1089.957996] ata8: port disabled. ignoring.
[ 1089.957998] ata8: reset failed, giving up
[ 1089.960193] scsi 8:0:0:0: CD-ROM_NEC DVD_RW ND-3500AG 2.1A 
PQ: 0 ANSI: 5
[ 1089.962400] sr0: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
[ 1089.962442] sr 8:0:0:0: Attached scsi CD-ROM sr0
[ 1089.962474] sr 8:0:0:0: Attached scsi generic sg1 type 5
[ 1089.963938] scsi 8:0:1:0: CD-ROMPIONEER  DVD-ROM DVD-106  1.22 
PQ: 0 ANSI: 5
[ 1089.966730] sr1: scsi3-mmc drive: 40x/40x cd/rw xa/form2 cdda tray
[ 1089.966769] sr 8:0:1:0: Attached scsi CD-ROM sr1
[ 1089.966802] sr 8:0:1:0: Attached scsi generic sg2 type 5
[ 1096.079852] Stopping tasks ... done.
[ 1096.126558] Shrinking memory...  -\|/-done (51275 pages freed)
[ 1097.076333] Freed 205100 kbytes in 1.63 seconds (125.82 MB/s)
[ 1097.076336] Suspending console(s)
[ 1097.080211] ACPI: PCI interrupt for device :01:08.0 disabled
[ 1097.092133] ata8: port disabled. ignoring.
[ 1097.092135] ata8: reset failed, giving up
[ 1097.092153] ACPI: PCI interrupt for device :00:02.1 disabled
[ 1097.098774] ACPI: PCI interrupt for device :00:02.0 disabled
[ 1097.105558] Extended CMOS year: 20
[ 1097.105562] swsusp: critical section: 
[ 1097.119909] swsusp: Need to copy 120019 pages
[   46.569060] Extended CMOS year: 20
[   46.586207] ACPI: Unable to turn cooling device [81003fe90890] 'on'
[   46.599040] PCI: Enabling device :00:02.0 ( - 0002)
[   46.599044] ACPI: PCI Interrupt :00:02.0[A] - Link [APCF] - GSI 22 
(level, low) - IRQ 22
[   46.599050] PCI: Setting latency timer of device :00:02.0 to 64
[   46.599055] PM: Writing back config space on device :00:02.0 at offset f 
(was 1030100, writing 103010a)
[   46.599062] PM: Writing back config space on device :00:02.0 at offset 4 
(was 0, writing fe02f000)
[   46.599066] PM: Writing back config space on device :00:02.0 at offset 1 
(was b6, writing b7)
[   46.612354] ACPI: PCI Interrupt :00:02.1[B] - Link [APCL] - GSI 23 
(level, low) - IRQ 23
[   46.612358] PCI: Setting latency timer of device :00:02.1 to 64
[   46.612371] usb usb1: root hub lost power or was reset
[   46.612378] ehci_hcd :00:02.1: debug port 1
[   46.612380] PCI: cache line size of 64 is not supported by device 
:00:02.1
[   46.612390] PM: Writing back config space on device :00:04.0 at offset b 
(was 82391043, writing 8239f043)
[   46.612397] PCI: Setting latency timer of device :00:04.0 to 64
[   46.612409] PCI: Setting latency timer of device :00:06.0 to 64
[   46.612441] ata8: port disabled. ignoring.
[   46.612443] ata8: reset failed, giving up
[   46.626342] PCI: Setting latency timer of device :00:0a.0 to 64
[   46.626357] PCI: Setting latency timer of device :00:0b.0 to 64
[   46.626369] 

Re: pata_amd dropping to PIO on resume

2007-02-16 Thread Jeff Garzik

Robert Hancock wrote:

Tobias Diedrich wrote:

Possibly a known issue:

After resume pata_amd drops from UDMA/33 to PIO on my system.
Reloading the module puts both attached optical drives (master and
slave) back to UDMA/33.

AFAICS "simplex DMA is claimed by other device, disabling DMA" seems
to be causing it to drop to PIO (but only after a suspend/resume
cycle, not on boot or module load).

Burning a DVD with 6x speed using PIO makes heavy use of burnproof
and makes the whole system quite sluggish. :)


Yes, the fact that it's going into simplex mode is the problem, it 
wasn't in simplex to start with. It looks like pata_amd does an 
ata_pci_clear_simplex only for certain chip models, maybe this model 
needs it as well?




Deleting the ata_pci_clear_simplex() call, then adding 
ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth 
trying.


Jeff


-
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/


Re: pata_amd dropping to PIO on resume

2007-02-16 Thread Robert Hancock

Tobias Diedrich wrote:

Possibly a known issue:

After resume pata_amd drops from UDMA/33 to PIO on my system.
Reloading the module puts both attached optical drives (master and
slave) back to UDMA/33.

AFAICS "simplex DMA is claimed by other device, disabling DMA" seems
to be causing it to drop to PIO (but only after a suspend/resume
cycle, not on boot or module load).

Burning a DVD with 6x speed using PIO makes heavy use of burnproof
and makes the whole system quite sluggish. :)


Yes, the fact that it's going into simplex mode is the problem, it 
wasn't in simplex to start with. It looks like pata_amd does an 
ata_pci_clear_simplex only for certain chip models, maybe this model 
needs it as well?


--
Robert Hancock  Saskatoon, SK, Canada
To email, remove "nospam" from [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

-
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/


Re: pata_amd dropping to PIO on resume

2007-02-16 Thread Robert Hancock

Tobias Diedrich wrote:

Possibly a known issue:

After resume pata_amd drops from UDMA/33 to PIO on my system.
Reloading the module puts both attached optical drives (master and
slave) back to UDMA/33.

AFAICS simplex DMA is claimed by other device, disabling DMA seems
to be causing it to drop to PIO (but only after a suspend/resume
cycle, not on boot or module load).

Burning a DVD with 6x speed using PIO makes heavy use of burnproof
and makes the whole system quite sluggish. :)


Yes, the fact that it's going into simplex mode is the problem, it 
wasn't in simplex to start with. It looks like pata_amd does an 
ata_pci_clear_simplex only for certain chip models, maybe this model 
needs it as well?


--
Robert Hancock  Saskatoon, SK, Canada
To email, remove nospam from [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

-
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/


Re: pata_amd dropping to PIO on resume

2007-02-16 Thread Jeff Garzik

Robert Hancock wrote:

Tobias Diedrich wrote:

Possibly a known issue:

After resume pata_amd drops from UDMA/33 to PIO on my system.
Reloading the module puts both attached optical drives (master and
slave) back to UDMA/33.

AFAICS simplex DMA is claimed by other device, disabling DMA seems
to be causing it to drop to PIO (but only after a suspend/resume
cycle, not on boot or module load).

Burning a DVD with 6x speed using PIO makes heavy use of burnproof
and makes the whole system quite sluggish. :)


Yes, the fact that it's going into simplex mode is the problem, it 
wasn't in simplex to start with. It looks like pata_amd does an 
ata_pci_clear_simplex only for certain chip models, maybe this model 
needs it as well?




Deleting the ata_pci_clear_simplex() call, then adding 
ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth 
trying.


Jeff


-
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/