aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libata-core.c4
-rw-r--r--drivers/scsi/sata_sil.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 21d194c6ace3..9e58f134f68b 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2577,7 +2577,6 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
2577next_sg: 2577next_sg:
2578 sg = &qc->sg[qc->cursg]; 2578 sg = &qc->sg[qc->cursg];
2579 2579
2580next_page:
2581 page = sg->page; 2580 page = sg->page;
2582 offset = sg->offset + qc->cursg_ofs; 2581 offset = sg->offset + qc->cursg_ofs;
2583 2582
@@ -2585,6 +2584,7 @@ next_page:
2585 page = nth_page(page, (offset >> PAGE_SHIFT)); 2584 page = nth_page(page, (offset >> PAGE_SHIFT));
2586 offset %= PAGE_SIZE; 2585 offset %= PAGE_SIZE;
2587 2586
2587 /* don't overrun current sg */
2588 count = min(sg->length - qc->cursg_ofs, bytes); 2588 count = min(sg->length - qc->cursg_ofs, bytes);
2589 2589
2590 /* don't cross page boundaries */ 2590 /* don't cross page boundaries */
@@ -2609,8 +2609,6 @@ next_page:
2609 kunmap(page); 2609 kunmap(page);
2610 2610
2611 if (bytes) { 2611 if (bytes) {
2612 if (qc->cursg_ofs < sg->length)
2613 goto next_page;
2614 goto next_sg; 2612 goto next_sg;
2615 } 2613 }
2616} 2614}
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
index 238580d244e6..49ed557a4b66 100644
--- a/drivers/scsi/sata_sil.c
+++ b/drivers/scsi/sata_sil.c
@@ -432,7 +432,13 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
432 writeb(cls, mmio_base + SIL_FIFO_R0); 432 writeb(cls, mmio_base + SIL_FIFO_R0);
433 writeb(cls, mmio_base + SIL_FIFO_W0); 433 writeb(cls, mmio_base + SIL_FIFO_W0);
434 writeb(cls, mmio_base + SIL_FIFO_R1); 434 writeb(cls, mmio_base + SIL_FIFO_R1);
435 writeb(cls, mmio_base + SIL_FIFO_W2); 435 writeb(cls, mmio_base + SIL_FIFO_W1);
436 if (ent->driver_data == sil_3114) {
437 writeb(cls, mmio_base + SIL_FIFO_R2);
438 writeb(cls, mmio_base + SIL_FIFO_W2);
439 writeb(cls, mmio_base + SIL_FIFO_R3);
440 writeb(cls, mmio_base + SIL_FIFO_W3);
441 }
436 } else 442 } else
437 printk(KERN_WARNING DRV_NAME "(%s): cache line size not set. Driver may not function\n", 443 printk(KERN_WARNING DRV_NAME "(%s): cache line size not set. Driver may not function\n",
438 pci_name(pdev)); 444 pci_name(pdev));