[PATCH] ahci: kill leftover from enabling NCQ over PMP
ahci had problems with NCQ over PMP and NCQ used to be disabled while PMP was attached. After fixing the problem, the temporary NCQ disabling code wasn't removed completely. Kill the remaining piece. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/ahci.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 24fb90f..694eabc 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1677,19 +1677,11 @@ static void ahci_pmp_attach(struct ata_port *ap) static void ahci_pmp_detach(struct ata_port *ap) { void __iomem *port_mmio = ahci_port_base(ap); - struct ahci_host_priv *hpriv = ap-host-private_data; - unsigned long flags; u32 cmd; cmd = readl(port_mmio + PORT_CMD); cmd = ~PORT_CMD_PMP; writel(cmd, port_mmio + PORT_CMD); - - if (hpriv-cap HOST_CAP_NCQ) { - spin_lock_irqsave(ap-lock, flags); - ap-flags |= ATA_FLAG_NCQ; - spin_unlock_irqrestore(ap-lock, flags); - } } static int ahci_pmp_read(struct ata_device *dev, int pmp, int reg, u32 *r_val) -- 1.5.0.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
[PATCH] ahci: clean up PORT_IRQ_BAD_PMP enabling
Now that we have pp-intr_mask, move PORT_IRQ_BAD_PMP enabling to ahci_pmp_attach/detach() where it belongs. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/ahci.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 694eabc..6633c74 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1620,11 +1620,8 @@ static void ahci_thaw(struct ata_port *ap) writel(tmp, port_mmio + PORT_IRQ_STAT); writel(1 ap-port_no, mmio + HOST_IRQ_STAT); - /* turn IRQ back on, ignore BAD_PMP if PMP isn't attached */ - tmp = pp-intr_mask; - if (!ap-nr_pmp_links) - tmp = ~PORT_IRQ_BAD_PMP; - writel(tmp, port_mmio + PORT_IRQ_MASK); + /* turn IRQ back on */ + writel(pp-intr_mask, port_mmio + PORT_IRQ_MASK); } static void ahci_error_handler(struct ata_port *ap) @@ -1667,21 +1664,29 @@ static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) static void ahci_pmp_attach(struct ata_port *ap) { void __iomem *port_mmio = ahci_port_base(ap); + struct ahci_port_priv *pp = ap-private_data; u32 cmd; cmd = readl(port_mmio + PORT_CMD); cmd |= PORT_CMD_PMP; writel(cmd, port_mmio + PORT_CMD); + + pp-intr_mask |= PORT_IRQ_BAD_PMP; + writel(pp-intr_mask, port_mmio + PORT_IRQ_MASK); } static void ahci_pmp_detach(struct ata_port *ap) { void __iomem *port_mmio = ahci_port_base(ap); + struct ahci_port_priv *pp = ap-private_data; u32 cmd; cmd = readl(port_mmio + PORT_CMD); cmd = ~PORT_CMD_PMP; writel(cmd, port_mmio + PORT_CMD); + + pp-intr_mask = ~PORT_IRQ_BAD_PMP; + writel(pp-intr_mask, port_mmio + PORT_IRQ_MASK); } static int ahci_pmp_read(struct ata_device *dev, int pmp, int reg, u32 *r_val) -- 1.5.0.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
[PATCH] ahci: fix notification handling
Asynchronous notification on ICH9 didn't work because it didn't write AN FIS into the RX area - it only updates SNotification. Also, snooping SDB_FIS RX area is racy against further SDB FIS receptions. Let sata_async_notification() determine using SNTF if it's available and snoop RX area iff SNTF isn't available Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Kristen Carlson Accardi [EMAIL PROTECTED] --- drivers/ata/ahci.c | 30 +- 1 files changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 6633c74..abfb72a 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1420,6 +1420,7 @@ static void ahci_port_intr(struct ata_port *ap) void __iomem *port_mmio = ap-ioaddr.cmd_addr; struct ata_eh_info *ehi = ap-link.eh_info; struct ahci_port_priv *pp = ap-private_data; + struct ahci_host_priv *hpriv = ap-host-private_data; u32 status, qc_active; int rc, known_irq = 0; @@ -1432,17 +1433,28 @@ static void ahci_port_intr(struct ata_port *ap) } if (status PORT_IRQ_SDB_FIS) { - /* If the 'N' bit in word 0 of the FIS is set, we just -* received asynchronous notification. Tell libata -* about it. Note that as the SDB FIS itself is -* accessible, SNotification can be emulated by the -* driver but don't bother for the time being. + /* If SNotification is available, leave notification +* handling to sata_async_notification(). If not, +* emulate it by snooping SDB FIS RX area. +* +* Snooping FIS RX area is probably cheaper than +* poking SNotification but some constrollers which +* implement SNotification, ICH9 for example, don't +* store AN SDB FIS into receive area. */ - const __le32 *f = pp-rx_fis + RX_FIS_SDB; - u32 f0 = le32_to_cpu(f[0]); - - if (f0 (1 15)) + if (hpriv-cap HOST_CAP_SNTF) sata_async_notification(ap); + else { + /* If the 'N' bit in word 0 of the FIS is set, +* we just received asynchronous notification. +* Tell libata about it. +*/ + const __le32 *f = pp-rx_fis + RX_FIS_SDB; + u32 f0 = le32_to_cpu(f[0]); + + if (f0 (1 15)) + sata_async_notification(ap); + } } /* pp-active_link is valid iff any command is in flight */ -- 1.5.0.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
[PATCH 1/3] libata: add @timeout to ata_exec_internal[_sg]()
Add @timeout argument to ata_exec_internal[_sg](). If 0, default timeout ata_probe_timeout is used. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- This patchset kills polling PMP register access callbacks -pmp_read and -pmp_write and use standard ata_exec_internal() mechanism. This patchset is generated on top of the following six patches. http://article.gmane.org/gmane.linux.ide/23464 http://article.gmane.org/gmane.linux.ide/23465 http://article.gmane.org/gmane.linux.ide/23466 http://article.gmane.org/gmane.linux.ide/23467 http://article.gmane.org/gmane.linux.ide/23468 http://article.gmane.org/gmane.linux.ide/23469 drivers/ata/libata-acpi.c |2 +- drivers/ata/libata-core.c | 32 drivers/ata/libata-eh.c |4 ++-- drivers/ata/libata.h |5 +++-- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 5ebbf16..d9c295c 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -474,7 +474,7 @@ static int taskfile_load_raw(struct ata_device *dev, tf.lbal, tf.lbam, tf.lbah, tf.device); rtf = tf; - err_mask = ata_exec_internal(dev, rtf, NULL, DMA_NONE, NULL, 0); + err_mask = ata_exec_internal(dev, rtf, NULL, DMA_NONE, NULL, 0, 0); if (err_mask) { ata_dev_printk(dev, KERN_ERR, ACPI cmd %02x/%02x:%02x:%02x:%02x:%02x:%02x failed diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 88becd2..f80089e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -926,7 +926,7 @@ static int ata_read_native_max_address(struct ata_device *dev, u64 *max_sectors) tf.protocol |= ATA_PROT_NODATA; tf.device |= ATA_LBA; - err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0); + err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0, 0); if (err_mask) { ata_dev_printk(dev, KERN_WARNING, failed to read native max address (err_mask=0x%x)\n, err_mask); @@ -988,7 +988,7 @@ static int ata_set_max_sectors(struct ata_device *dev, u64 new_sectors) tf.lbam = (new_sectors 8) 0xff; tf.lbah = (new_sectors 16) 0xff; - err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0); + err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0, 0); if (err_mask) { ata_dev_printk(dev, KERN_WARNING, failed to set max address (err_mask=0x%x)\n, err_mask); @@ -1394,6 +1394,7 @@ static void ata_qc_complete_internal(struct ata_queued_cmd *qc) * @dma_dir: Data tranfer direction of the command * @sg: sg list for the data buffer of the command * @n_elem: Number of sg entries + * @timeout: Timeout in msecs (0 for default) * * Executes libata internal command with timeout. @tf contains * command on entry and result on return. Timeout and error @@ -1410,7 +1411,7 @@ static void ata_qc_complete_internal(struct ata_queued_cmd *qc) unsigned ata_exec_internal_sg(struct ata_device *dev, struct ata_taskfile *tf, const u8 *cdb, int dma_dir, struct scatterlist *sg, - unsigned int n_elem) + unsigned int n_elem, unsigned long timeout) { struct ata_link *link = dev-link; struct ata_port *ap = link-ap; @@ -1486,7 +1487,10 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, spin_unlock_irqrestore(ap-lock, flags); - rc = wait_for_completion_timeout(wait, ata_probe_timeout); + if (!timeout) + timeout = ata_probe_timeout * 1000 / HZ; + + rc = wait_for_completion_timeout(wait, msecs_to_jiffies(timeout)); ata_port_flush_task(ap); @@ -1571,6 +1575,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, * @dma_dir: Data tranfer direction of the command * @buf: Data buffer of the command * @buflen: Length of data buffer + * @timeout: Timeout in msecs (0 for default) * * Wrapper around ata_exec_internal_sg() which takes simple * buffer instead of sg list. @@ -1583,7 +1588,8 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, */ unsigned ata_exec_internal(struct ata_device *dev, struct ata_taskfile *tf, const u8 *cdb, - int dma_dir, void *buf, unsigned int buflen) + int dma_dir, void *buf, unsigned int buflen, + unsigned long timeout) { struct scatterlist *psg = NULL, sg; unsigned int n_elem = 0; @@ -1595,7 +1601,8 @@ unsigned ata_exec_internal(struct ata_device *dev, n_elem++; } - return ata_exec_internal_sg(dev, tf, cdb, dma_dir, psg, n_elem); + return
[PATCH 2/3] libata: implement ATA_PFLAG_RESETTING
Implement ATA_PFLAG_RESETTING. This flag is set while reset is in progress. It's set before prereset is called and cleared after reset fails or postreset is finished. This flag itself doesn't have any function. It will be used by LLDs to tell whether reset is in progress if it needs to behave differently during reset. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-eh.c | 11 +++ include/linux/libata.h |1 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index c0e9a42..1f84e40 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2063,6 +2063,7 @@ int ata_eh_reset(struct ata_link *link, int classify, ata_prereset_fn_t prereset, ata_reset_fn_t softreset, ata_reset_fn_t hardreset, ata_postreset_fn_t postreset) { + struct ata_port *ap = link-ap; struct ata_eh_context *ehc = link-eh_context; unsigned int *classes = ehc-classes; int verbose = !(ehc-i.flags ATA_EHI_QUIET); @@ -2071,9 +2072,14 @@ int ata_eh_reset(struct ata_link *link, int classify, unsigned long deadline; unsigned int action; ata_reset_fn_t reset; + unsigned long flags; int rc; /* about to reset */ + spin_lock_irqsave(ap-lock, flags); + ap-pflags |= ATA_PFLAG_RESETTING; + spin_unlock_irqrestore(ap-lock, flags); + ata_eh_about_to_do(link, NULL, ehc-i.action ATA_EH_RESET_MASK); /* Determine which reset to use and record in ehc-i.action. @@ -2231,6 +2237,11 @@ int ata_eh_reset(struct ata_link *link, int classify, out: /* clear hotplug flag */ ehc-i.flags = ~ATA_EHI_HOTPLUGGED; + + spin_lock_irqsave(ap-lock, flags); + ap-pflags = ~ATA_PFLAG_RESETTING; + spin_unlock_irqrestore(ap-lock, flags); + return rc; } diff --git a/include/linux/libata.h b/include/linux/libata.h index 84dfc23..9f2da92 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -210,6 +210,7 @@ enum { ATA_PFLAG_UNLOADING = (1 5), /* module is unloading */ ATA_PFLAG_SCSI_HOTPLUG = (1 6), /* SCSI hotplug scheduled */ ATA_PFLAG_INITIALIZING = (1 7), /* being initialized, don't touch */ + ATA_PFLAG_RESETTING = (1 8), /* reset in progress */ ATA_PFLAG_SUSPENDED = (1 17), /* port is suspended (power) */ ATA_PFLAG_PM_PENDING= (1 18), /* PM operation pending */ -- 1.5.0.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
[PATCH 3/3] libata: use ata_exec_internal() for PMP register access
PMP registers used to be accessed with dedicated accessors -pmp_read and -pmp_write. During reset, those callbacks are called with the port frozen so they should be able to run without depending on interrupt delivery. To achieve this, they were implemented polling. However, as resetting the host port makes the PMP to isolate fan-out ports until SError.X is cleared, resetting fan-out ports while port is frozen doesn't buy much additional safety. This patch updates libata PMP support such that PMP registers are accessed using regular ata_exec_internal() mechanism and kills -pmp_read/write() callbacks. The following changes are made. * PMP access helpers - sata_pmp_read_init_tf(), sata_pmp_read_val(), sata_pmp_write_init_tf() are folded into sata_pmp_read/write() which are now standalone PMP register access functions. * sata_pmp_read/write() returns err_mask instead of rc. This is consistent with other functions which issue internal commands and allows more detailed error reporting. * ahci interrupt handler is modified to ignore BAD_PMP and spurious/illegal completion IRQs while reset is in progress. These conditions are expected during reset. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/ahci.c| 48 +++ drivers/ata/libata-core.c |3 - drivers/ata/libata-eh.c | 17 +++- drivers/ata/libata-pmp.c | 209 - drivers/ata/sata_sil24.c | 30 --- include/linux/libata.h|8 -- 6 files changed, 118 insertions(+), 197 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index abfb72a..10bc3f6 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -239,8 +239,6 @@ static void ahci_freeze(struct ata_port *ap); static void ahci_thaw(struct ata_port *ap); static void ahci_pmp_attach(struct ata_port *ap); static void ahci_pmp_detach(struct ata_port *ap); -static int ahci_pmp_read(struct ata_device *dev, int pmp, int reg, u32 *r_val); -static int ahci_pmp_write(struct ata_device *dev, int pmp, int reg, u32 val); static void ahci_error_handler(struct ata_port *ap); static void ahci_vt8251_error_handler(struct ata_port *ap); static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); @@ -297,8 +295,6 @@ static const struct ata_port_operations ahci_ops = { .pmp_attach = ahci_pmp_attach, .pmp_detach = ahci_pmp_detach, - .pmp_read = ahci_pmp_read, - .pmp_write = ahci_pmp_write, #ifdef CONFIG_PM .port_suspend = ahci_port_suspend, @@ -333,8 +329,6 @@ static const struct ata_port_operations ahci_vt8251_ops = { .pmp_attach = ahci_pmp_attach, .pmp_detach = ahci_pmp_detach, - .pmp_read = ahci_pmp_read, - .pmp_write = ahci_pmp_write, #ifdef CONFIG_PM .port_suspend = ahci_port_suspend, @@ -1421,12 +1415,17 @@ static void ahci_port_intr(struct ata_port *ap) struct ata_eh_info *ehi = ap-link.eh_info; struct ahci_port_priv *pp = ap-private_data; struct ahci_host_priv *hpriv = ap-host-private_data; + int resetting = !!(ap-pflags ATA_PFLAG_RESETTING); u32 status, qc_active; int rc, known_irq = 0; status = readl(port_mmio + PORT_IRQ_STAT); writel(status, port_mmio + PORT_IRQ_STAT); + /* ignore BAD_PMP while resetting */ + if (unlikely(resetting)) + status = ~PORT_IRQ_BAD_PMP; + if (unlikely(status PORT_IRQ_ERROR)) { ahci_error_intr(ap, status); return; @@ -1464,6 +1463,13 @@ static void ahci_port_intr(struct ata_port *ap) qc_active = readl(port_mmio + PORT_CMD_ISSUE); rc = ata_qc_complete_multiple(ap, qc_active, NULL); + + /* If resetting, spurious or invalid completions are expected, +* return unconditionally. +*/ + if (resetting) + return; + if (rc 0) return; if (rc 0) { @@ -1701,36 +1707,6 @@ static void ahci_pmp_detach(struct ata_port *ap) writel(pp-intr_mask, port_mmio + PORT_IRQ_MASK); } -static int ahci_pmp_read(struct ata_device *dev, int pmp, int reg, u32 *r_val) -{ - struct ata_port *ap = dev-link-ap; - struct ata_taskfile tf; - int rc; - - ahci_kick_engine(ap, 0); - - sata_pmp_read_init_tf(tf, dev, pmp, reg); - rc = ahci_exec_polled_cmd(ap, SATA_PMP_CTRL_PORT, tf, 1, 0, - SATA_PMP_SCR_TIMEOUT); - if (rc == 0) { - ahci_tf_read(ap, tf); - *r_val = sata_pmp_read_val(tf); - } - return rc; -} - -static int ahci_pmp_write(struct ata_device *dev, int pmp, int reg, u32 val) -{ - struct ata_port *ap = dev-link-ap; - struct ata_taskfile tf; - - ahci_kick_engine(ap, 0); - - sata_pmp_write_init_tf(tf, dev, pmp, reg,
can't read sectors with SG_IO
Hi,I want to read for instance 1 sector from my ATA hard disk with the SG_IO ioctl.I havecreated,set the fields for the SG_IO ioctl,it returns 0 but no data in the buffer.I even used the hdparm 7.7 sg16 function to read sectors from the ATA device but no data came back.After the ioctl is executed the sense buffer,status,device_status contains data so there is a problem but I don't know what kind.For instance the identify command works,so I can not read,and probably write sectors.It is not possible to read sectors with SG_IO ? and how ? Thanks Kantor Check out the hottest 2008 models today at Yahoo! Autos. http://autos.yahoo.com/new_cars.html - 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: Polling (was Re: [PATCHSET 2/2] implement PMP support, take 6)
Jeff Garzik wrote: Tejun Heo wrote: Jeff Garzik wrote: A few days before that, both PMP and SAS /were/ slated for 2.6.24, and after I fix the design problems, they will be again. One way or another, upstream will /not/ be doing polling PMP in 2.6.24. Just an update to let you know that I've been working on it. sata_sil24 works okay but ahci still craps itself after resetting downstream ports. This turns out to be a different issue. SIMG 5723/5744 doesn't like being driven by ahci controllers (both ICH9 and JMB) and the problem isn't related to whether polling is used or not. It's very weird because SATA tracer doesn't show much difference on the host side wire between being driven by ahci and sil24/32, but on the fan-out side, things are seriously broken (repeated COMRESET/COMWAKE/COMINIT and no FIS successfully being relayed from the host side). Other than that, I've tested things on various combinations and am fairly confident with it. I think we can go for 2.6.24 merge. Even things turn out to be bad, we at least have pretty good bisection point. Thanks for your patience and perseverance. Thanks. :-) It looks like it would be too difficult to get SAS PMP working for 2.6.24 merge window open, so I think it is only fair to rescind my assertion of polling PMP not in 2.6.24 release. Removing the polling remains a design requirement for SAS, but the more I look at old-EH-encrusted libsas, the more work I feel it needs before its ready for PMP. Sorry. I wish libata EH was easier to deal with from SAS side. I think being able to present SAS end point as an independent ATA host to libata EH would probably make life easier for both sides, but I don't have any actual experience with SAS (yet). Thanks. -- tejun - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Linux, SATA and Port Multiplier
Hello, I'm just trying to be a little proactive. I need to buy a sata card to use with an older Intel SC450NX server. I want to use this cabinet: http://www.stardom.com.tw/sohotank%20st6600.htm Thus I need port multiplier support. I would also like to have a card with both eSATA og interne SATA connectors. I have looked around, and found this: http://www.highpoint-tech.com/USA/rr1742.htm It seems to use the Marvell 88SX6042 chipset. Does this support port multiplier? If not, do you have any recommendations for any PCI sata-controller that supports port multiplier? It doesn't have to have eSATA, but it needs to have internal sata, and eSATA is a plus. Regards, Stian - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] sata_mv: correct S/G table limits
The recent mv_fill_sg() rewrite, to fix a data corruption problem related to IOMMU virtual merging, forgot to account for the potentially-increased size of the scatter/gather table after its run. Additionally, the DMA boundary is reduced from 0x to 0x to more closely match the needs of mv_fill_sg(). Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/ata/sata_mv.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 1a82e22..cb7dec9 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -313,7 +313,10 @@ enum { #define IS_GEN_IIE(hpriv) ((hpriv)-hp_flags MV_HP_GEN_IIE) enum { - MV_DMA_BOUNDARY = 0xU, + /* DMA boundary 0x is required by the s/g splitting +* we need on /length/ in mv_fill-sg(). +*/ + MV_DMA_BOUNDARY = 0xU, /* mask of register bits containing lower 32 bits * of EDMA request queue DMA address @@ -448,7 +451,7 @@ static struct scsi_host_template mv5_sht = { .queuecommand = ata_scsi_queuecmd, .can_queue = ATA_DEF_QUEUE, .this_id= ATA_SHT_THIS_ID, - .sg_tablesize = MV_MAX_SG_CT, + .sg_tablesize = MV_MAX_SG_CT / 2, .cmd_per_lun= ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = 1, @@ -466,7 +469,7 @@ static struct scsi_host_template mv6_sht = { .queuecommand = ata_scsi_queuecmd, .can_queue = ATA_DEF_QUEUE, .this_id= ATA_SHT_THIS_ID, - .sg_tablesize = MV_MAX_SG_CT, + .sg_tablesize = MV_MAX_SG_CT / 2, .cmd_per_lun= ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = 1, - 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: libata: add per device private data
Sorry for the delay in responding, I was on vacation. On Tue, 02 Oct 2007 11:07:30 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Kristen Carlson Accardi wrote: Allow host controllers to store private data per device. Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED] --- include/linux/libata.h |3 +++ 1 file changed, 3 insertions(+) Index: libata-dev/include/linux/libata.h === --- libata-dev.orig/include/linux/libata.h 2007-09-24 16:13:33.0 -0700 +++ libata-dev/include/linux/libata.h 2007-09-24 16:15:24.0 -0700 @@ -474,6 +474,9 @@ struct ata_device { /* error history */ struct ata_eringering; int spdn_cnt; + + /* controller driver per device private data */ + void*private_data; I don't have any objections to this per se... a lot of other subsystems do this too, and I can certainly see a potential need. But what about object lifetimes? If a controller is hot-unplugged, does anyone need notification to destroy dynamic objects, or does controller cleanup take care of that? If a device is unplugged, where should a controller driver do its -private_data cleanup? This is /not/ a NAK, just a request to make clear the lifetime rules and procedures... Jeff I'll do this - and meanwhile go ahead and ignore this patch. I've decided to submit it as part of a series where I actually use the private data, so we can review it in context. Thanks, Kristen - 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/12] ide: check -dma_setup() return value in flagged_taskfile()
Hello. Bartlomiej Zolnierkiewicz wrote: Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] Acked-by: Sergei Shtylyov [EMAIL PROTECTED] MBR, Sergei - 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 7/13] ide: add IDE_HFLAG_LEGACY_IRQS host flag
Bartlomiej Zolnierkiewicz wrote: Add IDE_HFLAG_LEGACY_IRQS host flag to tell ide_pci_setup_ports() to set hwif-irq to legacy IRQ 14/15 (iff hwif-irq is not already set) and convert atiixp, piix, serverworks, sis5513 and slc90e66 host drivers to use it. While at it: * In piix.c add IDE_HFLAGS_PIIX define and don't use -init_hwif for MPIIX. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] Acked-by: Sergei Shtylyov [EMAIL PROTECTED] MBR, Sergei - 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_sis driver may be broken in openSUSE 10.3
I have checked the 32 Bit Version of openSuSE 10.3 with SiS965 chipset, it works. The sata_sis driver tries to load the pata_sis driver. but SuSE 10.3 tries to load the sis5513 before. pata_sis and sis5513 are trying to serve the same hardware. may be this affects a conflict. please try boot option brokenmodules=sis5513 You can also try to boot with brokenmodules=sis5513,pata_sis,sata_sis Then you must load later the modules pata_sis and sata_sis in this order. regards Uwe Nathaniel Dube wrote: I found your contact information in the file.. /usr/src/linux-2.6.18.8-0.5/drivers/ata/sata_sis.c And figured you might be the one to talk to. I, as well as many others have had issus with openSUSE 10.3 not detecting SATA hard drives. I don't know if the fault is with the kernel developers or openSUSE. But I do know the issue is with the sata_sis driver that's being provided with 10.3. I'm not a programer. I wouldn't know where to begin to fix this issue. Here are some links of people having the same problem. This is one from the openSUSE mailing list. http://lists.opensuse.org/opensuse/2007-10/msg00496.html This is one of the web forums. http://www.suseforums.net/index.php?showtopic=39625 And here's some from Newsgroups. To many to post here. You could look for them here. news://support-forums.novell.com/opensuse.org.suse-linux.support.install-configure-administration news://support-forums.novell.com/opensuse.org.suse-linux.support.general-applications Or on Usenet. news:alt.os.linux.suse Search for sata. There's also a Novell bug report here. https://bugzilla.novell.com/show_bug.cgi?id=331610 - 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
Invalid PnP ACPI reserved MMIO areas on Supermicro boards
Some people with certain Supermicro boards (at least the H8DCE, it seems) have reported that the sata_nv driver fails to attach to some of the controllers due to resource conflicts: https://bugzilla.redhat.com/show_bug.cgi?id=280641 https://bugzilla.redhat.com/show_bug.cgi?id=313491 Essentially since about 2.6.22 or so (before which we apparently didn't handle PnpACPI reserved MMIO regions?) we get: pnp: 00:09: iomem range 0xdfefd000-0xdfefd3ff has been reserved pnp: 00:09: iomem range 0xdfefe000-0xdfefe3ff has been reserved when the CK804 SATA controllers have as their BIOS-assigned resources: 80:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3) (prog-if 85 [Master SecO PriO]) Subsystem: Super Micro Computer Inc Unknown device 1011 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast TAbort- TAbort- MAbort- SERR- PERR- Interrupt: pin A routed to IRQ 46 Region 0: I/O ports at e400 [size=8] Region 1: I/O ports at e000 [size=4] Region 2: I/O ports at dc00 [size=8] Region 3: I/O ports at d800 [size=4] Region 4: I/O ports at d400 [size=16] Region 5: Memory at dfefd000 (32-bit, non-prefetchable) and 80:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3) (prog-if 85 [Master SecO PriO]) Subsystem: Super Micro Computer Inc Unknown device 1011 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast TAbort- TAbort- MAbort- SERR- PERR- Interrupt: pin A routed to IRQ 45 Region 0: I/O ports at f800 [size=8] Region 1: I/O ports at f400 [size=4] Region 2: I/O ports at f000 [size=8] Region 3: I/O ports at ec00 [size=4] Region 4: I/O ports at e800 [size=16] Region 5: Memory at dfefe000 (32-bit, non-prefetchable) [size=4K] And so of course we get: sata_nv :80:07.0: Using ADMA mode PCI: Unable to reserve mem region #6:[EMAIL PROTECTED] for device :80:07.0 ACPI: PCI interrupt for device :80:07.0 disabled sata_nv: probe of :80:07.0 failed with error -16 ACPI: PCI Interrupt Link [LT2E] enabled at IRQ 45 ACPI: PCI Interrupt :80:08.0[A] - Link [LT2E] - GSI 45 (level, low) - IRQ 45 sata_nv :80:08.0: Using ADMA mode PCI: Unable to reserve mem region #6:[EMAIL PROTECTED] for device :80:08.0 ACPI: PCI interrupt for device :80:08.0 disabled sata_nv: probe of :80:08.0 failed with error -16 So essentially the BIOS has erroneously reserved the SATA controller's BARs in the ACPI motherboard resources, preventing the driver from attaching to the device. Any ideas on what we can do about this? -Get Supermicro to fix the BIOS - already tried, it seems -System-specific quirk to ignore these resource reservations? -Try to move the PCI resources if they conflict with the ACPI resource reservations? I wonder how Windows deals with this, if it even does on these boards? -- Robert Hancock Saskatoon, SK, Canada To email, remove nospam from [EMAIL PROTECTED] Home Page: http://www.roberthancock.com/ - 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
libata-dev rebased
for 2.6.23 release. 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/1] pata_cs5536: ATA driver for Geode companion chip
Martin K. Petersen wrote: This is a driver specifically for the ATA controller on the Geode CS5536 companion chip. The PCI device ID for this device was previously claimed by pata_amd.c but there were two problems with that: - Not all Geode platforms emulate the ATA registers in PCI config space - CS5536 PIO timings are not identical to AMD74XX/8111 pata_cs5536.c relies on Geode Machine Specific Registers to configure the ATA function and uses the correct PIO timings for the chip. Signed-off-by: Martin K. Petersen [EMAIL PROTECTED] Just FWIW... one you guys are happy with things, I'm ready to merge the driver whenever. - 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: blacklist NCQ on Seagate Barracuda ST380817AS
Tejun Heo wrote: From: Paolo Ornati [EMAIL PROTECTED] Seagate Barracuda ST380817AS has troubles with NCQ. For example, unpacking a tarball on an XFS filesystem gives this: ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x2 frozen ata1.00: cmd 61/40:00:29:a3:98/00:00:00:00:00/40 tag 0 cdb 0x0 data 32768 out res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) More info here: http://lkml.org/lkml/2007/1/21/76 Blacklist it! Signed-off-by: Paolo Ornati [EMAIL PROTECTED] Signed-off-by: Tejun Heo [EMAIL PROTECTED] applied several of these - 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-core: Expose gtm methods for driver use
Alan Cox wrote: Talk to the dark side our driver has to, yes. Much misleading is the data. Store it in a structure we do so that it may be parsed. Signed-off-by: Alan Cox [EMAIL PROTECTED] applied 1-2 - 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: skip suppress reporting if ATA_EHI_QUIET
Tejun Heo wrote: ATA_EHI_NO_AUTOPSY and ATA_EHI_QUIET are used during initial probing to skip exception analysis and reporting. Usually, there's nothing to report but on some allowed but rare corner cases (e.g. phy status changed interrupt when IRQ is enabled on frozen port - this happens if IRQ pending status isn't cleared in the IRQ router or controller) exception messages get printed. Skip reporting if ATA_EHI_QUIET is set. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-eh.c |3 +++ 1 files changed, 3 insertions(+), 0 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: wrap schedule_timeout_uninterruptible() in loop
Tejun Heo wrote: Tasks in uninterruptible sleep might be woken up by unrelated events and should check whether the condition it was waiting for has actually triggered. Wrap schedule_timeout_uninterruptible() in loop to achieve it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-eh.c |3 ++- 1 files changed, 2 insertions(+), 1 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] ahci: kill leftover from enabling NCQ over PMP
Tejun Heo wrote: ahci had problems with NCQ over PMP and NCQ used to be disabled while PMP was attached. After fixing the problem, the temporary NCQ disabling code wasn't removed completely. Kill the remaining piece. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/ahci.c |8 1 files changed, 0 insertions(+), 8 deletions(-) applied both - 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 notification handling
Tejun Heo wrote: Asynchronous notification on ICH9 didn't work because it didn't write AN FIS into the RX area - it only updates SNotification. Also, snooping SDB_FIS RX area is racy against further SDB FIS receptions. Let sata_async_notification() determine using SNTF if it's available and snoop RX area iff SNTF isn't available Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Kristen Carlson Accardi [EMAIL PROTECTED] --- drivers/ata/ahci.c | 30 +- 1 files changed, 21 insertions(+), 9 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/3] libata: add @timeout to ata_exec_internal[_sg]()
Tejun Heo wrote: Add @timeout argument to ata_exec_internal[_sg](). If 0, default timeout ata_probe_timeout is used. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- This patchset kills polling PMP register access callbacks -pmp_read and -pmp_write and use standard ata_exec_internal() mechanism. This patchset is generated on top of the following six patches. http://article.gmane.org/gmane.linux.ide/23464 http://article.gmane.org/gmane.linux.ide/23465 http://article.gmane.org/gmane.linux.ide/23466 http://article.gmane.org/gmane.linux.ide/23467 http://article.gmane.org/gmane.linux.ide/23468 http://article.gmane.org/gmane.linux.ide/23469 drivers/ata/libata-acpi.c |2 +- drivers/ata/libata-core.c | 32 drivers/ata/libata-eh.c |4 ++-- drivers/ata/libata.h |5 +++-- 4 files changed, 26 insertions(+), 17 deletions(-) applied 1-3, thanks - 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: Invalid PnP ACPI reserved MMIO areas on Supermicro boards
On Tuesday 09 October 2007 20:01, Robert Hancock wrote: Some people with certain Supermicro boards (at least the H8DCE, it seems) have reported that the sata_nv driver fails to attach to some of the controllers due to resource conflicts: https://bugzilla.redhat.com/show_bug.cgi?id=280641 https://bugzilla.redhat.com/show_bug.cgi?id=313491 Essentially since about 2.6.22 or so (before which we apparently didn't handle PnpACPI reserved MMIO regions?) we get: So if you boot with pnpacpi=off then the board is happy? -Len pnp: 00:09: iomem range 0xdfefd000-0xdfefd3ff has been reserved pnp: 00:09: iomem range 0xdfefe000-0xdfefe3ff has been reserved when the CK804 SATA controllers have as their BIOS-assigned resources: 80:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3) (prog-if 85 [Master SecO PriO]) Subsystem: Super Micro Computer Inc Unknown device 1011 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast TAbort- TAbort- MAbort- SERR- PERR- Interrupt: pin A routed to IRQ 46 Region 0: I/O ports at e400 [size=8] Region 1: I/O ports at e000 [size=4] Region 2: I/O ports at dc00 [size=8] Region 3: I/O ports at d800 [size=4] Region 4: I/O ports at d400 [size=16] Region 5: Memory at dfefd000 (32-bit, non-prefetchable) and 80:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3) (prog-if 85 [Master SecO PriO]) Subsystem: Super Micro Computer Inc Unknown device 1011 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast TAbort- TAbort- MAbort- SERR- PERR- Interrupt: pin A routed to IRQ 45 Region 0: I/O ports at f800 [size=8] Region 1: I/O ports at f400 [size=4] Region 2: I/O ports at f000 [size=8] Region 3: I/O ports at ec00 [size=4] Region 4: I/O ports at e800 [size=16] Region 5: Memory at dfefe000 (32-bit, non-prefetchable) [size=4K] And so of course we get: sata_nv :80:07.0: Using ADMA mode PCI: Unable to reserve mem region #6:[EMAIL PROTECTED] for device :80:07.0 ACPI: PCI interrupt for device :80:07.0 disabled sata_nv: probe of :80:07.0 failed with error -16 ACPI: PCI Interrupt Link [LT2E] enabled at IRQ 45 ACPI: PCI Interrupt :80:08.0[A] - Link [LT2E] - GSI 45 (level, low) - IRQ 45 sata_nv :80:08.0: Using ADMA mode PCI: Unable to reserve mem region #6:[EMAIL PROTECTED] for device :80:08.0 ACPI: PCI interrupt for device :80:08.0 disabled sata_nv: probe of :80:08.0 failed with error -16 So essentially the BIOS has erroneously reserved the SATA controller's BARs in the ACPI motherboard resources, preventing the driver from attaching to the device. Any ideas on what we can do about this? -Get Supermicro to fix the BIOS - already tried, it seems -System-specific quirk to ignore these resource reservations? -Try to move the PCI resources if they conflict with the ACPI resource reservations? I wonder how Windows deals with this, if it even does on these boards? - 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