Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614265
| From | Ondrej Zary <linux@rainbow-software.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH] sata_via: Enable hotplug on VT6420 |
| Date | 2017-03-31 21:20 +0200 |
| Message-ID | <trafv-iO-1@gated-at.bofh.it> (permalink) |
| References | <tr9Mt-8kr-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
VT6420 seems to have the same hotplug capability as VT6421.
However, enabling hotplug needs to expose SCR registers which can cause
problems. It works for me but might break elsewhere.
---
drivers/ata/sata_via.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index f3f538e..fafb0d3 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -132,6 +132,8 @@ struct svia_priv {
static struct ata_port_operations vt6420_sata_ops = {
.inherits = &svia_base_ops,
+ .scr_read = svia_scr_read,
+ .scr_write = svia_scr_write,
.freeze = svia_noop_freeze,
.prereset = vt6420_prereset,
.bmdma_start = vt6420_bmdma_start,
@@ -556,7 +558,7 @@ static void svia_wd_fix(struct pci_dev *pdev)
pci_write_config_byte(pdev, 0x52, tmp8 | BIT(2));
}
-static irqreturn_t vt6421_interrupt(int irq, void *dev_instance)
+static irqreturn_t vt642x_interrupt(int irq, void *dev_instance)
{
struct ata_host *host = dev_instance;
irqreturn_t rc = ata_bmdma_interrupt(irq, dev_instance);
@@ -644,7 +646,7 @@ static void svia_configure(struct pci_dev *pdev, int board_id,
pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8);
}
- if (board_id == vt6421) {
+ if (board_id == vt6420 || board_id == vt6421) {
/* enable IRQ on hotplug */
pci_read_config_byte(pdev, SVIA_MISC_3, &tmp8);
if ((tmp8 & SATA_HOTPLUG) != SATA_HOTPLUG) {
@@ -744,8 +746,8 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
svia_configure(pdev, board_id, hpriv);
pci_set_master(pdev);
- if (board_id == vt6421)
- return ata_host_activate(host, pdev->irq, vt6421_interrupt,
+ if (board_id == vt6420 || board_id == vt6421)
+ return ata_host_activate(host, pdev->irq, vt642x_interrupt,
IRQF_SHARED, &svia_sht);
else
return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,
--
Ondrej Zary
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] sata_via: Enable hotplug only on VT6421 Ondrej Zary <linux@rainbow-software.org> - 2017-03-31 20:50 +0200 [RFC PATCH] sata_via: Enable hotplug on VT6420 Ondrej Zary <linux@rainbow-software.org> - 2017-03-31 21:20 +0200
csiph-web