Re: [PATCHSET] libata: PATA driver for Celleb

2007-02-20 Thread Geert Uytterhoeven
On Mon, 19 Feb 2007, Alan wrote: I fear that the hardest part is yet to come, when we integrate the driver for the the PS3 (currently called gelic_net) into spidernet. The trouble is that the hardware is sufficiently similar to share all the high-level mechanisms like the DMA data

[PATCH] libata: disable pdev on all suspend events

2007-02-20 Thread Tejun Heo
libata used disable pdev only on PM_EVENT_SUSPEND while re-enable pdev unconditionally. This was okay before ref-counted pdev enable update but it now makes the pdev pinned after swsusp cycle (enabled twice but disabled only once) and devres sanity check whines about it. Fix it by

Re: [PATCH] libata: fix probe_ent alloc/free bugs

2007-02-20 Thread Tejun Heo
Tejun Heo wrote: ata_probe_ent_alloc() had a temporary hack such that devm_kzalloc() was used for allocation if devres had been previously initialized on the device; otherwise, plain kzalloc() was used. This was to make the code useable from both the old and devres-aware libata drivers during

Re: Fwd: [LIBATA] drives not detected

2007-02-20 Thread Tejun Heo
Patrick Ale wrote: On 2/16/07, Albert Lee [EMAIL PROTECTED] wrote: Hi, To make the fun even more fun. when I compile the old IDE drivers, rmmod the libata ones and modprobe the IDE drivers for my Promise card, the drives DO get detected. Hmm...if you can use IDE driver for your root

Re: Fwd: [LIBATA] drives not detected

2007-02-20 Thread Patrick Ale
On 2/20/07, Tejun Heo [EMAIL PROTECTED] wrote: Hmm...if you can use IDE driver for your root partition, change #undef ATA_DEBUG to #define ATA_DEBUG in include/linux/libata.h and rebuild the kernel. After booting, insmod pata_pdc2027x and please report what the kernel says. It might be that

Re: sata_promise: random/intermittent errors

2007-02-20 Thread Marc Marais
On Tue, 20 Feb 2007 12:48:12 +0800, Marc Marais wrote On Mon, 19 Feb 2007 11:26:24 +0100 (MET), Mikael Pettersson wrote On Mon, 19 Feb 2007 12:43:50 +0800, Marc Marais wrote: I've decided to post this to the linux-ide list to see if I can get to the bottom of this problem I'm

[PATCH 1/3] libata: separate out ata_ncq_enabled()

2007-02-20 Thread Tejun Heo
Separate out ata_ncq_enabled(). Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-core.c |4 +--- include/linux/libata.h| 15 +++ 2 files changed, 16 insertions(+), 3 deletions(-) Index: work/drivers/ata/libata-core.c

[PATCH 2/3] libata: fix ata_scmd_need_defer()

2007-02-20 Thread Tejun Heo
Fix ata_scmd_need_defer() such that... * whether NCQ is used or not is exactly determined using the same criteria as the issue path. * defer-check is performed in all cases. This fixes race condition where turning off NCQ on the fly causes non-NCQ commands sneak into NCQ phase.

Re: [PATCH] (pata-2.6 fix queue) cmd64x: add/fix enablebits

2007-02-20 Thread Sergei Shtylyov
Hello. Bartlomiej Zolnierkiewicz wrote: The IDE core looks at the wrong bit when checking if the secondary channel is enabled on PCI0646 -- CFR bit 8 is read-ahead disable, bit 3 is the correct one. I guess that you meant CNTRL here? Yeah, and bit 7. :- [ I corrected this in the

[PATCH 3/3] libata: fix ata_scsi_change_queue_depth()

2007-02-20 Thread Tejun Heo
Fix ata_scsi_change_queue_depth() such that... * NCQ on/off is exactly determined using the same logic as the issue path. * queue depth is adjusted to 1 if NCQ is not enabled. * -EINVAL is returned if requested action is ignored due to limitations. This fixes the bug which allows queue depth

Re: [PATCH 1/5] libata: improve ata_down_xfermask_limit()

2007-02-20 Thread Jeff Garzik
Tejun Heo wrote: Make ata_down_xfermask_limit() accept @sel instead of @force_pio0. @sel selects how the xfermask limit will be adjusted. The following selectors are defined. * ATA_DNXFER_PIO: only speed down PIO * ATA_DNXFER_DMA: only speed down DMA, don't cause transfer mode

Re: [PATCH 5/5] ahci: consider SDB FIS containing spurious NCQ completions HSM violation

2007-02-20 Thread Jeff Garzik
Tejun Heo wrote: SDB FIS containing spurious NCQ completions is a clear protocol violation. Currently, only some Maxtors with early firmware revisions are showing this problem. Those firmwares have other NCQ related problems including buggy NCQ error reporting and occasional lock up after NCQ

Re: [PATCH 3/3] libata: PATA driver for Celleb

2007-02-20 Thread Jeff Garzik
Akira Iguchi wrote: This is the patch for PATA controller of Celleb. This driver uses the managed iomap (devres). Because this driver needs special taskfile accesses, there is a copy of ata_std_softreset(). ata_dev_try_classify() is exported so that it can be used in this function.

Re: [PATCH] libata bugfix: HDIO_DRIVE_TASK

2007-02-20 Thread Jeff Garzik
Mark Lord wrote: I was trying to use HDIO_DRIVE_TASK for something today, and discovered that the libata implementation does not copy over the upper four LBA bits from args[6]. This is serious, as any tools using this ioctl would have their commands applied to the wrong sectors on the drive,

Re: [PATCH 1/3] libata: separate out ata_ncq_enabled()

2007-02-20 Thread Jeff Garzik
Tejun Heo wrote: Separate out ata_ncq_enabled(). Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-core.c |4 +--- include/linux/libata.h| 15 +++ 2 files changed, 16 insertions(+), 3 deletions(-) applied 1-3 - To unsubscribe from this list: send the

Re: [PATCH] libata: disable pdev on all suspend events

2007-02-20 Thread Jeff Garzik
Tejun Heo wrote: libata used disable pdev only on PM_EVENT_SUSPEND while re-enable pdev unconditionally. This was okay before ref-counted pdev enable update but it now makes the pdev pinned after swsusp cycle (enabled twice but disabled only once) and devres sanity check whines about it. Fix

Re: [PATCH] libata: Remove duplicate dma blacklist entry

2007-02-20 Thread Jeff Garzik
Magnus Damm wrote: libata: Remove duplicate dma blacklist entry The exact same entry is already present. Signed-off-by: Magnus Damm [EMAIL PROTECTED] --- Applies to 2.6.20-git14. applied - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to

[PATCH] libata: s/ap-id/ap-print_id/g

2007-02-20 Thread Tejun Heo
ata_port has two different id fields - id and port_no. id is system-wide 1-based unique id for the port while port_no is 0-based host-wide port number. The former is primarily used to identify the ATA port to the user in printk messages while the latter is used in various places in libata core

Re: [PATCH] libata: s/ap-id/ap-print_id/g

2007-02-20 Thread Jeff Garzik
Tejun Heo wrote: ata_port has two different id fields - id and port_no. id is system-wide 1-based unique id for the port while port_no is 0-based host-wide port number. The former is primarily used to identify the ATA port to the user in printk messages while the latter is used in various

Re: [PATCH] libata: fix probe_ent alloc/free bugs

2007-02-20 Thread Jeff Garzik
Tejun Heo wrote: ata_probe_ent_alloc() had a temporary hack such that devm_kzalloc() was used for allocation if devres had been previously initialized on the device; otherwise, plain kzalloc() was used. This was to make the code useable from both the old and devres-aware libata drivers during

[PATCH] sata_via: fix resource-managed iomap conversion

2007-02-20 Thread Tejun Heo
Conversion to resource-managed iomap was buggy causing init failures on both vt6420 and 6421 - BAR5 wasn't mapped for both controllers while on vt6420 sata_via tried to map BAR0-4 twice. Fix it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- I thought I have a vt6421 but mine too was a vt6420.

Re: [PATCH] libata: warn if speed limited due to 40-wire cable (v2)

2007-02-20 Thread Alan
cleaned up somewhat. Also, it's been inadvertently tested (it seems that pata_amd Nvidia cable detection is broken in current -git..) Yes. The pata_acpi driver fixes that one, but got kicked out as it didn't match other merges at the same time. It'll be back soon Signed-off-by: Robert

Re: pata_amd dropping to PIO on resume

2007-02-20 Thread Jeff Garzik
Alan wrote: Deleting the ata_pci_clear_simplex() call, then adding ATA_FLAG_IGN_SIMPLEX to the ata_port_info info[] array, is also worth trying. I think I know what is going on here. Firstly the simplex bits need re-clearing on a resume. On my todo list now I'm back If the bit does not

Re: pata_amd dropping to PIO on resume

2007-02-20 Thread Alan
places where the bit must be twiddled. Its easier to leave the bit in the BIOS-initialized state, and ignore the hardware bit's existence in software, if we know the behavior in the controller is hardwired. Less room for software bugs that way, IMO. The AMD docs don't categorically

Re: [PATCH] sata_nv: add back some verbosity into ADMA error_handler

2007-02-20 Thread Jeff Garzik
Robert Hancock wrote: Some debug output in the ADMA error_handler function was removed recently, but it may be useful in certain cases, like NCQ commands timing out. Add it back in, but make it a bit more intelligent so that it only prints if command(s) are active and only prints the CPBs for

Re: [PATCH] sata_nv: delay on switching between NCQ and non-NCQ commands

2007-02-20 Thread Jeff Garzik
Robert Hancock wrote: This patch appears to solve some problems with commands timing out in cases where an NCQ command is immediately followed by a non-NCQ command (or possibly vice versa). This is a rather ugly solution, but until we know more about why this is needed, this is about all we can

Re: [PATCH] sata_via: fix resource-managed iomap conversion

2007-02-20 Thread Jeff Garzik
Tejun Heo wrote: Conversion to resource-managed iomap was buggy causing init failures on both vt6420 and 6421 - BAR5 wasn't mapped for both controllers while on vt6420 sata_via tried to map BAR0-4 twice. Fix it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- I thought I have a vt6421 but mine

Re: [PATCH 1/5] sata_nv: Add CPB register info to error_handler output

2007-02-20 Thread Jeff Garzik
Robert Hancock wrote: When error handling occurs with pending commands, output the contents of the next CPB count and next CPB index registers as well as the others, since these may be useful for debugging. Signed-off-by: Robert Hancock [EMAIL PROTECTED] applied 1-5. Thanks for splitting it

Re: [PATCH] pata_pcmcia: Update device table

2007-02-20 Thread Jeff Garzik
Magnus Damm wrote: pata_pcmcia: Update device table Add CFA devices from I-O Data, Mitsubishi and Viking. Add SanDisk comment. Signed-off-by: Magnus Damm [EMAIL PROTECTED] --- Applies to 2.6.20-git14. applied - To unsubscribe from this list: send the line unsubscribe linux-ide in the

[PATCH 1/2] sata_vsc: factor the error and normal intr paths into separate routines

2007-02-20 Thread Dan Williams
Separate sata_vsc interrupt handling into a normal (per-port) path and an error path with the addition of vsc_port_intr and vsc_error_intr respectively. The error path handles interrupt based hotplug events which requires the definition of vsc_freeze and vsc_thaw. Note: vsc_port_intr has a

Re: 2.6.20-mm2

2007-02-20 Thread Rafael J. Wysocki
On Tuesday, 20 February 2007 01:04, Rafael J. Wysocki wrote: On Monday, 19 February 2007 12:45, Michal Piotrowski wrote: On 19/02/07, Rafael J. Wysocki [EMAIL PROTECTED] wrote: On Monday, 19 February 2007 01:00, Andrew Morton wrote: On Mon, 19 Feb 2007 00:25:48 +0100 Rafael J. Wysocki

Re: 2.6.20-mm2

2007-02-20 Thread Jeff Garzik
Rafael J. Wysocki wrote: FWIW, with CONFIG_PREEMPT unset (CONFIG_PREEMPT_VOLUNTARY is set instead), I'm unable to reproduce this problem on the box on which it is readily reproducible with CONFIG_PREEMPT set. I'm not surprised... I routinely tell people to turn it off, when debugging a

Re: 2.6.20-mm2

2007-02-20 Thread Rafael J. Wysocki
On Tuesday, 20 February 2007 07:31, Andrew Morton wrote: On Tue, 20 Feb 2007 02:20:21 +0100 Rafael J. Wysocki [EMAIL PROTECTED] wrote: On Sunday, 18 February 2007 20:43, Andrew Morton wrote: On Sun, 18 Feb 2007 13:44:54 +0100 Rafael J. Wysocki [EMAIL PROTECTED] wrote: On

Re: [git patches] libata ACPI support

2007-02-20 Thread Jeff Garzik
Lukas Hejtmanek wrote: On Tue, Feb 20, 2007 at 05:23:21PM -0500, Jeff Garzik wrote: introducing SATA ACPI does not work for me (I've filled the bug report: http://bugzilla.kernel.org/show_bug.cgi?id=8046) beside those error messages, IDE performance is decreased. libata.noacpi=1 option works ok

[PATCH 1/3] Make the IDE DMA timeout modifiable

2007-02-20 Thread Suleiman Souhlal
It can be changed via /proc/ide/hd?/settings. Signed-off-by: Ed Falk [EMAIL PROTECTED] --- drivers/ide/ide-dma.c |3 ++- drivers/ide/ide.c |2 ++ include/linux/ide.h |3 +++ 3 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/ide/ide-dma.c

[PATCH 3/3] Use correct IDE error recovery

2007-02-20 Thread Suleiman Souhlal
IDE error recovery is using WIN_IDLEIMMEDIATE which was only valid for IDE V1 and IDE V2. Modern drives will not be able to recover using this error handling. The correct thing to do is issue a SRST followed by a SET_FEATURES. Signed-off-by: Suleiman Souhlal [EMAIL PROTECTED] ---

[PATCH 2/3] Don't change transfer speed while requests are in flight

2007-02-20 Thread Suleiman Souhlal
Use ide_wait_cmd() in ide_config_drive_speed() if the drive has been initialized and we're not in an interrupt, to avoid changing the xfer speed while requests are in flight. An easy way to trigger the problem is to dd the disk while doing while :; do hdparm -d 1 /dev/hdc /dev/null; done While

[patch 10/21] ide: fix drive side 80c cable check

2007-02-20 Thread Greg KH
-stable review patch. If anyone has any objections, please let us know. -- eighty_ninty_three() had word 93 validitity check but not the 80c bit test itself (bit 12). This increases the chance of incorrect wire detection especially because host side cable detection is often

Re: [PATCH 1/3] Make the IDE DMA timeout modifiable

2007-02-20 Thread Bartlomiej Zolnierkiewicz
On Wednesday 21 February 2007 02:19, Suleiman Souhlal wrote: It can be changed via /proc/ide/hd?/settings. Why do we need to change IDE DMA timeout dynamically? BTW /proc/ide/hd?/settings is obsoleted Signed-off-by:Ed Falk [EMAIL PROTECTED] --- drivers/ide/ide-dma.c |3 ++-

Re: [PATCH 2/3] Don't change transfer speed while requests are in flight

2007-02-20 Thread Bartlomiej Zolnierkiewicz
On Wednesday 21 February 2007 02:21, Suleiman Souhlal wrote: Use ide_wait_cmd() in ide_config_drive_speed() if the drive has been initialized and we're not in an interrupt, to avoid changing the xfer speed while requests are in flight. Many devices have problems with SETFEATURES_XFER if the

Re: [PATCH 1/3] Make the IDE DMA timeout modifiable

2007-02-20 Thread Suleiman Souhlal
On Feb 20, 2007, at 5:44 PM, Bartlomiej Zolnierkiewicz wrote: On Wednesday 21 February 2007 02:19, Suleiman Souhlal wrote: It can be changed via /proc/ide/hd?/settings. Why do we need to change IDE DMA timeout dynamically? I've used it to test error recovery (for example). BTW

[PATCH] sata_nv: kill old private BMDMA helper functions

2007-02-20 Thread Robert Hancock
sata_nv implemented its own copies of the BMDMA helper functions for ADMA, since the ADMA BMDMA status registers are PIO while the other registers are MMIO, and this was the only way to handle this previously. Now that we have iomap support, the standard routines should just work, so use them.

Disk stuck in error recovery loop with AHCI

2007-02-20 Thread Jim Paris
Hi, For the past month or so I've been trying to track down data corruption I'm seeing on my server. It's something like 2-3 bits per 100 gigs of data, but only shows up on my 4-disk RAID5. RAM is ECC and fine. Anyway, as part of my testing I swapped SATA controllers many times (sata_nv,

Re: Fwd: [LIBATA] drives not detected

2007-02-20 Thread Tejun Heo
Patrick Ale wrote: On 2/20/07, Patrick Ale [EMAIL PROTECTED] wrote: Hi, Here is the output of the dmesg after inserting pata_pdc207x I seriously start to think that one of my drives is acting in a way that makes it unable for libata to detect the disks but makes the legacy ide drivers do

Re: [PATCH 1/2] sata_vsc: factor the error and normal intr paths into separate routines

2007-02-20 Thread Tejun Heo
Hello, On Tue, Feb 20, 2007 at 06:21:27PM -0700, Dan Williams wrote: @@ -119,6 +120,26 @@ static void vsc_sata_scr_write (struct ata_port *ap, unsigned int sc_reg, } +static void vsc_freeze(struct ata_port *ap) +{ + void __iomem *mask_addr; + + mask_addr =

Re: [PATCH 2/2] sata_vsc: clean up vsc_sata_interrupt

2007-02-20 Thread Tejun Heo
Hello, On Tue, Feb 20, 2007 at 06:21:32PM -0700, Dan Williams wrote: @@ -149,9 +145,9 @@ static void vsc_intr_mask_update(struct ata_port *ap, u8 ctl) VSC_SATA_INT_MASK_OFFSET + ap-port_no; mask = readb(mask_addr); if (ctl ATA_NIEN) - mask |= 0x80; +

[PATCH 5/5] ahci: consider SDB FIS containing spurious NCQ completions HSM violation (regenerated)

2007-02-20 Thread Tejun Heo
SDB FIS containing spurious NCQ completions is a clear protocol violation. Currently, only some Maxtors with early firmware revisions are showing this problem. Those firmwares have other NCQ related problems including buggy NCQ error reporting and occasional lock up after NCQ errors. Consider

[PATCH] libata: fix remaining ap-id

2007-02-20 Thread Tejun Heo
Merge order left libata-acpi and pata_scc with remainling usage of ap-id. Kill superflous id printing and substitute the remaining ones with ap-print_id. Signed-off-by: Tejun Heo [EMAIL PROTECTED] diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index b4e8be5..1bdf7a2 100644

Re: [PATCH RFC] libata: FUA updates

2007-02-20 Thread Tejun Heo
Robert Hancock wrote: This updates libata FUA support to be more more in line with reality. FUA support remains off by default. Add a setting for the fua command-line parameter on libata which enables FUA only on NCQ-supporting disks. Update the ata_dev_supports_fua function to remove the

[patch 04/18] SCSI: add missing cdb clearing in scsi_execute()

2007-02-20 Thread Greg KH
-stable review patch. If anyone has any objections, please let us know. -- From: Tejun Heo [EMAIL PROTECTED] Clear-garbage-after-CDB patch missed scsi_execute() and it causes some ODDs (HL-DT-ST DVD-RAM GSA-H30N) choke during SCSI scan. Note that this patch is only for -stable.