Re: Need help with libata error handling in libsas
James Bottomley wrote: On Mon, 2008-02-25 at 10:34 -0600, Brian King wrote: The new libata-eh is used for more than just EH. It is used for device probing, device revalidation, and power management. It is also woken for all command failures and is where the request sense for ATAPI devices is issued. Device revalidation following reset is also critical for ATA and ATAPI devices. One example of this is some SATA/PATA converter chips lose their DMA xfer settings following a reset and default to PIO mode only. Any DMA transfer that is attempted simply hangs. Strongly seconded. Doing your own ATA EH would be foolish, as that would imply duplicating all that carefully-time-tested logic handling devices which follow the ATA specs... about 98% of the time :) Just the set-transfer-mode logic took years to get right for the majority of ATA devices. OK ... I'm grepping around in the source trying to figure out all of this. Is it documented anywhere? That would really help me out at the moment. Unfortunately, not really. The simplistic version is... freeze, set some flags, call a function to schedule EH as needed -- most notably when your HBA signals an ATA device error or some other error in the ATA domain. Regardless of all this... libsas IMO will cause some libata-EH growing pains. libsas needs libata-EH for probing, revalidation, initialization, etc. But libsas probably does NOT need libata-EH for certain duties like SATA PHY diagnosis and link handling. libsas needs libata-EH. Unfortunately for libsas, libata-EH was written from the libata controls the world point of view, and probably needs some modifications to play well in the new SATA/SAS shared worldview. Brian's recommendation is quite sane... your -error_handler() probably just needs hard reset (aka COMRESET) capability. Jeff - 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
Re: new regression in 2.6.25-rc3: can't resume from suspend to ram, ata1 errors
Michael S. Tsirkin wrote: git bisect points at this commit: commit 559bbe6cbd0d8c68d40076a5f7dc98e3bf5864b2. power_state: get rid of write-only variable in SATA Hello Pavel -- It looks like this not a write-only variable after all... Jeff - 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
[git patches] libata updates
(additional explanation for the revert is in the full changeset description) Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus to receive the following updates: drivers/ata/libata-core.c |5 - drivers/ata/libata.h |1 - 2 files changed, 4 insertions(+), 2 deletions(-) Adrian Bunk (1): make atapi_dmadir static Jeff Garzik (1): Revert power_state: get rid of write-only variable in SATA diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index fbc2435..4fbcce7 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -113,7 +113,7 @@ int atapi_enabled = 1; module_param(atapi_enabled, int, 0444); MODULE_PARM_DESC(atapi_enabled, Enable discovery of ATAPI devices (0=off, 1=on)); -int atapi_dmadir = 0; +static int atapi_dmadir = 0; module_param(atapi_dmadir, int, 0444); MODULE_PARM_DESC(atapi_dmadir, Enable ATAPI DMADIR bridge support (0=off, 1=on)); @@ -6567,6 +6567,8 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg) ata_lpm_enable(host); rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); + if (rc == 0) + host-dev-power.power_state = mesg; return rc; } @@ -6585,6 +6587,7 @@ void ata_host_resume(struct ata_host *host) { ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); + host-dev-power.power_state = PMSG_ON; /* reenable link pm */ ata_lpm_disable(host); diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 6036ded..aa884f7 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -56,7 +56,6 @@ enum { extern unsigned int ata_print_id; extern struct workqueue_struct *ata_aux_wq; extern int atapi_enabled; -extern int atapi_dmadir; extern int atapi_passthru16; extern int libata_fua; extern int libata_noacpi; - 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
Re: [ugly patch] Save .15W-.5W by AHCI powersaving
Mark Lord wrote: Pavel Machek wrote: This is a patch (very ugly, assumes you have just one disk) to bring powersaving to AHCI. You need Alan's SCSI autosuspend (attached) patch as a base. It saves .5W compared to config with disk spinning, and even .15W compared to hdparm -y... on my thinkpad x60 anyway. .. There was a discussion of this here today. It makes good use of AHCI-specific features. Has it been tested with a Port-Multiplier yet? This is cool enough that we really ought to do a hardware-independent version, so that all SATA interfaces could benefit. Especially ata_piix, but others too. BTW we can also save power by allowing the user to choose to disable hotplugging support. Then we can power down PHYs that are not in use. That requires the addition of some policy controls, because it is user-specific whether or not to waste power waiting for a plug-in event. Jeff - 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
Re: achi.c bug ?
chaoyang wang wrote: Dear Jeff, I was looking at the kernel 2.6.21 code of the achi driver and found that the sg_table_size was set to 168, while the libata set the maximum sg to be 128 somewhere else. When a requester issues a request with 128 sgs to the ahci attached device, the system would fall to a scilent error. So, I could not count on the scsi probe of scsi_device--host-sg_tablesize that was read from achi. Any advise on the better fix? Thanks you very much, Can you be more specific about somewhere else? Reducing s/g table size should be quite safe. Jeff - 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
Re: ULI 5288(SATA driver)
Saumendra Dash wrote: Hi Jeff, I'm working on ULI1575 SATA driver which I want to run in Emulated-PATA mode. I have the following understanding to run a SATA device in Emulated-PATA mode: 1. In Emulated-PATA mode the legacy IDE driver should access the SATA device directly in combined mode. 2. The class code of the device shlould be set to Emulated-PATA mode(0x0185). 3. Enable SATA in combine mode. After doing the above changes the driver does not work in Emulated-PATA mode. Is there something missing to make the driver work in Emulated-PATA mode? Use a PCI quirk to unconditionally disable emulated PATA mode, because it's not needed. Jeff - 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
Re: Sata-MV, Intergated Sata Device Support
Jon Li wrote: Hello, I am curious as to whether there are plans to add support for integrated sata devices. I personally want to add support for a 60x1C0 based device (pci:id = 0x5182). I think adding support should be relatively simple, except for a few issues outlined below. In the original mvSata.c (ver3.4) that has 0x5182 support, the config space is as such: case MV_SATA_DEVICE_ID_5182: pAdapter-numberOfChannels = MV_SATA_5182_PORT_NUM; pAdapter-numberOfUnits = 1; pAdapter-portsPerUnit = 2; pAdapter-sataAdapterGeneration = MV_SATA_GEN_IIE; /*The integrated sata core chip based on 60x1 C0*/ pAdapter-chipIs60X1C0 = MV_TRUE; pAdapter-hostInterface = MV_HOST_IF_INTEGRATED; pAdapter-mainMaskOffset = 0x20024; /*the iobaseaddress is 0x6*/ pAdapter-mainCauseOffset = 0x20020; break; I have not yet figured out how all these values are defined in sata-mv.c (ver 0.8). Specifically, where do I define numberOfChannels which should equal 2, and numberOfUnits which obviously equals 1? I have a current config space (not completed) for sata-mv.c which is: { /* chip_5182 */ .sht= mv_sht, .flags = (MV_COMMON_FLAGS | MV_6XXX_FLAGS | MV_FLAG_DUAL_HC), .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 */ .port_ops = mv6_ops, }, I believe according to the new structure in sata-mv.c, HC_MAIN_IRQ_CAUSE_OFS should equal 0x20020 and HC_MAIN_IRQ_MASK_OFS should equal 0x20024 for the 0x5182 device. My final question is how to implement the MV_HOST_IF_INTEGRATED flag? Is this already implemented and renamed in sata-mv.c? Or do I need to also add the routines? I just wanted to point the current sata_mv hackers to this message from April 2007... Jeff - 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
Re: [RFC] Disk shock protection (revisited)
Elias Oltmanns wrote: The general idea: A daemon running in user space monitors input data from an accelerometer. When the daemon detects a critical condition, i.e., a sudden acceleration (for instance, laptop slides off the desk), it signals the kernel so the hard disk may be put into a (more) safe state. To this end, the kernel has to issue an idle immediate command with unload feature and stop the block layer queue afterwards. Once the daemon tells us that the imminent danger is over, the most important task for the kernel is to restart the block layer queue. See below for more details. Speaking specifically to that problem, it seems to me that you either want an mlock'd daemon, or just simply to keep everything in the kernel, for this specific solution. You don't want, for example, to swap out other apps, swap in the daemon, in order to handle a sudden acceleration. Jeff - 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
Re: Sata-MV, Intergated Sata Device Support
Mark Lord wrote: Jeff Garzik wrote: Jon Li wrote: Hello, I am curious as to whether there are plans to add support for integrated sata devices. I personally want to add support for a 60x1C0 based device (pci:id = 0x5182). I think adding support should be relatively simple, except for a few issues outlined below. In the original mvSata.c (ver3.4) that has 0x5182 support, the config space is as such: case MV_SATA_DEVICE_ID_5182: pAdapter-numberOfChannels = MV_SATA_5182_PORT_NUM; pAdapter-numberOfUnits = 1; pAdapter-portsPerUnit = 2; pAdapter-sataAdapterGeneration = MV_SATA_GEN_IIE; /*The integrated sata core chip based on 60x1 C0*/ pAdapter-chipIs60X1C0 = MV_TRUE; pAdapter-hostInterface = MV_HOST_IF_INTEGRATED; pAdapter-mainMaskOffset = 0x20024; /*the iobaseaddress is 0x6*/ pAdapter-mainCauseOffset = 0x20020; break; I have not yet figured out how all these values are defined in sata-mv.c (ver 0.8). Specifically, where do I define numberOfChannels which should equal 2, and numberOfUnits which obviously equals 1? I have a current config space (not completed) for sata-mv.c which is: { /* chip_5182 */ .sht= mv_sht, .flags= (MV_COMMON_FLAGS | MV_6XXX_FLAGS | MV_FLAG_DUAL_HC), .pio_mask= 0x1f,/* pio0-4 */ .udma_mask= 0x7f,/* udma0-6 */ .port_ops= mv6_ops, }, ... Saeed: isn't this what your SOC patches already implemented for us? As near as I can tell, sata_mv now already has support for the 60x1C0. Saeed's stuff didn't support PCI though, and Jon Li is definitely talking about PCI... Jeff - 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
Re: libata .sg_tablesize: why always dividing by 2 ?
As an aside, ISTR tomo-san was working on eliminating the need for the /2 by tackling the details on the IOMMU side... Jeff - 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
Re: new ata_port_operations for .pmp_{read,write} ?
Mark Lord wrote: Jeff Garzik wrote: Tejun Heo wrote: Yeah, exactly. I think what needs to be done is to separate out SFF assumptions from core layer, factor out SFF-proper helpers and use them to implement LLDs for quasi-SFF controllers. Thinking long term, I continue to hope that SFF support can eventually be separate into a sub-API, allowing people to disable (at compile time) SFF support completely if they don't need it. .. I can think of a few more pressing things to disable before that. Like ACPI and PMP. Modularizing those (or more crudely de-selecting them at build time) would save a lot of memory on small embedded boxes. Sure. Make these options dependent on CONFIG_EMBEDDED, and go to town from there... Jeff - 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
Re: new ata_port_operations for .pmp_{read,write} ?
To repeat myself from threads past... In particular with the Marvell 6440 (SATA/SAS, drivers/scsi/mvsas.c) when SATA PMP support is completed, we will want to look at passing things other than normal ATA commands via -qc_issue. Although selection isn't necessarily, talking to a PMP is fundamentally an asynchronous, event-driven operation just like any other FIS conversation. We don't need to be adding hooks for each new and interesting type of FIS sent across the wire. That just leads to an awful API. Jeff - 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
Re: power_state: get rid of write-only variable in SATA
Pavel Machek wrote: power_state is scheduled for removal, and libata uses it in write-only mode. Remove it. Signed-off-by: Pavel Machek [EMAIL PROTECTED] diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b4985bc..a31572d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6542,8 +6542,6 @@ int ata_host_suspend(struct ata_host *ho ata_lpm_enable(host); rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); - if (rc == 0) - host-dev-power.power_state = mesg; return rc; } @@ -6562,7 +6560,6 @@ void ata_host_resume(struct ata_host *ho { ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); - host-dev-power.power_state = PMSG_ON; 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata: automatically use DMADIR if drive/bridge requires it
Tejun Heo wrote: Back in 2.6.17-rc2, a libata module parameter was added for atapi_dmadir. That's nice, but most SATA devices which need it will tell us about it in their IDENTIFY PACKET response, as bit-15 of word-62 of the returned data (as per ATA7, ATA8 specifications). So for those which specify it, we should automatically use the DMADIR bit. Otherwise, disc writing will fail by default on many SATA-ATAPI drives. This patch adds ATA_DFLAG_DMADIR and make ata_dev_configure() set it if atapi_dmadir is set or identify data indicates DMADIR is necessary. atapi_xlat() is converted to check 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-scsi.c |3 ++- include/linux/ata.h |5 + include/linux/libata.h|1 + 4 files changed, 17 insertions(+), 3 deletions(-) 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-pmp: clear hob for pmp register accesses
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 interrogates the PM registers. It successfully reads register 0, and then register 1. But all subsequent registers read out (incorrectly) as zeros. .. Saeed has confirmed this behaviour with a SATA analyzer. The Marvell port-multiplier apparently likes to see clean HOB information when accessing PMP registers. Since sata_mv uses PIO shadow register access, this doesn't happen automatically, as it might in a more purely FIS-based driver (eg. ahci). One way to fix this is to flag these commands with ATA_TFLAG_LBA48, forcing libata to write out the HOB fields with known (zero) values. Signed-off-by: Saeed Bishara [EMAIL PROTECTED] Acked-by: Mark Lord [EMAIL PROTECTED] --- drivers/ata/libata-pmp.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] AMD SB700/SB800 SATA support 64bit DMA
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. Thanks Shane CUT HERE 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] 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] sata_fsl: fix build with ATA_VERBOSE_DEBUG
Anton Vorontsov wrote: This patch fixes build and few warnings when ATA_VERBOSE_DEBUG is defined: CC drivers/ata/sata_fsl.o drivers/ata/sata_fsl.c: In function ‘sata_fsl_fill_sg’: drivers/ata/sata_fsl.c:338: warning: format ‘%x’ expects type ‘unsigned int’, but argument 3 has type ‘void *’ drivers/ata/sata_fsl.c:338: warning: format ‘%x’ expects type ‘unsigned int’, but argument 4 has type ‘struct prde *’ drivers/ata/sata_fsl.c: In function ‘sata_fsl_qc_issue’: drivers/ata/sata_fsl.c:459: error: ‘csr_base’ undeclared (first use in this function) drivers/ata/sata_fsl.c:459: error: (Each undeclared identifier is reported only once drivers/ata/sata_fsl.c:459: error: for each function it appears in.) drivers/ata/sata_fsl.c: In function ‘sata_fsl_freeze’: drivers/ata/sata_fsl.c:525: error: ‘csr_base’ undeclared (first use in this function) make[2]: *** [drivers/ata/sata_fsl.o] Error 1 Signed-off-by: Anton Vorontsov [EMAIL PROTECTED] --- drivers/ata/sata_fsl.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-core: fix kernel-doc warning
Randy Dunlap wrote: From: Randy Dunlap [EMAIL PROTECTED] Fix libata-core kernel-doc warning: Warning(linux-2.6.25-rc2-git6//drivers/ata/libata-core.c:168): No description found for parameter 'ap' Signed-off-by: Randy Dunlap [EMAIL PROTECTED] --- drivers/ata/libata-core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.25-rc2-git6.orig/drivers/ata/libata-core.c +++ linux-2.6.25-rc2-git6/drivers/ata/libata-core.c @@ -153,7 +153,7 @@ MODULE_VERSION(DRV_VERSION); /** * ata_force_cbl - force cable type according to libata.force - * @link: ATA link of interest + * @ap: ATA port of interest * 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 http://vger.kernel.org/majordomo-info.html
[git patches] libata fixes
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus to receive the following updates: drivers/ata/ahci.c| 23 +-- drivers/ata/libata-core.c | 16 ++-- drivers/ata/libata-pmp.c |4 ++-- drivers/ata/libata-scsi.c |3 ++- drivers/ata/pata_atiixp.c |4 ++-- drivers/ata/sata_fsl.c|8 +--- include/linux/ata.h |5 + include/linux/libata.h|1 + 8 files changed, 44 insertions(+), 20 deletions(-) Alan Cox (1): pata_atiixp: Use 255 sector limit Anton Vorontsov (1): sata_fsl: fix build with ATA_VERBOSE_DEBUG Mark Lord (1): libata-pmp: clear hob for pmp register accesses Pavel Machek (1): power_state: get rid of write-only variable in SATA Randy Dunlap (1): libata-core: fix kernel-doc warning Shane Huang (1): [libata] ahci: AMD SB700/SB800 SATA support 64bit DMA Tejun Heo (1): libata: automatically use DMADIR if drive/bridge requires it diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 6dd12f7..1db93b6 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -85,6 +85,7 @@ enum { board_ahci_ign_iferr= 2, board_ahci_sb600= 3, board_ahci_mv = 4, + board_ahci_sb700= 5, /* global controller registers */ HOST_CAP= 0x00, /* host capabilities */ @@ -442,6 +443,16 @@ static const struct ata_port_info ahci_port_info[] = { .udma_mask = ATA_UDMA6, .port_ops = ahci_ops, }, + /* board_ahci_sb700 */ + { + AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | +AHCI_HFLAG_NO_PMP), + .flags = AHCI_FLAG_COMMON, + .link_flags = AHCI_LFLAG_COMMON, + .pio_mask = 0x1f, /* pio0-4 */ + .udma_mask = ATA_UDMA6, + .port_ops = ahci_ops, + }, }; static const struct pci_device_id ahci_pci_tbl[] = { @@ -484,12 +495,12 @@ static const struct pci_device_id ahci_pci_tbl[] = { /* ATI */ { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */ - { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb600 }, /* ATI SB700/800 */ - { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb600 }, /* ATI SB700/800 */ - { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb600 }, /* ATI SB700/800 */ - { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb600 }, /* ATI SB700/800 */ - { PCI_VDEVICE(ATI, 0x4394), board_ahci_sb600 }, /* ATI SB700/800 */ - { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb600 }, /* ATI SB700/800 */ + { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700 }, /* ATI SB700/800 */ + { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb700 }, /* ATI SB700/800 */ + { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb700 }, /* ATI SB700/800 */ + { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb700 }, /* ATI SB700/800 */ + { PCI_VDEVICE(ATI, 0x4394), board_ahci_sb700 }, /* ATI SB700/800 */ + { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */ /* VIA */ { PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */ diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4cf8662..fbc2435 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -153,7 +153,7 @@ MODULE_VERSION(DRV_VERSION); /** * ata_force_cbl - force cable type according to libata.force - * @link: ATA link of interest + * @ap: ATA port of interest * * Force cable type according to libata.force and whine about it. * The last entry which has matching port number is used, so it @@ -2396,6 +2396,7 @@ int ata_dev_configure(struct ata_device *dev) else if (dev-class == ATA_DEV_ATAPI) { const char *cdb_intr_string = ; const char *atapi_an_string = ; + const char *dma_dir_string = ; u32 sntf; rc = atapi_cdb_len(id); @@ -2436,13 +2437,19 @@ int ata_dev_configure(struct ata_device *dev) cdb_intr_string = , CDB intr; } + if (atapi_dmadir || atapi_id_dmadir(dev-id)) { + dev-flags |= ATA_DFLAG_DMADIR; + dma_dir_string = , DMADIR; + } + /* print device info to dmesg */ if (ata_msg_drv(ap) print_info) ata_dev_printk(dev, KERN_INFO, - ATAPI: %s, %s, max %s%s%s\n, + ATAPI: %s, %s, max %s%s%s%s\n, modelbuf, fwrevbuf, ata_mode_string(xfer_mask), - cdb_intr_string, atapi_an_string); + cdb_intr_string,
Re: new ata_port_operations for .pmp_{read,write} ?
Tejun Heo wrote: Yeah, exactly. I think what needs to be done is to separate out SFF assumptions from core layer, factor out SFF-proper helpers and use them to implement LLDs for quasi-SFF controllers. Thinking long term, I continue to hope that SFF support can eventually be separate into a sub-API, allowing people to disable (at compile time) SFF support completely if they don't need it. Jeff - 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
Re: [PATCH] libata: automatically use DMADIR if drive/bridge requires it
Mark Lord wrote: Albert Lee wrote: Tejun Heo wrote: Back in 2.6.17-rc2, a libata module parameter was added for atapi_dmadir. That's nice, but most SATA devices which need it will tell us about it in their IDENTIFY PACKET response, as bit-15 of word-62 of the returned data (as per ATA7, ATA8 specifications). So for those which specify it, we should automatically use the DMADIR bit. Otherwise, disc writing will fail by default on many SATA-ATAPI drives. This patch adds ATA_DFLAG_DMADIR and make ata_dev_configure() set it if atapi_dmadir is set or identify data indicates DMADIR is necessary. atapi_xlat() is converted to check 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. The patch looks good. However, it seems there is no realworld IDE-to-SATA bridge that requires DMADIR and also mangles IDENTIFY PACKET bit-15 of word-62 to indicate its presence. From the previous test of the IDE-to-SATA bridges, only the Sil 3611 requires the host software to hint on ATAPI DMADIR. But Sil 3611 doesn't mangle IDENTIFY PACKET word-62: http://www.spinics.net/lists/linux-ide/msg01514.html .. Ahh, great! We have history here! But there are more SATA bridges out there than the ones Alber has there (SiI 3611/3811, Marvell 88i8030/88SA8040, Acard ARC770, JMicron JM20330). There's the Marvell 88SA8050, and I have a funky looking thing here that says SataLink SPiF223A on it (). I wonder what it does? And how many other ones are there? The Word62 patch (from Tejun) is simple enough that the complexity point from before really doesn't hold water. I'm going to apply Tejun's patch. It's fine (as I noted I conditionally ACK'd your original patch). My opinion, though, it that this is merely coding to the spec, rather than making a bunch of real-world hardware work. All the SATA-PATA bridges I have, that support ATAPI, do not flag DMADIR. Jeff - 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
Re: 2.6.25-rc2 + smartd = hang
Anders Eriksson wrote: Hi, Trying out 2.6.25-rc2 smartd always causes my box to hang. I can switch vt:s and the keyboard seems to work. Using sysrq-e I noticed a callpath open - ext3 - journals - sync_buffer - io_scheduel - generic_unplig_device. I'd guess the open stems from smartd. Removing smartd from the startup, I'm now using rc2 fine... I got a nice jpg showing it as well. The sysrq-e output is probably just standard ext3 journalling unrelated to the problem... what does dmesg say? lspci? What's your hardware setup? Jeff - 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
Re: 2.6.25-rc2 + smartd = hang
Anders Eriksson wrote: Is smartd prepared to handle /dev/sdX style devices? Yes. You need to pass -d ata to smartd and smartctl, if your scripts are not already doing so. If this is the prefered driver these days, maybe it shouldn't be marked experimental in the menu anymore? It's not marked experimental. Jeff - 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
Re: new ata_port_operations for .pmp_{read,write} ?
Tejun Heo wrote: Yeah, this is an interesting problem. There are basically multiple sets of TF registers and the SFF way of assuming single set doesn't really work well and I don't really think adding -pmp_read/write is the correct long term solution to the problem. We need to confine direct TF register accesses to SFF layer only as controllers which don't implement SFF interface may or may not emulate TF registers and even when they do, it sometimes can't really match the SFF behavior. Strongly agreed. I wish things are a bit clearer now. I think the problem here is that we're assuming SFF TF access on controllers which aren't really SFF. For sil24 and ahci, the driver emulates it and it isn't too difficult. The picture gets more interesting for sata_mv as its hardware interface much closer to SFF than sil24 or ahci and TF registers matter much more. For ahci and sil24, LLD can just fool libata core layer which assumes ubiquitous TF access. TF registers don't really matter to controller operation anyway and feeding bogus values work well. For sata_mv, it's different. Those registers are integral part of controller operation and sata_mv can't really tolerate core layer stepping in w/o notifying LLD. I would definitely like to move away from the model where non-SFF drivers have to emulate SFF in any way. Re-reviewing the code, I don't see a lot of TF accesses outside of SFF-specific code, so we are already in pretty good shape. I think the picture gets more complicated with sata_mv and similar drivers (soon sata_svw, too), because they use the SFF code but only for certain TF protocols. The emulation question is not as clear, with those drivers. Jeff - 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
Re: power_state: get rid of write-only variable in SATA
Pavel Machek wrote: power_state is scheduled for removal, and libata uses it in write-only mode. Remove it. Signed-off-by: Pavel Machek [EMAIL PROTECTED] diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b4985bc..a31572d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6542,8 +6542,6 @@ int ata_host_suspend(struct ata_host *ho ata_lpm_enable(host); rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); - if (rc == 0) - host-dev-power.power_state = mesg; return rc; } @@ -6562,7 +6560,6 @@ void ata_host_resume(struct ata_host *ho { ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); - host-dev-power.power_state = PMSG_ON; /* reenable link pm */ ata_lpm_disable(host); libata uses it under the assumption that other parts of the system are aware of this variable. May I assume that the API has changed such that this is no longer necessary? Jeff - 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
Re: [PATCH] AMD SB700/SB800 SATA support 64bit DMA
Huang, Shane wrote: OMG, but I modified my settings and verified that the patch can really work here before I sent it to you... It's word-wrapping, and also quoting a bunch of characters, which make it difficult for tools to pick up: @ -85,6 +85,7 @@ board_ahci_ign_iferr=3D 2, board_ahci_sb600=3D 3, board_ahci_mv =3D 4, + board_ahci_sb700=3D 5, =20 That =3D and =20 stuff was added by your mailer (normal MIME email quoted-printable quoting) Jeff - 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
Re: [PATCH 11/11v2] ata: fix sparse warnings in pata_legacy.c
Harvey Harrison wrote: Use ld_qdi and ld_winbond to avoid shadowing static int variables qdi and winbond. The ld_ prefix refers to legacy_data. drivers/ata/pata_legacy.c:777:21: warning: symbol 'qdi' shadows an earlier one drivers/ata/pata_legacy.c:128:12: originally declared here drivers/ata/pata_legacy.c:811:21: warning: symbol 'qdi' shadows an earlier one drivers/ata/pata_legacy.c:128:12: originally declared here drivers/ata/pata_legacy.c:848:21: warning: symbol 'qdi' shadows an earlier one drivers/ata/pata_legacy.c:128:12: originally declared here drivers/ata/pata_legacy.c:882:21: warning: symbol 'qdi' shadows an earlier one drivers/ata/pata_legacy.c:128:12: originally declared here drivers/ata/pata_legacy.c:1040:21: warning: symbol 'winbond' shadows an earlier one drivers/ata/pata_legacy.c:129:12: originally declared here Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Alan Cox's suggestion of using a ld_ prefix incorporated. 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] sata_mv: Define module alias for platform device
Martin Michlmayr wrote: The sata_mv driver can be loaded as a platform device, as is done by various Orion (ARM) based devices. The driver needs to define a module alias for the platform driver so udev will load it automatically. Tested with Debian on a QNAP TS-209. Signed-off-by: Martin Michlmayr [EMAIL PROTECTED] --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -3198,6 +3198,7 @@ MODULE_DESCRIPTION(SCSI low-level driver for Marvell SATA controllers); MODULE_LICENSE(GPL); MODULE_DEVICE_TABLE(pci, mv_pci_tbl); MODULE_VERSION(DRV_VERSION); +MODULE_ALIAS(platform:sata_mv); #ifdef CONFIG_PCI module_param(msi, int, 0444); 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] sata_mv: use hpriv-base instead of the host-iomap
Saeed Bishara wrote: this fixes crash bug as the iomap table is not valid for integrated controllers. Signed-off-by: Saeed Bishara [EMAIL PROTECTED] --- drivers/ata/sata_mv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 04b5717..9c9a5b0 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -870,7 +870,7 @@ static void mv_start_dma(struct ata_port *ap, void __iomem *port_mmio, struct mv_host_priv *hpriv = ap-host-private_data; int hard_port = mv_hardport_from_port(ap-port_no); void __iomem *hc_mmio = mv_hc_base_from_port( - ap-host-iomap[MV_PRIMARY_BAR], hard_port); + mv_host_base(ap-host), hard_port); u32 hc_irq_cause, ipending; 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ata: fix sparse warning in libata.h
Harvey Harrison wrote: Avoids lots of these, also is more readable. include/linux/libata.h:1210:13: warning: potentially expensive pointer subtraction Change the subtraction to addition on the other side of the comparison. Thanks to Christer Weinigel for the suggestion. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- include/linux/libata.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/libata.h b/include/linux/libata.h index bc5a8d0..a6243bb 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -1207,7 +1207,7 @@ static inline struct ata_link *ata_port_next_link(struct ata_link *link) return ap-pmp_link; } - if (++link - ap-pmp_link ap-nr_pmp_links) + if (++link ap-nr_pmp_links + ap-pmp_link) return link; 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-scsi: automatically use DMADIR if drive/bridge requires it
Mark Lord wrote: Back in 2.6.17-rc2, a libata module parameter was added for atapi_dmadir. That's nice, but most SATA devices which need it will tell us about it in their IDENTIFY PACKET response, as bit-15 of word-62 of the returned data (as per ATA7, ATA8 specifications). So for those which specify it, we should automatically use the DMADIR bit. Otherwise, disc writing will fail by default on many SATA-ATAPI drives. Signed-off-by: Mark Lord [EMAIL PROTECTED] --- old/drivers/ata/libata-scsi.c2008-02-18 14:45:08.0 -0500 +++ linux/drivers/ata/libata-scsi.c2008-02-18 14:53:02.0 -0500 @@ -2543,9 +2543,10 @@ qc-tf.protocol = ATAPI_PROT_DMA; qc-tf.feature |= ATAPI_PKT_DMA; -if (atapi_dmadir (scmd-sc_data_direction != DMA_TO_DEVICE)) -/* some SATA bridges need us to indicate data xfer direction */ -qc-tf.feature |= ATAPI_DMADIR; +/* some SATA bridges need us to indicate data xfer direction */ +if (atapi_dmadir || (dev-id[62] 0x8000)) +if (scmd-sc_data_direction != DMA_TO_DEVICE) +qc-tf.feature |= ATAPI_DMADIR; Regardless of the historical usage (or lack thereof) of that I.D. word, I would prefer 1) an ata version check 2) a simple wrapper in linux/ata.h, similar to the many that already exist So, conditional ACK... - 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
Re: [PATCH] sata_mv: remove iounmap in mv_platform_remove and use devm_iomap
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] --- drivers/ata/sata_mv.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) 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 http://vger.kernel.org/majordomo-info.html
[git patches] libata fixes
Note: Tejun's change is a feature addition, but one that is IMO important for debugging and serious-bug workarounds. It's self-contained and should not affect anyone not using the new parm. Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus to receive the following updates: Documentation/kernel-parameters.txt | 35 drivers/ata/libata-core.c | 380 ++- drivers/ata/libata-eh.c |8 +- drivers/ata/libata-scsi.c |2 +- drivers/ata/libata.h|1 + drivers/ata/pata_legacy.c | 44 ++-- drivers/ata/sata_mv.c |9 +- include/linux/libata.h |2 +- 8 files changed, 448 insertions(+), 33 deletions(-) Harvey Harrison (2): ata: fix sparse warnings in pata_legacy.c ata: fix sparse warning in libata.h Martin Michlmayr (1): sata_mv: Define module alias for platform device Randy Dunlap (1): libata: fix kernel-doc parameter warning Saeed Bishara (2): sata_mv: use hpriv-base instead of the host-iomap sata_mv: remove iounmap in mv_platform_remove and use devm_iomap Tejun Heo (1): libata: implement libata.force module parameter diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 7278295..9a5b665 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -950,6 +950,41 @@ and is between 256 and 4096 characters. It is defined in the file when set. Format: int + libata.force= [LIBATA] Force configurations. The format is comma + separated list of [ID:]VAL where ID is + PORT[:DEVICE]. PORT and DEVICE are decimal numbers + matching port, link or device. Basically, it matches + the ATA ID string printed on console by libata. If + the whole ID part is omitted, the last PORT and DEVICE + values are used. If ID hasn't been specified yet, the + configuration applies to all ports, links and devices. + + If only DEVICE is omitted, the parameter applies to + the port and all links and devices behind it. DEVICE + number of 0 either selects the first device or the + first fan-out link behind PMP device. It does not + select the host link. DEVICE number of 15 selects the + host link and device attached to it. + + The VAL specifies the configuration to force. As long + as there's no ambiguity shortcut notation is allowed. + For example, both 1.5 and 1.5G would work for 1.5Gbps. + The following configurations can be forced. + + * Cable type: 40c, 80c, short40c, unk, ign or sata. + Any ID with matching PORT is used. + + * SATA link speed limit: 1.5Gbps or 3.0Gbps. + + * Transfer mode: pio[0-7], mwdma[0-4] and udma[0-7]. + udma[/][16,25,33,44,66,100,133] notation is also + allowed. + + * [no]ncq: Turn on or off NCQ. + + If there are multiple matching configurations changing + the same attribute, the last one is used. + load_ramdisk= [RAM] List of ramdisks to load from floppy See Documentation/ramdisk.txt. diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index def3682..60d1bb5 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -87,6 +87,28 @@ static struct workqueue_struct *ata_wq; struct workqueue_struct *ata_aux_wq; +struct ata_force_param { + const char *name; + unsigned intcbl; + int spd_limit; + unsigned long xfer_mask; + unsigned inthorkage_on; + unsigned inthorkage_off; +}; + +struct ata_force_ent { + int port; + int device; + struct ata_force_param param; +}; + +static struct ata_force_ent *ata_force_tbl; +static int ata_force_tbl_size; + +static char ata_force_param_buf[PAGE_SIZE] __initdata; +module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0444); +MODULE_PARM_DESC(force, Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)); + int atapi_enabled = 1; module_param(atapi_enabled, int, 0444); MODULE_PARM_DESC(atapi_enabled, Enable discovery of ATAPI devices (0=off, 1=on)); @@ -130,6 +152,179 @@ MODULE_VERSION(DRV_VERSION); /** + *
Re: [PATCH] libata: fix kernel-doc parameter warning
Randy Dunlap wrote: From: Randy Dunlap [EMAIL PROTECTED] Fix libata kernel-doc parameter: Warning(linux-2.6.25-rc2-git3//drivers/ata/libata-scsi.c:845): No description found for parameter 'rq' Signed-off-by: Randy Dunlap [EMAIL PROTECTED] --- drivers/ata/libata-scsi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 http://vger.kernel.org/majordomo-info.html
Re: [RFC-UGLYPATCH] ata: small optimization in linux/libata.h
Harvey Harrison wrote: diff --git a/include/linux/libata.h b/include/linux/libata.h index 2845983..f0e1178 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -1211,7 +1211,7 @@ static inline struct ata_link *ata_port_next_link(struct ata_link *link) return ap-pmp_link; } - if (++link - ap-pmp_link ap-nr_pmp_links) + if ((char*)++link - (char *)ap-pmp_link ap-nr_pmp_links * sizeof(*link)) return link; I prefer the less ugly version :) - 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
Re: [PATCH] pata_cs5536.c bugfix
Martin K. Petersen wrote: Fix speed negotiation for secondary device. Signed-off-by: Martin K. Petersen [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 http://vger.kernel.org/majordomo-info.html
Re: [libata-dev #upstream-fixes] pata_legacy: don't call ata_host_detach() after initialization failure
Tejun Heo wrote: 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 PROTECTED] Cc: Ingo Molnar [EMAIL PROTECTED] Cc: Arjan van de Ven [EMAIL PROTECTED] --- drivers/ata/pata_legacy.c |2 -- 1 file changed, 2 deletions(-) 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] pata_scc.c: add thaw ops
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] --- diff -pu linux-2.6.25-rc1/drivers/ata/pata_scc.c linux-2.6.25-rc1_mod/drivers/ata/pata_scc.c --- linux-2.6.25-rc1/drivers/ata/pata_scc.c 2008-02-11 07:18:14.0 +0900 +++ linux-2.6.25-rc1_mod/drivers/ata/pata_scc.c 2008-02-13 11:37:34.0 +0900 @@ -1007,6 +1007,8 @@ static const struct ata_port_operations .qc_issue = ata_qc_issue_prot, .freeze = scc_bmdma_freeze, + .thaw = ata_bmdma_thaw, + .error_handler = scc_error_handler, .post_internal_cmd = scc_bmdma_stop, 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 06/11] ata: sparse fixes for pata_amd.c
Harvey Harrison wrote: drop return statement. drivers/ata/pata_amd.c:149:2: warning: returning void-valued expression Commit ce54d1616302117fa98513ae916bbe1c02ea pata_amd: update mode selection for NV PATAs added the initializer for nv_mode_filter but missed deleting the previously set mode_filter drivers/ata/pata_amd.c:509:3: warning: Initializer entry defined twice drivers/ata/pata_amd.c:521:3: also defined here drivers/ata/pata_amd.c:544:3: warning: Initializer entry defined twice drivers/ata/pata_amd.c:556:3: also defined here Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- drivers/ata/pata_amd.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) applied 6-10 - 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
Re: [PATCH 1/3] ata: make ata_scsiop_inq_89 static in libata-scsi.c
Harvey Harrison wrote: Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- drivers/ata/libata-scsi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) applied 1-2 of 3 - 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
Re: [PATCH 01/11] ata: fix sparse warning in ata_piix.c
Harvey Harrison wrote: drivers/ata/ata_piix.c:1655:8: warning: symbol 'rc' shadows an earlier one drivers/ata/ata_piix.c:1616:6: originally declared here Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- drivers/ata/ata_piix.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) applied 1-4 - 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
[git patches] libata fixes
Got another couple sata_mv fixes pending too... coming soon. Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus to receive the following updates: drivers/ata/ata_piix.c |2 +- drivers/ata/libata-core.c |1 - drivers/ata/libata-scsi.c |2 +- drivers/ata/pata_acpi.c|4 ++-- drivers/ata/pata_amd.c |7 ++- drivers/ata/pata_cs5536.c | 10 +- drivers/ata/pata_jmicron.c |3 ++- drivers/ata/pata_legacy.c |2 -- drivers/ata/pata_marvell.c |4 ++-- drivers/ata/pata_scc.c |2 ++ drivers/ata/sata_mv.c |4 ++-- drivers/ata/sata_promise.c |2 +- drivers/ata/sata_via.c |4 ++-- 13 files changed, 22 insertions(+), 25 deletions(-) Akira Iguchi (1): pata_scc.c: add thaw ops Harvey Harrison (11): ata: make ata_scsiop_inq_89 static in libata-scsi.c ata: fix sparse warning in libata-core.c ata: fix sparse warning in ata_piix.c ata: fix sparse warning in sata_promise.c ata: fix sparse warning in sata_via.c ata: fix sparse warnings in sata_mv.c ata: sparse fixes for pata_amd.c ata: fix sparse warning in pata_cs5536.c ata: fix sparse warning in pata_jmicron.c ata: fix sparse warning in pata_marvell.c ata: fix sparse warning in pata_acpi.c Martin K. Petersen (1): pata_cs5536.c bugfix Tejun Heo (1): pata_legacy: don't call ata_host_detach() after initialization failure diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 9c2515f..752e7d2 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -1652,7 +1652,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev, u8 tmp; pci_read_config_byte(pdev, PIIX_SCC, tmp); if (tmp == PIIX_AHCI_DEVICE) { - int rc = piix_disable_ahci(pdev); + rc = piix_disable_ahci(pdev); if (rc) return rc; } diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 004dae4..beaa3a9 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -7086,7 +7086,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) DPRINTK(probe begin\n); for (i = 0; i host-n_ports; i++) { struct ata_port *ap = host-ports[i]; - int rc; /* probe */ if (ap-ops-error_handler) { diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index c02c490..1cea18f 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -1862,7 +1862,7 @@ unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf, * spin_lock_irqsave(host lock) */ -unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf, +static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf, unsigned int buflen) { u8 pbuf[60]; diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c index 244098a..bdc3b9d 100644 --- a/drivers/ata/pata_acpi.c +++ b/drivers/ata/pata_acpi.c @@ -77,8 +77,8 @@ static int pacpi_cable_detect(struct ata_port *ap) static void pacpi_error_handler(struct ata_port *ap) { - return ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset, - NULL, ata_std_postreset); + ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset, NULL, + ata_std_postreset); } /** diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index ea567e2..4b8d9b5 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c @@ -146,9 +146,8 @@ static int amd_pre_reset(struct ata_link *link, unsigned long deadline) static void amd_error_handler(struct ata_port *ap) { - return ata_bmdma_drive_eh(ap, amd_pre_reset, - ata_std_softreset, NULL, - ata_std_postreset); + ata_bmdma_drive_eh(ap, amd_pre_reset, ata_std_softreset, NULL, + ata_std_postreset); } static int amd_cable_detect(struct ata_port *ap) @@ -506,7 +505,6 @@ static struct ata_port_operations amd133_port_ops = { static struct ata_port_operations nv100_port_ops = { .set_piomode= nv100_set_piomode, .set_dmamode= nv100_set_dmamode, - .mode_filter= ata_pci_default_filter, .tf_load= ata_tf_load, .tf_read= ata_tf_read, .check_status = ata_check_status, @@ -541,7 +539,6 @@ static struct ata_port_operations nv100_port_ops = { static struct ata_port_operations nv133_port_ops = { .set_piomode= nv133_set_piomode, .set_dmamode= nv133_set_dmamode, - .mode_filter= ata_pci_default_filter, .tf_load= ata_tf_load,
Re: linux-next: first tree
Stephen Rothwell wrote: Also, more trees please ... :-) Please add the 'NEXT' branch of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git to your list. This is a throwaway meta-branch that is rebased often. The 'master' branch of libata-dev.git always contains the base commit from torvalds/linux-2.6.git from which all other branches are based. I never ever commit to the 'master' branch, only update it from torvalds/linux-2.6.git. Andrew, I will continue to maintain the 'ALL' branch exactly as before. It may contain changes not suitable for 'NEXT', but suitable for -mm testing. In my new development process, things will almost always land in 'ALL' before 'NEXT'. Jeff - 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
Re: linux-next: first tree
Jeff Garzik wrote: Please add the 'NEXT' branch of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git to your list. This is a throwaway meta-branch that is rebased often. Additional FYI: Don't be worried if git diff master..NEXT is empty from time to time. This condition occurs whenever the 'NEXT' queue is empty. Jeff - 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
Re: linux-next: first tree
James Bottomley wrote: So does this indicate the meaning of upstream and upstream-fixes is still the same? I always took upstream-fixes to be bug fixes for this -rc and upstream as queued for the next merge window, in which case NEXT would be the union of those two sets? In practice, #upstream-fixes isn't very useful, because I send its contents to Linus very very rapidly once they are committed to that branch. I then locally delete that branch once Linus merges it, and re-create it [again, locally] the next time I have some bug fixes to apply. So it is a somewhat throwaway branch. The main utility of #upstream-fixes is so that I can do git branch upstream-linus upstream-fixes and then continue making commits in parallel with a Linus pull+push cycle. The #upstream branch is much more useful, because that is where things for the next kernel are stored, during a bug-fix-only cycle. This is largely equivalent to NEXT, though I plan to be more stringent in my requirements for NEXT commits than #upstream commits. One thing to note is that pure rebases are somewhat rare; I much prefer to wait until the batch of commits lands in torvalds/linux-2.6.git, before I blow away and recreate (with a new torvalds HEAD) the branch in question. So, to answer your question... Fixes should go upstream fast enough that they should hit NEXT implicitly via a Linus pull+push. It should be the union of two sets, yes, if a Linus cycle takes a long time. When both #upstream and #upstream-fixes are active, I tend to always branch #upstream off of #upstream-fixes and/or do a git pull . upstream-fixes when updating #upstream. Jeff - 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
Re: [PATCH] PCI subsystem: AMD SATA IDE mode quirk
Jeff Garzik wrote: Greg Kroah-Hartman (cc'd) needs to pick up your patch, since it is in the PCI side of the house... In addition to just waiting, it is normal to ping someone and/or resend the patch, if nothing happens in 1-2 weeks. Jeff - 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
Re: [PATCH] PCI subsystem: AMD SATA IDE mode quirk
Cai, Crane wrote: Hi Jeff, Sorry to diturb you. However, it is a long time for me to submit this patch. Can you tell me when this patch can be upsteamed to the kernel tree? Thanks, Crane -Original Message- From: Jeff Garzik [mailto:[EMAIL PROTECTED] Sent: Saturday, February 02, 2008 2:20 PM To: Cai, Crane Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; Linux IDE mailing list Subject: Re: [PATCH] PCI subsystem: AMD SATA IDE mode quirk Cai, Crane wrote: From: Crane Cai [EMAIL PROTECTED] PCI: modify SATA IDE mode quirk When initialize and resume, SB600/700/800 need to set SATA mode correctly. Signed-off-by: Crane Cai [EMAIL PROTECTED] --- a/drivers/pci/quirks.c 2007-09-24 14:16:32.0 -0400 +++ b/drivers/pci/quirks.c 2008-02-02 11:23:47.0 -0500 @@ -859,12 +859,13 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX,quirk_disable_pxb ); -static void __devinit quirk_sb600_sata(struct pci_dev *pdev) +static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev) { - /* set sb600 sata to ahci mode */ - if ((pdev-class 8) == PCI_CLASS_STORAGE_IDE) { - u8 tmp; + /* set sb600/sb700/sb800 sata to ahci mode */ + u8 tmp; + pci_read_config_byte(pdev, PCI_CLASS_DEVICE, tmp); + if (tmp == 0x01) { pci_read_config_byte(pdev, 0x40, tmp); pci_write_config_byte(pdev, 0x40, tmp|1); pci_write_config_byte(pdev, 0x9, 1); @@ -872,10 +873,13 @@ static void __devinit quirk_sb600_sata(s pci_write_config_byte(pdev, 0x40, tmp); pdev-class = PCI_CLASS_STORAGE_SATA_AHCI; + printk(KERN_INFO PCI: set SATA to AHCI mode\n); } } -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_sb600_sata); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode); +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); ACK In the future, please also CC linux-ide@vger.kernel.org, as that's where the ATA folks hang out :) Greg Kroah-Hartman (cc'd) needs to pick up your patch, since it is in the PCI side of the house... Jeff - 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
Re: [PATCH #upstream] libata: make EH fail gracefully if no reset method is available
Tejun Heo wrote: When no reset method is available, libata currently oopses. Although the condition can't happen unless there's a bug in a low level driver, oopsing isn't the best way to report the error condition. Complain, dump stack and fail reset instead. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- This patch is on top of upstream (a984f58dd97f22f5113700322fed311a0ee29947) + prefer-hardreset patchset http://thread.gmane.org/gmane.linux.ide/27447 drivers/ata/libata-eh.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 64418f1..8d82b06 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2135,9 +2135,14 @@ int ata_eh_reset(struct ata_link *link, int classify, if (hardreset) { reset = hardreset; ehc-i.action = ATA_EH_HARDRESET; - } else { + } else if (softreset) { reset = softreset; ehc-i.action = ATA_EH_SOFTRESET; + } else { + ata_link_printk(link, KERN_ERR, BUG: no reset method, + please report to [EMAIL PROTECTED]); + dump_stack(); + return -EINVAL; ACK, but holding due to hold on prefer-hardreset patch (pinging device manufacturers) - 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
[git patches] libata fixes
Please pull from 'upstream-fixes' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-fixes to receive the following updates: drivers/ata/libata-core.c | 48 +- drivers/ata/pata_amd.c |2 +- drivers/ata/pata_legacy.c |2 +- drivers/ata/pata_ninja32.c |9 ++- drivers/ata/pata_via.c |6 - drivers/ata/sata_mv.c | 50 --- 6 files changed, 75 insertions(+), 42 deletions(-) Alan Cox (3): pata_amd: Note in the module description it handles Nvidia pata_legacy: typo fix pata_ninja32: setup changes Byron Bradley (1): sata_mv: platform driver allocs dma without create Tejun Heo (2): pata_via: fix SATA cable detection on cx700 libata: ignore deverr on SETXFER if mode is configured Yinghai Lu (1): sata_mv: fix loop with last port diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3011919..004dae4 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3048,6 +3048,8 @@ int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel) static int ata_dev_set_mode(struct ata_device *dev) { struct ata_eh_context *ehc = dev-link-eh_context; + const char *dev_err_whine = ; + int ign_dev_err = 0; unsigned int err_mask; int rc; @@ -3057,41 +3059,57 @@ static int ata_dev_set_mode(struct ata_device *dev) err_mask = ata_dev_set_xfermode(dev); + if (err_mask ~AC_ERR_DEV) + goto fail; + + /* revalidate */ + ehc-i.flags |= ATA_EHI_POST_SETMODE; + rc = ata_dev_revalidate(dev, ATA_DEV_UNKNOWN, 0); + ehc-i.flags = ~ATA_EHI_POST_SETMODE; + if (rc) + return rc; + /* Old CFA may refuse this command, which is just fine */ if (dev-xfer_shift == ATA_SHIFT_PIO ata_id_is_cfa(dev-id)) - err_mask = ~AC_ERR_DEV; + ign_dev_err = 1; /* Some very old devices and some bad newer ones fail any kind of SET_XFERMODE request but support PIO0-2 timings and no IORDY */ if (dev-xfer_shift == ATA_SHIFT_PIO !ata_id_has_iordy(dev-id) dev-pio_mode = XFER_PIO_2) - err_mask = ~AC_ERR_DEV; + ign_dev_err = 1; /* Early MWDMA devices do DMA but don't allow DMA mode setting. Don't fail an MWDMA0 set IFF the device indicates it is in MWDMA0 */ if (dev-xfer_shift == ATA_SHIFT_MWDMA dev-dma_mode == XFER_MW_DMA_0 (dev-id[63] 8) 1) - err_mask = ~AC_ERR_DEV; + ign_dev_err = 1; - if (err_mask) { - ata_dev_printk(dev, KERN_ERR, failed to set xfermode - (err_mask=0x%x)\n, err_mask); - return -EIO; - } + /* if the device is actually configured correctly, ignore dev err */ + if (dev-xfer_mode == ata_xfer_mask2mode(ata_id_xfermask(dev-id))) + ign_dev_err = 1; - ehc-i.flags |= ATA_EHI_POST_SETMODE; - rc = ata_dev_revalidate(dev, ATA_DEV_UNKNOWN, 0); - ehc-i.flags = ~ATA_EHI_POST_SETMODE; - if (rc) - return rc; + if (err_mask AC_ERR_DEV) { + if (!ign_dev_err) + goto fail; + else + dev_err_whine = (device error ignored); + } DPRINTK(xfer_shift=%u, xfer_mode=0x%x\n, dev-xfer_shift, (int)dev-xfer_mode); - ata_dev_printk(dev, KERN_INFO, configured for %s\n, - ata_mode_string(ata_xfer_mode2mask(dev-xfer_mode))); + ata_dev_printk(dev, KERN_INFO, configured for %s%s\n, + ata_mode_string(ata_xfer_mode2mask(dev-xfer_mode)), + dev_err_whine); + return 0; + + fail: + ata_dev_printk(dev, KERN_ERR, failed to set xfermode + (err_mask=0x%x)\n, err_mask); + return -EIO; } /** diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 761a666..ea567e2 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c @@ -772,7 +772,7 @@ static void __exit amd_exit(void) } MODULE_AUTHOR(Alan Cox); -MODULE_DESCRIPTION(low-level driver for AMD PATA IDE); +MODULE_DESCRIPTION(low-level driver for AMD and Nvidia PATA IDE); MODULE_LICENSE(GPL); MODULE_DEVICE_TABLE(pci, amd); MODULE_VERSION(DRV_VERSION); diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 333dc15..6c59969 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -127,7 +127,7 @@ static int opti82c611a; /* Opti82c611A on primary 1, sec 2, both 3 */ static int opti82c46x; /* Opti 82c465MV present(pri/sec autodetect) */ static int qdi;/* Set to probe QDI controllers */ static int winbond;/* Set
Re: [PATCH] sata_mv: platform driver allocs dma without create
Byron Bradley wrote: When the sata_mv driver is used as a platform driver, mv_create_dma_pools() is never called so it fails when trying to alloc in mv_pool_start(). Signed-off-by: Byron Bradley [EMAIL PROTECTED] Acked-by: Mark Lord [EMAIL PROTECTED] --- Mark, based on the comment from Andrew Morton on the sata_mv: fix loop with last port patch I have changed your Signed-off-by to an Acked-by. Hopefully thats correct. 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH #upstream-fixes] libata: ignore deverr on SETXFER if mode is configured
Tejun Heo wrote: Some controllers (VIA CX700) raise device error on SETXFER even after mode configuration succeeded. Update ata_dev_set_mode() such that device error is ignored if transfer mode is configured correctly. To implement this, device is revalidated even after device error on SETXFER. This fixes 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(-) 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/9] libata: PCI device should be powered up before being accessed
Tejun Heo wrote: PCI device should be powered up or powered up before its PCI regsiters are accessed. Although PCI configuration register access is allowed in D3hot, PCI device is free to reset its status when transiting from D3hot to D0 causing configuration data to change. Many libata SFF drivers which use ata_pci_init_one() read and update configuration registers before calling ata_pci_init_one() which enables the PCI device. Also, in resume paths, some drivers access registers without resuming the PCI device. This patch adds a call to pcim_enable_device() in init path if register is accessed before calling ata_pci_init_one() and make resume paths first resume PCI devices, access PCI configuration regiters then resume ATA host. While at it... * cmd640 was strange in that it set -resume even when CONFIG_PM is not. This is by-product of minimal build fix. Updated. * In cs5530, Don't BUG() on reinit failure. Just whine and fail resume. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Any objections, anyone? I would like to merge this for 2.6.25, as it is IMO bug fixes. Jeff - 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
Re: [PATCH] sata_mv: fix loop with last port
Yinghai Lu wrote: [PATCH] sata_mv: fix loop with last port commit f351b2d638c3cb0b95adde3549b7bfaf3f991dfa sata_mv: Support SoC controllers cause panic: [...] last_port already include port0 base. this patch change use last_port directly, and move pp assignment later. Signed-off-by: Yinghai Lu [EMAIL PROTECTED] applied Please don't repeat the email subject line in the email body, as that causes it to be duplicated in the permanent kernel changelog. - 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
Re: [PATCH #upstream-fixes] pata_via: fix SATA cable detection on cx700
Tejun Heo wrote: 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(-) 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] pata_amd: Note in the module description it handles Nvidia
Alan Cox wrote: This has confused a few people so fix it Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-mm1/drivers/ata/pata_amd.c linux-2.6.24-mm1/drivers/ata/pata_amd.c --- linux.vanilla-2.6.24-mm1/drivers/ata/pata_amd.c 2008-02-06 14:14:39.0 + +++ linux-2.6.24-mm1/drivers/ata/pata_amd.c 2008-02-06 14:31:35.0 + @@ -772,7 +772,7 @@ } MODULE_AUTHOR(Alan Cox); -MODULE_DESCRIPTION(low-level driver for AMD PATA IDE); +MODULE_DESCRIPTION(low-level driver for AMD and Nvidia PATA IDE); MODULE_LICENSE(GPL); MODULE_DEVICE_TABLE(pci, amd); MODULE_VERSION(DRV_VERSION); 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] pata_legacy: typo fix
Alan Cox wrote: Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-mm1/drivers/ata/pata_legacy.c linux-2.6.24-mm1/drivers/ata/pata_legacy.c --- linux.vanilla-2.6.24-mm1/drivers/ata/pata_legacy.c 2008-02-06 14:14:39.0 + +++ linux-2.6.24-mm1/drivers/ata/pata_legacy.c 2008-02-06 14:38:54.0 + @@ -127,7 +127,7 @@ static int opti82c46x; /* Opti 82c465MV present(pri/sec autodetect) */ static int qdi;/* Set to probe QDI controllers */ static int winbond;/* Set to probe Winbond controllers, - give I/O port if non stdanard */ + give I/O port if non standard */ static int autospeed; /* Chip present which snoops speed changes */ static int pio_mask = 0x1F;/* PIO range for autospeed devices */ static int iordy_mask = 0x;/* Use iordy if available */ 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCHSET #upstream] block/libata: update and use block layer padding and draining
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 are from James with some modifications. Please read the following thread for more info. http://thread.gmane.org/gmane.linux.scsi/37185 This patchset is on top of upstream (a6af42fc9a12165136d82206ad52f18c5955ce87) + kill-n_iter-and-fix-fsl patch [1] ACK patchset... lets definitely get these fixes upstream. Once Jens is happy, I would prefer the merge the lot upstream, if that is OK with everyone involved? Jens, ping? It's a bug fix, so it would be nice to get this in soonish. As noted, if all looks good, I would prefer to merge via libata-dev... Thanks, Jeff - 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
Re: [PATCHSET #upstream] block/libata: update and use block layer padding and draining
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 are from James with some modifications. Please read the following thread for more info. http://thread.gmane.org/gmane.linux.scsi/37185 This patchset is on top of upstream (a6af42fc9a12165136d82206ad52f18c5955ce87) + kill-n_iter-and-fix-fsl patch [1] ACK patchset... lets definitely get these fixes upstream. Once Jens is happy, I would prefer the merge the lot upstream, if that is OK with everyone involved? Jens, ping? It's a bug fix, so it would be nice to get this in soonish. As noted, if all looks good, I would prefer to merge via libata-dev... I'm ok with it, but lets please merge the block bits through the block repo, since they are not trivial. Wont be until the week after next, though. hmmm, rather than delaying the bug fixes for two weeks, since you're OK with it we can push upstream now, and apply further fixes if problems arise during testing? I would rather get these fixes out into wide testing sooner rather than later. Jeff - 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
Re: [PATCH 2/3 2.6.24-git] ARM/RPC: Use HAVE_PATA_PLATFORM to select pata platform driver
ACK patch series... would it be ok to send via the ARM maintainer? I would prefer to add this at the same time as its user... - 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
Re: [PATCH] ahci: fix CAP.NP and PI handling
Tejun Heo wrote: AHCI uses CAP.NP to indicate the number of ports and PI to tell which ports are enabled. The only requirement is that the number of ports indicated by CAP.NP should equal or be higher than the number of enabled ports in PI. CAP.NP and PI carry duplicate information and there have been some interesting cases. Some early AHCI controllers didn't set PI at all and just implement from port 0 to CAP.NP. An ICH8 board which wired four out of six available ports had 3 (4 ports) for CAP.NP and 0x33 for PI. While ESB2 has less bits set in PI than the value in CAP.NP. Till now, ahci driver assumed that PI is invalid if it doesn't match CAP.NP exactly. This violates AHCI standard and the driver ends up accessing unmimplemented ports on ESB2. This patch updates CAP.NP and PI handling such that PI can have less number of bits set than indicated in CAP.NP and the highest port is determined as the maximum port of what CAP.NP and PI indicate. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Jan Beulich [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 http://vger.kernel.org/majordomo-info.html
Re: libata: kill now unused n_iter and fix sata_fsl
Tejun Heo wrote: From: James Bottomley [EMAIL PROTECTED] qc-n_iter was used for libata's own sg walking before sg chaining replaced it. During conversion, the field and its usage in sata_fsl were left behind. Kill the filed and update sata_fsl. tj: This was part of James's libata-use-block-layer-padding patch. Separated out by me. Signed-off-by: James Bottomley [EMAIL PROTECTED] Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Li Yang [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 http://vger.kernel.org/majordomo-info.html
Re: [2.6 patch] ata_piix.c:piix_init_one() must be __devinit
Adrian Bunk wrote: This patch fixes the following section mismatches: -- snip -- ... WARNING: drivers/ata/built-in.o(.text+0x15072): Section mismatch in reference from the function piix_init_one() to the function .devinit.text:piix_init_sata_map() WARNING: drivers/ata/built-in.o(.text+0x150dd): Section mismatch in reference from the function piix_init_one() to the function .devinit.text:piix_init_pcs() WARNING: drivers/ata/built-in.o(.text+0x150e5): Section mismatch in reference from the function piix_init_one() to the function .devinit.text:piix_init_sidpr() WARNING: drivers/ata/built-in.o(.text+0x15107): Section mismatch in reference from the function piix_init_one() to the function .devinit.text:piix_check_450nx_errata() ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- 222e97f95d38ce7cb41980671cc4383df28b5f7a diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index a65c8ae..7a3b9ef 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -1595,7 +1595,8 @@ static void piix_iocfg_bit18_quirk(struct pci_dev *pdev) * Zero on success, or -ERRNO value. */ -static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) +static int __devinit piix_init_one(struct pci_dev *pdev, + const struct pci_device_id *ent) { static int printed_version; struct device *dev = pdev-dev; 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 http://vger.kernel.org/majordomo-info.html
[git patches] libata updates
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus to receive the following updates: arch/arm/mach-rpc/riscpc.c|2 +- arch/blackfin/mach-bf527/boards/ezkit.c |2 +- arch/blackfin/mach-bf533/boards/H8606.c |2 +- arch/blackfin/mach-bf533/boards/cm_bf533.c|2 +- arch/blackfin/mach-bf533/boards/ezkit.c |2 +- arch/blackfin/mach-bf533/boards/stamp.c |2 +- arch/blackfin/mach-bf537/boards/cm_bf537.c|2 +- arch/blackfin/mach-bf537/boards/generic_board.c |2 +- arch/blackfin/mach-bf537/boards/minotaur.c|2 +- arch/blackfin/mach-bf537/boards/stamp.c |2 +- arch/blackfin/mach-bf561/boards/cm_bf561.c|2 +- arch/blackfin/mach-bf561/boards/ezkit.c |2 +- arch/sh/boards/landisk/setup.c|2 +- arch/sh/boards/lboxre2/setup.c|2 +- arch/sh/boards/renesas/r7780rp/setup.c|2 +- arch/sh/boards/renesas/rts7751r2d/setup.c |2 +- arch/sh/boards/renesas/sdk7780/setup.c|2 +- arch/sh/boards/se/7722/setup.c|2 +- drivers/ata/ahci.c| 35 +- drivers/ata/ata_piix.c|3 +- drivers/ata/libata-core.c |2 - drivers/ata/pata_of_platform.c|2 +- drivers/ata/pata_platform.c |2 +- drivers/ata/sata_fsl.c|4 +- drivers/ata/sata_mv.c | 366 ++--- drivers/ata/sata_nv.c | 78 - drivers/ata/sata_via.c|2 - drivers/ide/legacy/ide_platform.c |2 +- include/linux/{pata_platform.h = ata_platform.h} | 13 +- include/linux/libata.h|2 - 30 files changed, 440 insertions(+), 107 deletions(-) rename include/linux/{pata_platform.h = ata_platform.h} (75%) Adrian Bunk (1): ata_piix.c:piix_init_one() must be __devinit Alejandro Riveira Fernández (1): sata_via.c: Remove missleading comment. Andrew Morton (1): ata: drivers/ata/sata_mv.c needs dmapool.h David Milburn (1): libata-core: unblacklist HITACHI drives James Bottomley (1): libata: kill now unused n_iter and fix sata_fsl Jeff Garzik (1): Rename: linux/pata_platform.h to linux/ata_platform.h Robert Hancock (1): sata_nv: fix ATAPI issues with memory over 4GB (v7) Saeed Bishara (1): sata_mv: Support SoC controllers Tejun Heo (1): ahci: fix CAP.NP and PI handling diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c index a454451..eca558c 100644 --- a/arch/arm/mach-rpc/riscpc.c +++ b/arch/arm/mach-rpc/riscpc.c @@ -17,7 +17,7 @@ #include linux/sched.h #include linux/device.h #include linux/serial_8250.h -#include linux/pata_platform.h +#include linux/ata_platform.h #include asm/elf.h #include asm/io.h diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index f8c411a..1795aab 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c @@ -37,7 +37,7 @@ #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #include linux/usb/isp1362.h #endif -#include linux/pata_platform.h +#include linux/ata_platform.h #include linux/irq.h #include linux/interrupt.h #include linux/usb/sl811.h diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index a72c7a6..97378b0 100644 --- a/arch/blackfin/mach-bf533/boards/H8606.c +++ b/arch/blackfin/mach-bf533/boards/H8606.c @@ -38,7 +38,7 @@ #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #include linux/usb/isp1362.h #endif -#include linux/pata_platform.h +#include linux/ata_platform.h #include linux/irq.h #include asm/dma.h diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index 21df2f3..886f260 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c @@ -34,7 +34,7 @@ #include linux/spi/spi.h #include linux/spi/flash.h #include linux/usb/isp1362.h -#include linux/pata_platform.h +#include linux/ata_platform.h #include linux/irq.h #include asm/dma.h #include asm/bfin5xx_spi.h diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index c37dd45..4026c2f 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c @@ -35,7 +35,7 @@ #include linux/spi/spi.h #include linux/spi/flash.h #include linux/usb/isp1362.h -#include linux/pata_platform.h +#include linux/ata_platform.h #include linux/irq.h #include asm/dma.h #include asm
Re: [PATCH] libata-core: unblacklist HITACHI drives
David Milburn wrote: The HITACHI HDS7250SASUN500G and HITACHI HDS7225SBSUN250 drives do not need to be blacklisted, the NCQ problem has been resolved with the sata_nv: fix for completion handling patch. Signed-off-by David Milburn [EMAIL PROTECTED] --- libata-core.c |2 -- 1 files changed, 2 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index bdbd55a..ba5406e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4154,8 +4154,6 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { /* NCQ is broken */ { Maxtor *, BANC*, ATA_HORKAGE_NONCQ }, { Maxtor 7V300F0, VA111630, ATA_HORKAGE_NONCQ }, - { HITACHI HDS7250SASUN500G*, NULL,ATA_HORKAGE_NONCQ }, - { HITACHI HDS7225SBSUN250G*, NULL,ATA_HORKAGE_NONCQ }, { ST380817AS, 3.42, ATA_HORKAGE_NONCQ }, { ST3160023AS, 3.42, ATA_HORKAGE_NONCQ }, 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH] sata_nv: fix ATAPI issues with memory over 4GB (v7)
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 and break legacy mode (which is needed for ATAPI devices). Also, if either port is in ATAPI mode we need to set the DMA mask for the PCI device to 32-bit to ensure that the IOMMU code properly bounces requests above 4GB, as it appears setting the bounce limit does not guarantee that we will not try to map requests above this point. Reported to fix https://bugzilla.redhat.com/show_bug.cgi?id=351451 Signed-off-by: Robert Hancock [EMAIL PROTECTED] applied, though it can still be improved... let's see if this sticks. - 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
Re: [patch 1/1] ata: drivers/ata/sata_mv.c needs dmapool.h
[EMAIL PROTECTED] wrote: From: Andrew Morton [EMAIL PROTECTED] mips: drivers/ata/sata_mv.c: In function `mv_port_free_dma_mem': drivers/ata/sata_mv.c:1080: error: implicit declaration of function `dma_pool_free' Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/ata/sata_mv.c |1 + 1 file changed, 1 insertion(+) diff -puN drivers/ata/sata_mv.c~ata-drivers-ata-sata_mvc-needs-dmapoolh drivers/ata/sata_mv.c --- a/drivers/ata/sata_mv.c~ata-drivers-ata-sata_mvc-needs-dmapoolh +++ a/drivers/ata/sata_mv.c @@ -69,6 +69,7 @@ #include linux/blkdev.h #include linux/delay.h #include linux/interrupt.h +#include linux/dmapool.h #include linux/dma-mapping.h #include linux/device.h #include scsi/scsi_host.h 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCHSET #upstream] block/libata: update and use block layer padding and draining
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 are from James with some modifications. Please read the following thread for more info. http://thread.gmane.org/gmane.linux.scsi/37185 This patchset is on top of upstream (a6af42fc9a12165136d82206ad52f18c5955ce87) + kill-n_iter-and-fix-fsl patch [1] ACK patchset... lets definitely get these fixes upstream. Once Jens is happy, I would prefer the merge the lot upstream, if that is OK with everyone involved? Jeff - 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
Re: [PATCH 2/4] libata: update ATAPI overflow draining
Tejun Heo wrote: For misc ATAPI commands which transfer variable length data to the host, overflow can occur due to application or hardware bug. Such overflows can be ignored safely as long as overflow data is properly drained. libata HSM implementation has this implemented in __atapi_pio_bytes() and recently updated for 2.6.24-rc but it requires further improvements. Improve drain logic such that... * Report overflow errors using ehi desc mechanism instead of printing directly. * Properly calculate the number of bytes to be drained considering actual number of consumed bytes for partial draining. * Add and use ata_drain_page for draining. This change fixes the problem where LLDs which do 32bit IOs consumes 4 bytes on each 2 byte draining resulting in draining twice more data than requested. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Acked-by: Albert Lee [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 104 +++-- 1 files changed, 53 insertions(+), 51 deletions(-) (updating status on an old patch) dropped, due to your current work - 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
Re: [PATCH 3/4] libata: implement ATAPI drain buffer
Tejun Heo wrote: Misc ATAPI commands may try to transfer more bytes than requested. For PIO which is performed by libata HSM, this is worked around by draining extra bytes from __atapi_pio_bytes(). This patch implements drain buffer to perform draining for DMA and PIO-over-DMA cases. One page is allocated w/ GFP_DMA32 during libata core layer initialization. On host registration, this drain page is DMA mapped and ATAPI_MAX_DRAIN_PAGES sg entries are reserved. ata_sg_setup_extra() uses these extra sg entries to map the drain page ATAPI_MAX_DRAIN_PAGES times, extending sg list by ATAPI_MAX_DRAIN bytes. This allows both DMA and PIO-over-DMA misc ATAPI commands to overflow by ATAPI_MAX_DRAIN bytes just like PIO commands. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 116 - drivers/ata/libata-scsi.c | 14 -- include/linux/libata.h|4 +- 3 files changed, 116 insertions(+), 18 deletions(-) (updating status on an old patch) dropped, due to your current work - 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
Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer
James Bottomley wrote: The aic94xx sequencer has a very finely honed sense of DMA transfers. It's fully automated, and handles both ATA DMA and ATA PIO in the sequencer engine (so all the driver sees is DMA). ditto AHCI, and most other DMA engines It reports both underrun and overrun conditions. For DMA underrun ditto AHCI, and most other DMA engines (device transfers less than expected, it just returns what it has and how much was missing as the residual) for DMA overrun (as in device tried to take more than it was programmed to send on either read or write) for PIO it does seem to zero fill or discard and then simply report task complete with overrun and let libsas sort it out. I suspect for DMA it first tries DMAT before taking other actions, but I'd need a protocol analyser (or the sequencer docs) to be sure. Almost every other DMA engine on the planet besides aic94xx is pretty much the same... you set up an s/g tables, and it reports overrun or underrun via an interrupt + status register bit. It sounds like aic94xx might do more work in the firmware -- that counts as advanced, since some of the DMA engine cleanup clearly occurs in firmware, rather than pushed to kernel software. Nowhere do I see anything about AHCI that is broken. It has standard DMA engine behavior found in storage and non-storage hardware. We handle overruns as error conditions in both SAS and ATA at the moment, but the point is that the ATAPI device is fully happy and quiesced when we do this. That may be the result of aic94xx handling extra FIS's in the firmware, something we cannot depend on for purely silicon-based devices. mvsas, broadsas, ahci, sata_sil24, and others behave similarly... Please don't mistake lack of firmware cleanup as broken hardware. Jeff - 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
Re: PROBLEM: SATA hotplugging not working with nForce MCP61
Tuomas Jormola wrote: On Sun, Feb 03, 2008 at 08:14:30AM +0900, Tejun Heo wrote: 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. Robert, is this hardware restriction or do we just need more info? Ok, so I guess it's not a bug per se. By reading [1] I was under impression that all the chips supported by sata_nv driver would also support hotplugging. [1] http://linux-ata.org/driver-status.html#nvidia Like NVIDIA noted, we need to add support for it... Jeff - 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
Re: [BUG] 2.6.24 refuses to boot - ATA problem?
Chris Rankin wrote: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) ata1.00: status: { DRDY } ata1: soft resetting link ata1.00: configured for UDMA/66 ata1: EH complete ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) ata1.00: status: { DRDY } ata1: soft resetting link Had at least one other report like this... Sleepiness prevents me from recalling more at the moment, but I think the other report was fixed with a special ACPI switch... /me puts in pile for Monday... Jeff - 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
Re: [PATCH 2/2 v3] sata_mv: Support SoC controllers
[EMAIL PROTECTED] wrote: --- /dev/null +++ b/include/linux/sata_mv.h @@ -0,0 +1,21 @@ +/* + * Marvell integrated SATA platfrom device data definition file. + * + * Saeed Bishara [EMAIL PROTECTED] + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed as is without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __LINUX_SATA_MV_H__ +#define __LINUX_SATA_MV_H__ + +/* + * Sata private data + */ +struct mv_sata_platform_data { + int n_ports; /* number of sata ports */ +}; + +#endif Overall, the patch is OK, but I fear adding way too many of these tiny includes, for each platform. Unless Paul M objects (pata_platform maintainer), I will rename linux/pata_platform.h to linux/ata_platform.h, and we can put your mv_sata_platform_data structure in there. Jeff - 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
Re: [PATCH] pata_sl82c105: dual channel support
Alan Cox wrote: Use qc_defer to serialize the two channels Signed-off-by: Alan Cox [EMAIL PROTECTED] applied... nice! - 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
Re: [PATCH] pata_legacy: multiple updates (rediff as asked)
Alan Cox wrote: - Fix probe logic to support multiple devices better - Fold in qdi and winbond support - Fix promise 202C30 probe - Restructure hrm, some of this is already in #upstream (and thus -mm, though maybe akpm has not yet regenerated his stuff). patch(1) seems to think I already have this stuff, and indeed the most recent changesets in pata_legacy are commit b832548773b0cd98216534caa31b9ed7607c4e76 Author: Alan Cox [EMAIL PROTECTED] Date: Sat Jan 19 15:47:23 2008 + pata_legacy: Merge winbond support This puts winbond VLB in with the other ISA/VLB support and means we can lose pata_winbond.c. With all the VLB/ISA probe in one space (and out of the core libata) this makes legacy probing work sanely. Also switch to devm_ for resource handling on the ports post probe Signed-off-by: Alan Cox [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] commit defc9cd826e4a99f550504a744f9407b518828ae Author: Alan Cox [EMAIL PROTECTED] Date: Thu Jan 10 14:33:10 2008 -0800 pata_legacy: resychronize with upstream changes and resubmit Update the legacy driver so it can handle VLB ports nicely, and has an internal structure for nailing new ISA/VLB forms in. Anyone got an ALI14xx and a spare day ;) Also adds an all parameter so you can load this driver after all the PCI ones in a boot time kernel and tell it to grab anything ST412 compatible even if it is an unknown PCI device. That allows libata to offer the same just get me a disk somehow fallback that old IDE did. Obsoletes pata_qdi. Signed-off-by: Alan Cox [EMAIL PROTECTED] Cc: Tejun Heo [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Jeff Garzik [EMAIL PROTECTED] - 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
Re: [PATCH 1/2 v3] sata_mv: Remove PCI dependency
[EMAIL PROTECTED] wrote: From: Saeed Bishara [EMAIL PROTECTED] The integrated SATA controller is connected directly to the SoC's internal bus, not via PCI interface. this patch removes the dependency on the PCI interface. Signed-off-by: Saeed Bishara [EMAIL PROTECTED] --- drivers/ata/Kconfig |2 +- drivers/ata/sata_mv.c | 132 +++- 2 files changed, 75 insertions(+), 59 deletions(-) applied, thanks for your patience - 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
Re: [PATCH] sata_nv: fix for completion handling
Robert Hancock wrote: This patch is based on an original patch from Kuan Luo of NVIDIA, posted under subject fixed a bug of adma in rhel4u5 with HDS7250SASUN500G. His description follows. I've reworked it a bit to avoid some unnecessary repeated checks but it should be functionally identical. The patch is to solve the error message ata1: CPB flags CMD err, flags=0x11 when testing HDS7250SASUN500G in rhel4u5. I tested this hd in 2.6.24-rc7 which needed to remove the mask in blacklist to run the ncq and the same error also showed up. I traced the bug and found that the interrupt finished a command (for example, tag=0) when the driver got that adma status is NV_ADMA_STAT_DONE and cpb-resp_flags is NV_CPB_RESP_DONE. However, For this hd, the drive maybe didn't clear bit 0 at this moment. It meaned the hardware had not completely finished the command. If at the same time the driver freed the command(tag 0) and sended another command (tag 0), the error happened. The notifier register is 32-bit register containing notifier value. Value is bit vector containing one bit per tag number (0-31) in corresponding bit positions (bit 0 is for tag 0, etc). When bit is set then ADMA indicates that command with corresponding tag number completed execution. So i added the check notifier code. Sometimes i saw that the notifier reg set some bits , but the adma status set NV_ADMA_STAT_CMD_COMPLETE ,not NV_ADMA_STAT_DONE. So i added the NV_ADMA_STAT_CMD_COMPLETE check code. Signed-off-by: Robert Hancock [EMAIL PROTECTED] applied, thanks all for investigating this stuff - 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
Re: [PATCH] pci: allow multiple calls to pcim_enable_device()
Tejun Heo wrote: There's no reason not to allow multiple calls to pcim_enable_device(). Calls after the first one can simply be noop. All PCI resources will be released when the initial pcim_enable_device() resource is released. This allows more flexibility to managed PCI users. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Greg Kroah-Hartman [EMAIL PROTECTED] --- This will be used to fix some libata issues. After Greg's ACK, would it be okay to push this through libata-dev#upstream? Thanks. drivers/pci/pci.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) applied, w/ greg's sign-off - 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
Re: [PATCH #upstream] libata: implement libata.force module parameter
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 to the second port but allow 3.0Gbps 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] --- I guess it's about time we add something like this. More than anything else this should help debugging and can serve as a last resort to work around problems. Thanks. Documentation/kernel-parameters.txt | 35 +++ drivers/ata/libata-core.c | 375 +++- drivers/ata/libata-eh.c |8 drivers/ata/libata.h|1 4 files changed, 415 insertions(+), 4 deletions(-) ACK, but it breaks the build due to section type conflicts: drivers/ata/libata-core.c:108: error: ata_force_param_buf causes a section type conflict Given that the data is marked __initdata and the code is marked __init, I cannot see the problem. - 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
[git patches] libata updates
The PCI change was ack'd by Greg... Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus to receive the following updates: drivers/ata/Kconfig |2 +- drivers/ata/ahci.c |2 + drivers/ata/ata_piix.c | 10 +- drivers/ata/pata_bf54x.c| 53 ++--- drivers/ata/pata_sl82c105.c | 33 +++- drivers/ata/sata_mv.c | 486 +++ drivers/ata/sata_nv.c | 18 +- drivers/pci/pci.c |3 +- 8 files changed, 389 insertions(+), 218 deletions(-) Adrian Bunk (1): ata_piix.c: make piix_merge_scr() static Alan Cox (1): pata_sl82c105: dual channel support Bryan Wu (1): Blackfin pata-bf54x driver: fix compiling bug - no ata_port struct in struct ata_device any more Jason Gaston (2): ahci: RAID mode SATA patch for Intel ICH10 DeviceID's ata_piix: IDE mode SATA patch for Intel ICH10 DeviceID's Mark Lord (13): sata_mv ncq EH fixes sata_mv ncq Mask transient IRQs sata_mv ncq Rename base to port mmio sata_mv ncq Fix EDMA configuration sata_mv ncq Add want ncq parameter for EDMA configuration sata_mv ncq Use hqtag instead of ioid sata_mv ncq Ignore response status LSB on NCQ sata_mv ncq Restrict max sectors to 8-bits on GenII NCQ sata_mv ncq Use DMA memory pools for hardware memory tables sata_mv ncq Introduce per-tag SG tables sata_mv ncq Enable NCQ operation sata_mv ncq Remove post internal cmd op sata_mv ncq Comments and version bump Robert Hancock (1): sata_nv: fix for completion handling Saeed Bishara (1): sata_mv: Remove PCI dependency Sonic Zhang (3): Blackfin pata-bf54x driver: Remove obsolete PM function Blackfin pata-bf54x driver: Add debug information Blackfin pata-bf54x driver: should cover all possible interrupt sources Tejun Heo (1): pci: allow multiple calls to pcim_enable_device() diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index ae19c9b..ba8f7f4 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -69,7 +69,7 @@ config ATA_PIIX config SATA_MV tristate Marvell SATA support (HIGHLY EXPERIMENTAL) - depends on PCI EXPERIMENTAL + depends on EXPERIMENTAL help This option enables support for the Marvell Serial ATA family. Currently supports 88SX[56]0[48][01] chips. diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 6f089b8..27c8d56 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -475,6 +475,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(INTEL, 0x294e), board_ahci }, /* ICH9M */ { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */ { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ + { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ + { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ /* JMicron 360/1/3/5/6, match class to avoid IDE function */ { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index a65c8ae..47892e6 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -267,6 +267,14 @@ static const struct pci_device_id piix_pci_tbl[] = { { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (Tolapai) */ { 0x8086, 0x5028, PCI_ANY_ID, PCI_ANY_ID, 0, 0, tolapai_sata_ahci }, + /* SATA Controller IDE (ICH10) */ + { 0x8086, 0x3a00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + /* SATA Controller IDE (ICH10) */ + { 0x8086, 0x3a06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, + /* SATA Controller IDE (ICH10) */ + { 0x8086, 0x3a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + /* SATA Controller IDE (ICH10) */ + { 0x8086, 0x3a26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, { } /* terminate list */ }; @@ -1068,7 +1076,7 @@ static void piix_sidpr_write(struct ata_device *dev, unsigned int reg, u32 val) iowrite32(val, hpriv-sidpr + PIIX_SIDPR_DATA); } -u32 piix_merge_scr(u32 val0, u32 val1, const int * const *merge_tbl) +static u32 piix_merge_scr(u32 val0, u32 val1, const int * const *merge_tbl) { u32 val = 0; int i, mi; diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index a32e3c4..7f87f10 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c @@ -299,7 +299,7 @@ static void bfin_set_piomode(struct ata_port *ap, struct ata_device *adev) */ n6 = num_clocks_min(t6min, fsclk); if (mode = 0 mode = 4 n6 = 1) { - pr_debug(set piomode: mode=%d, fsclk=%ud\n, mode, fsclk); + dev_dbg(adev-link-ap-dev, set piomode: mode=%d, fsclk=%ud\n, mode, fsclk); /* calculate the timing
Re: [PATCH RESEND] libata: implement drain buffers
James Bottomley wrote: From: James Bottomley [EMAIL PROTECTED] Date: Thu, 10 Jan 2008 11:42:50 -0600 Subject: libata: implement drain buffers This just updates the libata slave configure routine to take advantage of the block layer drain buffers. I suspect I should also be checking for AHCI as well as ATA_DEV_ATAPI, but I couldn't see how to do that easily. Signed-off-by: James Bottomley [EMAIL PROTECTED] --- drivers/ata/libata-scsi.c | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) Tejun's persistent comment/objection with these works is that you need two sizes, for ATAPI, the raw size and the buffered size. Jeff - 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
Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer
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. Jeff - 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
Re: [PATCHSET libata-dev#upstream] libata: prefer hardreset
I'm currently polling various drive manufacturers for comments, so I'm going to delay ack/nak on this patchset until their comments come back. Jeff - 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
Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables
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 = ahci_port_suspend, .port_resume= ahci_port_resume, #endif + .enable_pm = ahci_enable_alpm, + .disable_pm = ahci_disable_alpm, .port_start = ahci_port_start, .port_stop = ahci_port_stop, @@ -385,6 +387,8 @@ static const struct ata_port_operations ahci_p5wdh_ops = { .port_suspend = ahci_port_suspend, .port_resume= ahci_port_resume, #endif + .enable_pm = ahci_enable_alpm, + .disable_pm = ahci_disable_alpm, .port_start = ahci_port_start, .port_stop = ahci_port_stop, The last one is probably OK, but I didn't think vt8521 could do this? ACK everything else - 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
Re: [PATCH 9/9] libata: make reset related methods proper port operations
ACK patches 6-9 - 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
Re: [PATCH 3/9] libata: implement and use ata_noop_irq_clear()
Tejun Heo wrote: -irq_clear() is used to clear IRQ bit of a SFF controller and isn't useful for drivers which don't use libata SFF HSM implementation. However, it's a required callback and many drivers implement their own noop version as placeholder. This patch implements ata_noop_irq_clear and use it to replace 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] ACK patches 2-3 - 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
Re: [PATCH 1/9] libata: PCI device should be powered up before being accessed
Tejun Heo wrote: diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 7e68edf..5ef6594 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -597,6 +597,11 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) const struct ata_port_info *ppi[] = { NULL, NULL }; u8 tmp; struct pci_dev *isa_bridge; + int rc; + + rc = pcim_enable_device(pdev); + if (rc) + return rc; /* * The chipset revision selects the driver operations and @@ -632,8 +637,15 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) #ifdef CONFIG_PM static int ali_reinit_one(struct pci_dev *pdev) { + struct ata_host *host = dev_get_drvdata(pdev-dev); + int rc; + + rc = ata_pci_device_do_resume(pdev); + if (rc) + return rc; ali_init_chipset(pdev); - return ata_pci_device_resume(pdev); + ata_host_resume(host); + return 0; } #endif diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 761a666..567fe6b 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c @@ -662,10 +662,15 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) static int printed_version; int type = id-driver_data; u8 fifo; + int rc; if (!printed_version++) dev_printk(KERN_DEBUG, pdev-dev, version DRV_VERSION \n); + rc = pcim_enable_device(pdev); + if (rc) + return rc; + pci_read_config_byte(pdev, 0x41, fifo); /* Check for AMD7409 without swdma errata and if found adjust type */ @@ -709,6 +714,13 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) #ifdef CONFIG_PM static int amd_reinit_one(struct pci_dev *pdev) { + struct ata_host *host = dev_get_drvdata(pdev-dev); + int rc; + + rc = ata_pci_device_do_resume(pdev); + if (rc) + return rc; + if (pdev-vendor == PCI_VENDOR_ID_AMD) { u8 fifo; pci_read_config_byte(pdev, 0x41, fifo); @@ -721,7 +733,9 @@ static int amd_reinit_one(struct pci_dev *pdev) pdev-device == PCI_DEVICE_ID_AMD_COBRA_7401) ata_pci_clear_simplex(pdev); } - return ata_pci_device_resume(pdev); + + ata_host_resume(host); + return 0; } #endif diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index d421831..2f81480 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c @@ -446,11 +446,16 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) .port_ops = artop6260_ops, }; const struct ata_port_info *ppi[] = { NULL, NULL }; + int rc; if (!printed_version++) dev_printk(KERN_DEBUG, pdev-dev, version DRV_VERSION \n); + rc = pcim_enable_device(pdev); + if (rc) + return rc; + if (id-driver_data == 0) { /* 6210 variant */ ppi[0] = info_6210; ppi[1] = ata_dummy_port_info; While _I_ do not object, I'm curious to see what Alan thinks about adding enable-device to all these drivers. Seems like the right (and necessary) thing to do, from my perspective... Jeff - 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
Re: [PATCH #upstream] libata: make EH fail gracefully if no reset method is available
Tejun Heo wrote: When no reset method is available, libata currently oopses. Although the condition can't happen unless there's a bug in a low level driver, oopsing isn't the best way to report the error condition. Complain, dump stack and fail reset instead. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- This patch is on top of upstream (a984f58dd97f22f5113700322fed311a0ee29947) + prefer-hardreset patchset http://thread.gmane.org/gmane.linux.ide/27447 drivers/ata/libata-eh.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) ACK (held in mbox, due to waiting on drive manufacturers' responses) - 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
Re: [PATCH 2/2 v3] sata_mv: Support SoC controllers
[EMAIL PROTECTED] wrote: From: Saeed Bishara [EMAIL PROTECTED] Marvell's Orion SoC includes SATA controllers based on Marvell's PCI-to-SATA 88SX controllers. This patch extends the libATA sata_mv driver to support those controllers. Signed-off-by: Saeed Bishara [EMAIL PROTECTED] --- drivers/ata/sata_mv.c | 365 +-- include/linux/sata_mv.h | 21 +++ 2 files changed, 341 insertions(+), 45 deletions(-) create mode 100644 include/linux/sata_mv.h applied, after editing to use linux/ata_platform.h (renamed from linux/pata_platform.h) - 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
Re: [PATCH 2.6.23.11]: [sata_svw]: Add ATAPI DMA support for HT1x00 SATA controller
Anantha Subramanyam wrote: This patch adds ATAPI DMA support for HT1000 (aka BCM5785) HT1100 (aka BCM11000) SATA Controller. Signed-off-by: Anantha Subramanyam [EMAIL PROTECTED] Thanks much for your patience. Feedback: Engineering process issues: 1) patch is word-wrapped, and cannot be applied by automatic tools. In Linux, email is second only to the C compiler as a tool critical to development work. It might take some time to get things set up correctly -- but that's a one-time cost. 2) several occurences of whitespace mangling: tabs were converted to spaces, again making our automated tools unable to apply the patch. Consistency (with other Linux drivers) issues: 1) avoid C++ comments. The rest of the driver exclusively uses /* style (and 95% of the rest of the kernel does too). You should follow the existing coding style whenever modifying existing code. 2) don't define a struct twice, once for each endian (_k2_sata_cmd_desc_s). We use a very specific style, which the sparse source code checking tool knows and checks: a) define a single version of the struct b) use C types that indicate endianness: __le32, __be16, etc. c) in the source code, add endian conversions: foo-prd_tbl_base_lo = cpu_to_le32(address); These endian conversions are automatically optimized out on like-endian platforms, and are heavily optimized on unlike-endian platforms. 3) use POSIX-style struct definitions: OK: struct foo { ... }; Not OK: typedef struct _foo { ... } foo_t; 4) avoid what we call StudlyCaps :) The preferred Linux style used in the vast majority of code is lower case, with underscores separating words: OK: prd_tbl_hi prd_cnt prd_tbl_lo Not OK: sl_PrdTblBaseLow sw_PrdCount sw_PrdTblBaseHigh 5) similarly, avoid Hungarian notation, where the type is indicated in the variable/member name. OK: prd_tbl_lo Not OK: sl_prd_tbl_lo 6) No need to add an extra indentation level after a 'return' statement: static int k2_sata_check_atapi_dma(struct ata_queued_cmd *qc) { + u8 command = qc-scsicmd-cmnd[0]; + if (qc-ap-flags K2_FLAG_NO_ATAPI_DMA) return -1;/* ATAPI DMA not supported */ + else + { 7) static inline functions are preferred over cpp macros, because they are far more type-safe. +#define K2_IS_SATA_STS_GOOD(sata_sts) \ +(((sata_sts K2_SATA_DET_MASK) == K2_DEV_DET_PHY_RDY) (((sata_sts K2_SATA_INTF_MASK)8) == K2_SATA_INFT_ACTIVE)) The C compiler is smart enough to ensure there is no penalty for using a function rather than a macro. 8) in k2_ht1x_port_start(), use the standard Linux 'goto unwind' method of error handling: pspi = kmalloc(sizeof(k2_sata_port_info), GFP_KERNEL); if (!pspi) goto err_out; pspi-pcmd_desc = dma_alloc_coherent(dev, ...); if (!pspi-pcmd_desc) goto err_out_pspi; pspi-pcdb_cpybuf = dma_alloc_coherent(dev, ...); if (!pspi-pcdb_cpybuf) goto err_out_pcmd; /* ... etc ... */ return 0; err_out_pcmd: dma_free_coherent(pspi-pcmd_desc); err_out_pspi: kfree(pspi); err_out: return rc; 9) don't add unnecessary casts from a void pointer: k2_sata_port_info* pspi = (k2_sata_port_info*)ap-private_data; 10) remove redundant comment... by definition this statement is always true, since your patch will be merged into a kernel later than 2.6.18. +/* +later version of libata (kernel 2.6.18 later) have a elaborate +error handling mech that includes multilevel of resets (soft, hard, post...) +so we plug into that + +*/ 11) K2_SATA_WAIT_MDIO_DONE() should be a function, not a macro 12) overall, make sure your patch passes 'sparse' (see Documentation/sparse.txt) and 'checkpatch' (see scripts/checkpatch.pl) checks before submission. There are other minor issues I did not bother to outline here. Operational issues: 1) Use of 'volatile' is almost always the wrong thing to do: int k2_ht1x_qdma_pause(struct ata_port *ap, int pause) +{ + k2_sata_port_info* pspi = (k2_sata_port_info*)ap-private_data; + u32 qsr; + volatile int i = 0; In Linux, if you feel you need 'volatile', then really you most likely need (a) to remove it, (b) to use a barrier(), or (c) use a spinlock. 'volatile' across SMP machines is rather useless, and ill-defined in the C specifications. 2) remove redundant initialization of static var. Static variables are, by definition, initialized to zero. Explicit initialization simply wastes space in the initialized variable area. - static int printed_version; + static int
Re: [PATCH] PCI subsystem: AMD SATA IDE mode quirk
Cai, Crane wrote: From: Crane Cai [EMAIL PROTECTED] PCI: modify SATA IDE mode quirk When initialize and resume, SB600/700/800 need to set SATA mode correctly. Signed-off-by: Crane Cai [EMAIL PROTECTED] --- a/drivers/pci/quirks.c 2007-09-24 14:16:32.0 -0400 +++ b/drivers/pci/quirks.c 2008-02-02 11:23:47.0 -0500 @@ -859,12 +859,13 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX,quirk_disable_pxb ); -static void __devinit quirk_sb600_sata(struct pci_dev *pdev) +static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev) { - /* set sb600 sata to ahci mode */ - if ((pdev-class 8) == PCI_CLASS_STORAGE_IDE) { - u8 tmp; + /* set sb600/sb700/sb800 sata to ahci mode */ + u8 tmp; + pci_read_config_byte(pdev, PCI_CLASS_DEVICE, tmp); + if (tmp == 0x01) { pci_read_config_byte(pdev, 0x40, tmp); pci_write_config_byte(pdev, 0x40, tmp|1); pci_write_config_byte(pdev, 0x9, 1); @@ -872,10 +873,13 @@ static void __devinit quirk_sb600_sata(s pci_write_config_byte(pdev, 0x40, tmp); pdev-class = PCI_CLASS_STORAGE_SATA_AHCI; + printk(KERN_INFO PCI: set SATA to AHCI mode\n); } } -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_sb600_sata); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode); +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); ACK In the future, please also CC linux-ide@vger.kernel.org, as that's where the ATA folks hang out :) Jeff - 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
Re: PCI: Remove users of pci_enable_device_bars()
Linux Kernel Mailing List wrote: Commit: 0948391641918b95d8d96c15089eb5ac156850b3 PCI: Remove users of pci_enable_device_bars() This patch converts users of pci_enable_device_bars() to the new pci_enable_device_{io,mem} interface. The new API fits nicely, except maybe for the QLA case where a bit of code re-organization might be a good idea but I prefer sticking to the simple patch as I don't have hardware to test on. I'll also need some feedback on the cs5520 change. Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED] --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c @@ -229,7 +229,7 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi return -ENOMEM; /* Perform set up for DMA */ - if (pci_enable_device_bars(pdev, 12)) { + if (pci_enable_device_io(pdev)) { printk(KERN_ERR DRV_NAME : unable to configure BAR2.\n); return -ENODEV; } diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 6ec00b8..10adc49 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c @@ -156,8 +156,14 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic ide_setup_pci_noise(dev, d); /* We must not grab the entire device, it has 'ISA' space in its - BARS too and we will freak out other bits of the kernel */ - if (pci_enable_device_bars(dev, 12)) { +* BARS too and we will freak out other bits of the kernel +* +* pci_enable_device_bars() is going away. I replaced it with +* IO only enable for now but I'll need confirmation this is +* allright for that device. If not, it will need some kind of +* quirk. --BenH. +*/ + if (pci_enable_device_io(dev)) { printk(KERN_WARNING %s: Unable to enable 55x0.\n, d-name); return -ENODEV; } So... did the feedback mentioned in the commit log ever appear? :) Jeff - 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
Re: [PATCH 10/13] sata_mv ncq Introduce per-tag SG tables
applied 10-13 - 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
Re: [PATCH 09/13] sata_mv ncq Use DMA memory pools for hardware memory tables
Mark Lord wrote: Jeff Garzik wrote: Mark Lord wrote: Create host-owned DMA memory pools, for use in allocating/freeing per-port command/response queues and SG tables. This gives us a way to guarantee we meet the hardware address alignment requirements, and also reduces memory that might otherwise be wasted on alignment gaps. Signed-off-by: Mark Lord [EMAIL PROTECTED] ACK patches 1-13 applied patches 1-9 to #upstream. patch #10 failed, with git-am reporting it as a corrupt patch. .. That's weird. I can save the email from linux-ide here, and apply as a patch (after 01-09) with no issues at all. Jeff got mail reader problems? Here it is again, in case it got corrupted in transit to you. Nope, not corrupted in transit or on this side. It falls into a familiar pattern: * git-am(1) fails * patch(1) succeeds * when applying patch, patch(1) drops a .orig turd So while patch(1) succeeds because patch(1) is highly forgiving and git-am(1) is more strict, something was definitely strange on that incoming email. patch(1) lets you know by giving you a .orig file, something not normally created if the patch operation was 100% sound. ISTR Linus or Junio explaining why git-am(1) was more strict and why it was a good thing... As I did in this case, I usually just run patch(1), look carefully at the result using 'git diff HEAD', and then commit/resolve the changes. Jeff - 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
Re: [PATCH 09/13] sata_mv ncq Use DMA memory pools for hardware memory tables
Mark Lord wrote: Meanwhile, no further action required here. ACK :) And thanks for rounding out the NCQ work. sata_mv has needed love and attention for a while (well, really, its entire life). Jeff - 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
Re: [PATCH 09/13] sata_mv ncq Use DMA memory pools for hardware memory tables
Mark Lord wrote: Jeff Garzik wrote: Mark Lord wrote: Meanwhile, no further action required here. ACK :) And thanks for rounding out the NCQ work. sata_mv has needed love and attention for a while (well, really, its entire life). .. Well, it's going to be getting plenty of TLC over the next few months. In the short term, my plan is to submit further small patches to fix the IRQ and error-handling in sata_mv, as bug fixes for 2.6.25. Note that hot plug/unplug will begin to work correctly once the IRQ/EH code gets fixed (it sort of works already, but sometimes kills the machine). There are also some errata that need to be addressed in the 2.6.25 timeframe. In particular, there's an NCQ EH errata for the 60x1 chips, and a tricky issue about HOB access not working correctly on most versions of the chips. Bigger stuff that I'm deferring for 2.6.26: -- Port multiplier support (though this does look rather simple..) -- power management support -- ATAPI I'm interested to see this :) -- IRQ Coalescing Most modern SATA has some form of this, but I've yet to see any benefit. I've dealt with interrupt (packet) rates of well over 500k/sec in network land, and IMO the overhead in storage, even with tiny operations, is really small in comparison. So, I'm not sure its worth the latency penalty... at least as turned on by default. -- Target Mode support (interfaces yet to be defined) I would assume this would be along the lines of the SCSI target mode stuff. -- TCQ support: would be good in general for libata on smart hosts, but I'm not sure of the impact on libata EH processing. Agreed, it would be nice to support host queueing controllers. However, specifically for TCQ, it was rather poorly conceived. For most controllers (mv, broadcom/svw, others) an error will stop the DMA engine, and you perform recovery in software. All well and good, but figuring out all the states possible during recovery is non-trivial (I looked into it years ago). Its just messy. Jeff - 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
Re: [PATCH 1/2] [libata] sata_mv: Remove PCI dependency
saeed bishara wrote: On 1/16/08, Mark Lord [EMAIL PROTECTED] wrote: saeed bishara wrote: I attached the new patch .. Try again, please. This time, post the patch *inline* in the body of the email, so that it can more easily be seen, read, and commented on. Beware of many email clients that mangle inline patches, though. Cheers Here is the same patch inlined: From c5f5af7f2eed2fe42e28374257b983922dfd3db5 Mon Sep 17 00:00:00 2001 From: Saeed Bishara [EMAIL PROTECTED] Date: Sun, 2 Dec 2007 10:43:10 +0200 Subject: [PATCH] sata_mv: Remove PCI dependency The integrated SATA controller is connected directly to the SoC's internal bus, not via PCI interface. this patch removes the dependency on the PCI interface. Signed-off-by: Saeed Bishara [EMAIL PROTECTED] --- drivers/ata/Kconfig |2 +- drivers/ata/sata_mv.c | 131 +++- 2 files changed, 75 insertions(+), 58 deletions(-) ACK the changes; but both git-am(1) and patch(1) report that this is a corrupt patch. patch(1) says, [EMAIL PROTECTED] libata-dev]$ patch -sp1 /g/tmp/mbox patch: malformed patch at line 151: *hpriv, int idx, (patch is generally more forgiving than git-am) - 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
Re: [PATCH 09/13] sata_mv ncq Use DMA memory pools for hardware memory tables
Mark Lord wrote: Create host-owned DMA memory pools, for use in allocating/freeing per-port command/response queues and SG tables. This gives us a way to guarantee we meet the hardware address alignment requirements, and also reduces memory that might otherwise be wasted on alignment gaps. Signed-off-by: Mark Lord [EMAIL PROTECTED] ACK patches 1-13 applied patches 1-9 to #upstream. patch #10 failed, with git-am reporting it as a corrupt patch. - 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
Re: [PATCH 1/2] [libata] sata_mv: Remove PCI dependency
saeed bishara wrote: Hi Jeff, what is the status of this patch? I'd like to have this patch, and a second part that adds support for the SoC devices, to be merged into 2.6.25. please note that my patch collides with Mark's patches, I don't mind to rebase mine above Mark's patches, but, in that case I need to wait till you ack the later ones. right? Sorry, I found your 1/17 patch buried inside a thread. In the future, it would be helpful to rewrite the subject from Re: [patch 1/2] sata_mv: ... to [patch v2] sata_mv: ... so that its clear that is a patch to be queued. Jeff - 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
Re: [PATCH 2.6.24] ahci: RAID mode SATA patch for Intel ICH10 DeviceID's
Jason Gaston wrote: This patch adds the Intel ICH10 SATA RAID Controllers DeviceID's. Signed-off-by: Jason Gaston [EMAIL PROTECTED] --- linux-2.6.24/drivers/ata/ahci.c.orig2008-01-24 14:58:37.0 -0800 +++ linux-2.6.24/drivers/ata/ahci.c 2008-01-28 14:58:22.0 -0800 @@ -475,6 +475,8 @@ { PCI_VDEVICE(INTEL, 0x294e), board_ahci }, /* ICH9M */ { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */ { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ + { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ + { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ 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 http://vger.kernel.org/majordomo-info.html