Re: [PATCH] sata_nv,adma: fix error when rmmod sata_nv

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

 



Kuan Luo wrote:
> hi,
> The below error happens when i rmmod sata_nv in adma mode on ck804
> chipset with 2.6.24 kernel.
> I traced the code and found that the driver attempts to write device mem
> that has been unmapped.
> 
> Only simply removing the code" writew(0, mmio + NV_ADMA_CTL);" in the
> nv_adma_port_stop function or remove .port_stop field in nv_adma_ops,
> rmmod is ok.
> 
> static void nv_adma_port_stop(struct ata_port *ap)
> {
> 	struct nv_adma_port_priv *pp = ap->private_data;
> 	void __iomem *mmio = pp->ctl_block;
> 
> 	VPRINTK("ENTER\n");
> -	writew(0, mmio + NV_ADMA_CTL);
> }
> 
> Or
>  Place pcim_iomap_regions before ata_pci_prepare_native_host in
> nv_init_one function.
> This can guarantee that the code "writew(0, mmio + NV_ADMA_CTL) " write
> device mem before the device mem is unmapped.

Which kernel version are you using?  The following commit should have
fixed the problem.  Please give a shot at 2.6.24-rc5.  Thanks.

commit 32ebbc0c0d5d18c0135b55d1eb0029f48c54aff0
Author: Tejun Heo <htejun@xxxxxxxxx>
Date:   Thu Nov 8 13:09:00 2007 +0900

libata: port and host should be stopped before hardware resources are
released

-- 
tejun
-
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