Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-06 Thread Tejun Heo
Mikael Pettersson wrote: >> 3. we don't have them in ahci nor sata_sil24. > > But you do in sata_sil.c:sil_freeze(). Two versus one. It's democracy. :-) >> But, having those flushes won't hurt either. > > libata doesn't specify in its documentation that these driver > operations may have dela

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-06 Thread Tejun Heo
Arjan van de Ven wrote: >> But, having those flushes won't hurt either. What was the conclusion of >> mmio <-> spinlock sync discussion? I always feel kind of uncomfortable >> about readl() flushes. I think they're too subtle. > > those are orthogonal! > The posting flushes have nothing to do w

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-06 Thread Tejun Heo
Mikael Pettersson wrote: >> Don't freeze port unconditionally. You'll end up hardresetting on every >> error. Just make sure DMA engine is stopped and the controller is in a >> sane state. If that fails, then, the port should be frozen. Sorry, s/hardresetting/resetting/ > I'm looking into this

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-06 Thread Jeff Garzik
Mikael Pettersson wrote: On Sun, 03 Dec 2006 22:00:42 +0900, Tejun Heo wrote: Mikael Pettersson wrote: +} + +static void pdc_error_handler(struct ata_port *ap) +{ + struct ata_eh_context *ehc = &ap->eh_context; + ata_reset_fn_t hardreset; + + /* stop DMA, mask IRQ, don't clobb

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-06 Thread Mikael Pettersson
On Sun, 03 Dec 2006 22:00:42 +0900, Tejun Heo wrote: >Mikael Pettersson wrote: >> +} >> + >> +static void pdc_error_handler(struct ata_port *ap) >> +{ >> +struct ata_eh_context *ehc = &ap->eh_context; >> +ata_reset_fn_t hardreset; >> + >> +/* stop DMA, mask IRQ, don't clobber anything e

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-06 Thread Mikael Pettersson
On Sun, 03 Dec 2006 22:19:35 +0900, Tejun Heo wrote: >Jeff Garzik wrote: >> Tejun Heo wrote: >>> Hello, Mikael. >>> >>> Thanks for doing this. >>> >>> Mikael Pettersson wrote: >>> [--snip--] +static void pdc_freeze(struct ata_port *ap) +{ +void __iomem *mmio = (void __iomem *) ap

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-03 Thread Arjan van de Ven
> But, having those flushes won't hurt either. What was the conclusion of > mmio <-> spinlock sync discussion? I always feel kind of uncomfortable > about readl() flushes. I think they're too subtle. those are orthogonal! The posting flushes have nothing to do with spinlock-vs-mmio; that discu

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-03 Thread Tejun Heo
Jeff Garzik wrote: > Tejun Heo wrote: >> Hello, Mikael. >> >> Thanks for doing this. >> >> Mikael Pettersson wrote: >> [--snip--] >>> +static void pdc_freeze(struct ata_port *ap) >>> +{ >>> +void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr; >>> +u32 tmp; >>> + >>> +tmp = readl(

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-03 Thread Jeff Garzik
Tejun Heo wrote: Hello, Mikael. Thanks for doing this. Mikael Pettersson wrote: [--snip--] +static void pdc_freeze(struct ata_port *ap) +{ + void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr; + u32 tmp; + + tmp = readl(mmio + PDC_CTLSTAT); + tmp |= PDC_IRQ_DISAB

Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-03 Thread Tejun Heo
Hello, Mikael. Thanks for doing this. Mikael Pettersson wrote: [--snip--] > +static void pdc_freeze(struct ata_port *ap) > +{ > + void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr; > + u32 tmp; > + > + tmp = readl(mmio + PDC_CTLSTAT); > + tmp |= PDC_IRQ_DISABLE; > + tm

[PATCH 2.6.19 2/3] sata_promise: new EH conversion

2006-12-01 Thread Mikael Pettersson
This patch converts sata_promise to use new-style libata error handling for its SATA ports. PATA is left unchanged. * ATA_FLAG_SRST is no longer set for SATA ports * ->phy_reset is no longer set as it is unused when ->error_handler is present, and pdc_sata_phy_reset() has been removed * pdc_fre