Re: new ata_port_operations for .pmp_{read,write} ?

2008-02-25 Thread Tejun Heo
Hello, Mark. Mark Lord wrote: MMmm.. maybe the vendor unique FIS mechanism of the chipset can save the scenario here. It would seem to be a reasonable way to direct a FIS (anything up to 8KB) at a specific pmp, without changing the default pmp on the channel. I can have qc_issue use that

Re: ops-qc_defer not invoked on ata_exec_internal_sg() paths ?

2008-02-25 Thread Tejun Heo
Hello, Mark. Mark Lord wrote: The optional .qc_defer() methods don't seem to be called on the ata_exec_internal_sg() path. At present, this is probably okay. But in the future, as we add functionality for link power management and hotplug polling, this could be a problem. I think. Or

Re: new ata_port_operations for .pmp_{read,write} ?

2008-02-25 Thread Tejun Heo
Hello, Mark. Mark Lord wrote: libata doesn't really put much restrictions on what a LLD should do on entering EH and if the controller's behavior is predictable, there's no reason to freeze the port. If the problem is that the DMA engine isn't usable after PMP error but it's known that the

Re: new ata_port_operations for .pmp_{read,write} ?

2008-02-24 Thread Tejun Heo
Mark Lord wrote: No, the quickest solution for sata_mv, the one I apparently will now be using, is to just clone about 250 lines of reset/debouce/probe code from libata-core and change perhaps five lines of it to work around this issue plus some chipset errata. What I was thinking of,

Re: new ata_port_operations for .pmp_{read,write} ?

2008-02-23 Thread Tejun Heo
Hello, Mark. Mark Lord wrote: Mark Lord wrote: An alternative to all this, might be to expose the select_pmp() function shown in the sample code, and have libata-pmp.c call that, instead of having the new new .pmp_{read,write} functions. .. I wonder if this might be more viable than

Re: [PATCH] AMD SB700/SB800 SATA support 64bit DMA

2008-02-22 Thread Tejun Heo
Shane Huang wrote: Jeff and Tejun: I'm using my private mailbox to submit it before I set up the connection to our exchange mail server under linux. Please check whether this patch can be accepted. Patch looks fine to me. -- tejun - To unsubscribe from this list: send the line

Re: new ata_port_operations for .pmp_{read,write} ?

2008-02-22 Thread Tejun Heo
Hello, Mark. Mark Lord wrote: This patch provides two new struct ata_port_operations methods for this, and modifies the code in libata-pmp to use them if provided. ... Note that, while this does work for sata_mv, I'm still thinking about it. I'm not totally clear yet (more reading to do)

Re: new ata_port_operations for .pmp_{read,write} ?

2008-02-22 Thread Tejun Heo
Hello, Mark. Mark Lord wrote: And for that matter, is it possible for sata_pmp_read() to be called while the link is active with another command ? Not today, it seems, but what about when hotplug polling gets implemented ? .. That's the one I'm most concerned about. Should I be? ...

Re: [PATCH] libata-pmp: clear hob for pmp register accesses

2008-02-21 Thread Tejun Heo
Mark Lord wrote: Mark Lord wrote: Tejun Heo wrote: Hello, Mark. Mark Lord wrote: Tejun, I've added PMP to sata_mv, and am now trying to get it to work with a Marvell PM attached. And the behaviour I see is very bizarre. After hard+soft resets, the PM signature is found, and libata

Re: [PATCH] libata: Register for dock events when the drive is inside a dock station

2008-02-21 Thread Tejun Heo
If a device/bay is inside a docking station, we need to register for dock events additionally to bay events. If a dock event occurs, the dock driver will call the appropriate handler (ata_acpi_ap_notify() or ata_acpi_dev_notify()) for us. Signed-off-by: Holger Macht [EMAIL PROTECTED] ---

Re: JMicron - hard resetting link

2008-02-21 Thread Tejun Heo
Hello, Gabor FUNK wrote: To sum it up: - 1st the 4 disks on the Jmicron controller failed with 1 [chieftek] PSU - then it failed with 2 PSU too, but this time the chieftek was only connected to the different 4 disks - on the nvidia controller. MB and other disks were on the other,

Re: What's needed for PMP support?

2008-02-21 Thread Tejun Heo
Mark Lord wrote: Heh... I never thought a PMP aware controller would use TF SRST, so what you want to do is set pmp value in the register and calling ata_std_softreset(), right? I think the correct thing to do is to separate out SRST sequence proper from ata_std_softreset() into, say,

Re: What's needed for PMP support?

2008-02-21 Thread Tejun Heo
Mark Lord wrote: Mark Lord wrote: Tejun Heo wrote: The following things are needed for a LLD to support PMP. .. I think that's about it. Feel free to ask if something isn't clear. .. I think we need better semantics around sata_scr_{read,write}(), or more specifically These need

Re: [PATCH] AMD SB700/SB800 SATA support 64bit DMA

2008-02-21 Thread Tejun Heo
Huang, Shane wrote: Jeff: SB700 SATA controller can support 64 bit DMA, the previous commit badc2341579511a247f5993865aa68379e283c5c was added with careless reference to SB600, which should be modified by this patch. Signed-off-by: Shane Huang [EMAIL PROTECTED] Shane, it still wraps.

Re: sata_sil24 not configuring drive right?

2008-02-20 Thread Tejun Heo
Johann-Christoph Jacob wrote: my problem is not with the transfer mode but with the NCQ queue_depth. My bootlog shows: ata1.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 1) but i would like it to show: ata1.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 31/32) or something similar. I

Re: [PATCH] scsi: align shost-hostdata to cacheline

2008-02-20 Thread Tejun Heo
James Bottomley wrote: On Fri, 2008-02-15 at 07:49 +0900, Tejun Heo wrote: James Bottomley wrote: On Thu, 2008-02-14 at 18:48 +0900, Tejun Heo wrote: shost-hostdata can contain arbitrary data including DMA target buffers. Align it to cacheline. Signed-off-by: Tejun Heo [EMAIL PROTECTED

[PATCH] libata: automatically use DMADIR if drive/bridge requires it

2008-02-20 Thread Tejun Heo
ATA_DFLAG_DMADIR before setting DMADIR. Original patch is from Mark Lord. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Mark Lord [EMAIL PROTECTED] --- I don't have a bridge which sets DMADIR but so only checked atapi_dmadir parameter. Thanks. drivers/ata/libata-core.c | 11 +-- drivers/ata/libata

Re: [PATCH] sata_mv: remove iounmap in mv_platform_remove and use devm_iomap

2008-02-19 Thread Tejun Heo
Mark Lord wrote: Saeed Bishara wrote: this will fix crash bug when doing rmmod to the driver, this is because the port_stop function get called later and it could access the device's registers. Signed-off-by: Saeed Bishara [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun

Re: [PATCH] ata: fix sparse warning in libata.h

2008-02-15 Thread Tejun Heo
-by: Harvey Harrison [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] scsi: align shost-hostdata to cacheline

2008-02-14 Thread Tejun Heo
shost-hostdata can contain arbitrary data including DMA target buffers. Align it to cacheline. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- James, what do you think? include/scsi/scsi_host.h |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/scsi

[PATCH] libata: align ap-sector_buf to cacheline

2008-02-14 Thread Tejun Heo
ap-sector_buf is used as DMA target and misalignment can cause data corruption on non-coherent architectures. This problem is spotted and initial patch is submitted by Mark Mason. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Mark Mason [EMAIL PROTECTED] --- I thought about it more and marking

Re: [PATCH] scsi: align shost-hostdata to cacheline

2008-02-14 Thread Tejun Heo
James Bottomley wrote: On Thu, 2008-02-14 at 18:48 +0900, Tejun Heo wrote: shost-hostdata can contain arbitrary data including DMA target buffers. Align it to cacheline. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- James, what do you think? Hmm, it will blow out the host size

Re: JMicron - hard resetting link

2008-02-14 Thread Tejun Heo
Gabor FUNK wrote: To be honest, I didn't believe that doing anything with the PSU would do something. However, seemingly it did. I have also updated the BIOS, but I guess this has not much to do with it. I too am amazed at the number of PSU problems getting reported here. It seems most

Re: [RFC-UGLYPATCH] ata: small optimization in linux/libata.h

2008-02-14 Thread Tejun Heo
*). To make it a bit more robust, a BUILD_BUG_ON checking the pointer types may be a good idea. Sorry, but Nacked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http

Re: [PATCHSET] printk: implement printk_header() and merging printk, take #3

2008-02-14 Thread Tejun Heo
Tejun Heo wrote: Hello, Andrew Morton wrote: On Thu, 14 Feb 2008 09:40:51 +0900 Tejun Heo [EMAIL PROTECTED] wrote: Can you please take a look at ata_eh_link_report() in drivers/ata/libata-eh.c? I did. Punishment? Heh.. :-) Currently, it has some problems. Yes, and the patches do

[libata-dev #upstream-fixes] pata_legacy: don't call ata_host_detach() after initialization failure

2008-02-13 Thread Tejun Heo
ata_host_detach() detaches an attached port and shouldn't be called on a port which hasn't been attached yet. pata_legacy incorrectly calls ata_host_detach() on unattached port after initialization failure causing oops. Fix it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Alan Cox [EMAIL

[PATCHSET] printk: implement printk_header() and merging printk, take #3

2008-02-13 Thread Tejun Heo
Hello, all. This is the third take of implement-printk_header-and-mprintk patchset. Changes from the last take[L] are... * Now header is printed on every line of a multiline message. If the header ends with ':' followed by spaces. The colon is replaced with space from the second line. *

[PATCH 1/5] printk: keep log level on multiline messages

2008-02-13 Thread Tejun Heo
. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- kernel/printk.c | 50 +++--- 1 files changed, 23 insertions(+), 27 deletions(-) diff --git a/kernel/printk.c b/kernel/printk.c index 419cd47..2317ec8 100644 --- a/kernel/printk.c +++ b/kernel/printk.c

[PATCH 3/5] printk: implement merging printk

2008-02-13 Thread Tejun Heo
-off-by: Tejun Heo [EMAIL PROTECTED] --- include/linux/kernel.h | 73 kernel/printk.c| 300 +++- 2 files changed, 370 insertions(+), 3 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d885208..a9cbda8

Re: sil3114 corruptions (was: Re: [PATCH 3/3] faster workaround)

2008-02-13 Thread Tejun Heo
Bernd Schubert wrote: Hello Tejun, On Tuesday 23 October 2007 10:08:01 you wrote: Jeff Garzik wrote: Alan Cox wrote: 2) Once we identified, over time, the set of drives affected by this 3112 quirk (aka drives that didn't fully comply to SATA spec), the debugging of corruption cases

Re: [PATCH #upstream] libata: implement libata.force module parameter

2008-02-13 Thread Tejun Heo
Mark Lord wrote: Tejun Heo wrote: This patch implements libata.force module parameter which can selectively override ATA port, link and device configurations including cable type, SATA PHY SPD limit, transfer mode and NCQ. ... +libata.force=[LIBATA] Force configurations. The format

Re: [PATCHSET] printk: implement printk_header() and merging printk, take #3

2008-02-13 Thread Tejun Heo
Andrew Morton wrote: And mprintk the following. code: DEFINE_MPRINTK(mp, 2 * 80); mprintk_set_header(mp, KERN_INFO ata%u.%2u: , 1, 0); mprintk_push(mp, ATA %d, 7); mprintk_push(mp, , %u sectors\n, 1024); mprintk(mp, everything seems dandy\n); output: 6ata1.00: ATA 7, 1024

Re: [PATCHSET] printk: implement printk_header() and merging printk, take #3

2008-02-13 Thread Tejun Heo
Hello, Andrew Morton wrote: On Thu, 14 Feb 2008 09:40:51 +0900 Tejun Heo [EMAIL PROTECTED] wrote: Can you please take a look at ata_eh_link_report() in drivers/ata/libata-eh.c? I did. Punishment? Heh.. :-) Currently, it has some problems. Yes, and the patches do clean that up

Re: [PATCH] pata_scc.c: add thaw ops

2008-02-13 Thread Tejun Heo
Akira Iguchi wrote: This patch adds default thaw ops and fixes the freeze/thaw inconsistency. Signed-off-by: Kou Ishizaki [EMAIL PROTECTED] Signed-off-by: Akira Iguchi [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line

Re: libata/sata_sil24 cache alignment problem?

2008-02-13 Thread Tejun Heo
Alan Cox wrote: I hadn't considered that approach due to the way the ata_port is allocated: libata-core.c: host = scsi_host_alloc(ent-sht, sizeof(struct ata_port)); hosts.c: struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) { shost =

[PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations, take #2

2008-02-12 Thread Tejun Heo
Hello, all. This is the second take of cleanup-sht-ops patchset. As the name suggests it reorganizes and cleans up scsi_host_template and ata_port_operation tables used by libata core and low level drivers. Please read the head message of the last take[L] for more info. Changes from the last

[PATCH 04/10] libata: normalize port_info, port_operations and sht tables

2008-02-12 Thread Tejun Heo
supports NCQ but was missing qc_defer. Fixed. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/ahci.c |4 drivers/ata/ata_generic.c|1 + drivers/ata/ata_piix.c | 13 +++-- drivers/ata/pata_artop.c |1 + drivers/ata/pata_bf54x.c

[PATCH 01/10] libata: PCI device should be powered up before being accessed

2008-02-12 Thread Tejun Heo
() on reinit failure. Just whine and fail resume. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/pata_ali.c | 14 +- drivers/ata/pata_amd.c | 16 +++- drivers/ata/pata_artop.c |5 + drivers/ata/pata_cmd640.c | 21

[PATCH 02/10] libata: reorganize ata_port_operations

2008-02-12 Thread Tejun Heo
Over the time, ops in ata_port_operations has become a bit confusing. Reorganize. SFF/BMDMA ops are separated into separate a group as they will be taken out of ata_port_operations later. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- include/linux/libata.h | 117

[PATCH 03/10] libata: implement and use ata_noop_irq_clear()

2008-02-12 Thread Tejun Heo
those custom placeholders. Also, SFF drivers which don't support BMDMA don't need to use ata_bmdma_irq_clear(). It becomes noop if BMDMA address isn't initialized. Convert them to use ata_noop_irq_clear(). Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/ahci.c | 12

[PATCH 09/10] libata: kill port_info-sht and -irq_handler

2008-02-12 Thread Tejun Heo
-private_data, which is supposed to carry LLD-specific information, instead and kill -sht and -irq_handler. nv_pi_priv structure is defined and struct literals are used to initialize private_data. Notational overhead is negligible. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/sata_nv.c | 29

[PATCH 08/10] libata: stop overloading port_info-private_data

2008-02-12 Thread Tejun Heo
-private_data directly. Adding @host_priv instead of using init-register model for LLDs which use ata_pci_init_one() is suggested by Alan Cox. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Alan Cox [EMAIL PROTECTED] --- drivers/ata/ata_generic.c |2 +- drivers/ata/libata-core.c

[PATCH 07/10] libata: make ata_pci_init_one() not use ops-irq_handler and pi-sht

2008-02-12 Thread Tejun Heo
initialization anyway. As ata_pci_init_one() was the last user of ops-irq_handler, this patch also kills the field. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/ata_generic.c |3 +-- drivers/ata/libata-core.c |1 - drivers/ata/libata-sff.c|7

Re: Current qc_defer implementation may lead to infinite recursion

2008-02-12 Thread Tejun Heo
Elias Oltmanns wrote: Tejun Heo [EMAIL PROTECTED] wrote: Elias Oltmanns wrote: +static int piix_qc_defer(struct ata_queued_cmd *qc) +{ + static struct ata_port *ap = NULL; + struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; missing static? Oh well, I must have been too tired already

Re: [PATCH #upstream] libata: implement libata.force module parameter

2008-02-12 Thread Tejun Heo
Jeff Garzik wrote: Tejun Heo wrote: This patch implements libata.force module parameter which can selectively override ATA port, link and device configurations including cable type, SATA PHY SPD limit, transfer mode and NCQ. For example, you can say use 1.5Gbps for all fan-out ports attached

Re: [PATCH #upstream] libata: implement libata.force module parameter

2008-02-12 Thread Tejun Heo
for the PMP device itself, oh, the device attached to the third fan-out port chokes on NCQ and shouldn't go over UDMA4 by the following. libata.force=2:1.5g,2.15:3.0g,2.03:noncq,udma4 Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- Okay, the build failure is dependent on compiler version. 4.1.2

Re: JMicron - hard resetting link

2008-02-12 Thread Tejun Heo
Hello, Gabor FUNK wrote: What I said was that timeouts occurring due to transmission errors should be recoverable. It seems like IRQ delivery didn't work probably due to screaming IRQ. I need to see the messages before the first relevant error message. It's always a good idea to post full

Re: [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations, take #2

2008-02-12 Thread Tejun Heo
Akira Iguchi wrote: Tejun Heo wrote: * pata_scc should now have NULL thaw after conversion. I'm sorry. This is a bug. Please use default thaw (ata_bmdma_thaw) for pata_scc. That change should be a separate patch. This patchset shouldn't change any actual behavior but adding ata_bmdma_thaw

Re: JMicron - hard resetting link

2008-02-12 Thread Tejun Heo
Gabor FUNK wrote: It shouldn't kill the RAID. Hmmm... The log is truncated. Can you please post full kernel log spanning from boot to array death? RAID dies because controller dies, then it loses 4 disks out of 8... Actually, the server last time was up and running for 2 months. Then when

Re: JMicron - hard resetting link

2008-02-12 Thread Tejun Heo
Gabor FUNK wrote: Hi list, I seem to have a bug with JMicron controller in a Gigabyte GA-N680SLI-DQ6 motherboard. http://www.gigabyte.com.tw/Support/Motherboard/BIOS_Model.aspx?ProductID=2460 Kernel is 2.6.24. 10 on-board SATA connectors, 2+4*JMicron 20360/20363 + 4*nVidia MCP55 2*200GB

Re: Current qc_defer implementation may lead to infinite recursion

2008-02-12 Thread Tejun Heo
Elias Oltmanns wrote: Tejun Heo [EMAIL PROTECTED] wrote: Elias Oltmanns wrote: This proves that piix_qc_defer() has declined the same command 100 times in succession. However, this will only happen if the status of all the commands enqueued for one port hasn't changed in the meantime

Re: 2.6.24 found 5 exceptions in dmesg after not using the system for while

2008-02-11 Thread Tejun Heo
Andrew Paprocki wrote: I haven't used the system with these errors in a day or two and I came back and noticed 5 exceptions in dmesg. These are all the same: ata1: exception Emask 0x10 SAct 0x0 SErr 0x90200 action 0xe frozen ata1: irq_stat 0x0040, PHY RDY changed ata1: SError: { Persist

Re: sata_mv: problems using it as a platform_driver

2008-02-11 Thread Tejun Heo
Saeed Bishara wrote: host-private_data = hpriv; hpriv-n_ports = n_ports; -host-iomap = NULL; hpriv-base = ioremap(res-start, res-end - res-start + 1); +host-iomap = hpriv-base; hpriv-base -= MV_SATAHC0_REG_BASE; rc = mv_create_dma_pools(hpriv, pdev-dev);

Re: Current qc_defer implementation may lead to infinite recursion

2008-02-11 Thread Tejun Heo
Elias Oltmanns wrote: +static int piix_qc_defer(struct ata_queued_cmd *qc) +{ + static struct ata_port *ap = NULL; + struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; missing static? + static int count = 0; +#define PIIX_QC_DEFER_THRESHOLD 5000 + + if (!ap) + ap =

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Tejun Heo
Holger Macht wrote: On a related note, shouldn't ata_acpi_handle_hotplug delete the device like what is done when doing echo 1 /sys/devices/.../block/sr0/device/delete Yeap, when the ata_acpi_handle_hotplug() was added, the focus was supporting hotplug when the controller itself doesn't

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Tejun Heo
Hello, Holger Macht wrote: In the above example, even the reset sequence itself can cause hang if the hardware is implemented slightly differently. The reason why set_piomode() locks up but reset sequence doesn't is simple dumb luck. I think the proper fix is to tell libata to detach the

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Tejun Heo
Hello, Holger Macht wrote: In the above example, even the reset sequence itself can cause hang if the hardware is implemented slightly differently. The reason why set_piomode() locks up but reset sequence doesn't is simple dumb luck. Another thing, whether it's poor luck or not, it worked

Re: Current qc_defer implementation may lead to infinite recursion

2008-02-11 Thread Tejun Heo
Hello, Elias Oltmanns wrote: Hmmm... The reason why max_host_blocked and max_device_blocked are set to 1 is to let libata re-consider status after each command completion as blocked status can be rather complex w/ PMP. I haven't really followed the code yet but you're saying that blocked

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Tejun Heo
Holger Macht wrote: It should be called via ata_acpi_{ap|dev}_notify() callbacks installed via acpi_install_notify_handler(). Can you add dump_stack() in the function and verify that it actually is being called? It could be that the method is called too late or libata takes too long to

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-10 Thread Tejun Heo
This calls ata_eh_reset(...) which in turn tries to force PIO mode 0. But the device is already gone. Bisecting revealed the following commit as culprit: commit cdeab1140799f09c5f728a5ff85e0bdfa5679cd2 Author: Tejun Heo [EMAIL PROTECTED] Date: Mon Oct 29 16:41:09 2007 +0900

Re: Current qc_defer implementation may lead to infinite recursion

2008-02-10 Thread Tejun Heo
Elias Oltmanns wrote: Hi Tejun, due to your commit 31cc23b34913bc173680bdc87af79e551bf8cc0d libata now sets max_host_blocked and max_device_blocked to 1 for all devices it manages. Under certain conditions this may lead to system lockups due to infinite recursion as I have explained to

Re: [PATCH #upstream] libata: implement libata.force module parameter

2008-02-08 Thread Tejun Heo
Sam Ravnborg wrote: I have lost the actual patch. But what you see is what happens when you mix const and non-const data in the same section. Look for use of __initdata for const data and replace it with __initconst. And modpost cannot warn about it as gcc errors out before we look at the

Re: [PATCHSET #upstream] block/libata: update and use block layer padding and draining

2008-02-08 Thread Tejun Heo
Jeff Garzik wrote: Jens Axboe wrote: On Fri, Feb 08 2008, Jeff Garzik wrote: Jeff Garzik wrote: Tejun Heo wrote: This patchset updates block layer padding and draining support and make libata use it. It's based on James Bottomley's initial work and, of the five, the last two patches

[PATCH 6/7] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-08 Thread Tejun Heo
alignment correctly for ATAPI devices and drop broken sg mangling from ata_sg_setup(). * Use request-raw_data_len for ATAPI transfer chunk size. * Killed qc-raw_nbytes. * Separated out killing qc-n_iter. Signed-off-by: James Bottomley [EMAIL PROTECTED] Signed-off-by: Tejun Heo

[PATCH 7/7] libata: implement drain buffers

2008-02-08 Thread Tejun Heo
. * ata_dev_printk() used instead of sdev_printk(). Signed-off-by: James Bottomley [EMAIL PROTECTED] Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 56 +++--- drivers/ata/libata-scsi.c | 59

[PATCH 2/7] block: update bio according to DMA alignment padding

2008-02-08 Thread Tejun Heo
of the request to make this padding visible to lower layers. This patch makes blk_rq_map_user() extend the last bio such that it includes the padding area and the size of area pointed to by the request is properly aligned. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: James Bottomley [EMAIL

[PATCHSET #upstream] block/libata: update and use block layer padding and draining, take 2

2008-02-08 Thread Tejun Heo
This is the second take of blk-layer-padding-and-draining patchset. Changes from the last take[L] are... * libata-update-ATAPI-overflow-draining patch added. This patch fixes up ATAPI PIO handling before updating it to use block layer draining. consumed accounting and

[PATCH 4/7] block: implement request_queue-dma_drain_needed

2008-02-08 Thread Tejun Heo
Draining shouldn't be done for commands where overflow may indicate data integrity issues. Add dma_drain_needed callback to request_queue. Drain buffer is appened iff this function returns non-zero. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: James Bottomley [EMAIL PROTECTED] --- block/blk

[PATCH 1/7] libata: update ATAPI overflow draining

2008-02-08 Thread Tejun Heo
. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Acked-by: Albert Lee [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 76 +++- 1 files changed, 33 insertions(+), 43 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3011919

[PATCH 3/7] block: add request-raw_data_len

2008-02-08 Thread Tejun Heo
or device. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: James Bottomley [EMAIL PROTECTED] --- block/blk-core.c|2 ++ block/blk-map.c |2 ++ block/blk-merge.c |1 + block/bsg.c |8 block/scsi_ioctl.c |3 ++- drivers/scsi

[PATCH 5/7] block: clear drain buffer if draining for write command

2008-02-08 Thread Tejun Heo
Clear drain buffer before chaining if the command in question is a write. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- block/blk-merge.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index d50cfc8..d0b9031 100644 --- a/block

Re: [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations

2008-02-08 Thread Tejun Heo
Akira Iguchi wrote: Tejun Heo wrote: The following drivers need specific platform to build, so they need verification. If you work on one of the following drivers, please verify that the driver builds and works fine. It would be best if you can verify that the sht and ops don't change

Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables

2008-02-08 Thread Tejun Heo
Jeff Garzik wrote: Tejun Heo wrote: diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 07dcaf6..08301ca 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -351,6 +351,8 @@ static const struct ata_port_operations ahci_vt8251_ops = { .port_suspend

Re: [PATCH 7/9] libata: stop overloading port_info-private_data

2008-02-08 Thread Tejun Heo
Alan Cox wrote: On Wed, 30 Jan 2008 18:29:01 +0900 Tejun Heo [EMAIL PROTECTED] wrote: port_info-private_data is currently used for two purposes - to record private data about the port_info or to specify host-private_data to use when allocating ata_host. Sensible point, horrible

Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables

2008-02-08 Thread Tejun Heo
Alan Cox wrote: * Every driver for SFF controllers now uses ata_pci_default_filter() unless the driver has custom implementation. That is only needed for DMA capable devices. I guess it does no harm to be consistent and call it anyway but you then say .. Yeah, it's kind of fuzzy to

Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables

2008-02-08 Thread Tejun Heo
Tejun Heo wrote: * No reason to set ata_pci_default_filter() for PIO-only drivers. and your patches add the calls for the CS5520 ? diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index 972ed9f..5614e76 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c

Re: slow resume from s2ram

2008-02-06 Thread Tejun Heo
Brian Keck wrote: Hello, I can't get my otherwise lovely debian/sid Vaio TX17 to resume promptly from suspend-to-ram. Until recently it resumed at all maybe 1 in 4 times from 's2ram -f -p' in X, always taking several minutes, apparently due to the hard disk (1.8 Toshiba

[PATCH] ahci: fix CAP.NP and PI handling

2008-02-06 Thread Tejun Heo
as the maximum port of what CAP.NP and PI indicate. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Jan Beulich [EMAIL PROTECTED] --- drivers/ata/ahci.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c

[PATCH #upstream-fixes] pata_via: fix SATA cable detection on cx700

2008-02-06 Thread Tejun Heo
The first port of cx700 is SATA. Fix cable detection. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/pata_via.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 39627ab..d119a68 100644 --- a/drivers/ata

[PATCH #upstream-fixes] libata: ignore deverr on SETXFER if mode is configured

2008-02-06 Thread Tejun Heo
kernel bugzilla bug 8563. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Alan Cox [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 48 +++--- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
Tejun Heo wrote: Some ATA controllers including SFF BMDMA and libata PIO HSM need the number of bytes mapped in the sg table. Yeah, it can be calculated with a simple macro but it also is a fundamentally confusing dual-sizing which should be made as clear as possible. Plus, it can

Re: AHCI driver preferring nr_ports over port map

2008-02-04 Thread Tejun Heo
Jan Beulich wrote: Do you have any real case where the above behavior causes problem? It's not strictly a problem (i.e. nothing really mis-behaves), but it made me wonder why the box I saw this on gets 6 ahci device instances set up when spec as well as port map say there ought to be only 5.

Re: AHCI driver preferring nr_ports over port map

2008-02-04 Thread Tejun Heo
Jan Beulich wrote: I understand your concern, but I think you also understand mine. So I'm not really asking for general reversal of the logic, but to perhaps make it just a little smarter. The (not generally usable according to what you said earlier) experiment I made was to use the smaller

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
And, here's working version. I'll splite and post them tomorrow. Thanks. Index: work/block/blk-core.c === --- work.orig/block/blk-core.c +++ work/block/blk-core.c @@ -116,6 +116,7 @@ void rq_init(struct request_queue *q, st

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
Hello, James Bottomley wrote: No, it doesn't. Drain needs to extend the sg table too The patches do extend the sg table. Hmm... Where? and it makes controllers lax about buffer overruns for commands they shouldn't be. So adjust the qc-nbytes to show no drain element in libata ...

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
James Bottomley wrote: No, it doesn't. Drain needs to extend the sg table too The patches do extend the sg table. Hmm... Where? It's the block component; it's already in git head with this patch: commit fa0ccd837e3dddb44c7db2f128a8bb7e4eabc21a Author: James Bottomley [EMAIL PROTECTED]

libata: kill now unused n_iter and fix sata_fsl

2008-02-04 Thread Tejun Heo
. Separated out by me. Signed-off-by: James Bottomley [EMAIL PROTECTED] Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Li Yang [EMAIL PROTECTED] --- drivers/ata/sata_fsl.c |4 ++-- include/linux/libata.h |2 -- 2 files changed, 2 insertions(+), 4 deletions(-) Index: work/drivers/ata

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
James Bottomley wrote: Oops, I was talking about padding. Sorry about that. Oh, OK ... the I thought the changelog was pretty explicit. However, it works because the dma_aligment parameter of the block layer ensures that all elements of the sg list begin and end on an address that conforms

[PATCH 3/5] block: implement request_queue-dma_drain_needed

2008-02-04 Thread Tejun Heo
Draining shouldn't be done for commands where overflow may indicate data integrity issues. Add dma_drain_needed callback to request_queue. Drain buffer is appened iff this function returns non-zero. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: James Bottomley [EMAIL PROTECTED] --- block/blk

[PATCH 1/5] block: update bio according to DMA alignment padding

2008-02-04 Thread Tejun Heo
of the request to make this padding visible to lower layers. This patch makes blk_rq_map_user() extend the last bio such that it includes the padding area and the size of area pointed to by the request is properly aligned. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: James Bottomley [EMAIL

[PATCHSET #upstream] block/libata: update and use block layer padding and draining

2008-02-04 Thread Tejun Heo
This patchset updates block layer padding and draining support and make libata use it. It's based on James Bottomley's initial work and, of the five, the last two patches are from James with some modifications. Please read the following thread for more info.

[PATCH 2/5] block: add request-raw_data_len

2008-02-04 Thread Tejun Heo
or device. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: James Bottomley [EMAIL PROTECTED] --- block/blk-core.c|2 ++ block/blk-map.c |2 ++ block/blk-merge.c |1 + block/bsg.c |8 block/scsi_ioctl.c |3 ++- drivers/scsi

[PATCH 4/5] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
[EMAIL PROTECTED] Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/ahci.c|5 -- drivers/ata/libata-core.c | 145 +++-- drivers/ata/libata-scsi.c | 23 ++- drivers/ata/pata_icside.c |8 -- drivers/ata/sata_fsl.c

[PATCH 5/5] libata: implement drain buffers

2008-02-04 Thread Tejun Heo
. * ata_dev_printk() used instead of sdev_printk(). Signed-off-by: James Bottomley [EMAIL PROTECTED] Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-scsi.c | 41 +++-- 1 files changed, 35 insertions(+), 6 deletions(-) diff --git a/drivers/ata/libata

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-03 Thread Tejun Heo
James Bottomley wrote: I'm reluctant to add another parameter to the request, but this one you can calculate: you just do it wherever you work out the size of the request. If data_len is the true data length and total_data_len is the data length plus the drain length, the calculation

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-03 Thread Tejun Heo
James Bottomley wrote: I'm only really going by what Tejun says about AHCI. The problem as I understand it is data overrun on PIO mode commands. AHCI apparently (like aic94xx) processes these internally and doesn't actually use the libata pio handlers, so it just uses an internal buffer to

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-03 Thread Tejun Heo
James Bottomley wrote: On Mon, 2008-02-04 at 00:14 +0900, Tejun Heo wrote: James Bottomley wrote: I'm reluctant to add another parameter to the request, but this one you can calculate: you just do it wherever you work out the size of the request. If data_len is the true data length

Re: AHCI driver preferring nr_ports over port map

2008-02-02 Thread Tejun Heo
Jan Beulich wrote: Jeff, while I realize that Intel's documentation may not be consistent with anything more generic (which I don't know where to look for), this current behavior seems to contradict what Intel documents for ESB2: 23.3.1.4 PI – Ports Implemented Register (D31:F2) Address

Re: PROBLEM: SATA hotplugging not working with nForce MCP61

2008-02-02 Thread Tejun Heo
Tuomas Jormola wrote: 00:08.0 IDE interface [0101]: nVidia Corporation MCP61 SATA Controller [10de:03f6] (rev a2) 00:08.1 IDE interface [0101]: nVidia Corporation MCP61 SATA Controller [10de:03f6] (rev a2) That's MCP61 which is GENERIC variant in sata_nv which does not support hotplugging.

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-02 Thread Tejun Heo
James Bottomley wrote: On Fri, 2008-02-01 at 15:02 -0500, Jeff Garzik wrote: James Bottomley wrote: Could we please get this in ... I thought I mentioned several times that it fixes a fatal oops in both aic94xx and ipr. Tejun has a persistent objection... see other email. Actually, see

  1   2   3   4   5   6   7   8   9   10   >