* [BK PATCHES] 2.6.x libata fixes
@ 2004-07-14 20:33 Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2004-07-14 20:33 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: Bartlomiej Zolnierkiewicz, linux-ide
Please do a
bk pull bk://kernel.bkbits.net/jgarzik/libata-upstream-2.6
This will update the following files:
drivers/pci/quirks.c | 31 ++++++++++++++++++++++++-------
drivers/scsi/libata-core.c | 6 ++++--
2 files changed, 28 insertions(+), 9 deletions(-)
through these ChangeSets:
<jgarzik@pobox.com> (04/07/14 1.1880)
[PCI, libata] Fix "combined mode" PCI quirk for ICH6
The hardware vendor, in their infinite wisdom, make the combined
mode configuration register different between ICH5 and ICH6.
Take this into account.
<Sergio.Gelato@astro.su.se> (04/07/14 1.1879)
[PATCH] libata: fix kunmap() of incorrect page, in PIO data xfer
Obvious bug. Fixes highmem oops.
diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c
--- a/drivers/pci/quirks.c 2004-07-14 16:32:30 -04:00
+++ b/drivers/pci/quirks.c 2004-07-14 16:32:30 -04:00
@@ -817,6 +817,7 @@
static void __init quirk_intel_ide_combined(struct pci_dev *pdev)
{
u8 prog, comb, tmp;
+ int ich = 0;
/*
* Narrow down to Intel SATA PCI devices.
@@ -827,8 +828,12 @@
case 0x24df:
case 0x25a3:
case 0x25b0:
+ ich = 5;
+ break;
case 0x2651:
case 0x2652:
+ case 0x2653:
+ ich = 6;
break;
default:
/* we do not handle this PCI device */
@@ -839,13 +844,25 @@
* Read combined mode register.
*/
pci_read_config_byte(pdev, 0x90, &tmp); /* combined mode reg */
- tmp &= 0x6; /* interesting bits 2:1, PATA primary/secondary */
- if (tmp == 0x4) /* bits 10x */
- comb = (1 << 0); /* SATA port 0, PATA port 1 */
- else if (tmp == 0x6) /* bits 11x */
- comb = (1 << 2); /* PATA port 0, SATA port 1 */
- else
- return; /* not in combined mode */
+
+ if (ich == 5) {
+ tmp &= 0x6; /* interesting bits 2:1, PATA primary/secondary */
+ if (tmp == 0x4) /* bits 10x */
+ comb = (1 << 0); /* SATA port 0, PATA port 1 */
+ else if (tmp == 0x6) /* bits 11x */
+ comb = (1 << 2); /* PATA port 0, SATA port 1 */
+ else
+ return; /* not in combined mode */
+ } else {
+ WARN_ON(ich != 6);
+ tmp &= 0x3; /* interesting bits 1:0 */
+ if (tmp & (1 << 0))
+ comb = (1 << 2); /* PATA port 0, SATA port 1 */
+ else if (tmp & (1 << 1))
+ comb = (1 << 0); /* SATA port 0, PATA port 1 */
+ else
+ return; /* not in combined mode */
+ }
/*
* Read programming interface register.
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c 2004-07-14 16:32:30 -04:00
+++ b/drivers/scsi/libata-core.c 2004-07-14 16:32:30 -04:00
@@ -2029,6 +2029,7 @@
{
struct ata_queued_cmd *qc;
struct scatterlist *sg;
+ struct page *page;
unsigned char *buf;
u8 status;
@@ -2065,7 +2066,8 @@
if (qc->cursect == (qc->nsect - 1))
ap->pio_task_state = PIO_ST_LAST;
- buf = kmap(sg[qc->cursg].page) +
+ page = sg[qc->cursg].page;
+ buf = kmap(page) +
sg[qc->cursg].offset + (qc->cursg_ofs * ATA_SECT_SIZE);
qc->cursect++;
@@ -2088,7 +2090,7 @@
else
insl(ap->ioaddr.data_addr, buf, ATA_SECT_DWORDS);
- kunmap(sg[qc->cursg].page);
+ kunmap(page);
}
static void ata_pio_task(void *_data)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [BK PATCHES] 2.6.x libata fixes
@ 2004-08-29 1:07 Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2004-08-29 1:07 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: Bartlomiej Zolnierkiewicz, linux-ide
Please do a
bk pull bk://gkernel.bkbits.net/libata-2.6
This will update the following files:
drivers/scsi/libata-core.c | 8 ++++----
drivers/scsi/sata_nv.c | 20 ++++++++++++--------
2 files changed, 16 insertions(+), 12 deletions(-)
through these ChangeSets:
<achew@nvidia.com> (04/08/28 1.1913)
[PATCH] sata_nv: fix CK804 support
This patch fixes a problem introduced when CK804 support was added. mmio_base can only be set in the CK804 case,
else libata will attempt to iounmap mmio_base, which isn't iomapped for the non-CK804 case. Still need the bar 5
address, so steal from host_set->ports[0]->ioaddr.scr_addr. Jeff, let me know if this is a bad thing to do.
<jeremy@sgi.com> (04/08/28 1.1912)
[PATCH] Fix DMA boundary overflow bug
We seem to have found an overflow problem in libata-core.c.
We were trying to DMA to the address range 0xffff8000-0xffffbfff.
In the original version of the code, given that address and
count (0xffff8000 and 0x4000), the variable "boundary" would be
set to 0, causing len to be set to 0x8000 (which is greater than
sg_len). Then at the bottom of the loop, sg_len would be set
to 0xffffc000 (0x4000 - 0x8000), which would then cause the
loop never to terminate (until much of memory was scribbled
over or the kernel died).
The code below should be functionally identical, but not be
subject to the same overflow problem (boundary needs to be a
u33).
Signed-off-by: jeremy@sgi.com
===== drivers/scsi/libata-core.c 1.94 vs edited =====
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c 2004-08-28 21:06:41 -04:00
+++ b/drivers/scsi/libata-core.c 2004-08-28 21:06:41 -04:00
@@ -1836,7 +1836,7 @@
idx = 0;
for (nelem = qc->n_elem; nelem; nelem--,sg++) {
- u32 addr, boundary;
+ u32 addr, offset;
u32 sg_len, len;
/* determine if physical DMA addr spans 64K boundary.
@@ -1847,10 +1847,10 @@
sg_len = sg_dma_len(sg);
while (sg_len) {
- boundary = (addr & ~0xffff) + (0xffff + 1);
+ offset = addr & 0xffff;
len = sg_len;
- if ((addr + sg_len) > boundary)
- len = boundary - addr;
+ if ((offset + sg_len) > 0x10000)
+ len = 0x10000 - offset;
ap->prd[idx].addr = cpu_to_le32(addr);
ap->prd[idx].flags_len = cpu_to_le32(len & 0xffff);
diff -Nru a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
--- a/drivers/scsi/sata_nv.c 2004-08-28 21:06:41 -04:00
+++ b/drivers/scsi/sata_nv.c 2004-08-28 21:06:41 -04:00
@@ -20,6 +20,10 @@
* If you do not delete the provisions above, a recipient may use your
* version of this file under either the OSL or the GPL.
*
+ * 0.03
+ * - Fixed a bug where the hotplug handlers for non-CK804/MCP04 were using
+ * mmio_base, which is only set for the CK804/MCP04 case.
+ *
* 0.02
* - Added support for CK804 SATA controller.
*
@@ -40,7 +44,7 @@
#include <linux/libata.h>
#define DRV_NAME "sata_nv"
-#define DRV_VERSION "0.02"
+#define DRV_VERSION "0.03"
#define NV_PORTS 2
#define NV_PIO_MASK 0x1f
@@ -422,33 +426,33 @@
u8 intr_mask;
outb(NV_INT_STATUS_HOTPLUG,
- (unsigned long)probe_ent->mmio_base + NV_INT_STATUS);
+ probe_ent->port[0].scr_addr + NV_INT_STATUS);
- intr_mask = inb((unsigned long)probe_ent->mmio_base + NV_INT_ENABLE);
+ intr_mask = inb(probe_ent->port[0].scr_addr + NV_INT_ENABLE);
intr_mask |= NV_INT_ENABLE_HOTPLUG;
- outb(intr_mask, (unsigned long)probe_ent->mmio_base + NV_INT_ENABLE);
+ outb(intr_mask, probe_ent->port[0].scr_addr + NV_INT_ENABLE);
}
static void nv_disable_hotplug(struct ata_host_set *host_set)
{
u8 intr_mask;
- intr_mask = inb((unsigned long)host_set->mmio_base + NV_INT_ENABLE);
+ intr_mask = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE);
intr_mask &= ~(NV_INT_ENABLE_HOTPLUG);
- outb(intr_mask, (unsigned long)host_set->mmio_base + NV_INT_ENABLE);
+ outb(intr_mask, host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE);
}
static void nv_check_hotplug(struct ata_host_set *host_set)
{
u8 intr_status;
- intr_status = inb((unsigned long)host_set->mmio_base + NV_INT_STATUS);
+ intr_status = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS);
// Clear interrupt status.
- outb(0xff, (unsigned long)host_set->mmio_base + NV_INT_STATUS);
+ outb(0xff, host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS);
if (intr_status & NV_INT_STATUS_HOTPLUG) {
if (intr_status & NV_INT_STATUS_PDEV_ADDED)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [BK PATCHES] 2.6.x libata fixes
@ 2004-08-30 18:50 Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2004-08-30 18:50 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, Bartlomiej Zolnierkiewicz
Please do a
bk pull bk://gkernel.bkbits.net/libata-2.6
This will update the following files:
drivers/scsi/ata_piix.c | 2 +-
drivers/scsi/libata-core.c | 8 ++++----
drivers/scsi/sata_nv.c | 20 ++++++++++++--------
3 files changed, 17 insertions(+), 13 deletions(-)
through these ChangeSets:
<bzolnier@elka.pw.edu.pl> (04/08/30 1.1914)
[PATCH] libata: ata_piix.c PIO fix
[patch] libata: ata_piix.c PIO fix
"[libata] transfer mode cleanup" introduced bug in ata_piix.c:
previously PIO number (not mode) was passed to piix_set_piomode().
Fortunately this function is only used for (disabled) PATA support.
I bet that this is the reason why MWDMA didn't work for PATA.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
<achew@nvidia.com> (04/08/28 1.1913)
[PATCH] sata_nv: fix CK804 support
This patch fixes a problem introduced when CK804 support was added. mmio_base can only be set in the CK804 case,
else libata will attempt to iounmap mmio_base, which isn't iomapped for the non-CK804 case. Still need the bar 5
address, so steal from host_set->ports[0]->ioaddr.scr_addr. Jeff, let me know if this is a bad thing to do.
<jeremy@sgi.com> (04/08/28 1.1912)
[PATCH] Fix DMA boundary overflow bug
We seem to have found an overflow problem in libata-core.c.
We were trying to DMA to the address range 0xffff8000-0xffffbfff.
In the original version of the code, given that address and
count (0xffff8000 and 0x4000), the variable "boundary" would be
set to 0, causing len to be set to 0x8000 (which is greater than
sg_len). Then at the bottom of the loop, sg_len would be set
to 0xffffc000 (0x4000 - 0x8000), which would then cause the
loop never to terminate (until much of memory was scribbled
over or the kernel died).
The code below should be functionally identical, but not be
subject to the same overflow problem (boundary needs to be a
u33).
Signed-off-by: jeremy@sgi.com
===== drivers/scsi/libata-core.c 1.94 vs edited =====
diff -Nru a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
--- a/drivers/scsi/ata_piix.c 2004-08-30 14:44:42 -04:00
+++ b/drivers/scsi/ata_piix.c 2004-08-30 14:44:42 -04:00
@@ -389,7 +389,7 @@
static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev)
{
- unsigned int pio = adev->pio_mode;
+ unsigned int pio = adev->pio_mode - XFER_PIO_0;
struct pci_dev *dev = ap->host_set->pdev;
unsigned int is_slave = (adev->devno != 0);
unsigned int master_port= ap->port_no ? 0x42 : 0x40;
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c 2004-08-30 14:44:42 -04:00
+++ b/drivers/scsi/libata-core.c 2004-08-30 14:44:42 -04:00
@@ -1836,7 +1836,7 @@
idx = 0;
for (nelem = qc->n_elem; nelem; nelem--,sg++) {
- u32 addr, boundary;
+ u32 addr, offset;
u32 sg_len, len;
/* determine if physical DMA addr spans 64K boundary.
@@ -1847,10 +1847,10 @@
sg_len = sg_dma_len(sg);
while (sg_len) {
- boundary = (addr & ~0xffff) + (0xffff + 1);
+ offset = addr & 0xffff;
len = sg_len;
- if ((addr + sg_len) > boundary)
- len = boundary - addr;
+ if ((offset + sg_len) > 0x10000)
+ len = 0x10000 - offset;
ap->prd[idx].addr = cpu_to_le32(addr);
ap->prd[idx].flags_len = cpu_to_le32(len & 0xffff);
diff -Nru a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
--- a/drivers/scsi/sata_nv.c 2004-08-30 14:44:42 -04:00
+++ b/drivers/scsi/sata_nv.c 2004-08-30 14:44:42 -04:00
@@ -20,6 +20,10 @@
* If you do not delete the provisions above, a recipient may use your
* version of this file under either the OSL or the GPL.
*
+ * 0.03
+ * - Fixed a bug where the hotplug handlers for non-CK804/MCP04 were using
+ * mmio_base, which is only set for the CK804/MCP04 case.
+ *
* 0.02
* - Added support for CK804 SATA controller.
*
@@ -40,7 +44,7 @@
#include <linux/libata.h>
#define DRV_NAME "sata_nv"
-#define DRV_VERSION "0.02"
+#define DRV_VERSION "0.03"
#define NV_PORTS 2
#define NV_PIO_MASK 0x1f
@@ -422,33 +426,33 @@
u8 intr_mask;
outb(NV_INT_STATUS_HOTPLUG,
- (unsigned long)probe_ent->mmio_base + NV_INT_STATUS);
+ probe_ent->port[0].scr_addr + NV_INT_STATUS);
- intr_mask = inb((unsigned long)probe_ent->mmio_base + NV_INT_ENABLE);
+ intr_mask = inb(probe_ent->port[0].scr_addr + NV_INT_ENABLE);
intr_mask |= NV_INT_ENABLE_HOTPLUG;
- outb(intr_mask, (unsigned long)probe_ent->mmio_base + NV_INT_ENABLE);
+ outb(intr_mask, probe_ent->port[0].scr_addr + NV_INT_ENABLE);
}
static void nv_disable_hotplug(struct ata_host_set *host_set)
{
u8 intr_mask;
- intr_mask = inb((unsigned long)host_set->mmio_base + NV_INT_ENABLE);
+ intr_mask = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE);
intr_mask &= ~(NV_INT_ENABLE_HOTPLUG);
- outb(intr_mask, (unsigned long)host_set->mmio_base + NV_INT_ENABLE);
+ outb(intr_mask, host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE);
}
static void nv_check_hotplug(struct ata_host_set *host_set)
{
u8 intr_status;
- intr_status = inb((unsigned long)host_set->mmio_base + NV_INT_STATUS);
+ intr_status = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS);
// Clear interrupt status.
- outb(0xff, (unsigned long)host_set->mmio_base + NV_INT_STATUS);
+ outb(0xff, host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS);
if (intr_status & NV_INT_STATUS_HOTPLUG) {
if (intr_status & NV_INT_STATUS_PDEV_ADDED)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [BK PATCHES] 2.6.x libata fixes
@ 2004-10-31 0:18 Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2004-10-31 0:18 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide
Fix rather ugly (and/or embarrassing) bugs in AHCI.
Some random guy popped up at a random time to kill a bug I've been
searching for, for over a week... :)
Please do a
bk pull bk://gkernel.bkbits.net/libata-2.6
This will update the following files:
drivers/scsi/ahci.c | 38 +++++++++++++++++++++++++++-------
drivers/scsi/sata_promise.c | 48 ++++++++++++++++++++++----------------------
2 files changed, 54 insertions(+), 32 deletions(-)
through these ChangeSets:
<jgarzik@pobox.com> (04/10/30 1.2349)
[libata ahci] bump version to 1.00
<mmelchior@xs4all.nl> (04/10/30 1.2348)
[libata ahci] fix rather serious (and/or embarassing) bugs
- Add definition for SActive register
- Add most interrupt sources to default interrupt mask
- Write low 32 bits of FIS address to PxFB, where they belong
- Set command active bit in PxSACT before setting command issue bit in PxCI
- Announce Sub Class Code in driver info message [IDE, SATA or RAID]
and additionally, from me [jgarzik]:
- ignore ports-implemented bitmap for now; it's a write-only register
that silly BIOSen initialize incorreclty
Signed-off-by: Matthijs Melchior <mmelchior@xs4all.nl>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
<tobias.lorenz@gmx.net> (04/10/30 1.2347)
[libata sata_promise] s/sata/ata/
100% cosmetic: rename various symbols with 'sata' in them to 'ata',
in preparation for addition of support for a PATA controller.
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c 2004-10-30 20:16:29 -04:00
+++ b/drivers/scsi/ahci.c 2004-10-30 20:16:29 -04:00
@@ -38,7 +38,7 @@
#include <asm/io.h>
#define DRV_NAME "ahci"
-#define DRV_VERSION "0.11"
+#define DRV_VERSION "1.00"
enum {
@@ -90,6 +90,7 @@
PORT_SCR_STAT = 0x28, /* SATA phy register: SStatus */
PORT_SCR_CTL = 0x2c, /* SATA phy register: SControl */
PORT_SCR_ERR = 0x30, /* SATA phy register: SError */
+ PORT_SCR_ACT = 0x34, /* SATA phy register: SActive */
/* PORT_IRQ_{STAT,MASK} bits */
PORT_IRQ_COLD_PRES = (1 << 31), /* cold presence detect */
@@ -116,6 +117,9 @@
PORT_IRQ_HBUS_DATA_ERR |
PORT_IRQ_IF_ERR,
DEF_PORT_IRQ = PORT_IRQ_FATAL | PORT_IRQ_PHYRDY |
+ PORT_IRQ_CONNECT | PORT_IRQ_SG_DONE |
+ PORT_IRQ_UNK_FIS | PORT_IRQ_SDB_FIS |
+ PORT_IRQ_DMAS_FIS | PORT_IRQ_PIOS_FIS |
PORT_IRQ_D2H_REG_FIS,
/* PORT_CMD bits */
@@ -329,8 +333,8 @@
if (hpriv->cap & HOST_CAP_64)
writel((pp->rx_fis_dma >> 16) >> 16, port_mmio + PORT_FIS_ADDR_HI);
- writel(pp->rx_fis_dma & 0xffffffff, port_mmio + PORT_LST_ADDR);
- readl(port_mmio + PORT_LST_ADDR); /* flush */
+ writel(pp->rx_fis_dma & 0xffffffff, port_mmio + PORT_FIS_ADDR);
+ readl(port_mmio + PORT_FIS_ADDR); /* flush */
writel(PORT_CMD_ICC_ACTIVE | PORT_CMD_FIS_RX |
PORT_CMD_POWER_ON | PORT_CMD_SPIN_UP |
@@ -672,10 +676,13 @@
static int ahci_qc_issue(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
- void *mmio = (void *) ap->ioaddr.cmd_addr;
+ void *port_mmio = (void *) ap->ioaddr.cmd_addr;
+
+ writel(1, port_mmio + PORT_SCR_ACT);
+ readl(port_mmio + PORT_SCR_ACT); /* flush */
- writel(1, mmio + PORT_CMD_ISSUE);
- readl(mmio + PORT_CMD_ISSUE); /* flush */
+ writel(1, port_mmio + PORT_CMD_ISSUE);
+ readl(port_mmio + PORT_CMD_ISSUE); /* flush */
return 0;
}
@@ -774,8 +781,10 @@
}
for (i = 0; i < probe_ent->n_ports; i++) {
+#if 0 /* BIOSen initialize this incorrectly */
if (!(hpriv->port_map & (1 << i)))
continue;
+#endif
port_mmio = ahci_port_base(mmio, i);
VPRINTK("mmio %p port_mmio %p\n", mmio, port_mmio);
@@ -856,6 +865,8 @@
void *mmio = probe_ent->mmio_base;
u32 vers, cap, impl, speed;
const char *speed_s;
+ u16 cc;
+ const char *scc_s;
vers = readl(mmio + HOST_VERSION);
cap = hpriv->cap;
@@ -869,8 +880,18 @@
else
speed_s = "?";
+ pci_read_config_word(pdev, 0x0a, &cc);
+ if (cc == 0x0101)
+ scc_s = "IDE";
+ else if (cc == 0x0106)
+ scc_s = "SATA";
+ else if (cc == 0x0104)
+ scc_s = "RAID";
+ else
+ scc_s = "unknown";
+
printk(KERN_INFO DRV_NAME "(%s) AHCI %02x%02x.%02x%02x "
- "%u slots %u ports %s Gbps 0x%x impl\n"
+ "%u slots %u ports %s Gbps 0x%x impl %s mode\n"
,
pci_name(pdev),
@@ -882,7 +903,8 @@
((cap >> 8) & 0x1f) + 1,
(cap & 0x1f) + 1,
speed_s,
- impl);
+ impl,
+ scc_s);
printk(KERN_INFO DRV_NAME "(%s) flags: "
"%s%s%s%s%s%s"
diff -Nru a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
--- a/drivers/scsi/sata_promise.c 2004-10-30 20:16:29 -04:00
+++ b/drivers/scsi/sata_promise.c 2004-10-30 20:16:29 -04:00
@@ -73,7 +73,7 @@
static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg);
static void pdc_sata_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
-static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
+static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
static void pdc_eng_timeout(struct ata_port *ap);
static int pdc_port_start(struct ata_port *ap);
@@ -85,7 +85,7 @@
static void pdc_irq_clear(struct ata_port *ap);
static int pdc_qc_issue_prot(struct ata_queued_cmd *qc);
-static Scsi_Host_Template pdc_sata_sht = {
+static Scsi_Host_Template pdc_ata_sht = {
.module = THIS_MODULE,
.name = DRV_NAME,
.ioctl = ata_scsi_ioctl,
@@ -104,7 +104,7 @@
.bios_param = ata_std_bios_param,
};
-static struct ata_port_operations pdc_sata_ops = {
+static struct ata_port_operations pdc_ata_ops = {
.port_disable = ata_port_disable,
.tf_load = pdc_tf_load_mmio,
.tf_read = ata_tf_read,
@@ -126,28 +126,28 @@
static struct ata_port_info pdc_port_info[] = {
/* board_2037x */
{
- .sht = &pdc_sata_sht,
+ .sht = &pdc_ata_sht,
.host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_SRST | ATA_FLAG_MMIO,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
- .port_ops = &pdc_sata_ops,
+ .port_ops = &pdc_ata_ops,
},
/* board_20319 */
{
- .sht = &pdc_sata_sht,
+ .sht = &pdc_ata_sht,
.host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_SRST | ATA_FLAG_MMIO,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
- .port_ops = &pdc_sata_ops,
+ .port_ops = &pdc_ata_ops,
},
};
-static struct pci_device_id pdc_sata_pci_tbl[] = {
+static struct pci_device_id pdc_ata_pci_tbl[] = {
{ PCI_VENDOR_ID_PROMISE, 0x3371, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_2037x },
{ PCI_VENDOR_ID_PROMISE, 0x3373, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
@@ -164,10 +164,10 @@
};
-static struct pci_driver pdc_sata_pci_driver = {
+static struct pci_driver pdc_ata_pci_driver = {
.name = DRV_NAME,
- .id_table = pdc_sata_pci_tbl,
- .probe = pdc_sata_init_one,
+ .id_table = pdc_ata_pci_tbl,
+ .probe = pdc_ata_init_one,
.remove = ata_pci_remove_one,
};
@@ -481,7 +481,7 @@
}
-static void pdc_sata_setup_port(struct ata_ioports *port, unsigned long base)
+static void pdc_ata_setup_port(struct ata_ioports *port, unsigned long base)
{
port->cmd_addr = base;
port->data_addr = base;
@@ -539,7 +539,7 @@
writel(tmp, mmio + PDC_SLEW_CTL);
}
-static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
+static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int printed_version;
struct ata_probe_ent *probe_ent = NULL;
@@ -599,8 +599,8 @@
probe_ent->irq_flags = SA_SHIRQ;
probe_ent->mmio_base = mmio_base;
- pdc_sata_setup_port(&probe_ent->port[0], base + 0x200);
- pdc_sata_setup_port(&probe_ent->port[1], base + 0x280);
+ pdc_ata_setup_port(&probe_ent->port[0], base + 0x200);
+ pdc_ata_setup_port(&probe_ent->port[1], base + 0x280);
probe_ent->port[0].scr_addr = base + 0x400;
probe_ent->port[1].scr_addr = base + 0x500;
@@ -610,8 +610,8 @@
case board_20319:
probe_ent->n_ports = 4;
- pdc_sata_setup_port(&probe_ent->port[2], base + 0x300);
- pdc_sata_setup_port(&probe_ent->port[3], base + 0x380);
+ pdc_ata_setup_port(&probe_ent->port[2], base + 0x300);
+ pdc_ata_setup_port(&probe_ent->port[3], base + 0x380);
probe_ent->port[2].scr_addr = base + 0x600;
probe_ent->port[3].scr_addr = base + 0x700;
@@ -645,22 +645,22 @@
}
-static int __init pdc_sata_init(void)
+static int __init pdc_ata_init(void)
{
- return pci_module_init(&pdc_sata_pci_driver);
+ return pci_module_init(&pdc_ata_pci_driver);
}
-static void __exit pdc_sata_exit(void)
+static void __exit pdc_ata_exit(void)
{
- pci_unregister_driver(&pdc_sata_pci_driver);
+ pci_unregister_driver(&pdc_ata_pci_driver);
}
MODULE_AUTHOR("Jeff Garzik");
MODULE_DESCRIPTION("Promise SATA TX2/TX4 low-level driver");
MODULE_LICENSE("GPL");
-MODULE_DEVICE_TABLE(pci, pdc_sata_pci_tbl);
+MODULE_DEVICE_TABLE(pci, pdc_ata_pci_tbl);
-module_init(pdc_sata_init);
-module_exit(pdc_sata_exit);
+module_init(pdc_ata_init);
+module_exit(pdc_ata_exit);
^ permalink raw reply [flat|nested] 8+ messages in thread
* [BK PATCHES] 2.6.x libata fixes
@ 2004-12-08 1:03 Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2004-12-08 1:03 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide
The DMA map bug was pretty ugly. Caused some "my device is gone"
problems, but no data corruption thankfully. Please apply.
Please do a
bk pull bk://gkernel.bkbits.net/libata-2.6
This will update the following files:
drivers/scsi/ahci.c | 3 ++-
drivers/scsi/libata-core.c | 42 ++++++++++++++++++++++++++++++++++--------
drivers/scsi/libata-scsi.c | 4 ++--
include/linux/libata.h | 1 +
4 files changed, 39 insertions(+), 11 deletions(-)
through these ChangeSets:
<dougg@torque.net> (04/12/07 1.2150)
[PATCH] off-by-1 libata-scsi INQUIRY VPD pages 0x80 and 0x83
I have some code (in sginfo) that requests the first 4 bytes
of SCSI INQUIRY VPD pages to get their length then asks for
that exact length in a follow up request to fetch the payload.
Just like I saw with 36 byte standard INQUIRYs (no fixed)
I get a buffer full or zeroes.
BTW SCSI standards dictate that in situations where the allocation
length (in the cdb) is less than what is needed that what can be
sent shall be sent (i.e. truncated and without any error indication
or modification to the part of the response returned).
In other words it is up the the application client to take remedial
action.
Changelog:
- fix off-by-1 allocation length issue with SCSI
INQUIRY VPD pages 0x80 and 0x83
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
<jgarzik@pobox.com> (04/12/07 1.2149)
[libata] only DMA map data for DMA commands (fix >=4GB bug)
libata made the assumption that (for PIO commands in this case)
it could modify DMA memory at the kernel-virtual address, after
mapping this. This is incorrect, and fails on e.g. platforms that
copy DMA memory back and forth (swiotlb on Intel EM64T and IA64).
Remove this assumption by ensuring that we only call the DMA mapping
routines if we really are going to use DMA for data xfer.
Also: remove a bogus WARN_ON() in ata_sg_init_one() which caused
bug reports (but no problems).
diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c 2004-12-07 20:01:34 -05:00
+++ b/drivers/scsi/ahci.c 2004-12-07 20:01:34 -05:00
@@ -229,7 +229,8 @@
{
.sht = &ahci_sht,
.host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
- ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO,
+ ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO |
+ ATA_FLAG_PIO_DMA,
.pio_mask = 0x03, /* pio3-4 */
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
.port_ops = &ahci_ops,
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c 2004-12-07 20:01:34 -05:00
+++ b/drivers/scsi/libata-core.c 2004-12-07 20:01:34 -05:00
@@ -1950,8 +1950,6 @@
sg->page = virt_to_page(buf);
sg->offset = (unsigned long) buf & ~PAGE_MASK;
sg_dma_len(sg) = buflen;
-
- WARN_ON(buflen > PAGE_SIZE);
}
void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
@@ -2693,6 +2691,30 @@
VPRINTK("EXIT\n");
}
+static inline int ata_should_dma_map(struct ata_queued_cmd *qc)
+{
+ struct ata_port *ap = qc->ap;
+
+ switch (qc->tf.protocol) {
+ case ATA_PROT_DMA:
+ case ATA_PROT_ATAPI_DMA:
+ return 1;
+
+ case ATA_PROT_ATAPI:
+ case ATA_PROT_PIO:
+ case ATA_PROT_PIO_MULT:
+ if (ap->flags & ATA_FLAG_PIO_DMA)
+ return 1;
+
+ /* fall through */
+
+ default:
+ return 0;
+ }
+
+ /* never reached */
+}
+
/**
* ata_qc_issue - issue taskfile to device
* @qc: command to issue to device
@@ -2713,12 +2735,16 @@
{
struct ata_port *ap = qc->ap;
- if (qc->flags & ATA_QCFLAG_SG) {
- if (ata_sg_setup(qc))
- goto err_out;
- } else if (qc->flags & ATA_QCFLAG_SINGLE) {
- if (ata_sg_setup_one(qc))
- goto err_out;
+ if (ata_should_dma_map(qc)) {
+ if (qc->flags & ATA_QCFLAG_SG) {
+ if (ata_sg_setup(qc))
+ goto err_out;
+ } else if (qc->flags & ATA_QCFLAG_SINGLE) {
+ if (ata_sg_setup_one(qc))
+ goto err_out;
+ }
+ } else {
+ qc->flags &= ~ATA_QCFLAG_DMAMAP;
}
ap->ops->qc_prep(qc);
diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
--- a/drivers/scsi/libata-scsi.c 2004-12-07 20:01:34 -05:00
+++ b/drivers/scsi/libata-scsi.c 2004-12-07 20:01:34 -05:00
@@ -898,7 +898,7 @@
};
memcpy(rbuf, hdr, sizeof(hdr));
- if (buflen > (ATA_SERNO_LEN + 4))
+ if (buflen > (ATA_SERNO_LEN + 4 - 1))
ata_dev_id_string(args->id, (unsigned char *) &rbuf[4],
ATA_ID_SERNO_OFS, ATA_SERNO_LEN);
@@ -927,7 +927,7 @@
rbuf[3] = 4 + strlen(inq_83_str); /* page len */
/* our one and only identification descriptor (vendor-specific) */
- if (buflen > (strlen(inq_83_str) + 4 + 4)) {
+ if (buflen > (strlen(inq_83_str) + 4 + 4 - 1)) {
rbuf[4 + 0] = 2; /* code set: ASCII */
rbuf[4 + 3] = strlen(inq_83_str);
memcpy(rbuf + 4 + 4, inq_83_str, strlen(inq_83_str));
diff -Nru a/include/linux/libata.h b/include/linux/libata.h
--- a/include/linux/libata.h 2004-12-07 20:01:34 -05:00
+++ b/include/linux/libata.h 2004-12-07 20:01:34 -05:00
@@ -112,6 +112,7 @@
ATA_FLAG_SRST = (1 << 5), /* use ATA SRST, not E.D.D. */
ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */
ATA_FLAG_SATA_RESET = (1 << 7), /* use COMRESET */
+ ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
^ permalink raw reply [flat|nested] 8+ messages in thread
* [BK PATCHES] 2.6.x libata fixes
@ 2005-02-07 9:19 Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2005-02-07 9:19 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: libata-2.6.txt --]
[-- Type: text/plain, Size: 18994 bytes --]
Please do a
bk pull bk://gkernel.bkbits.net/libata-2.6
This will update the following files:
drivers/scsi/ahci.c | 2
drivers/scsi/libata-core.c | 187 ++++++++++++++++++++++++++++++++------------
drivers/scsi/libata-scsi.c | 35 ++++----
drivers/scsi/sata_nv.c | 45 ++++++++--
drivers/scsi/sata_promise.c | 14 ++-
drivers/scsi/sata_sil.c | 1
include/linux/ata.h | 2
include/linux/libata.h | 2
8 files changed, 209 insertions(+), 79 deletions(-)
through these ChangeSets:
<jpaana:s2.org>:
o [libata sata_promise] add PCI ID for new SATAII TX2 card
<mkrikis:yahoo.com>:
o libata: fix ata_piix on ICH6R in RAID mode
<syntax:pa.net>:
o [libata sata_sil] add another Seagate drive to blacklist
Albert Lee:
o [libata] SCSI-to-ATA translation fixes
Andrew Chew:
o sata_nv: enable generic class support for future NVIDIA SATA
Brett Russ:
o [libata scsi] verify cmd bug fixes/support
Jeff Garzik:
o [libata ahci] Add support for ULi M5288
o [libata sata_promise] support Promise SATAII TX2/TX4 cards
o [libata] Remove CDROM drive from PATA DMA blacklist
o [libata] add DMA blacklist
Pete Zaitcev:
o [libata] fix probe object allocation bugs
diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c 2005-02-07 04:11:15 -05:00
+++ b/drivers/scsi/ahci.c 2005-02-07 04:11:15 -05:00
@@ -250,6 +250,8 @@
board_ahci }, /* ICH7R */
{ PCI_VENDOR_ID_INTEL, 0x27c3, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_ahci }, /* ICH7R */
+ { PCI_VENDOR_ID_AL, 0x5288, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci }, /* ULi M5288 */
{ } /* terminate list */
};
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c 2005-02-07 04:11:15 -05:00
+++ b/drivers/scsi/libata-core.c 2005-02-07 04:11:15 -05:00
@@ -1700,6 +1700,69 @@
DPRINTK("EXIT\n");
}
+static void ata_pr_blacklisted(struct ata_port *ap, struct ata_device *dev)
+{
+ printk(KERN_WARNING "ata%u: dev %u is on DMA blacklist, disabling DMA\n",
+ ap->id, dev->devno);
+}
+
+static const char * ata_dma_blacklist [] = {
+ "WDC AC11000H",
+ "WDC AC22100H",
+ "WDC AC32500H",
+ "WDC AC33100H",
+ "WDC AC31600H",
+ "WDC AC32100H",
+ "WDC AC23200L",
+ "Compaq CRD-8241B",
+ "CRD-8400B",
+ "CRD-8480B",
+ "CRD-8482B",
+ "CRD-84",
+ "SanDisk SDP3B",
+ "SanDisk SDP3B-64",
+ "SANYO CD-ROM CRD",
+ "HITACHI CDR-8",
+ "HITACHI CDR-8335",
+ "HITACHI CDR-8435",
+ "Toshiba CD-ROM XM-6202B",
+ "CD-532E-A",
+ "E-IDE CD-ROM CR-840",
+ "CD-ROM Drive/F5A",
+ "WPI CDD-820",
+ "SAMSUNG CD-ROM SC-148C",
+ "SAMSUNG CD-ROM SC",
+ "SanDisk SDP3B-64",
+ "SAMSUNG CD-ROM SN-124",
+ "ATAPI CD-ROM DRIVE 40X MAXIMUM",
+ "_NEC DV5800A",
+};
+
+static int ata_dma_blacklisted(struct ata_port *ap, struct ata_device *dev)
+{
+ unsigned char model_num[40];
+ char *s;
+ unsigned int len;
+ int i;
+
+ ata_dev_id_string(dev->id, model_num, ATA_ID_PROD_OFS,
+ sizeof(model_num));
+ s = &model_num[0];
+ len = strnlen(s, sizeof(model_num));
+
+ /* ATAPI specifies that empty space is blank-filled; remove blanks */
+ while ((len > 0) && (s[len - 1] == ' ')) {
+ len--;
+ s[len] = 0;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++)
+ if (!strncmp(ata_dma_blacklist[i], s, len))
+ return 1;
+
+ return 0;
+}
+
static unsigned int ata_get_mode_mask(struct ata_port *ap, int shift)
{
struct ata_device *master, *slave;
@@ -1712,17 +1775,37 @@
if (shift == ATA_SHIFT_UDMA) {
mask = ap->udma_mask;
- if (ata_dev_present(master))
+ if (ata_dev_present(master)) {
mask &= (master->id[ATA_ID_UDMA_MODES] & 0xff);
- if (ata_dev_present(slave))
+ if (ata_dma_blacklisted(ap, master)) {
+ mask = 0;
+ ata_pr_blacklisted(ap, master);
+ }
+ }
+ if (ata_dev_present(slave)) {
mask &= (slave->id[ATA_ID_UDMA_MODES] & 0xff);
+ if (ata_dma_blacklisted(ap, slave)) {
+ mask = 0;
+ ata_pr_blacklisted(ap, slave);
+ }
+ }
}
else if (shift == ATA_SHIFT_MWDMA) {
mask = ap->mwdma_mask;
- if (ata_dev_present(master))
+ if (ata_dev_present(master)) {
mask &= (master->id[ATA_ID_MWDMA_MODES] & 0x07);
- if (ata_dev_present(slave))
+ if (ata_dma_blacklisted(ap, master)) {
+ mask = 0;
+ ata_pr_blacklisted(ap, master);
+ }
+ }
+ if (ata_dev_present(slave)) {
mask &= (slave->id[ATA_ID_MWDMA_MODES] & 0x07);
+ if (ata_dma_blacklisted(ap, slave)) {
+ mask = 0;
+ ata_pr_blacklisted(ap, slave);
+ }
+ }
}
else if (shift == ATA_SHIFT_PIO) {
mask = ap->pio_mask;
@@ -3452,32 +3535,28 @@
}
static struct ata_probe_ent *
-ata_probe_ent_alloc(int n, struct device *dev, struct ata_port_info **port)
+ata_probe_ent_alloc(struct device *dev, struct ata_port_info *port)
{
struct ata_probe_ent *probe_ent;
- int i;
- probe_ent = kmalloc(sizeof(*probe_ent) * n, GFP_KERNEL);
+ probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL);
if (!probe_ent) {
printk(KERN_ERR DRV_NAME "(%s): out of memory\n",
kobject_name(&(dev->kobj)));
return NULL;
}
- memset(probe_ent, 0, sizeof(*probe_ent) * n);
+ memset(probe_ent, 0, sizeof(*probe_ent));
- for (i = 0; i < n; i++) {
- INIT_LIST_HEAD(&probe_ent[i].node);
- probe_ent[i].dev = dev;
-
- probe_ent[i].sht = port[i]->sht;
- probe_ent[i].host_flags = port[i]->host_flags;
- probe_ent[i].pio_mask = port[i]->pio_mask;
- probe_ent[i].mwdma_mask = port[i]->mwdma_mask;
- probe_ent[i].udma_mask = port[i]->udma_mask;
- probe_ent[i].port_ops = port[i]->port_ops;
+ INIT_LIST_HEAD(&probe_ent->node);
+ probe_ent->dev = dev;
- }
+ probe_ent->sht = port->sht;
+ probe_ent->host_flags = port->host_flags;
+ probe_ent->pio_mask = port->pio_mask;
+ probe_ent->mwdma_mask = port->mwdma_mask;
+ probe_ent->udma_mask = port->udma_mask;
+ probe_ent->port_ops = port->port_ops;
return probe_ent;
}
@@ -3487,7 +3566,7 @@
ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port)
{
struct ata_probe_ent *probe_ent =
- ata_probe_ent_alloc(1, pci_dev_to_dev(pdev), port);
+ ata_probe_ent_alloc(pci_dev_to_dev(pdev), port[0]);
if (!probe_ent)
return NULL;
@@ -3513,39 +3592,47 @@
return probe_ent;
}
-struct ata_probe_ent *
-ata_pci_init_legacy_mode(struct pci_dev *pdev, struct ata_port_info **port)
+static struct ata_probe_ent *
+ata_pci_init_legacy_mode(struct pci_dev *pdev, struct ata_port_info **port,
+ struct ata_probe_ent **ppe2)
{
- struct ata_probe_ent *probe_ent =
- ata_probe_ent_alloc(2, pci_dev_to_dev(pdev), port);
+ struct ata_probe_ent *probe_ent, *probe_ent2;
+
+ probe_ent = ata_probe_ent_alloc(pci_dev_to_dev(pdev), port[0]);
if (!probe_ent)
return NULL;
+ probe_ent2 = ata_probe_ent_alloc(pci_dev_to_dev(pdev), port[1]);
+ if (!probe_ent2) {
+ kfree(probe_ent);
+ return NULL;
+ }
+
+ probe_ent->n_ports = 1;
+ probe_ent->irq = 14;
- probe_ent[0].n_ports = 1;
- probe_ent[0].irq = 14;
+ probe_ent->hard_port_no = 0;
+ probe_ent->legacy_mode = 1;
- probe_ent[0].hard_port_no = 0;
- probe_ent[0].legacy_mode = 1;
+ probe_ent2->n_ports = 1;
+ probe_ent2->irq = 15;
- probe_ent[1].n_ports = 1;
- probe_ent[1].irq = 15;
+ probe_ent2->hard_port_no = 1;
+ probe_ent2->legacy_mode = 1;
- probe_ent[1].hard_port_no = 1;
- probe_ent[1].legacy_mode = 1;
-
- probe_ent[0].port[0].cmd_addr = 0x1f0;
- probe_ent[0].port[0].altstatus_addr =
- probe_ent[0].port[0].ctl_addr = 0x3f6;
- probe_ent[0].port[0].bmdma_addr = pci_resource_start(pdev, 4);
-
- probe_ent[1].port[0].cmd_addr = 0x170;
- probe_ent[1].port[0].altstatus_addr =
- probe_ent[1].port[0].ctl_addr = 0x376;
- probe_ent[1].port[0].bmdma_addr = pci_resource_start(pdev, 4)+8;
+ probe_ent->port[0].cmd_addr = 0x1f0;
+ probe_ent->port[0].altstatus_addr =
+ probe_ent->port[0].ctl_addr = 0x3f6;
+ probe_ent->port[0].bmdma_addr = pci_resource_start(pdev, 4);
- ata_std_ports(&probe_ent[0].port[0]);
- ata_std_ports(&probe_ent[1].port[0]);
+ probe_ent2->port[0].cmd_addr = 0x170;
+ probe_ent2->port[0].altstatus_addr =
+ probe_ent2->port[0].ctl_addr = 0x376;
+ probe_ent2->port[0].bmdma_addr = pci_resource_start(pdev, 4)+8;
+
+ ata_std_ports(&probe_ent->port[0]);
+ ata_std_ports(&probe_ent2->port[0]);
+ *ppe2 = probe_ent2;
return probe_ent;
}
@@ -3579,7 +3666,8 @@
else
port[1] = port[0];
- if ((port[0]->host_flags & ATA_FLAG_NO_LEGACY) == 0) {
+ if ((port[0]->host_flags & ATA_FLAG_NO_LEGACY) == 0
+ && (pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
/* TODO: support transitioning to native mode? */
pci_read_config_byte(pdev, PCI_CLASS_PROG, &tmp8);
mask = (1 << 2) | (1 << 0);
@@ -3641,9 +3729,7 @@
goto err_out_regions;
if (legacy_mode) {
- probe_ent = ata_pci_init_legacy_mode(pdev, port);
- if (probe_ent)
- probe_ent2 = &probe_ent[1];
+ probe_ent = ata_pci_init_legacy_mode(pdev, port, &probe_ent2);
} else
probe_ent = ata_pci_init_native_mode(pdev, port);
if (!probe_ent) {
@@ -3657,8 +3743,12 @@
if (legacy_mode) {
if (legacy_mode & (1 << 0))
ata_device_add(probe_ent);
+ else
+ kfree(probe_ent);
if (legacy_mode & (1 << 1))
ata_device_add(probe_ent2);
+ else
+ kfree(probe_ent2);
} else {
ata_device_add(probe_ent);
}
@@ -3848,7 +3938,6 @@
#ifdef CONFIG_PCI
EXPORT_SYMBOL_GPL(pci_test_config_bits);
-EXPORT_SYMBOL_GPL(ata_pci_init_legacy_mode);
EXPORT_SYMBOL_GPL(ata_pci_init_native_mode);
EXPORT_SYMBOL_GPL(ata_pci_init_one);
EXPORT_SYMBOL_GPL(ata_pci_remove_one);
diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
--- a/drivers/scsi/libata-scsi.c 2005-02-07 04:11:15 -05:00
+++ b/drivers/scsi/libata-scsi.c 2005-02-07 04:11:15 -05:00
@@ -202,7 +202,7 @@
{0x40, MEDIUM_ERROR, 0x11, 0x04}, // Uncorrectable ECC error Unrecovered read error
/* BBD - block marked bad */
{0x80, MEDIUM_ERROR, 0x11, 0x04}, // Block marked bad Medium error, unrecovered read error
- {0xFF, 0xFF, 0xFF, 0xFF}, // END mark
+ {0xFF, 0xFF, 0xFF, 0xFF}, // END mark
};
static unsigned char stat_table[][4] = {
/* Must be first because BUSY means no other bits valid */
@@ -210,22 +210,22 @@
{0x20, HARDWARE_ERROR, 0x00, 0x00}, // Device fault
{0x08, ABORTED_COMMAND, 0x47, 0x00}, // Timed out in xfer, fake parity for now
{0x04, RECOVERED_ERROR, 0x11, 0x00}, // Recovered ECC error Medium error, recovered
- {0xFF, 0xFF, 0xFF, 0xFF}, // END mark
+ {0xFF, 0xFF, 0xFF, 0xFF}, // END mark
};
int i = 0;
cmd->result = SAM_STAT_CHECK_CONDITION;
-
+
/*
* Is this an error we can process/parse
*/
-
+
if(drv_stat & ATA_ERR)
/* Read the err bits */
err = ata_chk_err(qc->ap);
/* Display the ATA level error info */
-
+
printk(KERN_WARNING "ata%u: status=0x%02x { ", qc->ap->id, drv_stat);
if(drv_stat & 0x80)
{
@@ -242,7 +242,7 @@
if(drv_stat & 0x01) printk("Error ");
}
printk("}\n");
-
+
if(err)
{
printk(KERN_WARNING "ata%u: error=0x%02x { ", qc->ap->id, err);
@@ -259,11 +259,11 @@
if(err & 0x02) printk("TrackZeroNotFound ");
if(err & 0x01) printk("AddrMarkNotFound ");
printk("}\n");
-
+
/* Should we dump sector info here too ?? */
}
-
-
+
+
/* Look for err */
while(sense_table[i][0] != 0xFF)
{
@@ -301,7 +301,7 @@
/* No error ?? */
printk(KERN_ERR "ata%u: called with no error (%02X)!\n", qc->ap->id, drv_stat);
/* additional-sense-code[-qualifier] */
-
+
sb[0] = 0x70;
sb[2] = MEDIUM_ERROR;
sb[7] = 0x0A;
@@ -488,19 +488,24 @@
}
if (lba48) {
+ tf->command = ATA_CMD_VERIFY_EXT;
+
tf->hob_nsect = (n_sect >> 8) & 0xff;
tf->hob_lbah = (sect >> 40) & 0xff;
tf->hob_lbam = (sect >> 32) & 0xff;
tf->hob_lbal = (sect >> 24) & 0xff;
- } else
+ } else {
+ tf->command = ATA_CMD_VERIFY;
+
tf->device |= (sect >> 24) & 0xf;
+ }
tf->nsect = n_sect & 0xff;
- tf->hob_lbah = (sect >> 16) & 0xff;
- tf->hob_lbam = (sect >> 8) & 0xff;
- tf->hob_lbal = sect & 0xff;
+ tf->lbah = (sect >> 16) & 0xff;
+ tf->lbam = (sect >> 8) & 0xff;
+ tf->lbal = sect & 0xff;
return 0;
}
@@ -600,7 +605,7 @@
return 1;
/* stores LBA27:24 in lower 4 bits of device reg */
- tf->device |= scsicmd[2];
+ tf->device |= scsicmd[6];
qc->nsect = scsicmd[13];
}
diff -Nru a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
--- a/drivers/scsi/sata_nv.c 2005-02-07 04:11:15 -05:00
+++ b/drivers/scsi/sata_nv.c 2005-02-07 04:11:15 -05:00
@@ -20,6 +20,10 @@
* If you do not delete the provisions above, a recipient may use your
* version of this file under either the OSL or the GPL.
*
+ * 0.06
+ * - Added generic SATA support by using a pci_device_id that filters on
+ * the IDE storage class code.
+ *
* 0.03
* - Fixed a bug where the hotplug handlers for non-CK804/MCP04 were using
* mmio_base, which is only set for the CK804/MCP04 case.
@@ -44,7 +48,7 @@
#include <linux/libata.h>
#define DRV_NAME "sata_nv"
-#define DRV_VERSION "0.5"
+#define DRV_VERSION "0.6"
#define NV_PORTS 2
#define NV_PIO_MASK 0x1f
@@ -108,6 +112,7 @@
enum nv_host_type
{
+ GENERIC,
NFORCE2,
NFORCE3,
CK804
@@ -128,6 +133,9 @@
PCI_ANY_ID, PCI_ANY_ID, 0, 0, CK804 },
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, CK804 },
+ { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
+ PCI_ANY_ID, PCI_ANY_ID,
+ PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC },
{ 0, } /* terminate list */
};
@@ -136,7 +144,6 @@
struct nv_host_desc
{
enum nv_host_type host_type;
- unsigned long host_flags;
void (*enable_hotplug)(struct ata_probe_ent *probe_ent);
void (*disable_hotplug)(struct ata_host_set *host_set);
void (*check_hotplug)(struct ata_host_set *host_set);
@@ -144,21 +151,24 @@
};
static struct nv_host_desc nv_device_tbl[] = {
{
+ .host_type = GENERIC,
+ .enable_hotplug = NULL,
+ .disable_hotplug= NULL,
+ .check_hotplug = NULL,
+ },
+ {
.host_type = NFORCE2,
- .host_flags = 0x00000000,
.enable_hotplug = nv_enable_hotplug,
.disable_hotplug= nv_disable_hotplug,
.check_hotplug = nv_check_hotplug,
},
{
.host_type = NFORCE3,
- .host_flags = 0x00000000,
.enable_hotplug = nv_enable_hotplug,
.disable_hotplug= nv_disable_hotplug,
.check_hotplug = nv_check_hotplug,
},
{ .host_type = CK804,
- .host_flags = NV_HOST_FLAGS_SCR_MMIO,
.enable_hotplug = nv_enable_hotplug_ck804,
.disable_hotplug= nv_disable_hotplug_ck804,
.check_hotplug = nv_check_hotplug_ck804,
@@ -168,6 +178,7 @@
struct nv_host
{
struct nv_host_desc *host_desc;
+ unsigned long host_flags;
};
static struct pci_driver nv_pci_driver = {
@@ -284,8 +295,8 @@
if (sc_reg > SCR_CONTROL)
return 0xffffffffU;
- if (host->host_desc->host_flags & NV_HOST_FLAGS_SCR_MMIO)
- return readl(ap->ioaddr.scr_addr + (sc_reg * 4));
+ if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO)
+ return readl((void*)ap->ioaddr.scr_addr + (sc_reg * 4));
else
return inl(ap->ioaddr.scr_addr + (sc_reg * 4));
}
@@ -298,8 +309,8 @@
if (sc_reg > SCR_CONTROL)
return;
- if (host->host_desc->host_flags & NV_HOST_FLAGS_SCR_MMIO)
- writel(val, ap->ioaddr.scr_addr + (sc_reg * 4));
+ if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO)
+ writel(val, (void*)ap->ioaddr.scr_addr + (sc_reg * 4));
else
outl(val, ap->ioaddr.scr_addr + (sc_reg * 4));
}
@@ -322,6 +333,14 @@
struct ata_port_info *ppi;
struct ata_probe_ent *probe_ent;
int rc;
+ u32 bar;
+
+ // Make sure this is a SATA controller by counting the number of bars
+ // (NVIDIA SATA controllers will always have six bars). Otherwise,
+ // it's an IDE controller and we ignore it.
+ for (bar=0; bar<6; bar++)
+ if (pci_resource_start(pdev, bar) == 0)
+ return -ENODEV;
if (!printed_version++)
printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
@@ -352,11 +371,15 @@
if (!host)
goto err_out_free_ent;
+ memset(host, 0, sizeof(struct nv_host));
host->host_desc = &nv_device_tbl[ent->driver_data];
probe_ent->private_data = host;
- if (host->host_desc->host_flags & NV_HOST_FLAGS_SCR_MMIO) {
+ if (pci_resource_flags(pdev, 5) & IORESOURCE_MEM)
+ host->host_flags |= NV_HOST_FLAGS_SCR_MMIO;
+
+ if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) {
unsigned long base;
probe_ent->mmio_base = ioremap(pci_resource_start(pdev, 5),
@@ -395,7 +418,7 @@
return 0;
err_out_iounmap:
- if (host->host_desc->host_flags & NV_HOST_FLAGS_SCR_MMIO)
+ if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO)
iounmap(probe_ent->mmio_base);
err_out_free_host:
kfree(host);
diff -Nru a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
--- a/drivers/scsi/sata_promise.c 2005-02-07 04:11:15 -05:00
+++ b/drivers/scsi/sata_promise.c 2005-02-07 04:11:15 -05:00
@@ -156,10 +156,18 @@
board_2037x },
{ PCI_VENDOR_ID_PROMISE, 0x3376, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_2037x },
+ { PCI_VENDOR_ID_PROMISE, 0x3574, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_2037x },
+ { PCI_VENDOR_ID_PROMISE, 0x3d75, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_2037x },
+
{ PCI_VENDOR_ID_PROMISE, 0x3318, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_20319 },
{ PCI_VENDOR_ID_PROMISE, 0x3319, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_20319 },
+ { PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_20319 },
+
{ } /* terminate list */
};
@@ -406,9 +414,11 @@
return IRQ_NONE;
}
- spin_lock(&host_set->lock);
+ spin_lock(&host_set->lock);
+
+ writel(mask, mmio_base + PDC_INT_SEQMASK);
- for (i = 0; i < host_set->n_ports; i++) {
+ for (i = 0; i < host_set->n_ports; i++) {
VPRINTK("port %u\n", i);
ap = host_set->ports[i];
tmp = mask & (1 << (i + 1));
diff -Nru a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
--- a/drivers/scsi/sata_sil.c 2005-02-07 04:11:15 -05:00
+++ b/drivers/scsi/sata_sil.c 2005-02-07 04:11:15 -05:00
@@ -86,6 +86,7 @@
{ "ST330013AS", SIL_QUIRK_MOD15WRITE },
{ "ST340017AS", SIL_QUIRK_MOD15WRITE },
{ "ST360015AS", SIL_QUIRK_MOD15WRITE },
+ { "ST380013AS", SIL_QUIRK_MOD15WRITE },
{ "ST380023AS", SIL_QUIRK_MOD15WRITE },
{ "ST3120023AS", SIL_QUIRK_MOD15WRITE },
{ "ST3160023AS", SIL_QUIRK_MOD15WRITE },
diff -Nru a/include/linux/ata.h b/include/linux/ata.h
--- a/include/linux/ata.h 2005-02-07 04:11:15 -05:00
+++ b/include/linux/ata.h 2005-02-07 04:11:15 -05:00
@@ -123,6 +123,8 @@
ATA_CMD_PIO_WRITE_EXT = 0x34,
ATA_CMD_SET_FEATURES = 0xEF,
ATA_CMD_PACKET = 0xA0,
+ ATA_CMD_VERIFY = 0x40,
+ ATA_CMD_VERIFY_EXT = 0x42,
/* SETFEATURES stuff */
SETFEATURES_XFER = 0x03,
diff -Nru a/include/linux/libata.h b/include/linux/libata.h
--- a/include/linux/libata.h 2005-02-07 04:11:15 -05:00
+++ b/include/linux/libata.h 2005-02-07 04:11:15 -05:00
@@ -436,8 +436,6 @@
extern struct ata_probe_ent *
ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port);
-extern struct ata_probe_ent *
-ata_pci_init_legacy_mode(struct pci_dev *pdev, struct ata_port_info **port);
extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits);
#endif /* CONFIG_PCI */
^ permalink raw reply [flat|nested] 8+ messages in thread
* [BK PATCHES] 2.6.x libata fixes
@ 2005-03-12 4:33 Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2005-03-12 4:33 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide@vger.kernel.org, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: libata.txt --]
[-- Type: text/plain, Size: 327 bytes --]
Please do a
bk pull bk://gkernel.bkbits.net/libata-2.6
This will update the following files:
drivers/scsi/ahci.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
through these ChangeSets:
Brett Russ:
o AHCI: fix fatal error int handling
Jeff Garzik:
o [libata ahci] support ->tf_read hook
[-- Attachment #3: libata.patch --]
[-- Type: text/x-patch, Size: 1606 bytes --]
diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c 2005-03-11 23:30:59 -05:00
+++ b/drivers/scsi/ahci.c 2005-03-11 23:30:59 -05:00
@@ -177,6 +177,7 @@
static int ahci_port_start(struct ata_port *ap);
static void ahci_port_stop(struct ata_port *ap);
static void ahci_host_stop(struct ata_host_set *host_set);
+static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
static void ahci_qc_prep(struct ata_queued_cmd *qc);
static u8 ahci_check_status(struct ata_port *ap);
static u8 ahci_check_err(struct ata_port *ap);
@@ -210,6 +211,8 @@
.check_err = ahci_check_err,
.dev_select = ata_noop_dev_select,
+ .tf_read = ahci_tf_read,
+
.phy_reset = ahci_phy_reset,
.qc_prep = ahci_qc_prep,
@@ -463,6 +466,14 @@
return (readl(mmio + PORT_TFDATA) >> 8) & 0xFF;
}
+static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
+{
+ struct ahci_port_priv *pp = ap->private_data;
+ u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
+
+ ata_tf_from_fis(d2h_fis, tf);
+}
+
static void ahci_fill_sg(struct ata_queued_cmd *qc)
{
struct ahci_port_priv *pp = qc->ap->private_data;
@@ -539,7 +550,7 @@
/* stop DMA */
tmp = readl(port_mmio + PORT_CMD);
- tmp &= PORT_CMD_START | PORT_CMD_FIS_RX;
+ tmp &= ~PORT_CMD_START;
writel(tmp, port_mmio + PORT_CMD);
/* wait for engine to stop. TODO: this could be
@@ -571,7 +582,7 @@
/* re-start DMA */
tmp = readl(port_mmio + PORT_CMD);
- tmp |= PORT_CMD_START | PORT_CMD_FIS_RX;
+ tmp |= PORT_CMD_START;
writel(tmp, port_mmio + PORT_CMD);
readl(port_mmio + PORT_CMD); /* flush */
^ permalink raw reply [flat|nested] 8+ messages in thread
* [BK PATCHES] 2.6.x libata fixes
@ 2005-03-29 20:46 Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2005-03-29 20:46 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide@vger.kernel.org, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: changelog.txt --]
[-- Type: text/plain, Size: 598 bytes --]
Please do a
bk pull bk://gkernel.bkbits.net/libata-2.6
This will update the following files:
drivers/scsi/ahci.c | 2 --
drivers/scsi/libata-scsi.c | 7 ++++++-
drivers/scsi/sata_sil.c | 32 +++++++++++++++++++++++++++++++-
3 files changed, 37 insertions(+), 4 deletions(-)
through these ChangeSets:
<carlos.pardo:siliconimage.com>:
o sata_sil: Fix FIFO PCI Bus Arbitration
Brett Russ:
o libata: support descriptor sense in ctrl page
Jason Gaston:
o SATA AHCI correction Intel ICH7R
Jeff Garzik:
o [libata sata_sil] Don't presume PCI cache-line-size reg is > 0
[-- Attachment #3: patch --]
[-- Type: text/plain, Size: 3068 bytes --]
diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c 2005-03-29 15:45:18 -05:00
+++ b/drivers/scsi/ahci.c 2005-03-29 15:45:18 -05:00
@@ -253,8 +253,6 @@
board_ahci }, /* ICH7 */
{ PCI_VENDOR_ID_INTEL, 0x27c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_ahci }, /* ICH7M */
- { PCI_VENDOR_ID_INTEL, 0x27c2, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
- board_ahci }, /* ICH7R */
{ PCI_VENDOR_ID_INTEL, 0x27c3, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_ahci }, /* ICH7R */
{ PCI_VENDOR_ID_AL, 0x5288, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
--- a/drivers/scsi/libata-scsi.c 2005-03-29 15:45:18 -05:00
+++ b/drivers/scsi/libata-scsi.c 2005-03-29 15:45:18 -05:00
@@ -1038,7 +1038,12 @@
static unsigned int ata_msense_ctl_mode(u8 **ptr_io, const u8 *last)
{
- const u8 page[] = {0xa, 0xa, 2, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 30};
+ const u8 page[] = {0xa, 0xa, 6, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 30};
+
+ /* byte 2: set the descriptor format sense data bit (bit 2)
+ * since we need to support returning this format for SAT
+ * commands and any SCSI commands against a 48b LBA device.
+ */
ata_msense_push(ptr_io, last, page, sizeof(page));
return sizeof(page);
diff -Nru a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
--- a/drivers/scsi/sata_sil.c 2005-03-29 15:45:18 -05:00
+++ b/drivers/scsi/sata_sil.c 2005-03-29 15:45:18 -05:00
@@ -38,12 +38,21 @@
#include <linux/libata.h>
#define DRV_NAME "sata_sil"
-#define DRV_VERSION "0.8"
+#define DRV_VERSION "0.9"
enum {
sil_3112 = 0,
sil_3114 = 1,
+ SIL_FIFO_R0 = 0x40,
+ SIL_FIFO_W0 = 0x41,
+ SIL_FIFO_R1 = 0x44,
+ SIL_FIFO_W1 = 0x45,
+ SIL_FIFO_R2 = 0x240,
+ SIL_FIFO_W2 = 0x241,
+ SIL_FIFO_R3 = 0x244,
+ SIL_FIFO_W3 = 0x245,
+
SIL_SYSCFG = 0x48,
SIL_MASK_IDE0_INT = (1 << 22),
SIL_MASK_IDE1_INT = (1 << 23),
@@ -199,6 +208,13 @@
MODULE_DEVICE_TABLE(pci, sil_pci_tbl);
MODULE_VERSION(DRV_VERSION);
+static unsigned char sil_get_device_cache_line(struct pci_dev *pdev)
+{
+ u8 cache_line = 0;
+ pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &cache_line);
+ return cache_line;
+}
+
static void sil_post_set_mode (struct ata_port *ap)
{
struct ata_host_set *host_set = ap->host_set;
@@ -341,6 +357,7 @@
unsigned int i;
int pci_dev_busy = 0;
u32 tmp, irq_mask;
+ u8 cls;
if (!printed_version++)
printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
@@ -404,6 +421,19 @@
probe_ent->port[i].scr_addr = base + sil_port[i].scr;
ata_std_ports(&probe_ent->port[i]);
}
+
+ /* Initialize FIFO PCI bus arbitration */
+ cls = sil_get_device_cache_line(pdev);
+ if (cls) {
+ cls >>= 3;
+ cls++; /* cls = (line_size/8)+1 */
+ writeb(cls, mmio_base + SIL_FIFO_R0);
+ writeb(cls, mmio_base + SIL_FIFO_W0);
+ writeb(cls, mmio_base + SIL_FIFO_R1);
+ writeb(cls, mmio_base + SIL_FIFO_W2);
+ } else
+ printk(KERN_WARNING DRV_NAME "(%s): cache line size not set. Driver may not function\n",
+ pci_name(pdev));
if (ent->driver_data == sil_3114) {
irq_mask = SIL_MASK_4PORT;
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-03-29 20:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-29 20:46 [BK PATCHES] 2.6.x libata fixes Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2005-03-12 4:33 Jeff Garzik
2005-02-07 9:19 Jeff Garzik
2004-12-08 1:03 Jeff Garzik
2004-10-31 0:18 Jeff Garzik
2004-08-30 18:50 Jeff Garzik
2004-08-29 1:07 Jeff Garzik
2004-07-14 20:33 Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).