aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-16 11:07:14 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-16 11:07:14 -0500
commit8bb6030b62a70edc0cb8129338f83e9063aeaf92 (patch)
treedb4fd4c255e93c2090ba421bf716bc09aaf50f14 /drivers/scsi
parent77ed78e5cf32be1c3fae5c477cc1d78e2e3f17db (diff)
parent7bdd720869ff75700b48b132ee71852615b55808 (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ahci.c30
-rw-r--r--drivers/scsi/ata_piix.c2
-rw-r--r--drivers/scsi/libata-core.c6
-rw-r--r--drivers/scsi/libata.h2
-rw-r--r--drivers/scsi/sata_promise.c2
-rw-r--r--drivers/scsi/sata_qstor.c2
-rw-r--r--drivers/scsi/sata_sil24.c21
-rw-r--r--drivers/scsi/sata_svw.c2
-rw-r--r--drivers/scsi/sata_sx4.c2
-rw-r--r--drivers/scsi/sata_vsc.c2
10 files changed, 47 insertions, 24 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 894e7113e0b3..83467a05dc8e 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -48,7 +48,7 @@
48#include <asm/io.h> 48#include <asm/io.h>
49 49
50#define DRV_NAME "ahci" 50#define DRV_NAME "ahci"
51#define DRV_VERSION "1.01" 51#define DRV_VERSION "1.2"
52 52
53 53
54enum { 54enum {
@@ -558,23 +558,25 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
558 pp->cmd_slot[0].opts |= cpu_to_le32(n_elem << 16); 558 pp->cmd_slot[0].opts |= cpu_to_le32(n_elem << 16);
559} 559}
560 560
561static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) 561static void ahci_restart_port(struct ata_port *ap, u32 irq_stat)
562{ 562{
563 void __iomem *mmio = ap->host_set->mmio_base; 563 void __iomem *mmio = ap->host_set->mmio_base;
564 void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); 564 void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
565 u32 tmp; 565 u32 tmp;
566 int work; 566 int work;
567 567
568 printk(KERN_WARNING "ata%u: port reset, " 568 if ((ap->device[0].class != ATA_DEV_ATAPI) ||
569 "p_is %x is %x pis %x cmd %x tf %x ss %x se %x\n", 569 ((irq_stat & PORT_IRQ_TF_ERR) == 0))
570 ap->id, 570 printk(KERN_WARNING "ata%u: port reset, "
571 irq_stat, 571 "p_is %x is %x pis %x cmd %x tf %x ss %x se %x\n",
572 readl(mmio + HOST_IRQ_STAT), 572 ap->id,
573 readl(port_mmio + PORT_IRQ_STAT), 573 irq_stat,
574 readl(port_mmio + PORT_CMD), 574 readl(mmio + HOST_IRQ_STAT),
575 readl(port_mmio + PORT_TFDATA), 575 readl(port_mmio + PORT_IRQ_STAT),
576 readl(port_mmio + PORT_SCR_STAT), 576 readl(port_mmio + PORT_CMD),
577 readl(port_mmio + PORT_SCR_ERR)); 577 readl(port_mmio + PORT_TFDATA),
578 readl(port_mmio + PORT_SCR_STAT),
579 readl(port_mmio + PORT_SCR_ERR));
578 580
579 /* stop DMA */ 581 /* stop DMA */
580 tmp = readl(port_mmio + PORT_CMD); 582 tmp = readl(port_mmio + PORT_CMD);
@@ -632,7 +634,7 @@ static void ahci_eng_timeout(struct ata_port *ap)
632 printk(KERN_ERR "ata%u: BUG: timeout without command\n", 634 printk(KERN_ERR "ata%u: BUG: timeout without command\n",
633 ap->id); 635 ap->id);
634 } else { 636 } else {
635 ahci_intr_error(ap, readl(port_mmio + PORT_IRQ_STAT)); 637 ahci_restart_port(ap, readl(port_mmio + PORT_IRQ_STAT));
636 638
637 /* hack alert! We cannot use the supplied completion 639 /* hack alert! We cannot use the supplied completion
638 * function from inside the ->eh_strategy_handler() thread. 640 * function from inside the ->eh_strategy_handler() thread.
@@ -677,7 +679,7 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
677 err_mask = AC_ERR_HOST_BUS; 679 err_mask = AC_ERR_HOST_BUS;
678 680
679 /* command processing has stopped due to error; restart */ 681 /* command processing has stopped due to error; restart */
680 ahci_intr_error(ap, status); 682 ahci_restart_port(ap, status);
681 683
682 if (qc) 684 if (qc)
683 ata_qc_complete(qc, err_mask); 685 ata_qc_complete(qc, err_mask);
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 7a1ed94492f9..887b2b9ee4aa 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -50,7 +50,7 @@
50#include <linux/libata.h> 50#include <linux/libata.h>
51 51
52#define DRV_NAME "ata_piix" 52#define DRV_NAME "ata_piix"
53#define DRV_VERSION "1.04" 53#define DRV_VERSION "1.05"
54 54
55enum { 55enum {
56 PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ 56 PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index ba1eb8b38e00..bb604dfbdef6 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1570,11 +1570,13 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1570 1570
1571 /* 1571 /*
1572 * Find the mode. 1572 * Find the mode.
1573 */ 1573 */
1574 1574
1575 if (!(s = ata_timing_find_mode(speed))) 1575 if (!(s = ata_timing_find_mode(speed)))
1576 return -EINVAL; 1576 return -EINVAL;
1577 1577
1578 memcpy(t, s, sizeof(*s));
1579
1578 /* 1580 /*
1579 * If the drive is an EIDE drive, it can tell us it needs extended 1581 * If the drive is an EIDE drive, it can tell us it needs extended
1580 * PIO/MW_DMA cycle timing. 1582 * PIO/MW_DMA cycle timing.
@@ -1595,7 +1597,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1595 * Convert the timing to bus clock counts. 1597 * Convert the timing to bus clock counts.
1596 */ 1598 */
1597 1599
1598 ata_timing_quantize(s, t, T, UT); 1600 ata_timing_quantize(t, t, T, UT);
1599 1601
1600 /* 1602 /*
1601 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T 1603 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index 74a84e0ec0a4..8ebaa694d18e 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -29,7 +29,7 @@
29#define __LIBATA_H__ 29#define __LIBATA_H__
30 30
31#define DRV_NAME "libata" 31#define DRV_NAME "libata"
32#define DRV_VERSION "1.12" /* must be exactly four chars */ 32#define DRV_VERSION "1.20" /* must be exactly four chars */
33 33
34struct ata_scsi_args { 34struct ata_scsi_args {
35 u16 *id; 35 u16 *id;
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
index 242d906987ad..8a8e3e3ef0ed 100644
--- a/drivers/scsi/sata_promise.c
+++ b/drivers/scsi/sata_promise.c
@@ -46,7 +46,7 @@
46#include "sata_promise.h" 46#include "sata_promise.h"
47 47
48#define DRV_NAME "sata_promise" 48#define DRV_NAME "sata_promise"
49#define DRV_VERSION "1.02" 49#define DRV_VERSION "1.03"
50 50
51 51
52enum { 52enum {
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c
index 4a6d3067d23c..a8987f5ff5cc 100644
--- a/drivers/scsi/sata_qstor.c
+++ b/drivers/scsi/sata_qstor.c
@@ -41,7 +41,7 @@
41#include <linux/libata.h> 41#include <linux/libata.h>
42 42
43#define DRV_NAME "sata_qstor" 43#define DRV_NAME "sata_qstor"
44#define DRV_VERSION "0.04" 44#define DRV_VERSION "0.05"
45 45
46enum { 46enum {
47 QS_PORTS = 4, 47 QS_PORTS = 4,
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c
index 55e744d6db88..cb1933a3bd55 100644
--- a/drivers/scsi/sata_sil24.c
+++ b/drivers/scsi/sata_sil24.c
@@ -139,6 +139,7 @@ enum {
139 PORT_CS_DEV_RST = (1 << 1), /* device reset */ 139 PORT_CS_DEV_RST = (1 << 1), /* device reset */
140 PORT_CS_INIT = (1 << 2), /* port initialize */ 140 PORT_CS_INIT = (1 << 2), /* port initialize */
141 PORT_CS_IRQ_WOC = (1 << 3), /* interrupt write one to clear */ 141 PORT_CS_IRQ_WOC = (1 << 3), /* interrupt write one to clear */
142 PORT_CS_CDB16 = (1 << 5), /* 0=12b cdb, 1=16b cdb */
142 PORT_CS_RESUME = (1 << 6), /* port resume */ 143 PORT_CS_RESUME = (1 << 6), /* port resume */
143 PORT_CS_32BIT_ACTV = (1 << 10), /* 32-bit activation */ 144 PORT_CS_32BIT_ACTV = (1 << 10), /* 32-bit activation */
144 PORT_CS_PM_EN = (1 << 13), /* port multiplier enable */ 145 PORT_CS_PM_EN = (1 << 13), /* port multiplier enable */
@@ -188,11 +189,29 @@ enum {
188 PORT_CERR_XFR_PCIPERR = 35, /* PSD ecode 11 - PCI prity err during transfer */ 189 PORT_CERR_XFR_PCIPERR = 35, /* PSD ecode 11 - PCI prity err during transfer */
189 PORT_CERR_SENDSERVICE = 36, /* FIS received while sending service */ 190 PORT_CERR_SENDSERVICE = 36, /* FIS received while sending service */
190 191
192 /* bits of PRB control field */
193 PRB_CTRL_PROTOCOL = (1 << 0), /* override def. ATA protocol */
194 PRB_CTRL_PACKET_READ = (1 << 4), /* PACKET cmd read */
195 PRB_CTRL_PACKET_WRITE = (1 << 5), /* PACKET cmd write */
196 PRB_CTRL_NIEN = (1 << 6), /* Mask completion irq */
197 PRB_CTRL_SRST = (1 << 7), /* Soft reset request (ign BSY?) */
198
199 /* PRB protocol field */
200 PRB_PROT_PACKET = (1 << 0),
201 PRB_PROT_TCQ = (1 << 1),
202 PRB_PROT_NCQ = (1 << 2),
203 PRB_PROT_READ = (1 << 3),
204 PRB_PROT_WRITE = (1 << 4),
205 PRB_PROT_TRANSPARENT = (1 << 5),
206
191 /* 207 /*
192 * Other constants 208 * Other constants
193 */ 209 */
194 SGE_TRM = (1 << 31), /* Last SGE in chain */ 210 SGE_TRM = (1 << 31), /* Last SGE in chain */
195 PRB_SOFT_RST = (1 << 7), /* Soft reset request (ign BSY?) */ 211 SGE_LNK = (1 << 30), /* linked list
212 Points to SGT, not SGE */
213 SGE_DRD = (1 << 29), /* discard data read (/dev/null)
214 data address ignored */
196 215
197 /* board id */ 216 /* board id */
198 BID_SIL3124 = 0, 217 BID_SIL3124 = 0,
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c
index 57e5a9d964c3..6e7f7c83a75a 100644
--- a/drivers/scsi/sata_svw.c
+++ b/drivers/scsi/sata_svw.c
@@ -54,7 +54,7 @@
54#endif /* CONFIG_PPC_OF */ 54#endif /* CONFIG_PPC_OF */
55 55
56#define DRV_NAME "sata_svw" 56#define DRV_NAME "sata_svw"
57#define DRV_VERSION "1.06" 57#define DRV_VERSION "1.07"
58 58
59/* Taskfile registers offsets */ 59/* Taskfile registers offsets */
60#define K2_SATA_TF_CMD_OFFSET 0x00 60#define K2_SATA_TF_CMD_OFFSET 0x00
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c
index b4bbe48acab0..dcc3ad9a9d6e 100644
--- a/drivers/scsi/sata_sx4.c
+++ b/drivers/scsi/sata_sx4.c
@@ -46,7 +46,7 @@
46#include "sata_promise.h" 46#include "sata_promise.h"
47 47
48#define DRV_NAME "sata_sx4" 48#define DRV_NAME "sata_sx4"
49#define DRV_VERSION "0.7" 49#define DRV_VERSION "0.8"
50 50
51 51
52enum { 52enum {
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
index 77a6e4b9262d..fcfa486965b4 100644
--- a/drivers/scsi/sata_vsc.c
+++ b/drivers/scsi/sata_vsc.c
@@ -47,7 +47,7 @@
47#include <linux/libata.h> 47#include <linux/libata.h>
48 48
49#define DRV_NAME "sata_vsc" 49#define DRV_NAME "sata_vsc"
50#define DRV_VERSION "1.0" 50#define DRV_VERSION "1.1"
51 51
52/* Interrupt register offsets (from chip base address) */ 52/* Interrupt register offsets (from chip base address) */
53#define VSC_SATA_INT_STAT_OFFSET 0x00 53#define VSC_SATA_INT_STAT_OFFSET 0x00