public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: BUG: SCSI SYNCHRONIZE_CACHE on driver unload
  2004-08-05 23:02 BUG: SCSI SYNCHRONIZE_CACHE on driver unload Mark Lord
@ 2004-08-05 22:48 ` Randy.Dunlap
  2004-08-05 23:13   ` Mark Lord
  0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2004-08-05 22:48 UTC (permalink / raw)
  To: Mark Lord; +Cc: linux-kernel, linux-scsi

On Thu, 05 Aug 2004 19:02:18 -0400 Mark Lord wrote:

| On module removal of a SCSI Low-Level Driver (LLD),
| the mid-layer tries to do a SYNCHRONIZE_CACHE
| command to each device on each host of that driver.
| 
| But the command is issued *after* setting SHOST_CANCEL,
| which means that scsi_dispatch_cmd() will *always*
| fail the command inline, without passing to the LLD.
| 
| This bug shows up only for hosts/drives which support
| a write-back caching scheme.  For the more common
| write-thru scheme, the SYNCHRONIZE_CACHE command is
| never issued, so the bug never manifests.

Like this, when I unmount a zip drive (?):

Synchronizing SCSI cache for disk sde: <4>FAILED
  status = 0, message = 00, host = 1, driver = 00

--
~Randy

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

* BUG: SCSI SYNCHRONIZE_CACHE on driver unload
@ 2004-08-05 23:02 Mark Lord
  2004-08-05 22:48 ` Randy.Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Lord @ 2004-08-05 23:02 UTC (permalink / raw)
  To: Linux Kernel, linux-scsi

On module removal of a SCSI Low-Level Driver (LLD),
the mid-layer tries to do a SYNCHRONIZE_CACHE
command to each device on each host of that driver.

But the command is issued *after* setting SHOST_CANCEL,
which means that scsi_dispatch_cmd() will *always*
fail the command inline, without passing to the LLD.

This bug shows up only for hosts/drives which support
a write-back caching scheme.  For the more common
write-thru scheme, the SYNCHRONIZE_CACHE command is
never issued, so the bug never manifests.

Cheers
-- 
Mark Lord
(hdparm keeper & the original "Linux IDE Guy")

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

* Re: BUG: SCSI SYNCHRONIZE_CACHE on driver unload
  2004-08-05 22:48 ` Randy.Dunlap
@ 2004-08-05 23:13   ` Mark Lord
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Lord @ 2004-08-05 23:13 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-kernel, linux-scsi

Yup.  That's the exact bug.
-- 
Mark Lord
(hdparm keeper & the original "Linux IDE Guy")

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

end of thread, other threads:[~2004-08-05 23:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-05 23:02 BUG: SCSI SYNCHRONIZE_CACHE on driver unload Mark Lord
2004-08-05 22:48 ` Randy.Dunlap
2004-08-05 23:13   ` Mark Lord

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