From: James Bottomley <James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
To: Matthew Dharm
<mdharm-scsi-JGfshJpz5UybPZpvUQj5UqxOck334EZe@public.gmane.org>
Cc: Hans de Goede <j.w.r.degoede-fbo2DhPpy/Q@public.gmane.org>,
Guillaume Bedot <littletux-QFiJtcdG+fw@public.gmane.org>,
Boaz Harrosh <bharrosh-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>,
USB Storage list
<usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf@public.gmane.org>,
fedora-kernel-list-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
USB development list
<linux-usb-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
David Brown
<usb-storage2-GijAUarxTbMdnm+yROfE0A@public.gmane.org>,
linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: PATCH: usb-storage-psc1350-v4.patch (was Linux scsi / usb-mass-storage and HP printer cardreader bug + fix)
Date: Mon, 14 Jan 2008 10:33:08 -0600 [thread overview]
Message-ID: <1200328388.3159.20.camel@localhost.localdomain> (raw)
In-Reply-To: <20080114160310.GH14375-JGfshJpz5UybPZpvUQj5UqxOck334EZe@public.gmane.org>
On Mon, 2008-01-14 at 08:03 -0800, Matthew Dharm wrote:
> On Mon, Jan 14, 2008 at 10:46:56AM +0100, Hans de Goede wrote:
> > Guillaume Bedot wrote:
> > >But it fixes only two models.
> > >Do you think other devices (hp or not) can be impacted ?
> > >There are hundreds of models with card readers only for hp :
> > >http://hplip.sourceforge.net/supported_devices/combined.html
> > >
> > >Will this be possible to use "LAST_SECTOR_BUG" quirk for testing without
> > >recompiling a kernel ?
> > >
> >
> > This is not possible AFAIK, I've already wrote a blog post about this
> > asking for people to test this, but got no responses.
>
> Once the patches are accepted by the SCSI people, one of the things we can
> consider doing is enabling this quirk for all USB devices. It should be
> pretty harmless to all properly working devices, and the performance hit
> should be pretty minimal.
The SCSI patches look OK, with the stylistic points fixed below ...
we'll need two separate patches as well (one for SCSI, one for USB).
> We may be able to convince the SCSI people to enable it for all devices,
> regardless of HCD.
No ... I'm not particularly keen to have enterprise vendors after my
blood ...
> + /* Some devices (some sdcards for one) don't like it if the last sector
> + gets read in a larger then 1 sector read */
The comment style in sd is
/*
* comment
*/
> + if (sdp->last_sector_bug && rq->nr_sectors > sdp->sector_size / 512 &&
An unlikely() here, please to force the compiler to optimise for the
non-buggy case. Plus what is the rq->nr_sectors > sdp->sector_size /
512 test supposed to be doing? that being true is supposed to be a
guarantee of the block layer (and if something goes wrong there's a
check for this lower down).
> + block + rq->nr_sectors == get_capacity(disk)) {
rq->nr_sectors should be this_count
> + this_count -= sdp->sector_size / 512;
If you relocate this code to after the sector_size/this_count adjustment
code (i.e. about line 442) you can just do --this_count;
James
next prev parent reply other threads:[~2008-01-14 16:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 21:44 Linux scsi / usb-mass-storage and HP printer cardreader bug + fix Hans de Goede
2008-01-09 22:10 ` Matthew Dharm
2008-01-10 10:43 ` Boaz Harrosh
2008-01-10 10:52 ` Hans de Goede
2008-01-10 11:27 ` Boaz Harrosh
2008-01-11 12:48 ` Hans de Goede
2008-01-11 13:57 ` Guillaume Bedot
[not found] ` <47860106.3090509-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2008-01-11 20:14 ` PATCH: usb-storage-psc1350-v4.patch (was Linux scsi / usb-mass-storage and HP printer cardreader bug + fix) Hans de Goede
2008-01-11 20:34 ` [usb-storage] " Matthew Dharm
2008-01-14 9:40 ` Guillaume Bedot
2008-01-14 9:46 ` Hans de Goede
2008-01-14 16:03 ` Matthew Dharm
[not found] ` <20080114160310.GH14375-JGfshJpz5UybPZpvUQj5UqxOck334EZe@public.gmane.org>
2008-01-14 16:33 ` James Bottomley [this message]
2008-01-14 18:37 ` Hans de Goede
2008-01-14 19:09 ` James Bottomley
2008-01-14 19:27 ` Hans de Goede
2008-01-14 20:20 ` James Bottomley
[not found] ` <1200342046.3159.64.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-20 10:12 ` Hans de Goede
[not found] ` <1200328388.3159.20.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-14 18:40 ` Stefan Richter
2008-01-14 19:01 ` Matthew Dharm
2008-01-14 19:10 ` Hans de Goede
2008-04-25 5:43 ` (unknown), wangzhilei-pcEzf3JNfARxfCqBhyfcug
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=1200328388.3159.20.camel@localhost.localdomain \
--to=james.bottomley-d9phhud1jfjcxq6kfmz53/egyhegw8jk@public.gmane.org \
--cc=bharrosh-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org \
--cc=fedora-kernel-list-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=j.w.r.degoede-fbo2DhPpy/Q@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=littletux-QFiJtcdG+fw@public.gmane.org \
--cc=mdharm-scsi-JGfshJpz5UybPZpvUQj5UqxOck334EZe@public.gmane.org \
--cc=usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf@public.gmane.org \
--cc=usb-storage2-GijAUarxTbMdnm+yROfE0A@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.