From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Lord Subject: Re: sata_mv port lockup on hotplug (kernel 2.6.38.2) Date: Tue, 12 Apr 2011 10:55:55 -0400 Message-ID: <4DA467FB.6020905@teksavvy.com> References: <4D9CD275.9000002@teksavvy.com> <4D9FACC9.7020200@teksavvy.com> <4DA45CA7.9040102@teksavvy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from ironport2-out.teksavvy.com ([206.248.154.181]:53050 "EHLO ironport2-out.pppoe.ca" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932069Ab1DLOz6 (ORCPT ); Tue, 12 Apr 2011 10:55:58 -0400 In-Reply-To: <4DA45CA7.9040102@teksavvy.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Bruce Stenning Cc: "linux-kernel@vger.kernel.org" , "linux-ide@vger.kernel.org" , Tejun Heo On 11-04-12 10:07 AM, Mark Lord wrote: > On 11-04-12 06:30 AM, Bruce Stenning wrote: .. >> I am currently inserting tracing into 2.6.38.2 to try to work out what is going >> on. From mv_write_main_irq_mask I can see that the IRQ for each port is still >> enabled, even when ports stop responding. I see interrupts generated when I >> hotplug or unplug disks on ports that are not locked up, but no interrupt is >> generated at all for the ports that are locked (this is from tracing in >> asm_do_IRQ in arch/arm/kernel/irq.c) >> >> One thing I noticed was that there is no spinlock around the >> mv_save_cached_regs/mv_edma_cfg in mv_hardreset (unlike mv_port_start and >> mv_port_stop); why is this? > > The mv_hardreset path is run from a libata-eh thread, > and it assumes it has exclusive access to the hardware. Mmm.. another suspect is sata_mv's ".sff_irq_clear" function. I don't see any locking in libata-sff.c before calling that one. Tejun -- should libata-sff grab ap->lock before calling .sff_irq_clear, or is that up to the LLD to do? Thanks.