aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-02-17 16:47:16 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-17 16:47:16 -0500
commit614f8f50ca1361d054cdeca38d241684490d2296 (patch)
tree25c361fc4aa6139a9d1280b9c46ead3c85468cdb
parent00ab2f3df33dd3e649904765767dd87ffbcb3acf (diff)
parentc15d85c8f3f73b5f20aae7928e25b6996f16b328 (diff)
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
-rw-r--r--drivers/scsi/libata-core.c7
-rw-r--r--drivers/scsi/sata_mv.c1
-rw-r--r--drivers/scsi/sata_vsc.c30
3 files changed, 34 insertions, 4 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 46c4cdbaee86..7ddd5a69352a 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -614,7 +614,7 @@ int ata_rwcmd_protocol(struct ata_queued_cmd *qc)
614 } else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) { 614 } else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) {
615 /* Unable to use DMA due to host limitation */ 615 /* Unable to use DMA due to host limitation */
616 tf->protocol = ATA_PROT_PIO; 616 tf->protocol = ATA_PROT_PIO;
617 index = dev->multi_count ? 0 : 4; 617 index = dev->multi_count ? 0 : 8;
618 } else { 618 } else {
619 tf->protocol = ATA_PROT_DMA; 619 tf->protocol = ATA_PROT_DMA;
620 index = 16; 620 index = 16;
@@ -3357,11 +3357,12 @@ static void ata_pio_error(struct ata_port *ap)
3357{ 3357{
3358 struct ata_queued_cmd *qc; 3358 struct ata_queued_cmd *qc;
3359 3359
3360 printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
3361
3362 qc = ata_qc_from_tag(ap, ap->active_tag); 3360 qc = ata_qc_from_tag(ap, ap->active_tag);
3363 assert(qc != NULL); 3361 assert(qc != NULL);
3364 3362
3363 if (qc->tf.command != ATA_CMD_PACKET)
3364 printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
3365
3365 /* make sure qc->err_mask is available to 3366 /* make sure qc->err_mask is available to
3366 * know what's wrong and recover 3367 * know what's wrong and recover
3367 */ 3368 */
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index 6fddf17a3b70..2770005324b4 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -997,6 +997,7 @@ static void mv_qc_prep(struct ata_queued_cmd *qc)
997 case ATA_CMD_READ_EXT: 997 case ATA_CMD_READ_EXT:
998 case ATA_CMD_WRITE: 998 case ATA_CMD_WRITE:
999 case ATA_CMD_WRITE_EXT: 999 case ATA_CMD_WRITE_EXT:
1000 case ATA_CMD_WRITE_FUA_EXT:
1000 mv_crqb_pack_cmd(cw++, tf->hob_nsect, ATA_REG_NSECT, 0); 1001 mv_crqb_pack_cmd(cw++, tf->hob_nsect, ATA_REG_NSECT, 0);
1001 break; 1002 break;
1002#ifdef LIBATA_NCQ /* FIXME: remove this line when NCQ added */ 1003#ifdef LIBATA_NCQ /* FIXME: remove this line when NCQ added */
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
index 2e2c3b7acb0c..e484e8db6810 100644
--- a/drivers/scsi/sata_vsc.c
+++ b/drivers/scsi/sata_vsc.c
@@ -81,6 +81,19 @@
81/* Port stride */ 81/* Port stride */
82#define VSC_SATA_PORT_OFFSET 0x200 82#define VSC_SATA_PORT_OFFSET 0x200
83 83
84/* Error interrupt status bit offsets */
85#define VSC_SATA_INT_ERROR_E_OFFSET 2
86#define VSC_SATA_INT_ERROR_P_OFFSET 4
87#define VSC_SATA_INT_ERROR_T_OFFSET 5
88#define VSC_SATA_INT_ERROR_M_OFFSET 1
89#define is_vsc_sata_int_err(port_idx, int_status) \
90 (int_status & ((1 << (VSC_SATA_INT_ERROR_E_OFFSET + (8 * port_idx))) | \
91 (1 << (VSC_SATA_INT_ERROR_P_OFFSET + (8 * port_idx))) | \
92 (1 << (VSC_SATA_INT_ERROR_T_OFFSET + (8 * port_idx))) | \
93 (1 << (VSC_SATA_INT_ERROR_M_OFFSET + (8 * port_idx))) \
94 )\
95 )
96
84 97
85static u32 vsc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) 98static u32 vsc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg)
86{ 99{
@@ -201,13 +214,28 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance,
201 struct ata_port *ap; 214 struct ata_port *ap;
202 215
203 ap = host_set->ports[i]; 216 ap = host_set->ports[i];
217
218 if (is_vsc_sata_int_err(i, int_status)) {
219 u32 err_status;
220 printk(KERN_DEBUG "%s: ignoring interrupt(s)\n", __FUNCTION__);
221 err_status = ap ? vsc_sata_scr_read(ap, SCR_ERROR) : 0;
222 vsc_sata_scr_write(ap, SCR_ERROR, err_status);
223 handled++;
224 }
225
204 if (ap && !(ap->flags & 226 if (ap && !(ap->flags &
205 (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) { 227 (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) {
206 struct ata_queued_cmd *qc; 228 struct ata_queued_cmd *qc;
207 229
208 qc = ata_qc_from_tag(ap, ap->active_tag); 230 qc = ata_qc_from_tag(ap, ap->active_tag);
209 if (qc && (!(qc->tf.ctl & ATA_NIEN))) 231 if (qc && (!(qc->tf.ctl & ATA_NIEN))) {
210 handled += ata_host_intr(ap, qc); 232 handled += ata_host_intr(ap, qc);
233 } else {
234 printk(KERN_DEBUG "%s: ignoring interrupt(s)\n", __FUNCTION__);
235 ata_chk_status(ap);
236 handled++;
237 }
238
211 } 239 }
212 } 240 }
213 } 241 }