From: Oliver Neukum <oneukum-IBi9RG/b67k@public.gmane.org>
To: "Martin K. Petersen"
<martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: jejb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf@public.gmane.org,
linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] scsi: introduce a quirk for false cache reporting
Date: Sun, 14 Aug 2016 17:27:44 +0200 [thread overview]
Message-ID: <1471188464.4879.9.camel@suse.com> (raw)
In-Reply-To: <yq18tw4rpsy.fsf-+q57XtR/GgMb6DWv4sQWN6xOck334EZe@public.gmane.org>
On Wed, 2016-08-10 at 22:40 -0400, Martin K. Petersen wrote:
> >>>>> "Oliver" == Oliver Neukum <oneukum-IBi9RG/b67k@public.gmane.org> writes:
>
> Oliver> Some SATA to USB bridges fail to cooperate with some drives
> Oliver> resulting in no cache being present being reported to the
> Oliver> host. That causes the host to skip sending a command to
> Oliver> synchronize caches. That causes data loss when the drive is
> Oliver> powered down.
>
> diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
> index a6c346d..392d166 100644
> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -179,6 +179,7 @@ struct scsi_device {
> unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */
> unsigned is_visible:1; /* is the device visible in sysfs */
> unsigned wce_default_on:1; /* Cache is ON by default */
> + unsigned always_sync:1; /* synchronize cache in every case*/
> unsigned no_dif:1; /* T10 PI (DIF) should be disabled */
> unsigned broken_fua:1; /* Don't set FUA bit */
> unsigned lun_in_cdb:1; /* Store LUN bits in CDB[1] */
>
> I must be missing something. How is always_sync different from just
> setting wce_default_on?
Hi,
wce_default_on controls the default if the device provides no
indication. The problem here is that the indication the device
provides must be overridden, as they are false.
Regards
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-08-14 15:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 11:55 [PATCH] scsi: introduce a quirk for false cache reporting Oliver Neukum
2016-08-09 1:57 ` Martin K. Petersen
2016-08-09 14:02 ` Alan Stern
2016-08-11 2:40 ` Martin K. Petersen
[not found] ` <yq18tw4rpsy.fsf-+q57XtR/GgMb6DWv4sQWN6xOck334EZe@public.gmane.org>
2016-08-14 15:27 ` Oliver Neukum [this message]
[not found] ` <1471188464.4879.9.camel-IBi9RG/b67k@public.gmane.org>
2016-08-16 4:44 ` Martin K. Petersen
[not found] ` <yq14m6ll3uv.fsf-+q57XtR/GgMb6DWv4sQWN6xOck334EZe@public.gmane.org>
2016-08-16 10:28 ` Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2016-09-12 13:19 Oliver Neukum
2016-09-12 18:13 ` Alan Stern
2016-08-16 12:05 Oliver Neukum
2016-08-19 2:19 ` Martin K. Petersen
2016-09-08 10:43 ` Oliver Neukum
[not found] ` <1473331428.32073.0.camel-IBi9RG/b67k@public.gmane.org>
2016-09-09 11:26 ` Martin K. Petersen
2016-09-09 11:46 ` Greg KH
2016-07-19 13:20 Oliver Neukum
2016-07-12 8:24 Oliver Neukum
[not found] ` <1468311876-4132-1-git-send-email-oneukum-IBi9RG/b67k@public.gmane.org>
2016-08-02 7:49 ` Johannes Thumshirn
2016-07-11 11:53 Oliver Neukum
2016-07-11 14:33 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471188464.4879.9.camel@suse.com \
--to=oneukum-ibi9rg/b67k@public.gmane.org \
--cc=jejb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.