Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755904Ab3JPOj7 (ORCPT ); Wed, 16 Oct 2013 10:39:59 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:59460 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750811Ab3JPOj6 (ORCPT ); Wed, 16 Oct 2013 10:39:58 -0400 Date: Wed, 16 Oct 2013 10:39:57 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Ming Lei cc: Vishal Annapurve , Linux Kernel Mailing List , linux-usb Subject: Re: [PATCH] usb-storage: scsiglue: Changing the command result In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 767 Lines: 22 On Wed, 16 Oct 2013, Ming Lei wrote: > > Of course the SCSI midlayer has decided to abort. That's the only way > > this bit can get set. But usb-storage doesn't know why SCSI decided to > > abort. > > usb-storage may know if it is caused by timeout via .eh_timed_out callback > if it wants to know. Ah, good point. Vishal, since the only way an abort can occur is when the .eh_timeout_out callback runs, I think it makes sense to set the result code to DID_TIME_OUT instead of DID_ABORT in all cases. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/