From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 5 12:43:50 2011 Return-Path: Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F5371065673 for ; Tue, 5 Apr 2011 12:43:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B83D08FC08 for ; Tue, 5 Apr 2011 12:43:49 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA03640; Tue, 05 Apr 2011 15:43:47 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4D9B0E82.1060800@FreeBSD.org> Date: Tue, 05 Apr 2011 15:43:46 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Borja Marcos References: <4D9AF9B7.9030107@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@FreeBSD.org Subject: Re: propose: change some sense codes handling X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2011 12:43:50 -0000 on 05/04/2011 14:53 Borja Marcos said the following: > > On Apr 5, 2011, at 1:30 PM, Borja Marcos wrote: > >> >> On Apr 5, 2011, at 1:15 PM, Andriy Gapon wrote: >> >> As far as I know, this shouldn't be reported by a non-removable media device. It should be used by removable media such as tape units, magneto-optical drives, CDROM drives, WORMs... >> >> >> If a card read reports this, I assume that either the reader has crappy firmware _or_ it has an electrical contact problem with the media. But ignoring this error just could lead to data loss. In the case of a user replacing a memory card with a mounted filesystem, it would be certainly a data loss (blocks intended for one card written to a different card?) > > To clarify my somewhat fuzzy message. I assume a card reader should report this in the following cases: > > - User has replaced the card > > - User has extracted and reinserted the card > > - Electrical contact problem > > - Crappy reader firmware > > In either case it shouldn't be ignored causing just a retry. > > > In the case of a fixed memory pendrive, well, it would indicate either some serious internal error (this message is intended for removable media) or, again, maybe an unplugged and plugged on USB device, at most? Of course there's the option of buggy firmware reporting this for a non-removable media unit. > > When you unplug a USB drive from the USB bus you are unplugging both the media and the controller. Actually, this sense code is reported by a particular USB thumbdrive that I have. So the media is definitely non-removable. And it happens each time I plug the thumbdrive. So I'd hazard a guess about its firmware. -- Andriy Gapon