Re: stable basic 4-port SATA card

2007-11-14 Thread Tejun Heo
Jeff Breidenbach wrote: > I read with interest I. Straford's current trials and tribulations > with the Promise SATA300 TX4. Do people have a favorite > alternative to this card that plays well with Linux? I've read the > chipset compatibility list, but am not sure how to boil that > information do

Re: [PATCH] pata_sis.c: Add Packard Bell EasyNote K5305 to laptops

2007-11-14 Thread Tejun Heo
Gabriel C wrote: > Hi, > > With newer kernels HDD in my old laptop is limited to UDMA 33. > With this patch I get UDMA 100 again. > > Signed-off-by: Gabriel Craciunescu <[EMAIL PROTECTED]> applied to #tj-upstream-fixes with Hi, edited out. :-) -- tejun - To unsubscribe from this list: send t

Re: [PATCH] libata-scsi: be tolerant of 12-byte ATAPI commands in 16-byte CDBs

2007-11-14 Thread Tejun Heo
Mark Lord wrote: > Sebastian Kemper reported that issuing CD/DVD commands under libata > is not fully compatible with ide-scsi. In particular, the > GPCMD_SET_STREAMING > was being rejected at the host level in some instances. > > The reason is that libata-scsi insists upon the cmd_len field exac

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-14 Thread Tejun Heo
Tejun Heo wrote: > If so, can you please add that switching into register mode is okay as > long as there's no other ADMA commands in flight and add > WARN_ON((qc->flags & ATA_QCFLAG_RESULT_TF) && link->sactive)? More accurately, link->sactive test can be subst

Re: [PATCH 1/2] sata_nv: don't use legacy DMA in ADMA mode

2007-11-14 Thread Tejun Heo
Hello, Robert Hancock wrote: > We need to run any DMA command with result taskfile requested in ADMA mode > when the port is in ADMA mode, otherwise it may try to use the legacy DMA > engine > in ADMA mode which is not allowed. Enforce this with BUG_ON() since data > corruption could potentially

Re: [PATCH 2/2] sata_nv: fix ATAPI issues with memory over 4GB (v3)

2007-11-14 Thread Tejun Heo
Robert Hancock wrote: > This fixes some problems with ATAPI devices on nForce4 controllers in ADMA > mode > on systems with memory located above 4GB. We need to delay setting the 64-bit > DMA mask until the PRD table and padding buffer are allocated so that they > don't > get allocated above 4GB

Re: Promise SATA TX4 300 port timeout with sata_promise in 2.6.22, kernel panic in 2.6.23

2007-11-14 Thread Tejun Heo
I Stratford wrote: > On Nov 12, 2007 4:01 AM, Tejun Heo <[EMAIL PROTECTED]> wrote: > >> Mikael Pettersson wrote: >>> First, a workaround for a HW erratum affecting 2nd-generation >>> chips like the SATA300 TX4 was included in kernel 2.6.24-rc2. >> ... &

Re: [PATCH 1/2] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-14 Thread Tejun Heo
Albert Lee wrote: > After an error condition, some ATAPI tape drives set DRQ=1 together with ERR=1 > when asking the host to transfer the CDB of the next packet command (i.e. > request sense). > This patch, a revised version of Alan/Mark's previous patch, adds > ATA_HORKAGE_STUCK_ERR > to workaro

Re: [PATCH 2/2] libata: use ATA_HORKAGE_STUCK_ERR for ATAPI tape drives

2007-11-14 Thread Tejun Heo
Albert Lee wrote: > Per Mark's comments, maybe all ATAPI tape drives need ATA_HORKAGE_STUCK_ERR. > This patch applys ATA_HORKAGE_STUCK_ERR for all ATAPI tape drives. > > Signed-off-by: Albert Lee <[EMAIL PROTECTED]> > Cc: Mark Lord <[EMAIL PROTECTED]> applied to #tj-upstream-fixes. -- tejun - T

Re: libata , Silicon Image 3124

2007-11-13 Thread Tejun Heo
[linux-ide added back. please don't drop cc list] Kasimir Mueller wrote: > Tejun Heo schrieb: >> Kasimir Müller wrote: >> >>> Nov 12 19:28:42 linux kernel: ata6.02: cmd >>> ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x0 data 0 >>> Nov 12 19:2

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Tejun Heo
Mark Lord wrote: > ERR should stay set until the next command has been written to the device. > So we could try and be clever to ignore ERR after PACKET, before CDB, only > if it was set by previous command. > > Sounds a bit complex. > > Just (unconditionally for tape) ignoring it between PACKET

Re: [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB

2007-11-13 Thread Tejun Heo
Mark Lord wrote: > Tejun Heo wrote: >> Robert Hancock wrote: >>> Tejun Heo wrote: > .. >>> Yes, it should likely do something with these return values. Though >>> theoretically it shouldn't fail, since the DMA mask is either 32-bit, >>> which sh

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Tejun Heo
Albert Lee wrote: > After an error condition, some ATAPI tape drives set DRQ=1 together with ERR=1 > when asking the host to transfer the CDB of the next packet command (i.e. > request sense). > This patch workarounds the problem by ignoring the ERR bit and proceed > REQUEST SENSE. > > Signed-of

Re: [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB

2007-11-12 Thread Tejun Heo
Robert Hancock wrote: > Tejun Heo wrote: >> How about always initialize DMA mask to ATA_DMA_MASK regardless of ADMA >> mode such that PRD and PAD buffers are always accessible by register >> mode and just raising PCI dma mask and queue bounce limit if ADMA mode >> is

Re: 2.6.24-rc & SB600 AHCI no go on >=4GB of RAM

2007-11-12 Thread Tejun Heo
Srihari Vijayaraghavan wrote: > Tejun Heo <[EMAIL PROTECTED]> wrote: >> [...] Please post boot log. > > Both the working (with mem= option) & a panicking ones attached. > > Actually as you've pointed out, it may have nothing to do with ahci or sb600 > as

Re: [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB

2007-11-12 Thread Tejun Heo
Hello, Robert. Robert Hancock wrote: > @@ -747,11 +748,29 @@ > on the port. */ > adma_enable = 0; > nv_adma_register_mode(ap); > + if (!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE)) { > + /* Transitioning to legacy mode. Fr

Re: libata , Silicon Image 3124

2007-11-12 Thread Tejun Heo
Kasimir Müller wrote: > Nov 12 19:28:42 linux kernel: ata6.02: cmd > ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x0 data 0 > Nov 12 19:28:42 linux kernel: res > 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout) That's flush timing out, which isn't good. 1. Are the errors localiz

What's needed for PMP support?

2007-11-12 Thread Tejun Heo
(cc'd linux-ide and changed subject a bit) Hello, Mark Lord wrote: > Can you spare a minute to udpate me on what is typically needed to get > a SATA driver to support port multipliers ? Sure thing. > And which LLDs currently have it already? > I have a sata_sil24 driven ExpressCard (for noteboo

Re: Hang during boot in piix_init_pcs (ata_piix.c) with macbook pro

2007-11-12 Thread Tejun Heo
[cc'ing Jason] Hello, Thomas. Thomas Rohwer wrote: > My next try would be to put in a custom version ich8_map_db with > port_enable=1 > (and possibly {P0, P2, NA, NA} in the first line of .map) and use this map > for pci id 8086:2828, because I think the notebook has only one sata > port anyway. >

Re: [2.6 patch] libata: remove unused functions

2007-11-12 Thread Tejun Heo
Adrian Bunk wrote: > This patch removes the following obsolete functions: > - libata-core.c: __sata_phy_reset() > - libata-core.c: sata_phy_reset() > - libata-eh.c: ata_qc_timeout() > - libata-eh.c: ata_eng_timeout() > > Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Queued in #tj-upstream-fixes

Re: possibly a dumb question about sb600/700

2007-11-12 Thread Tejun Heo
Alan Cox wrote: >> Alright, then. I was just worried about the asymmetry. Oh, this >> _reminds me of another problem regarding enable bits. There's a system >> (wyse thin client) with pata_amd controller where the enable bit isn't >> set by the BIOS and there's no reliable way to identify the sy

Re: question about sata-error on boot.

2007-11-12 Thread Tejun Heo
(cc Robert Hancock, maybe we need ATA_LFLAG_HRST_TO_RESUME for these controllers?) Andrew Morton wrote: >> On Fri, 2 Nov 2007 19:34:20 +0100 "Hemmann, Volker Armin" <[EMAIL >> PROTECTED]> wrote: >> Hi, > > (cc linux-ide) > >> for some time (and I can't say for how long, but the board is less tha

Re: possibly a dumb question about sb600/700

2007-11-12 Thread Tejun Heo
Alan Cox wrote: > On Mon, 12 Nov 2007 18:05:44 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> Hello, >> >> I've been looking at PATA support for sb600 and 700 and found something >> weird. >> >> * IDE atiixp.c has a separate entry for sb

Re: Promise SATA TX4 300 port timeout with sata_promise in 2.6.22, kernel panic in 2.6.23

2007-11-12 Thread Tejun Heo
Hello, Mikael Pettersson wrote: >> Also, if 3Gbps can't be made reliable on those controllers, how about >> limiting it to 1.5Gbps by default with appropriate warning messages? >> Without PMP, it's not like we're gonna earn anything by driving the >> thing at 3Gbps. > > There are two things going

possibly a dumb question about sb600/700

2007-11-12 Thread Tejun Heo
Hello, I've been looking at PATA support for sb600 and 700 and found something weird. * IDE atiixp.c has a separate entry for sb600 such that it only probes the first port but sb700 doesn't use the entry. So, does sb600 has one PATA channel but sb700 has two? * libata pata_atiixp.c doesn't have

[PATCH] ata_piix: add SATELLITE U205 to broken suspend list

2007-11-12 Thread Tejun Heo
Satellite U205 has alternate product name where the satellite part is all capatalized. Add it to the blacklist. This is reported by Ross Patterson in kernel bugzilla bug #7780. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Ross Patterson <[EMAIL PROTECTED]> --- This patch has be

Re: Promise SATA TX4 300 port timeout with sata_promise in 2.6.22, kernel panic in 2.6.23

2007-11-12 Thread Tejun Heo
Patric Karlsson wrote: > Tejun Heo wrote: >> It seems those 3Gbps promise controllers have hard time getting out of >> transmission errors. Is it because hardreset doesn't work? Can we >> fix it? >> >> Also, if 3Gbps can't be made reliable on tho

Re: Promise SATA TX4 300 port timeout with sata_promise in 2.6.22, kernel panic in 2.6.23

2007-11-11 Thread Tejun Heo
Hello, I Stratford wrote: > The purpose of the mail is to document and share my experience in the > hope that someone might find it useful, either for debugging their own > TX4 300-centric system issues or figuring out what is up with > sata_promise and the TX4 300 in 3Gbps mode. I also wish to of

Re: SATA eating my disk, port reset, destroying unrelated data

2007-11-11 Thread Tejun Heo
Robert Hancock wrote: > Norbert Preining wrote: >> ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x40 action 0x2 > > Serror 0x40 means a handshake error. Usually Serror indications are > due to a hardware problem (bad SATA cable, power or drive problem). > >> ata1.00: (BMDMA stat 0x25) >> at

Re: 2.6.24-rc1: pata_amd fails to detect 80-pin wire

2007-11-11 Thread Tejun Heo
Hello, Cable detection has always been broken for pata_amd. Recent changes seem to have broken some other subset tho. The following patchset to get it fixed once and for all is pending. http://thread.gmane.org/gmane.linux.ide/24524 Thanks. -- tejun - To unsubscribe from this list: send the

Re: AHCI + ST3160023AS + NCQ problems

2007-11-11 Thread Tejun Heo
Matheus Izvekov wrote: >> Indeed removing the jumper of sdb made it be recognised as SATA2. But >> sdc, what the problem is really about, is neither SATA2, not has any >> jumper whatsoever. but both the manufacturer and libata claim it >> supports NCQ. >> > > Anything i could do to help debug this

Re: only one drive in a port multiplier system is being recognized

2007-11-11 Thread Tejun Heo
Greg Hennessy wrote: > I have a LYCeSATA-4x pci card that is port multiplier compatible (it > works fine > under win xp) that is only showing one of 5 attached drives when > attached to > a Redhat 5 computer, with both 2.6.18-8.1.15.el5 and 2.6.23.1. > The SATA link shows as up for the one recogni

Re: linux-ata.org contributions

2007-11-11 Thread Tejun Heo
Jeff Garzik wrote: >> So, my preference is a wiki. I don't care which wiki it is as long as I >> can edit and view it directly. > > So noted, it sounds like a wiki it greatly preferred by all involved. > I'll look around for one I like. > > Expect no action until Nov 16 at the earliest, of cours

Re: linux-ata.org contributions

2007-11-11 Thread Tejun Heo
Jeff Garzik wrote: > I wouldn't push it out unless it looked OK in my browser. > > But overall I tend to dislike wikis. They enable collaboration, but > tend to be uniformly ugly, cumbersome, and CPU intensive. Besides collaboration, one thing I like about wikis is that updating the page is an o

Re: 2.6.24-rc & SB600 AHCI no go on >=4GB of RAM

2007-11-08 Thread Tejun Heo
Srihari Vijayaraghavan wrote: > (Same symptoms/behaviour as before: > http://marc.info/?l=linux-ide&m=117949823328798&w=2 & > http://marc.info/?t=11781097043&r=1&w=2) > > With mem=3500M all is well, otherwise it goes on reseting the ports in a loop > & not booting :-( Hmmm.. weird. The w

Re: SC1200 failure in 2.6.23 and 2.6.24-rc1-git10

2007-11-08 Thread Tejun Heo
Denys Fedoryshchenko wrote: > Thanks, it works like that. > > Seems in libata there is no fall-back to non-DMA mode, if DMA didn't work. There is, it's just too conservative about that. With improvements pending for 2.6.24, it should be quite snappy at falling back to PIO if configured transfer

Re: [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers

2007-11-08 Thread Tejun Heo
Mark Lord wrote: > Tejun Heo wrote: >> In a presentation of true workmanship, pata_ali asserts IRQ >> permanantly if the TF status register is read more than once when >> there's no device attached to the port. > .. > > Is using the altstatus reg (rather t

Re: [PATCH 13/15] ide: remove hwif->intrproc

2007-11-08 Thread Tejun Heo
Alan Cox wrote: > On Thu, Nov 08, 2007 at 11:43:45AM +0900, Tejun Heo wrote: >>> I believe I have a small PCI card here with an HPT366 chip on it. >>> Does anyone there want it before I throw it away? >> I already have a 372. It should be almost the same, right? >

[PATCH #upstream-fixes] libata: port and host should be stopped before hardware resources are released

2007-11-07 Thread Tejun Heo
IRQ is released but with all other hardware resources intact. The devres is added iff ->host_stop and/or ->port_stop exist. This problem has been spotted by Mark Lord. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Mark Lord <[EMAIL PROTECTED]> --- Jeff, this really needs

Re: [PATCH 13/15] ide: remove hwif->intrproc

2007-11-07 Thread Tejun Heo
Mark Lord wrote: >> Bartlomiej Zolnierkiewicz wrote: >> >>> * hpt366.c::hpt3xx_intrproc() is the only user of hwif->intrproc > .. > > Speaking of which.. > > I believe I have a small PCI card here with an HPT366 chip on it. > Does anyone there want it before I throw it away? I already have a 372

Re: [PATCH 1/4] libata sata_qstor fix oops on rmmod

2007-11-07 Thread Tejun Heo
Mark Lord wrote: > sata_qstor fix oops on rmmod. > > sata_qstor likes to disable the chip on module unload, > so it provides a libata "host_stop" method to do this. > But in recent kernels, this routine is now called too late, > after the PCI mmio resources have already been released. > Which prod

[PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers

2007-11-07 Thread Tejun Heo
is reported by Luca Tettamanti in bugzilla bug 9298. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Tested-By: Luca Tettamanti <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/ata/libata-core.c

Re: sata NCQ blacklist entry

2007-11-07 Thread Tejun Heo
Florian La Roche wrote: > Hello all, > > I've taking email addresses from the last NCQ blacklist changes going > into the kernel. > This Fujitsu drive also gives me spurious command completions. Detailed > output also available at https://bugzilla.redhat.com/show_bug.cgi?id=366181. > > Let me kno

[PATCH] ata_piix: add SATELLITE PRO U200 to broken suspend list

2007-11-06 Thread Tejun Heo
From: Yann Chachkoff <[EMAIL PROTECTED]> Please warmly welcome the PRO variant of Satellite U200 to the broken suspend list. Original patch is from Yann Chachkoff. Patch reformatted and forwarded by Tejun Heo. Signed-off-by: Yann Chachkoff <[EMAIL PROTECTED]> Signed-off-by: Tejun

Re: [PATCH 05/12] libata: xfer_mask is unsigned int not unsigned long

2007-11-06 Thread Tejun Heo
Jeff Garzik wrote: >> Jeff, are you okay with u32 or 64? > > unsigned long is IMO the best choice for bitmaps. > > * it is a machine int on all(?) architectures I don't really see much point in this. What's the advantage of a machine int for xfer mask? > * it is 32-bit on 32-bit architectures

Re: [PATCH 04/12] libata: kill ata_id_to_dma_mode()

2007-11-06 Thread Tejun Heo
Alan Cox wrote: > On Tue, 6 Nov 2007 14:39:02 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> ata_id_to_dma_mode() isn't quite generic. The function is basically >> privately implemented ata_id_xfermask() combined with hardcoded mode >> printing a

Re: [PATCH 08/12] libata: implement ata_timing_cycle2mode() and use it in libata-acpi and pata_acpi

2007-11-06 Thread Tejun Heo
Alan Cox wrote: >> +/* PIO */ >> +mode = ata_timing_cycle2mode(ATA_SHIFT_PIO, gtm->drive[unit].pio); >> +xfer_mask |= ata_xfer_mode2mask(mode); > > No check v 0xFF > >> + * ata_timing_cycle2mode - find xfer mode for the specified cycle duration >> + * @xfer_shift: ATA_SHIFT_* value

Re: [PATCH 11/12] libata: add ATA_CBL_PATA_IGN

2007-11-06 Thread Tejun Heo
Alan Cox wrote: >> This patch adds ATA_CBL_PATA_IGN which tells libata to ignore the >> cable type completely and just let the LLD determine the transfer mode >> via host transfer mode masks and ->mode_filter(). >> >> Signed-off-by: Tejun Heo <[EMAIL PROTECTED

Re: [PATCH 06/12] libata: separate out ata_acpi_gtm_xfermask() from pacpi_discover_modes()

2007-11-06 Thread Tejun Heo
Alan Cox wrote: >> +/* Welcome to ACPI, bring a bucket */ >> +const unsigned int ata_acpi_pio_cycle[7] = { >> +600, 383, 240, 180, 120, 100, 80 >> +}; >> +EXPORT_SYMBOL_GPL(ata_acpi_pio_cycle); >> + >> +const unsigned int ata_acpi_mwdma_cycle[5] = { >> +480, 150, 120, 100, 80 >> +}; >> +EXP

Re: [PATCH 05/12] libata: xfer_mask is unsigned int not unsigned long

2007-11-06 Thread Tejun Heo
Alan Cox wrote: > On Tue, 6 Nov 2007 14:39:03 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> xfer_mask is unsigned int not unsigned long. Change ->mode_filter to >> take and return unsigned int. >> >> While at it, rename @adev of ata_pci_d

Re: "Fix ATAPI transfer lengths" causes CD writing regression

2007-11-06 Thread Tejun Heo
Alan Cox wrote: > On Mon, 05 Nov 2007 09:05:48 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> Alan Cox wrote: >>>> Maybe we could set a limit here. If the ATAPI device keeps DRQ=1 and >>>> exceeds the limit, we consider it as HSM violation and

[PATCH 05/12] libata: xfer_mask is unsigned int not unsigned long

2007-11-05 Thread Tejun Heo
xfer_mask is unsigned int not unsigned long. Change ->mode_filter to take and return unsigned int. While at it, rename @adev of ata_pci_default_filter() to @dev for consistency. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-sff.c |5 +++-- dr

[PATCH 12/12] pata_amd: update mode selection for NV PATAs

2007-11-05 Thread Tejun Heo
red during driver attach and restored on detach. * Cable type is fixed to ATA_CBL_PATA_IGN and mode selection is soley done by nv_mode_filter() which peeks both BIOS and ACPI configurations and filter accordingly. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Alan Cox <[EMAIL PROTE

[PATCH 09/12] libata: implement ata_acpi_init_gtm()

2007-11-05 Thread Tejun Heo
ion modify it. The accessor is there to make building w/o ACPI easy dev->__acpi_init doesn't exist if ACPI is not enabled. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-acpi.c |3 +++ include/linux/libata.h| 14 +- 2 files changed, 16 insertion

[PATCH 08/12] libata: implement ata_timing_cycle2mode() and use it in libata-acpi and pata_acpi

2007-11-05 Thread Tejun Heo
. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Alan Cox <[EMAIL PROTECTED]> --- drivers/ata/libata-acpi.c | 62 +++-- drivers/ata/libata-core.c | 52 + drivers/ata/pata_acpi.c | 13 + include/li

[PATCH 11/12] libata: add ATA_CBL_PATA_IGN

2007-11-05 Thread Tejun Heo
gned-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Alan Cox <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 13 + include/linux/ata.h |7 --- include/linux/libata.h|1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/ata/lib

[PATCH 07/12] libata: fix ata_acpi_gtm_xfermask()

2007-11-05 Thread Tejun Heo
any DMA mask bit set all bits in PIO mask. * MWDMA and UDMA blocks are swapped. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Alan Cox <[EMAIL PROTECTED]> --- drivers/ata/libata-acpi.c | 42 +- 1 files changed, 21 insertions(+), 21 deleti

[PATCH 10/12] libata: reimplement ata_acpi_cbl_80wire() using ata_acpi_gtm_xfermask()

2007-11-05 Thread Tejun Heo
, so using initial caching value makes sense. This fixes ACPI part of cable detection in pata_amd which previously always returned 0 because configuring PIO0 during reset clears DMA configuration. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Alan Cox <[EMAIL PROTECTED]> --- driver

[PATCH 03/12] libata: clean up xfermode / PATA timing related stuff

2007-11-05 Thread Tejun Heo
ata_timing_find_mode() accordingly. This patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 82 ++--- include/linux/libata.h| 21 ++- 2 files changed, 52 insert

[PATCH 06/12] libata: separate out ata_acpi_gtm_xfermask() from pacpi_discover_modes()

2007-11-05 Thread Tejun Heo
, this patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Alan Cox <[EMAIL PROTECTED]> --- drivers/ata/libata-acpi.c | 78 + drivers/ata/pata_acpi.c | 66 ++-

[PATCH 02/12] libata: export xfermode / PATA timing related functions

2007-11-05 Thread Tejun Heo
, change unsigned short @speed to u8 @xfer_mode in ata_timing_find_mode() for consistency. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 33 +++-- include/linux/libata.h| 10 ++ 2 files changed, 29 insertions(+), 14 del

[PATCH 04/12] libata: kill ata_id_to_dma_mode()

2007-11-05 Thread Tejun Heo
dling functions. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/ata_generic.c | 17 - drivers/ata/libata-core.c | 43 --- include/linux/libata.h|1 - 3 files changed, 16 insertions(+), 45 deletions(-) diff --git a/

[PATCHSET] libata: update timing and fix pata_amd transfer mode selection

2007-11-05 Thread Tejun Heo
Hello, This patchset cleans up and improves PATA timing related code and fix pata_amd transfer mode selection on top of the improvements. This patchset contains the following tweleve patches. 0001-ata_generic-unindent-loop-in-generic_set_mode.patch 0002-libata-export-xfermode-PATA-timing-rela

[PATCH 01/12] ata_generic: unindent loop in generic_set_mode()

2007-11-05 Thread Tejun Heo
Unindent loop body in generic_set_mode(). This is to ease future change. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/ata_generic.c | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/ata/ata_generic.c b/drive

[PATCH 3/8 UPDATED] libata: factor out ata_eh_schedule_probe()

2007-11-05 Thread Tejun Heo
. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- drivers/ata/libata-eh.c | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) Index: work/drivers/ata

Re: [PATCH 3/8] libata: factor out ata_eh_schedule_probe()

2007-11-05 Thread Tejun Heo
Bartlomiej Zolnierkiewicz wrote: >> -if (!ata_dev_enabled(dev) && >> -((ehc->i.probe_mask & (1 << dev->devno)) && >> - !(ehc->did_probe_mask & (1 << dev->devno { >> -ata_eh_detach_dev(dev); >> -

[PATCH 7/8] libata: implement ATA_DFLAG_DUBIOUS_XFER

2007-11-04 Thread Tejun Heo
ATA_DFLAG_DUBIOUS_XFER is set whenever data transfer speed or method changes and gets cleared when data transfer command succeeds in the newly configured transfer mode. This will be used to improve speed down logic. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]< --- drivers/ata/libata-

[PATCH 8/8] libata: implement fast speed down for unverified data transfer mode

2007-11-04 Thread Tejun Heo
nning code gives up. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-eh.c | 97 --- 1 files changed, 83 insertions(+), 14 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 99231ec..7835e1a 1006

[PATCH 5/8] libata: clean up EH speed down implementation

2007-11-04 Thread Tejun Heo
in ata_eh_speed_down() These changes are to improve readability and ease further changes. This patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-eh.c | 117 +-- include/linux/libata.h |

[PATCH 4/8] libata: move ata_set_mode() to libata-eh.c

2007-11-04 Thread Tejun Heo
Move ata_set_mode() to libata-eh.c. ata_set_mode() is surely an EH action and will be more tightly coupled with the rest of error handling. Move it to libata-eh.c. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 25 - drivers/ata/

[PATCH 6/8] libata: adjust speed down rules

2007-11-04 Thread Tejun Heo
Allow SATAPI devices to fall back to PIO. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-eh.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 7f505f1..cf2afb0 100644 --- a/drivers

[PATCHSET] libata: update EH speed down logic, take #2

2007-11-04 Thread Tejun Heo
Hello, This is the second take of update-EH-speed-down-logic patchset. Changes from the last take[1] are... * Updated to apply & build against the current linus#master. Recently committed error-passthhrough-for-non-IO-command change broke build with this patchset applied. This patchset is

[PATCH 1/8] libata: rearrange ATA_DFLAG_*

2007-11-04 Thread Tejun Heo
Area for DFLAGs which are cleared on INIT is full. Extend it by 8 bits. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- include/linux/libata.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/libata.h b/include/linux/libata.h index 1e27785..6

[PATCH 3/8] libata: factor out ata_eh_schedule_probe()

2007-11-04 Thread Tejun Heo
Factor out ata_eh_schedule_probe() from ata_eh_handle_dev_fail() and ata_eh_recover(). This is to improve maintainability and make future changes easier. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-eh.c | 37 - 1 files chang

[PATCH 2/8] libata: add protocol data transfer tests

2007-11-04 Thread Tejun Heo
Add protocol data transfer tests. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- include/linux/ata.h | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/include/linux/ata.h b/include/linux/ata.h index 61535e7..2318531 100644 --- a/include/linux

Re: "Fix ATAPI transfer lengths" causes CD writing regression

2007-11-04 Thread Tejun Heo
Alan Cox wrote: >> Maybe we could set a limit here. If the ATAPI device keeps DRQ=1 and >> exceeds the limit, we consider it as HSM violation and have EH handle it. > > On a DMA transfer its basically out of our control (and a PIO drain will > lock some controllers solid until power cycle), Do su

Re: new errors with sata_sil24 with port multiplier

2007-11-03 Thread Tejun Heo
Jon Chelton wrote: > Now that the speed of this drive has been at 1.5gbs, the error has not > returned under moderate disk load for 20 or so hours. This is odd > because 7 other drives on the same controller are working at 3.0gbs. The drive is faulty or the connector or something else is wrong wi

Re: "Fix ATAPI transfer lengths" causes CD writing regression

2007-11-03 Thread Tejun Heo
Daniel Drake wrote: > Tejun Heo wrote: >>> <4>ata2.00: HSM violation: eh_analyze_tf: BUSY|DRQ >>> <3>ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen >>> <3>ata2.00: cmd a0/00:00:00:0a:00/00:00:00:00:00/a0 tag 0 cdb 0x5a data >>

Re: new errors with sata_sil24 with port multiplier

2007-11-02 Thread Tejun Heo
Jon Chelton wrote: > ata2.02: irq_stat 0x02020002, device error via SDB FIS > ata2.02: cmd 60/50:00:6f:5b:02/00:00:00:00:00/40 tag 0 cdb 0x0 data > 40960 in > res 50/00:00:00:00:00/00:00:00:00:00/00 Emask 0x1 (device > error) Hmmm... Status register value is weird here. It's reporting de

Re: [PATCH 1/3] libata: implement dev->acpi_init_gtm

2007-11-02 Thread Tejun Heo
Tejun Heo wrote: > Jeff Garzik wrote: >> Tejun Heo wrote: >>> Add dev->acpi_init_gtm and store initial GTM values on host >>> initialization. If the field is valid, ATA_PFLAG_INIT_GTM_VALID flag >>> is set. This is to remember BIOS/firmware programmed

Re: [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd

2007-11-02 Thread Tejun Heo
Alan Cox wrote: >> detection. We're basically just trying to follow what BIOS did. Maybe >> we should return ATA_CBL_PATA_MAYBE_80 unconditionally and implement > > MAYBE_80 = UNK. Yeah, right. I somehow thought it was close to "don't really know but treat as 40c" but it's more like "don't rea

Re: "Fix ATAPI transfer lengths" causes CD writing regression

2007-11-02 Thread Tejun Heo
Daniel Drake wrote: > Tejun Heo wrote: >> Yeap, the SG command is fine. The drive is being weird tho. The >> allocation length field says 10 bytes, so it should just have >> transferred 10 bytes without causing HSM violation. >> >> Can you please apply the a

Re: [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd

2007-11-02 Thread Tejun Heo
Alan Cox wrote: >> 2. UDMA mode is configured but equal to or under UDMA33. Dunno whether >> it's cable or device limit but anyways you better limit it to UDMA33 too. > > If it is under UDMA33 you know it isn't a cable limit > > If it is UDMA 33 and the device top is > UDMA 33 it might be > > T

Re: [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd

2007-11-02 Thread Tejun Heo
Alan Cox wrote: >> What the function answers is not actually cable type but "according to >> the current configuration, using this cable type won't violate BIOS >> configuration" kind of answer. How the caller is to use that is the >> caller's responsibility. > > How does the caller make use of i

Re: [PATCH 3/3] pata_amd: fix and improve cable detection

2007-11-02 Thread Tejun Heo
Hello, again. Forgot one thing. Alan Cox wrote: >> all we can use is how the BIOS configured it. I suppose BIOS does it by >> issuing trial commands which I don't think adding to libata is a good idea. > > The BIOS does it by asking the hardware somehow. I traced one or two > BIOSes that far. T

Re: [PATCH 3/3] pata_amd: fix and improve cable detection

2007-11-02 Thread Tejun Heo
Alan Cox wrote: >> all we can use is how the BIOS configured it. I suppose BIOS does it by >> issuing trial commands which I don't think adding to libata is a good idea. > > The BIOS does it by asking the hardware somehow. I traced one or two > BIOSes that far. The info is there but its not docum

Re: [PATCH 3/3] pata_amd: fix and improve cable detection

2007-11-02 Thread Tejun Heo
Alan Cox wrote: >> Cable detection on Nvidia PATA hosts is pathetic. The current >> nv_cable_detect() assumes that the native cable detection only >> mistakes 80c as 40c but this isn't true. On ASUS A8N-E, cable >> register almost always says 80c is attached and it also manages to >> trick the dr

Re: [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd

2007-11-02 Thread Tejun Heo
Alan Cox wrote: >> Using the initial GTM value is the right thing to do because both are >> trying to check firmware setting and by the time ->cable_detect runs >> the controller is already forced into PIO0 by reset. > > As we only look at the DMA bits that doesn't matter but I agree it would > be

Re: [PATCH 1/3] libata: implement dev->acpi_init_gtm

2007-11-02 Thread Tejun Heo
Jeff Garzik wrote: > Tejun Heo wrote: >> Add dev->acpi_init_gtm and store initial GTM values on host >> initialization. If the field is valid, ATA_PFLAG_INIT_GTM_VALID flag >> is set. This is to remember BIOS/firmware programmed initial timing >> for later use befor

Re: [PATCH 1/3] libata: implement dev->acpi_init_gtm

2007-11-02 Thread Tejun Heo
Alan Cox wrote: > On Sat, 03 Nov 2007 00:20:10 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> Add dev->acpi_init_gtm and store initial GTM values on host >> initialization. If the field is valid, ATA_PFLAG_INIT_GTM_VALID flag >> is set. This is to remem

[PATCH 3/3] pata_amd: fix and improve cable detection

2007-11-02 Thread Tejun Heo
c. This change makes cable detection work correctly all the time on ASUS A8N-E and should also work well on other NV PATA configurations. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/pata_amd.c | 112 +++-- 1 file changed, 90 insert

[PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd

2007-11-02 Thread Tejun Heo
are setting and by the time ->cable_detect runs the controller is already forced into PIO0 by reset. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-acpi.c | 68 +- drivers/ata/pata_amd.c|3 +- drivers/ata/pata_via

[PATCH 1/3] libata: implement dev->acpi_init_gtm

2007-11-02 Thread Tejun Heo
Add dev->acpi_init_gtm and store initial GTM values on host initialization. If the field is valid, ATA_PFLAG_INIT_GTM_VALID flag is set. This is to remember BIOS/firmware programmed initial timing for later use before reset and mode configuration modify it. Signed-off-by: Tejun Heo <

Re: [smartmontools-support] Bug/Issue

2007-11-02 Thread Tejun Heo
Hello, Jon. Please don't top-post. Jon Hardcastle wrote: > Looking at the logs there is seconds(as in 2~5) > literally between when the smartd kicks in on the sata > and when it decides the drive isn't capable. I can > tell you now it takes at least 10~15 seconds for the > drive to spin up.. prob

Re: [smartmontools-support] Bug/Issue

2007-11-02 Thread Tejun Heo
Hello, Jon. Please don't top-post. Jon Hardcastle wrote: > Looking at the logs there is seconds(as in 2~5) > literally between when the smartd kicks in on the sata > and when it decides the drive isn't capable. I can > tell you now it takes at least 10~15 seconds for the > drive to spin up.. prob

Re: SATA_SIL

2007-11-02 Thread Tejun Heo
Frans de Boer wrote: > Both sil and sil24 are not the same compared to the stock 2.6.22.9 > kernel. And you're seeing problem on which? >>> Do you still like to recieve my report as suggested by you? >> Yeah, it should just work. Thanks. >> > Uh, your reacte on which part? The part of just wait

Re: SATA_SIL

2007-11-01 Thread Tejun Heo
[restoring linux-ide, please don't drop cc] Frans de Boer wrote: > Hello sir, > > I just checked: the SuSE 2.6.22.9-0.4 source for sata_sil.c (among > others) is NOT the same as the stock 2.6.22.9. Looking at your reply, I > quess that I have to skip 2.6.23 and use the next 2.6.24 release? Is it

Re: "Fix ATAPI transfer lengths" causes CD writing regression

2007-11-01 Thread Tejun Heo
Alan Cox wrote: >> "one size" that you can supply to the SG_IO command (unless you want to >> use a stupidly large buffer) to retrieve all the data at once. Instead, >> as Tejun describes, you put a short read request in first, look at byte >> 1 of the page which tells you the length, and then r

Re: "Fix ATAPI transfer lengths" causes CD writing regression

2007-11-01 Thread Tejun Heo
Daniel Drake wrote: > Alan Cox wrote: >> Lots of *other* problems occur instead. Daniel is reporting that if he >> makes a stupid request to a buggy drive he gets a reset and the system >> continues happily. Even that reset being a reset not a new command issue >> is actually us being excessively p

[PATCH 8/8] libata: implement fast speed down for unverified data transfer mode

2007-11-01 Thread Tejun Heo
nning code gives up. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-eh.c | 97 --- 1 files changed, 83 insertions(+), 14 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index e635100..79bda92 1006

<    2   3   4   5   6   7   8   9   10   11   >