[PATCH] 460EX on-chip SATA driver<kernel 2.6.33> < resubmission : 02>
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Apr 7 17:41:56 EST 2010
On Tue, 2010-04-06 at 11:16 -0400, Jeff Garzik wrote:
> > +static irqreturn_t dma_dwc_interrupt(int irq, void *hsdev_instance)
> > +{
> > + int chan;
> > + u32 tfr_reg, err_reg;
> > +
> > + struct sata_dwc_device *hsdev =
> > + (struct sata_dwc_device *) hsdev_instance;
> > + struct ata_host *host = (struct ata_host *) hsdev->host;
> > + struct ata_port *ap;
> > + struct sata_dwc_device_port *hsdevp;
> > + u8 tag = 0;
> > + unsigned int port = 0;
> > + struct sata_dwc_host_priv *hp;
> > + hp = kmalloc(sizeof(*hp), GFP_KERNEL);
>
> 1) interrupt is not GFP_KERNEL
>
> 2) you must failure kmalloc failure
>
> 3) it is not clear to me where you initialize this structure???
And why the heck would you want to allocate it at interrupt time ? ? ?
BTW. Stefan mentioned earlier that they had some fixes for that driver
in the Denx tree. Are those fixes now included in that variant ?
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list