Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[PATCH] libata: fix ata_xfer_tbl termination
[PATCH] libata: make ata_qc_issue complete failed qcs
[PATCH] libata: fix ata_qc_issue failure path
[PATCH] ata_piix: fix ich6/m_map_db
[libata] ahci: add ATI SB600 PCI IDs

+22 -24
+4
drivers/scsi/ahci.c
··· 293 293 board_ahci }, /* JMicron JMB360 */ 294 294 { 0x197b, 0x2363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 295 295 board_ahci }, /* JMicron JMB363 */ 296 + { PCI_VENDOR_ID_ATI, 0x4380, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 297 + board_ahci }, /* ATI SB600 non-raid */ 298 + { PCI_VENDOR_ID_ATI, 0x4381, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 299 + board_ahci }, /* ATI SB600 raid */ 296 300 { } /* terminate list */ 297 301 }; 298 302
+2 -2
drivers/scsi/ata_piix.c
··· 301 301 .mask = 0x3, 302 302 .map = { 303 303 /* PM PS SM SS MAP */ 304 - { P0, P1, P2, P3 }, /* 00b */ 304 + { P0, P2, P1, P3 }, /* 00b */ 305 305 { IDE, IDE, P1, P3 }, /* 01b */ 306 306 { P0, P2, IDE, IDE }, /* 10b */ 307 307 { RV, RV, RV, RV }, ··· 312 312 .mask = 0x3, 313 313 .map = { 314 314 /* PM PS SM SS MAP */ 315 - { P0, P1, P2, P3 }, /* 00b */ 315 + { P0, P2, RV, RV }, /* 00b */ 316 316 { RV, RV, RV, RV }, 317 317 { P0, P2, IDE, IDE }, /* 10b */ 318 318 { RV, RV, RV, RV },
+13 -15
drivers/scsi/libata-core.c
··· 278 278 } 279 279 280 280 static const struct ata_xfer_ent { 281 - unsigned int shift, bits; 281 + int shift, bits; 282 282 u8 base; 283 283 } ata_xfer_tbl[] = { 284 284 { ATA_SHIFT_PIO, ATA_BITS_PIO, XFER_PIO_0 }, ··· 989 989 qc->private_data = &wait; 990 990 qc->complete_fn = ata_qc_complete_internal; 991 991 992 - qc->err_mask = ata_qc_issue(qc); 993 - if (qc->err_mask) 994 - ata_qc_complete(qc); 992 + ata_qc_issue(qc); 995 993 996 994 spin_unlock_irqrestore(&ap->host_set->lock, flags); 997 995 ··· 3995 3997 * 3996 3998 * LOCKING: 3997 3999 * spin_lock_irqsave(host_set lock) 3998 - * 3999 - * RETURNS: 4000 - * Zero on success, AC_ERR_* mask on failure 4001 4000 */ 4002 - 4003 - unsigned int ata_qc_issue(struct ata_queued_cmd *qc) 4001 + void ata_qc_issue(struct ata_queued_cmd *qc) 4004 4002 { 4005 4003 struct ata_port *ap = qc->ap; 4004 + 4005 + qc->ap->active_tag = qc->tag; 4006 + qc->flags |= ATA_QCFLAG_ACTIVE; 4006 4007 4007 4008 if (ata_should_dma_map(qc)) { 4008 4009 if (qc->flags & ATA_QCFLAG_SG) { ··· 4017 4020 4018 4021 ap->ops->qc_prep(qc); 4019 4022 4020 - qc->ap->active_tag = qc->tag; 4021 - qc->flags |= ATA_QCFLAG_ACTIVE; 4022 - 4023 - return ap->ops->qc_issue(qc); 4023 + qc->err_mask |= ap->ops->qc_issue(qc); 4024 + if (unlikely(qc->err_mask)) 4025 + goto err; 4026 + return; 4024 4027 4025 4028 sg_err: 4026 4029 qc->flags &= ~ATA_QCFLAG_DMAMAP; 4027 - return AC_ERR_SYSTEM; 4030 + qc->err_mask |= AC_ERR_SYSTEM; 4031 + err: 4032 + ata_qc_complete(qc); 4028 4033 } 4029 - 4030 4034 4031 4035 /** 4032 4036 * ata_qc_issue_prot - issue taskfile to device in proto-dependent manner
+2 -6
drivers/scsi/libata-scsi.c
··· 1431 1431 goto early_finish; 1432 1432 1433 1433 /* select device, send command to hardware */ 1434 - qc->err_mask = ata_qc_issue(qc); 1435 - if (qc->err_mask) 1436 - ata_qc_complete(qc); 1434 + ata_qc_issue(qc); 1437 1435 1438 1436 VPRINTK("EXIT\n"); 1439 1437 return; ··· 2197 2199 2198 2200 qc->complete_fn = atapi_sense_complete; 2199 2201 2200 - qc->err_mask = ata_qc_issue(qc); 2201 - if (qc->err_mask) 2202 - ata_qc_complete(qc); 2202 + ata_qc_issue(qc); 2203 2203 2204 2204 DPRINTK("EXIT\n"); 2205 2205 }
+1 -1
drivers/scsi/libata.h
··· 47 47 extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc); 48 48 extern void ata_port_flush_task(struct ata_port *ap); 49 49 extern void ata_qc_free(struct ata_queued_cmd *qc); 50 - extern unsigned int ata_qc_issue(struct ata_queued_cmd *qc); 50 + extern void ata_qc_issue(struct ata_queued_cmd *qc); 51 51 extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); 52 52 extern void ata_dev_select(struct ata_port *ap, unsigned int device, 53 53 unsigned int wait, unsigned int can_sleep);