提交 0eb09693 编写于 作者: L Linus Torvalds

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:
  libata clear horkage on ata_dev_init()
  [libata, IDE] add new VIA bridge to VIA PATA drivers
  pata_it821x: fix lost interrupt with atapi devices
  Fix broken pata_via cable detection
...@@ -6035,6 +6035,7 @@ void ata_dev_init(struct ata_device *dev) ...@@ -6035,6 +6035,7 @@ void ata_dev_init(struct ata_device *dev)
*/ */
spin_lock_irqsave(ap->lock, flags); spin_lock_irqsave(ap->lock, flags);
dev->flags &= ~ATA_DFLAG_INIT_MASK; dev->flags &= ~ATA_DFLAG_INIT_MASK;
dev->horkage = 0;
spin_unlock_irqrestore(ap->lock, flags); spin_unlock_irqrestore(ap->lock, flags);
memset((void *)dev + ATA_DEVICE_CLEAR_OFFSET, 0, memset((void *)dev + ATA_DEVICE_CLEAR_OFFSET, 0,
......
...@@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct ata_queued_cmd *qc) ...@@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct ata_queued_cmd *qc)
struct ata_port *ap = qc->ap; struct ata_port *ap = qc->ap;
struct it821x_dev *itdev = ap->private_data; struct it821x_dev *itdev = ap->private_data;
/* Only use dma for transfers to/from the media. */
if (qc->nbytes < 2048)
return -EOPNOTSUPP;
/* No ATAPI DMA in smart mode */ /* No ATAPI DMA in smart mode */
if (itdev->smart) if (itdev->smart)
return -EOPNOTSUPP; return -EOPNOTSUPP;
......
...@@ -97,6 +97,7 @@ static const struct via_isa_bridge { ...@@ -97,6 +97,7 @@ static const struct via_isa_bridge {
u8 rev_max; u8 rev_max;
u16 flags; u16 flags;
} via_isa_bridges[] = { } via_isa_bridges[] = {
{ "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
...@@ -243,7 +244,6 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo ...@@ -243,7 +244,6 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
int ut; int ut;
int offset = 3 - (2*ap->port_no) - adev->devno; int offset = 3 - (2*ap->port_no) - adev->devno;
/* Calculate the timing values we require */ /* Calculate the timing values we require */
ata_timing_compute(adev, mode, &t, T, UT); ata_timing_compute(adev, mode, &t, T, UT);
...@@ -290,9 +290,17 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo ...@@ -290,9 +290,17 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07; ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07;
break; break;
} }
/* Set UDMA unless device is not UDMA capable */ /* Set UDMA unless device is not UDMA capable */
if (udma_type) if (udma_type) {
pci_write_config_byte(pdev, 0x50 + offset, ut); u8 cable80_status;
/* Get 80-wire cable detection bit */
pci_read_config_byte(pdev, 0x50 + offset, &cable80_status);
cable80_status &= 0x10;
pci_write_config_byte(pdev, 0x50 + offset, ut | cable80_status);
}
} }
static void via_set_piomode(struct ata_port *ap, struct ata_device *adev) static void via_set_piomode(struct ata_port *ap, struct ata_device *adev)
......
...@@ -74,6 +74,7 @@ static struct via_isa_bridge { ...@@ -74,6 +74,7 @@ static struct via_isa_bridge {
u8 udma_mask; u8 udma_mask;
u8 flags; u8 flags;
} via_isa_bridges[] = { } via_isa_bridges[] = {
{ "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
{ "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
{ "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
{ "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
......
...@@ -1343,6 +1343,7 @@ ...@@ -1343,6 +1343,7 @@
#define PCI_DEVICE_ID_VIA_8231_4 0x8235 #define PCI_DEVICE_ID_VIA_8231_4 0x8235
#define PCI_DEVICE_ID_VIA_8365_1 0x8305 #define PCI_DEVICE_ID_VIA_8365_1 0x8305
#define PCI_DEVICE_ID_VIA_CX700 0x8324 #define PCI_DEVICE_ID_VIA_CX700 0x8324
#define PCI_DEVICE_ID_VIA_VX800 0x8353
#define PCI_DEVICE_ID_VIA_8371_1 0x8391 #define PCI_DEVICE_ID_VIA_8371_1 0x8391
#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 #define PCI_DEVICE_ID_VIA_82C598_1 0x8598
#define PCI_DEVICE_ID_VIA_838X_1 0xB188 #define PCI_DEVICE_ID_VIA_838X_1 0xB188
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册