lkml.org 
[lkml]   [2007]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sata_nv,adma: fix error when rmmod sata_nv
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@gmail.com>
Date: Thu Nov 8 13:09:00 2007 +0900

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

--
tejun


\
 
 \ /
  Last update: 2007-12-12 09:21    [W:0.061 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site