public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: START-STOP under Linux 2.4
       [not found] <20030402093236.A15801@one-eyed-alien.net>
@ 2003-04-02 18:49 ` Alan Stern
  2003-04-10  0:06   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Stern @ 2003-04-02 18:49 UTC (permalink / raw)
  To: Greg KH; +Cc: SCSI development list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1403 bytes --]

Greg:

This patch for 2.4.21-pre6 (a backport from 2.5) removes a source of
problems for many usb-storage devices by replacing a START-STOP command,
used to determine if the drive media is loaded, with a TEST-UNIT-READY.  
In the past people have handled this by creating entries in unusual_devs.h
with the US_FL_START_STOP flag; now that should no longer be necessary.

Alan Stern


On Wed, 2 Apr 2003, Matthew Dharm wrote:

> Send it to Greg K-H -- he'll send it to Marcello.
> 
> Matt
> 
> On Wed, Apr 02, 2003 at 10:24:47AM -0500, Alan Stern wrote:
> > Great!  I'll try to get this into the official kernel source.
> > 
> > Matt:  Do you know the appropriate person to send this patch to for
> > inclusion in 2.4.21?
> > 
> > Alan Stern
> > 
> > 
> > On Tue, 1 Apr 2003, John Goerzen wrote:
> > 
> > > Alan Stern <stern@rowland.harvard.edu> writes:
> > >
> > > > Based on the kernel log you posted earlier, it looks like your problem may
> > > > stem from the use of a START-STOP command.  The patch below removes that
> > > > command; it's a backport from 2.5.  Try installing this and let us know if
> > > > it helps.
> > >
> > > Indeed it does!  Things seem to work fine with your patch.
> > 
> > On 1 Apr 2003, Chris Worley wrote:
> > 
> > > Bingo.
> > >
> > > This worked great.  There was a little tweak on the sd.c patch for the
> > > 2.4.19 kernel, but it was apparent.
> > >
> > > Thanks!


[-- Attachment #2: START-STOP patch for 2.4.21-pre6 --]
[-- Type: TEXT/PLAIN, Size: 1031 bytes --]

--- linux-2.4.21/drivers/scsi/sd.c.orig	Mon Mar 31 16:27:31 2003
+++ linux-2.4.21/drivers/scsi/sd.c	Mon Mar 31 16:56:20 2003
@@ -731,15 +731,17 @@
 				 * check_disk_change */
 	}
 
-	/* Using Start/Stop enables differentiation between drive with
+	/*
+	 * Using TEST_UNIT_READY enables differentiation between drive with
 	 * no cartridge loaded - NOT READY, drive with changed cartridge -
 	 * UNIT ATTENTION, or with same cartridge - GOOD STATUS.
-	 * This also handles drives that auto spin down. eg iomega jaz 1GB
-	 * as this will spin up the drive.
+	 *
+	 * Drives that auto spin down. eg iomega jaz 1G, will be started
+	 * by sd_init_onedisk(), whenever revalidate_scsidisk() is called.
 	 */
 	retval = -ENODEV;
 	if (scsi_block_when_processing_errors(SDev))
-		retval = scsi_ioctl(SDev, SCSI_IOCTL_START_UNIT, NULL);
+		retval = scsi_ioctl(SDev, SCSI_IOCTL_TEST_UNIT_READY, NULL);
 
 	if (retval) {		/* Unable to test, unit probably not ready.
 				 * This usually means there is no disc in the

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: START-STOP under Linux 2.4
  2003-04-02 18:49 ` START-STOP under Linux 2.4 Alan Stern
@ 2003-04-10  0:06   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-04-10  0:06 UTC (permalink / raw)
  To: Alan Stern; +Cc: SCSI development list

On Wed, Apr 02, 2003 at 01:49:15PM -0500, Alan Stern wrote:
> Greg:
> 
> This patch for 2.4.21-pre6 (a backport from 2.5) removes a source of
> problems for many usb-storage devices by replacing a START-STOP command,
> used to determine if the drive media is loaded, with a TEST-UNIT-READY.  
> In the past people have handled this by creating entries in unusual_devs.h
> with the US_FL_START_STOP flag; now that should no longer be necessary.

Applied, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-09 23:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20030402093236.A15801@one-eyed-alien.net>
2003-04-02 18:49 ` START-STOP under Linux 2.4 Alan Stern
2003-04-10  0:06   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox