2.6.24-rc1-gec3b67c1 broken reg. libata-sata_nv in non NCQ mode

2007-10-27 Thread Prakash Punnoor
Hi, I cannot boot above kernel when I *disable* swncq support which got added in sata_nv. Problem seems that some component thinks driver is in ncq mode while it is not, as I see a queue depth of 31 instead of 0 on boot., ie I see something like this: ata1.00: 625142448 sectors, multi 1:

[PATCH-RFC] (was: Re: Sata Sil3512 bug?; Promise SATA300 TX4)

2007-10-27 Thread Alexander Sabourenkov
Hello. There appears to be a hardware bug in that it chokes on scatterlist if the last item is larger than 164 bytes. The patch that follows fixes my problem on 2.6.22. I can't think of a way to avoid second pass over scatterlist without duplicating code (ata_qc_prep() and ata_fill_sg() from

Re: [PATCH-RFC]

2007-10-27 Thread Alexander Sabourenkov
Alexander Sabourenkov wrote: Hello. There appears to be a hardware bug in that it chokes on scatterlist if the last item is larger than 164 bytes. The patch that follows fixes my problem on 2.6.22. I can't think of a way to avoid second pass over scatterlist without duplicating code

Re[2]: [PATCH-RFC]

2007-10-27 Thread MisterE
Hello Alexander, Saturday, October 27, 2007, 3:44:51 PM, you wrote: There appears to be a hardware bug in that it chokes on scatterlist if the last item is larger than 164 bytes. Can you confirm that this only will happen when running at 300Gb mode? I have the drives jumpered and have no

[2.6 patch] unexport ide_fix_driveid

2007-10-27 Thread Adrian Bunk
ide_fix_driveid can now be unexported. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- 627c730e21e5010a5bdb1f4f9968cfd5e0b4df2a diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 9516883..d3c5672 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -403,9 +403,6

Re: [PATCH-RFC] (was: Re: Sata Sil3512 bug?; Promise SATA300 TX4)

2007-10-27 Thread Mikael Pettersson
On Sat, 27 Oct 2007 17:24:32 +0400, Alexander Sabourenkov wrote: There appears to be a hardware bug in that it chokes on scatterlist if the last item is larger than 164 bytes. The patch that follows fixes my problem on 2.6.22. I can't think of a way to avoid second pass over scatterlist

Re: [PATCH-RFC]

2007-10-27 Thread Alexander Sabourenkov
MisterE wrote: Can you confirm that this only will happen when running at 300Gb mode? I confirm that without this patch errors happen on both 150 and 300 modes, on both jumpered and unjumpered drives. It seems that errors are highly hardware/configuration dependent. I'm willing to try your

[PATCH-RFC] Promise TX4 implement hw-bug workaround

2007-10-27 Thread Alexander Sabourenkov
Hello. Once again, There appears to be a hardware bug in that it chokes on scatterlist if the last item is larger than 164 bytes. This was discovered by reading the code of vendor-supplied driver. The patch that follows fixes my problem on 2.6.22. I can't think of a way to avoid second pass

Re: [2.6 patch] unexport ide_fix_driveid

2007-10-27 Thread Alan Cox
On Sat, Oct 27, 2007 at 04:18:33PM +0200, Adrian Bunk wrote: ide_fix_driveid can now be unexported. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Acked-by: Alan Cox [EMAIL PROTECTED] -- Where small clearances exist, controls are required to prevent these clearances becoming

Re: [PATCH-RFC] Promise SATA300 TX4

2007-10-27 Thread Alexander Sabourenkov
Hello. Interesting, but can you please give more background information? I.e., how did you determine the existence of this bug? I was experiencing read/write errors, with data corruption. Dmesgs and lspcis are at http://lxnt.info/linux/ I downloaded driver from the promise.com, put up 2.6.11

Re: [2.6 patch] unexport ide_fix_driveid

2007-10-27 Thread Bartlomiej Zolnierkiewicz
On Saturday 27 October 2007, Adrian Bunk wrote: ide_fix_driveid can now be unexported. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] applied - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at

[PATCH] ide/Kconfig: fix BLK_DEV_OFFBOARD dependencies

2007-10-27 Thread Bartlomiej Zolnierkiewicz
This config option is effective only for host drivers that use IDE_HFLAG_OFF_BOARD host flag (aec62xx, generic, hpt34x, hpt366, pdc202xx_new, pdc202xx_old and tc86c001). Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/Kconfig |3 ++- 1 file changed, 2

Re: [PATCH] ide: remove stale ide.h configuration options

2007-10-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: Remove stale ide.h configuration options: * INITIAL_MULT_COUNT - always defined to 0 * SUPPORT_SLOW_DATA_PORTS - unused * OK_TO_RESET_CONTROLLER - always defined to 0 * DISABLE_IRQ_NOSYNC - always defined to 0 Leave SUPPORT_VLB_SYNC (defined to 0

Re: [PATCH 8/9] ide: replace ide_pci_device_t by struct ide_port_info

2007-10-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: * Rename struct ide_pci_device_s to struct ide_port_info. I'm not sure that ide_port_info name fits the data indeed, as those are not applicable only to the ports but to a chip as a whole, so ide_chip_info would seem a better name... but well, it's too

Re: [PATCH 8/9] ide: replace ide_pci_device_t by struct ide_port_info

2007-10-27 Thread Bartlomiej Zolnierkiewicz
On Saturday 27 October 2007, Sergei Shtylyov wrote: Bartlomiej Zolnierkiewicz wrote: * Rename struct ide_pci_device_s to struct ide_port_info. I'm not sure that ide_port_info name fits the data indeed, as those are not applicable only to the ports but to a chip as a whole, so

[PATCH 1/15] ide: check rq-cmd_type in drive_cmd_intr()

2007-10-27 Thread Bartlomiej Zolnierkiewicz
drive_cmd_intr() is used by both REQ_TYPE_ATA_CMD and REQ_TYPE_ATA_TASK but commands using PIO-in protocol are valid only for REQ_TYPE_ATA_CMD (args[4] in case of REQ_TYPE_ATA_TASK points to a value for IDE_LCYL_REG register instead of the data buffer). This fix allows REQ_TYPE_ATA_TASK commands

[PATCH 2/15] ide: clear HOB bit for REQ_TYPE_ATA_TASK requests in ide_end_drive_cmd()

2007-10-27 Thread Bartlomiej Zolnierkiewicz
ide_dump_ata_status() may set HOB bit before ide_end_drive_cmd() is called. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-io.c |2 ++ 1 file changed, 2 insertions(+) Index: b/drivers/ide/ide-io.c

[PATCH 3/15] ide: add missing rq.ref_count initialization to ide_diag_taskfile()

2007-10-27 Thread Bartlomiej Zolnierkiewicz
Noticed by Tejun Heo. Cc: Tejun Heo [EMAIL PROTECTED] Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-taskfile.c |1 + 1 file changed, 1 insertion(+) Index: b/drivers/ide/ide-taskfile.c === ---

[PATCH 4/15] ide: use drive-select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd()

2007-10-27 Thread Bartlomiej Zolnierkiewicz
Use drive-select.all for REQ_TYPE_ATA_TASK requests in execute_drive_cmd() (the obsolete bits 7 and 5 of the Device register need to be set). Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-io.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) Index:

[PATCH 5/15] ide: fix registers loading order for WIN_SMART in execute_drive_cmd()

2007-10-27 Thread Bartlomiej Zolnierkiewicz
Fix registers loading order for REQ_TYPE_ATA_CMD request with WIN_SMART command in execute_drive_cmd() (load IDE_FEATURE_REG and IDE_SECTOR_REG before loading IDE_LCYL_REG and IDE_HCYL_REG). It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which

[PATCH 6/15] ide: fix registers loading order for IDE_NSECTOR_REG in execute_drive_cmd()

2007-10-27 Thread Bartlomiej Zolnierkiewicz
Move loading of IDE_NSECTOR_REG from ide_cmd() to execute_drive_cmd() (load the IDE_NSECTOR_REG just after IDE_FEATURE_REG). This also allows us to drop 'nsect' argument from ide_cmd() and simplify execute_drive_cmd() code for REQ_TYPE_ATA_CMD case a bit. It shouldn't affect anything (just a

[PATCH 7/15] ide: execute_drive_cmd() cleanup

2007-10-27 Thread Bartlomiej Zolnierkiewicz
* Rename 'args' variable in 'if (rq-cmd_type == REQ_TYPE_ATA_TASKFILE)' block to 'task'. * execute_drive_cmd() is used only for REQ_TYPE_ATA_{CMD,TASK,TASKFILE} so we can move the common code out from 'if (rq-cmd_type == REQ_TYPE_ATA_CMD)' and 'if (rq-cmd_type == REQ_TYPE_ATA_TASK)'

[PATCH 8/15] ide: remove ide_cmd() helper

2007-10-27 Thread Bartlomiej Zolnierkiewicz
* Remove ide_cmd() helper. * Clear nIEN and call SELECT_MASK() before writing taskfile registers. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-io.c | 26 ++ 1 file changed, 6 insertions(+), 20 deletions(-) Index:

[PATCH 9/15] ide: use ide_tf_load() in execute_drive_cmd()

2007-10-27 Thread Bartlomiej Zolnierkiewicz
* Add IDE_TFLAG_OUT_DEVICE taskfile flag to indicate the need of writing the Device register and handle it in ide_tf_load(). Update ide_tf_load() and {do_rw,flagged}_taskfile() users accordingly. * Use struct ide_taskfile and ide_tf_load() in execute_drive_cmd(). * Make the debugging code

[PATCH 10/15] ide: use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests

2007-10-27 Thread Bartlomiej Zolnierkiewicz
* Use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests in ide_end_drive_cmd() to decide whether we need to read HOB taskfile registers. * Update execute_drive_cmd() accordingly. This is a preparation for the next patch which removes unnecessary writes to HOB taskfile registers for some ATA

[PATCH 11/15] ide: remove unnecessary writes to HOB taskfile registers

2007-10-27 Thread Bartlomiej Zolnierkiewicz
* Set taskfile flags for REQ_TYPE_ATA_TASKFILE requests before adding the request to the queue. * Cleanup execute_drive_cmd(). * Remove unnecessary writes to HOB taskfile registers when using LBA48 disk for the following cases: - Power Management requests (WIN_FLUSH_CACHE[_EXT],

[PATCH 13/15] ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests

2007-10-27 Thread Bartlomiej Zolnierkiewicz
Based on the earlier work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo [EMAIL PROTECTED] Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-disk.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-)

[PATCH 14/15] ide: switch ide_task_ioctl() to use REQ_TYPE_ATA_TASKFILE requests

2007-10-27 Thread Bartlomiej Zolnierkiewicz
Based on the earlier work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo [EMAIL PROTECTED] Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-taskfile.c | 29 +++-- 1 file changed, 15

[PATCH 12/15] ide: extend timeout for REQ_TYPE_ATA_{CMD,TASK} requests

2007-10-27 Thread Bartlomiej Zolnierkiewicz
Extend timeout for REQ_TYPE_ATA_{CMD,TASK} requests from WAIT_CMD (10sec) to WAIT_WORSTCASE (30sec, already used for REQ_TYPE_ATA_TASKFILE). Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-io.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index:

[PATCH 15/15] ide: remove REQ_TYPE_ATA_TASK

2007-10-27 Thread Bartlomiej Zolnierkiewicz
Based on the earlier work by Tejun Heo. All users are gone so we can finally remove it. Cc: Tejun Heo [EMAIL PROTECTED] Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-io.c | 25 + drivers/ide/ide-lib.c |3 +--

2.6.24-rc1 IDE regression on PMAC?

2007-10-27 Thread Mikael Pettersson
As shown by this dmesg diff between 2.6.23 and 2.6.24-rc1, IDE's PMAC driver now decides to downgrade itself to PIO2 on this box. Is this intensional or a bug? --- dmesg-2.6.23 +++ dmesg-2.6.24-rc1 @@ -84,8 +89,9 @@ ide0: Found Apple Heathrow ATA controller, bus ID 0, irq 28 Probing IDE

Re: [PATCH-RFC] Promise TX4 implement hw-bug workaround

2007-10-27 Thread Alan Cox
I can't think of a way to avoid second pass over scatterlist without duplicating code (ata_qc_prep() and ata_fill_sg() from libata-core.c). This appears to be incomplete: + VPRINTK(Splitting last PRD.\n); + + ap-prd[idx - 1].flags_len -=

Re: [PATCH-RFC] Promise TX4 implement hw-bug workaround

2007-10-27 Thread Alexander Sabourenkov
Alan Cox wrote: I can't think of a way to avoid second pass over scatterlist without duplicating code (ata_qc_prep() and ata_fill_sg() from libata-core.c). This appears to be incomplete: [...] What guarantees you have enough PRD entries to do this without changing the limit in the

Re: [PATCH-RFC] Promise TX4 implement hw-bug workaround

2007-10-27 Thread Alexander Sabourenkov
Alexander Sabourenkov wrote: Alan Cox wrote: I can't think of a way to avoid second pass over scatterlist without duplicating code (ata_qc_prep() and ata_fill_sg() from libata-core.c). This appears to be incomplete: [...] What guarantees you have enough PRD entries to do this without

Re: 2.6.24-rc1 IDE regression on PMAC?

2007-10-27 Thread Bartlomiej Zolnierkiewicz
On Saturday 27 October 2007, Mikael Pettersson wrote: As shown by this dmesg diff between 2.6.23 and 2.6.24-rc1, IDE's PMAC driver now decides to downgrade itself to PIO2 on this box. Is this intensional or a bug? This drive still uses MWDMA1 according to the dmesg diff (only the debug message