lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 03 Dec 2006 22:00:42 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Mikael Pettersson <mikpe@...uu.se>
CC:	Jeff Garzik <jeff@...zik.org>, linux-ide@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion

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;
> +	tmp &= ~PDC_DMA_ENABLE;
> +	writel(tmp, mmio + PDC_CTLSTAT);
> +	readl(mmio + PDC_CTLSTAT); /* flush *//* XXX: needed? sata_sil does this */

Just drop the above line.

> +}
> +
> +static void pdc_thaw(struct ata_port *ap)
> +{
> +	void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr;
> +	u32 tmp;
> +
> +	/* clear IRQ */
> +	readl(mmio + PDC_INT_SEQMASK);
> +
> +	/* turn IRQ back on */
> +	tmp = readl(mmio + PDC_CTLSTAT);
> +	tmp &= ~PDC_IRQ_DISABLE;
> +	writel(tmp, mmio + PDC_CTLSTAT);
> +	readl(mmio + PDC_CTLSTAT); /* flush *//* XXX: needed? */

Ditto.

> +}
> +
> +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 else */
> +	ata_eh_freeze_port(ap);

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.

> +	hardreset = NULL;
> +	if (sata_scr_valid(ap)) {
> +		ehc->i.action |= ATA_EH_HARDRESET;

Why always force HARDRESET?

> +		hardreset = sata_std_hardreset;
> +	}

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ