diff options
author | Tony Luck <tony.luck@intel.com> | 2005-05-18 16:28:52 -0700 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-05-18 16:28:52 -0700 |
commit | 3d620cd75588a37c7f5547e26e2a28b046c280f0 (patch) | |
tree | b109b7f11744fd0d63a274a1eebed474fa9aedd7 /drivers/scsi | |
parent | a1ecf7f6e65637ba4470405ad39794710dbf85d4 (diff) | |
parent | 301216244b1e39c4346e56d38b079ca53d528580 (diff) | |
download | op-kernel-dev-3d620cd75588a37c7f5547e26e2a28b046c280f0.zip op-kernel-dev-3d620cd75588a37c7f5547e26e2a28b046c280f0.tar.gz |
Sync with Linus - rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 12 | ||||
-rw-r--r-- | drivers/scsi/libata-scsi.c | 5 | ||||
-rw-r--r-- | drivers/scsi/sata_svw.c | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 0b5d3a5..ee9b96d 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1253,11 +1253,11 @@ void __sata_phy_reset(struct ata_port *ap) unsigned long timeout = jiffies + (HZ * 5); if (ap->flags & ATA_FLAG_SATA_RESET) { - scr_write(ap, SCR_CONTROL, 0x301); /* issue phy wake/reset */ - scr_read(ap, SCR_STATUS); /* dummy read; flush */ + /* issue phy wake/reset */ + scr_write_flush(ap, SCR_CONTROL, 0x301); udelay(400); /* FIXME: a guess */ } - scr_write(ap, SCR_CONTROL, 0x300); /* issue phy wake/clear reset */ + scr_write_flush(ap, SCR_CONTROL, 0x300); /* phy wake/clear reset */ /* wait for phy to become ready, if necessary */ do { @@ -2539,7 +2539,7 @@ static void atapi_request_sense(struct ata_port *ap, struct ata_device *dev, ata_sg_init_one(qc, cmd->sense_buffer, sizeof(cmd->sense_buffer)); qc->dma_dir = DMA_FROM_DEVICE; - memset(&qc->cdb, 0, sizeof(ap->cdb_len)); + memset(&qc->cdb, 0, ap->cdb_len); qc->cdb[0] = REQUEST_SENSE; qc->cdb[4] = SCSI_SENSE_BUFFERSIZE; @@ -2811,6 +2811,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat) /* call completion callback */ rc = qc->complete_fn(qc, drv_stat); + qc->flags &= ~ATA_QCFLAG_ACTIVE; /* if callback indicates not to complete command (non-zero), * return immediately @@ -3229,7 +3230,8 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs) struct ata_queued_cmd *qc; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.ctl & ATA_NIEN))) + if (qc && (!(qc->tf.ctl & ATA_NIEN)) && + (qc->flags & ATA_QCFLAG_ACTIVE)) handled |= ata_host_intr(ap, qc); } } diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 4c96df0..416ba67 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -347,7 +347,10 @@ int ata_scsi_slave_config(struct scsi_device *sdev) */ if ((dev->flags & ATA_DFLAG_LBA48) && ((dev->flags & ATA_DFLAG_LOCK_SECTORS) == 0)) { - sdev->host->max_sectors = 2048; + /* + * do not overwrite sdev->host->max_sectors, since + * other drives on this host may not support LBA48 + */ blk_queue_max_sectors(sdev->request_queue, 2048); } } diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 8d1a5d2..05075bd 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c @@ -395,7 +395,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e /* Clear a magic bit in SCR1 according to Darwin, those help * some funky seagate drives (though so far, those were already - * set by the firmware on the machines I had access to + * set by the firmware on the machines I had access to) */ writel(readl(mmio_base + K2_SATA_SICR1_OFFSET) & ~0x00040000, mmio_base + K2_SATA_SICR1_OFFSET); |