Re: [PATCH] ata_piix: fix pio/mwdma programming

2007-05-28 Thread Jeff Garzik
Tejun Heo wrote: Fix various bugs in pio/mwdma mode programming. * Control bits in the timing register wasn't cleared properly while programming PIO mode. * MWDMA mode programming cleared the wrong part of control bits. * MWDMA mode programming cleared udma_mask even when the controller do

Re: [PATCH] ata_piix: fix pio/mwdma programming

2007-05-25 Thread Alan Cox
On Fri, 25 May 2007 19:16:58 +0200 Tejun Heo <[EMAIL PROTECTED]> wrote: > Fix various bugs in pio/mwdma mode programming. > > * Control bits in the timing register wasn't cleared properly while > programming PIO mode. > > * MWDMA mode programming cleared the wrong part of control bits. > > *

[PATCH] ata_piix: fix pio/mwdma programming

2007-05-25 Thread Tejun Heo
Fix various bugs in pio/mwdma mode programming. * Control bits in the timing register wasn't cleared properly while programming PIO mode. * MWDMA mode programming cleared the wrong part of control bits. * MWDMA mode programming cleared udma_mask even when the controller doesn't support UDMA.

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-07 Thread Mark Lord
Art Haas wrote: On Wed, Feb 07, 2007 at 11:53:17AM +0900, Tejun Heo wrote: Art Haas wrote: Also, zero out the features register before issuing PACKET_IDENTIFY, if the code isn't already doing that. Okay. SUCCESS! Yay! ... So, it succeeded without any DRQ wait. Can you please apply only

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-07 Thread Art Haas
On Wed, Feb 07, 2007 at 11:53:17AM +0900, Tejun Heo wrote: > Art Haas wrote: > >>>Also, zero out the features register before issuing PACKET_IDENTIFY, > >>>if the code isn't already doing that. > >>Okay. > >> > >>>After the drive asserts BUSY, and later deasserts BUSY, > >>>there might be a slight

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-07 Thread Tejun Heo
Art Haas wrote: Also, zero out the features register before issuing PACKET_IDENTIFY, if the code isn't already doing that. Okay. After the drive asserts BUSY, and later deasserts BUSY, there might be a slight delay before the drive asserts DRQ. So, it is possible for the status to read zeros i

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-06 Thread Art Haas
On Tue, Feb 06, 2007 at 06:11:44PM +0900, Tejun Heo wrote: > Mark Lord wrote: > > Tejun Heo wrote: > >> .. > >> Then, PACKET_IDENTIFY after configuring transfer mode fails with > >> -ENOENT. Meaning it saw (status & (ATA_BUSY|ATA_DRQ|ATA_ERR|ATA_DF)) == > >> 0 in HSM_ST. > > .. > >> So, PATA gurus

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-06 Thread Tejun Heo
Mark Lord wrote: > Tejun Heo wrote: >> .. >> Then, PACKET_IDENTIFY after configuring transfer mode fails with >> -ENOENT. Meaning it saw (status & (ATA_BUSY|ATA_DRQ|ATA_ERR|ATA_DF)) == >> 0 in HSM_ST. > .. >> So, PATA gurus, can you bless us with enlightenment? :-) > > Heh.. guaranteeing detecti

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-03 Thread Tejun Heo
Alan wrote: >>> Yep and if the BIOS programmed the slave into DMA that might not be ideal. >> How so? The bit will be programmed by set_dmamode() right after >> set_piomode() is complete. > > IFF we also put the device into a DMA mode. A blacklisted device would be > wrong. Hmmm... I might be mi

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-03 Thread Mark Lord
Tejun Heo wrote: .. Then, PACKET_IDENTIFY after configuring transfer mode fails with -ENOENT. Meaning it saw (status & (ATA_BUSY|ATA_DRQ|ATA_ERR|ATA_DF)) == 0 in HSM_ST. .. So, PATA gurus, can you bless us with enlightenment? :-) Heh.. guaranteeing detection of all the strange implementatio

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-03 Thread Alan
> > Yep and if the BIOS programmed the slave into DMA that might not be ideal. > > How so? The bit will be programmed by set_dmamode() right after > set_piomode() is complete. IFF we also put the device into a DMA mode. A blacklisted device would be wrong. > See the difference? Smart one liner

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-03 Thread Art Haas
On Sat, Feb 03, 2007 at 11:09:19AM +0900, Tejun Heo wrote: > (cc'ing Albert, Mark and Sergei. Hi!) > > Art Haas wrote: > > Hi. Sorry to say the CD-ROM is still not found. Full 'dmesg' output > > listed below in hopes it provides clues. > > Erggghh.. I'm sorry too. I thought I found it this time

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Tejun Heo
(cc'ing Albert, Mark and Sergei. Hi!) Art Haas wrote: > Hi. Sorry to say the CD-ROM is still not found. Full 'dmesg' output > listed below in hopes it provides clues. Erggghh.. I'm sorry too. I thought I found it this time. > ata_piix :00:07.1: version 2.00ac7 > ata2: PATA max UDMA/33 cmd

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Tejun Heo
Alan wrote: >> * Control bits in the timing register wasn't cleared properly while >> programming PIO mode. > > Yep and if the BIOS programmed the slave into DMA that might not be ideal. How so? The bit will be programmed by set_dmamode() right after set_piomode() is complete. >> * MWDMA mode

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Art Haas
On Sat, Feb 03, 2007 at 12:18:56AM +0900, Tejun Heo wrote: > Hello, Art Haas, Alan. > > Okay, here's another try at fixing the detection bug. I went through > intel ich docs and compared with the ide piix driver. This patch > fixes the following problems. > > * Control bits in the timing regist

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Sergei Shtylyov
Hello. Alan wrote: Actually, I think ata_timing_merge() should just be performed when setting MWDMA mode... This should be the right thing to do in most cases (however, this hardware has some complications in the form of only 2-bit wide active/recovery counts and 2 fast timing bank select bit

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Alan
On Sat, 03 Feb 2007 01:41:41 +0900 Tejun Heo <[EMAIL PROTECTED]> wrote: > >Actually, I think ata_timing_merge() should just be performed when > > setting MWDMA mode... This should be the right thing to do in most cases > > (however, this hardware has some complications in the form of only 2-bit

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Sergei Shtylyov
Hello. Mark Lord wrote: It's amazing how poorly we have programmed PIIX, for the lifespan of Linux... Actually, we've only been fiddling timings on PIIX since 1998 or so, when AH began taking over Linux IDE. Still, 10 years is an eternity. The most funny thing is that despite being call

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Alan
> * Control bits in the timing register wasn't cleared properly while > programming PIO mode. Yep and if the BIOS programmed the slave into DMA that might not be ideal. > * MWDMA mode programming cleared the wrong part of control bits. I > think this can fix your problem. Your change does n

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Mark Lord
Jeff Garzik wrote: It's amazing how poorly we have programmed PIIX, for the lifespan of Linux... Actually, we've only been fiddling timings on PIIX since 1998 or so, when AH began taking over Linux IDE. Still, 10 years is an eternity. Cheers - To unsubscribe from this list: send the line "uns

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Tejun Heo
Sergei Shtylyov wrote: >> +/* PIO configuration clears DTE unconditionally. It will be >> + * programmed in set_dmamode which is guaranteed to be called >> + * after set_piomode if any DMA mode is available. >> + */ > >Actually, I think ata_timing_merge() should just be perfor

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Jeff Garzik
It's amazing how poorly we have programmed PIIX, for the lifespan of Linux... Jeff - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Sergei Shtylyov
Hello. Tejun Heo wrote: Okay, here's another try at fixing the detection bug. I went through intel ich docs and compared with the ide piix driver. This patch fixes the following problems. diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index c6bf1a3..51f55a0 100644 --- a/drive

[PATCH] ata_piix: fix pio/mwdma programming (for testing, don't apply)

2007-02-02 Thread Tejun Heo
Hello, Art Haas, Alan. Okay, here's another try at fixing the detection bug. I went through intel ich docs and compared with the ide piix driver. This patch fixes the following problems. * Control bits in the timing register wasn't cleared properly while programming PIO mode. * MWDMA mode pr