Re: [PATCH 3/5] cmd64x: implement serialization as per notes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 17 Nov 2009 18:35:05 +0100
Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx> wrote:

> On Tuesday 17 November 2009 15:51:32 Alan Cox wrote:
> 
> > +struct cmd_priv
> > +{
> > +	int dma_live;		/* Channel using DMA */
> > +	int irq_t[2];		/* Register to check for IRQ */
> > +	int irq_m[2];		/* Bit to check */
> > +};
> 
> irq_t and irq_m content will be identical for all host instances

Once I've had a look at the later chip variants I'll indeed do that
providing the 648 is ok in all revs.

> so you may as well add one instance for it, use ->private_data to
> store dma_live information and remove cmd_priv allocation
> 
> > +	/* If the other port is not live then issue the command */
> > +	if (alt == NULL || !alt->qc_active) {
> > +		if (dma)
> > +			priv->dma_live = qc->ap->port_no;
> > +		return 0;
> > +	}
> > +	/* If there is a live DMA command then wait */
> > +	if (priv->dma_live != -1)
> > +		return 	ATA_DEFER_PORT;
> > +	if (dma) {
> > +		/* Cannot overlap our DMA command */
> > +		if (alt->qc_active)
> > +			return ATA_DEFER_PORT;
> 
> no need to check alt->qc_active again here

Good point

Thanks for the review.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux