From: Jeff Garzik Date: Fri, 23 Jun 2006 02:11:56 +0000 (-0400) Subject: Merge branch 'master' into upstream X-Git-Tag: v2.6.18-rc1~1079^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71d530cd1b6d97094481002a04c77fea1c8e1c22;p=linux-2.6 Merge branch 'master' into upstream Conflicts: drivers/scsi/libata-core.c drivers/scsi/libata-scsi.c include/linux/pci_ids.h --- 71d530cd1b6d97094481002a04c77fea1c8e1c22 diff --cc drivers/scsi/libata-core.c index 89c3fbe6e6,de9ba7890b..df483adc3f --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@@ -4983,23 -4294,18 +4983,24 @@@ static int ata_start_drive(struct ata_d * and host. * */ -int ata_device_resume(struct ata_port *ap, struct ata_device *dev) +int ata_device_resume(struct ata_device *dev) { + struct ata_port *ap = dev->ap; + if (ap->flags & ATA_FLAG_SUSPENDED) { + struct ata_device *failed_dev; + + ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT); ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000); + ap->flags &= ~ATA_FLAG_SUSPENDED; - ata_set_mode(ap); + while (ata_set_mode(ap, &failed_dev)) + ata_dev_disable(failed_dev); } - if (!ata_dev_present(dev)) + if (!ata_dev_enabled(dev)) return 0; if (dev->class == ATA_DEV_ATA) - ata_start_drive(ap, dev); + ata_start_drive(dev); return 0; } diff --cc drivers/scsi/libata-scsi.c index 32c1df6909,f1e129b7c9..9698949fa5 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@@ -38,10 -38,9 +38,10 @@@ #include #include #include + #include #include #include - #include +#include #include #include #include @@@ -2346,12 -2303,14 +2346,12 @@@ static unsigned int atapi_xlat(struct a qc->tf.protocol = ATA_PROT_ATAPI_DMA; qc->tf.feature |= ATAPI_PKT_DMA; -#ifdef ATAPI_ENABLE_DMADIR - /* some SATA bridges need us to indicate data xfer direction */ - if (cmd->sc_data_direction != DMA_TO_DEVICE) + if (atapi_dmadir && (cmd->sc_data_direction != DMA_TO_DEVICE)) + /* some SATA bridges need us to indicate data xfer direction */ qc->tf.feature |= ATAPI_DMADIR; -#endif } - qc->nbytes = cmd->bufflen; + qc->nbytes = cmd->request_bufflen; return 0; } @@@ -2553,11 -2500,8 +2553,11 @@@ ata_scsi_pass_thru(struct ata_queued_cm * TODO: find out if we need to do more here to * cover scatter/gather case. */ - qc->nsect = cmd->bufflen / ATA_SECT_SIZE; + qc->nsect = cmd->request_bufflen / ATA_SECT_SIZE; + /* request result TF */ + qc->flags |= ATA_QCFLAG_RESULT_TF; + return 0; invalid_fld: diff --cc include/linux/pci_ids.h index 55dc8ac3f0,cde701c13c..c2fd2d1993 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@@ -1182,10 -1194,14 +1194,18 @@@ #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E #define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372 #define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373 + #define PCI_DEVICE_ID_NVIDIA_NVENET_16 0x03E5 + #define PCI_DEVICE_ID_NVIDIA_NVENET_17 0x03E6 +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7 +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC + #define PCI_DEVICE_ID_NVIDIA_NVENET_18 0x03EE + #define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 + #define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450 + #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 + #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 + #define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 #define PCI_VENDOR_ID_IMS 0x10e0 #define PCI_DEVICE_ID_IMS_TT128 0x9128 diff --cc include/scsi/scsi_cmnd.h index 88c6c4da6c,b0caabec1b..e46cd404bd --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@@ -151,6 -145,9 +145,10 @@@ extern struct scsi_cmnd *scsi_get_comma extern void scsi_put_command(struct scsi_cmnd *); extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int); extern void scsi_finish_command(struct scsi_cmnd *cmd); +extern void scsi_req_abort_cmd(struct scsi_cmnd *cmd); + extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, + size_t *offset, size_t *len); + extern void scsi_kunmap_atomic_sg(void *virt); + #endif /* _SCSI_SCSI_CMND_H */