David Miller | 1 Mar 03:34 2010
Picon

Re: [PATCH 3/3] ide: move dcache flushing to generic ide code

From: Sebastian Andrzej Siewior <sebastian <at> breakpoint.cc>
Date: Sun, 28 Feb 2010 16:35:41 +0100

> the pio callbacks are called with different kind of buffers. It could be
> a straight kernel addr, kernel stack or a kmaped highmem page.
> Some of this break the virt_to_page() assumptions.
> This patch moves the dcache flush from architecture code into generic
> ide code. ide_pio_bytes() is the only place where user pages might be
> written as far as I can see.
> The dcache flush is avoided in two cases:
> - data which is written to the device (i.e. they are comming from the
>   userland)

This needs a flush on sparc, otherwise an alias now exists in the
kernel side copy of the buffer.  The D-cache flush is intentionally
unconditional for PIO mode.  I definitely don't want to take the same
risks you guys seem to be willing to take for this optimization which
is of questionable value.

I also, intrinsically, really don't like these changes.

For one thing, you're optimizing PIO mode.

Secondly, IDE is in deep maintainence mode, if you want to optimize
cache flushing do it in the ATA layer.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

Daniel Nilsson | 1 Mar 19:31 2010
Picon

Intel ICH8 errata for ata_piix.c

Hi,

I have a laptop running Linux 2.6.33 with the following SATA chip:
"Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev
03)", and I am experiencing random loss of data and a bouncing SATA
link.

The problem seems to be described by other people in
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/297058 . After
investigating for a while, I found the errata
http://www.intel.com/Assets/PDF/specupdate/313057.pdf , see especially
errata #19 which handles MSI. Is this something that is handled in the
driver?

I have disabled MSI interrupts by using "pci=nomsi" on the kernel boot
line for now, and will see if it fixes anything - hopefully it does.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Sebastian Andrzej Siewior | 1 Mar 20:58 2010

Re: [PATCH 3/3] ide: move dcache flushing to generic ide code

* David Miller | 2010-02-28 18:34:17 [-0800]:

>From: Sebastian Andrzej Siewior <sebastian <at> breakpoint.cc>
>Date: Sun, 28 Feb 2010 16:35:41 +0100
>
>> the pio callbacks are called with different kind of buffers. It could be
>> a straight kernel addr, kernel stack or a kmaped highmem page.
>> Some of this break the virt_to_page() assumptions.
>> This patch moves the dcache flush from architecture code into generic
>> ide code. ide_pio_bytes() is the only place where user pages might be
>> written as far as I can see.
>> The dcache flush is avoided in two cases:
>> - data which is written to the device (i.e. they are comming from the
>>   userland)
>
>This needs a flush on sparc, otherwise an alias now exists in the
>kernel side copy of the buffer.  The D-cache flush is intentionally
>unconditional for PIO mode.  I definitely don't want to take the same
>risks you guys seem to be willing to take for this optimization which
>is of questionable value.
It is not us guys it is just me. And if it is a stupid thing to do then
I get probably punched by Ralf as well once he gets back.
The part I don't get is why you have to flush dcache after the copy
process. I would understand a flush before reading. The dcache alias in
kernel shouldn't hurt since it is not used anymore. Unless we read twice
from the same page. Is this the trick?

>I also, intrinsically, really don't like these changes.
>
>For one thing, you're optimizing PIO mode.
(Continue reading)

Jeff Garzik | 1 Mar 21:12 2010

Re: [PATCH 2/5] Subject: [PATCH] pata_efar: add locking for parallel scanning

On 02/17/2010 08:16 AM, Alan Cox wrote:
> From: Bartlomiej Zolnierkiewicz<bzolnier <at> gmail.com>
>
> Add clearing of UDMA enable bit also for PIO modes and then add
> an extra locking for parallel scanning.
>
> This is similar change as commit 60c3be3 for ata_piix host driver
> and while pata_efar doesn't enable parallel scan yet the race could
> probably also be triggered by requesting re-scanning of both ports
> at the same time using SCSI sysfs interface.
>
> [Ported to current kernel without other patch dependancies by
>   Alan Cox]
>
> Original is
> Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier <at> gmail.com>
>
> This one is
> Signed-off-by: Alan Cox<alan <at> linux.intel.com>
> ---
>
>   drivers/ata/pata_efar.c |   15 +++++++++++++++
>   1 files changed, 15 insertions(+), 0 deletions(-)

applied 2-5

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Jeff Garzik | 1 Mar 21:12 2010
Picon

Re: [PATCH] ata: Detect Delkin Devices compact flash

On 02/23/2010 01:41 PM, Ben Gardner wrote:
> I have a Delkin Devices compact flash card that isn't being recognized using the
> SATA/PATA drivers.
> The card is recognized and works with the deprecated ATA drivers.
>
> The error I am seeing is:
> ata1.00: failed to IDENTIFY (device reports invalid type, err_mask=0x0)
>
> I tracked it down to ata_id_is_cfa() in include/linux/ata.h.
> The Delkin card has id[0] set to 0x844a and id[83] set to 0.
> This isn't what the kernel expects and is probably incorrect.
>
> The simplest work-around is to add a check for 0x844a to ata_id_is_cfa().
>
> Signed-off-by: Ben Gardner<gardner.ben <at> gmail.com>

applied

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jeff Garzik | 1 Mar 21:15 2010

Re: [RFC 1/4] libata: cache device select

On 02/17/2010 08:10 AM, Alan Cox wrote:
> Avoid the device select overhead on every qc_issue (>  10uS) by caching the
> currently selected device. This shows up on profiles under load. Best case
> this costs us 10uS for the delay, worst case with a dumb interface it's
> costing us about *1mS* a command.
>
> I believe the logic here is sufficient, but would welcome some second reviews
> as its not something you want to get wrong !
>
>
> Signed-off-by: Alan Cox<alan <at> linux.intel.com>
> ---
>
>   drivers/ata/libata-sff.c |    8 ++++++--
>   include/linux/libata.h   |    1 +
>   2 files changed, 7 insertions(+), 2 deletions(-)
>
>
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 63d9c6a..cf0332a 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
>  <at>  <at>  -469,6 +469,7  <at>  <at>  void ata_sff_dev_select(struct ata_port *ap, unsigned int device)
>
>   	iowrite8(tmp, ap->ioaddr.device_addr);
>   	ata_sff_pause(ap);	/* needed; also flushes, for mmio */
> +	ap->sff_selected = device;
>   }
>   EXPORT_SYMBOL_GPL(ata_sff_dev_select);
>
(Continue reading)

Jeff Garzik | 1 Mar 21:18 2010
Picon

Re: [PATCH] pata_mpc52xx: optimizing code size by change of ATA timing data types

On 02/16/2010 02:41 PM, Grant Likely wrote:
> [cc'd linux-kernel, linux-ide and Jeff Garzik]
>
> Hi Roman.
>
> you should use ./scripts/get_maintainer.pl to make sure you're cc'ing
> the right people when posting patches.  You should repost so that Jeff
> has a copy of the patch to pick up (and add my acked-by when you do).
>
> On Wed, Dec 16, 2009 at 6:29 AM, Roman Fietze
> <roman.fietze <at> telemotive.de>  wrote:
>> Hello Everybody,
>>
>> A totally simple patch that reduces the text size as of the
>> ppc_6xx-size command of pata_mpc52xx by more than 10%, by reducing the
>> rodata size from 0x4a4 to 0x17e bytes. This is simply done by changing
>> the data types of the ATA timing constants.
>
> Acked-by: Grant Likely<grant.likely <at> secretlab>

I have the ACK, but never saw the requested repost...  req that, please?

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jeff Garzik | 1 Mar 21:23 2010

[git patches] libata updates for 2.6.34


Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus

to receive the following updates:

 drivers/ata/Kconfig             |    4 +-
 drivers/ata/ahci.c              |  235 +++++++++++++++++++++++++++++++++++----
 drivers/ata/ata_generic.c       |    2 +-
 drivers/ata/ata_piix.c          |   28 ++++-
 drivers/ata/libata-core.c       |   17 ++-
 drivers/ata/libata-sff.c        |   50 +++++++--
 drivers/ata/pata_acpi.c         |    2 +-
 drivers/ata/pata_ali.c          |   10 +-
 drivers/ata/pata_amd.c          |    2 +-
 drivers/ata/pata_artop.c        |    2 +-
 drivers/ata/pata_at91.c         |    4 +-
 drivers/ata/pata_atiixp.c       |   14 ++-
 drivers/ata/pata_cmd640.c       |    2 +-
 drivers/ata/pata_cmd64x.c       |   27 ++---
 drivers/ata/pata_cs5530.c       |    2 +-
 drivers/ata/pata_cs5535.c       |    4 +-
 drivers/ata/pata_cs5536.c       |    2 +-
 drivers/ata/pata_cypress.c      |   12 +-
 drivers/ata/pata_efar.c         |   22 +++-
 drivers/ata/pata_hpt366.c       |   23 +---
 drivers/ata/pata_hpt37x.c       |  189 ++++++++++++++-----------------
 drivers/ata/pata_hpt3x2n.c      |  120 +++++++++-----------
 drivers/ata/pata_it8213.c       |    2 +-
 drivers/ata/pata_it821x.c       |    2 +-
(Continue reading)

Robert Hancock | 2 Mar 00:51 2010
Picon

Re: Intel ICH8 errata for ata_piix.c

On 03/01/2010 12:31 PM, Daniel Nilsson wrote:
> Hi,
>
> I have a laptop running Linux 2.6.33 with the following SATA chip:
> "Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev
> 03)", and I am experiencing random loss of data and a bouncing SATA
> link.
>
> The problem seems to be described by other people in
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/297058 . After
> investigating for a while, I found the errata
> http://www.intel.com/Assets/PDF/specupdate/313057.pdf , see especially
> errata #19 which handles MSI. Is this something that is handled in the
> driver?
>
> I have disabled MSI interrupts by using "pci=nomsi" on the kernel boot
> line for now, and will see if it fixes anything - hopefully it does.

If the controller's not in AHCI mode (and it's not, if ata_piix is in 
use) then MSI is never used, so that won't do anything.

It doesn't look like that errata should apply to AHCI on Linux either, 
since the HBA reset is only used on initialization or resume, when the 
interrupt wouldn't even be enabled.

I think your problem is something else. Unfortunately that Launchpad bug 
report seems to have the usual problem of multiple, most likely 
unrelated problems (including totally different hardware/controllers) 
that have been put into the same report. The initial report seems to be 
saying they're having problems with a SATA drive but the dmesg output 
(Continue reading)

David Miller | 2 Mar 01:39 2010
Picon

Re: [PATCH 3/3] ide: move dcache flushing to generic ide code

From: Sebastian Andrzej Siewior <sebastian <at> breakpoint.cc>
Date: Mon, 1 Mar 2010 20:58:58 +0100

> The part I don't get is why you have to flush dcache after the copy
> process. I would understand a flush before reading. The dcache alias in
> kernel shouldn't hurt since it is not used anymore. Unless we read twice
> from the same page. Is this the trick?

Anything that puts the data into the cache on the kernel
side is a problem.  The page is still potentially in user
space, as a result there will be thus two active mappings
in the cache, one in the kernel side and one in the user
side.  The user can then do various operations which can
access either mapping.

Writing to it via write() system call, writing to it via
mmap(), making the kernel write to it by doing a read()
with the buffer pointing into the mmap() area.

All we need is a modification on either side for the other
one to potentially become stale.

>>Secondly, IDE is in deep maintainence mode, if you want to optimize
>>cache flushing do it in the ATA layer.
> This patch patch was mostly driven by the fact that the buffer can be a
> normal kernel mapping or a virtual address. The latter doesn't work with
> virt_to_page().
> Anyway I should probably spent more time getting ATA layer wokring than
> on the IDE layer since it is somehow working since patch#1.

(Continue reading)


Gmane