From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932702AbcHJDir (ORCPT ); Tue, 9 Aug 2016 23:38:47 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:33187 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932550AbcHJDim (ORCPT ); Tue, 9 Aug 2016 23:38:42 -0400 X-Greylist: delayed 745 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Aug 2016 23:38:41 EDT Date: Tue, 9 Aug 2016 23:38:38 -0400 From: Tejun Heo To: tom.ty89@gmail.com Cc: hare@suse.de, sergei.shtylyov@cogentembedded.com, arnd@arndb.de, sfr@canb.auug.org.au, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org Subject: Re: [PATCH resend 5/5] libata-scsi: fix MODE SELECT translation for Control mode page Message-ID: <20160810033838.GB25053@mtj.duckdns.org> References: <14bd98eb08ddf86be28f558817bed3cd27c397cd.1469126217.git.tom.ty89@gmail.com> <2ed3f3aba21a4b815e9497e6aeba497280f9f333.1469126217.git.tom.ty89@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ed3f3aba21a4b815e9497e6aeba497280f9f333.1469126217.git.tom.ty89@gmail.com> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 22, 2016 at 02:41:54AM +0800, tom.ty89@gmail.com wrote: > From: Tom Yan > > scsi_done() was called repeatedly and apparently because of that, > the kernel would call trace when we touch the Control mode page: > > Call Trace: > [] dump_stack+0x63/0x81 > [] __warn+0xcb/0xf0 > [] warn_slowpath_null+0x1d/0x20 > [] ata_eh_finish+0xe0/0xf0 [libata] > [] sata_pmp_error_handler+0x640/0xa50 [libata] > [] ahci_error_handler+0x1d/0x70 [libahci] > [] ata_scsi_port_error_handler+0x430/0x770 [libata] > [] ? ata_scsi_cmd_error_handler+0xdd/0x160 [libata] > [] ata_scsi_error+0xa7/0xf0 [libata] > [] scsi_error_handler+0xaa/0x560 [scsi_mod] > [] ? scsi_eh_get_sense+0x180/0x180 [scsi_mod] > [] kthread+0xd8/0xf0 > [] ret_from_fork+0x1f/0x40 > [] ? kthread_worker_fn+0x170/0x170 > ---[ end trace 8b7501047e928a17 ]--- > > Removed the unnecessary code and let ata_scsi_translate() do the job. > > Also, since ata_mselect_control() has no ATA command to send to the > device, ata_scsi_mode_select_xlat() should return 1 for it, so that > ata_scsi_translate() will finish early to avoid ata_qc_issue(). > > Signed-off-by: Tom Yan Applied to libata/for-4.9. Thanks. -- tejun