-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolling-io-6-of-7.patch
67 lines (60 loc) · 1.82 KB
/
polling-io-6-of-7.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From [email protected] Mon Mar 7 19:26:19 2005
Date: Mon, 7 Mar 2005 19:26:19 -0800
From: Jason Uhlenkott <[email protected]>
Subject: [PATCH 6/7] Polling I/O: sata_vsc support
Message-ID: <[email protected]>
References: <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[email protected]>
User-Agent: Mutt/1.5.6i
Status: RO
Content-Length: 1308
Lines: 50
Polling I/O support for Vitesse VSC7174 4 port DPA SATA.
Index: linux/drivers/scsi/sata_vsc.c
===================================================================
--- linux.orig/drivers/scsi/sata_vsc.c 2005-03-07 17:48:57.889069897 -0800
+++ linux/drivers/scsi/sata_vsc.c 2005-03-07 17:49:09.440925190 -0800
@@ -186,6 +186,34 @@
return IRQ_RETVAL(handled);
}
+static int
+vsc_dump_quiesce(struct scsi_device *device)
+{
+ struct ata_port *ap = (struct ata_port *) device->host->hostdata;
+ struct ata_host_set *host_set = ap->host_set;
+
+ /*
+ * Give the device 1 second to finish whatever it might be doing,
+ * then deal with any pending interrupts.
+ */
+ mdelay(1000);
+ vsc_sata_interrupt(0, host_set, NULL);
+
+ ap->qactive = 0;
+ ap->active_tag = ATA_TAG_POISON;
+
+ return 0;
+}
+
+static void
+vsc_dump_poll(struct scsi_device *device)
+{
+ struct ata_port *ap = (struct ata_port *) device->host->hostdata;
+ struct ata_host_set *host_set = ap->host_set;
+
+ vsc_sata_interrupt(0, host_set, NULL);
+}
+
static Scsi_Host_Template vsc_sata_sht = {
.module = THIS_MODULE,
@@ -204,6 +232,8 @@
.dma_boundary = ATA_DMA_BOUNDARY,
.slave_configure = ata_scsi_slave_config,
.bios_param = ata_std_bios_param,
+ .dump_quiesce = vsc_dump_quiesce,
+ .dump_poll = vsc_dump_poll,
};