History

Merge tag 'ata-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata updates from Niklas Cassel: - ATA PASS-THROUGH sense data cleanups and fixes (Igor Pylypiv) Store the sense data for ATA PASS-THROUGH commands at the correct offset in the sense buffer when using fixed format sense data. Cleanup the logic related to generating sense data for PASS-THROUGH commands. Generating sense data for PASS-THROUGH commands would overwrite any eventual (real) sense data received from the device. Honor the D_SENSE bit when generating sense data for PASS-THROUGH commands. (The D_SENSE bit can be set by the user, and determines if the returned sense data should be in fixed format or descriptor format) - ata port allocation cleanups (me) Assign the ata port print_id at port allocation time, such that the ata_port_* print functions can be used earlier in the init call chain. Change the ata port port print_id to use ida_alloc(), such that print_ids will get reused on rmmod + modprobe, instead of being incremented indefinitely. Remove wrappers that only existed in order to export the internal libata functions which they wrapped, and instead export the libata functions directly. - Update SATA_MOBILE_LPM_POLICY Kconfig default to med_power_with_dipm (Mario Limonciello) Using this default was not always a good idea before, because it would break hot plug support. However, with LPM changes in recent kernels, a port marked as external will not enable LPM (in order to not break hot plug), so it is now safe to change the default value of this Kconfig. All major Linux distros have had SATA_MOBILE_LPM_POLICY set to med_power_with_dipm for quite a long time - Convert ahci-fsl-qoriq device tree binding to yaml format (Frank Li) * tag 'ata-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: dt-bindings: ata: ahci-fsl-qoriq: add fsl,ls1046a-ahci and fsl,ls1012a-ahci ata: ahci: Add debug print for external port ata,scsi: Remove wrapper ata_sas_port_alloc() ata: libata-core: Reuse available ata_port print_ids ata: libata: Assign print_id at port allocation time ata: libata-core: Remove local_port_no struct member ata: libata-sata: Remove superfluous assignment in ata_sas_port_alloc() ata: libata-core: Remove support for decreasing the number of ports ata: libata: Remove unused function declaration for ata_scsi_detect() ata,scsi: Remove wrappers ata_sas_tport_{add,delete}() ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf ata: libata-core: Set ATA_QCFLAG_RTF_FILLED in fill_result_tf() ata: libata-scsi: Do not pass ATA device id to ata_to_sense_error() ata: libata-scsi: Remove redundant sense_buffer memsets ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error ata: libata-scsi: Do not overwrite valid sense data when CK_COND=1 ata: libata-scsi: Fix offsets for the fixed format sense data dt-bindings: ata: ahci-fsl-qoriq: convert to yaml format ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm

Linus Torvalds committed 2 years ago

Commit e2f710f2 parents 01f851a 6739fad14 files · +230 −225Browse files

Unified · Split

14 files
  1. Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt +0 −21
  2. Documentation/devicetree/bindings/ata/fsl,ahci.yaml +64 −0
  3. drivers/ata/Kconfig +1 −1
  4. drivers/ata/ahci.c +3 −1
  5. drivers/ata/libahci.c +2 −10
  6. drivers/ata/libata-core.c +23 −26
  7. drivers/ata/libata-sata.c +0 −49
  8. drivers/ata/libata-scsi.c +118 −91
  9. drivers/ata/libata-transport.c +4 −1
  10. drivers/ata/libata-transport.h +0 −3
  11. drivers/ata/libata.h +0 −2
  12. drivers/scsi/libsas/sas_ata.c +10 −12
  13. drivers/scsi/libsas/sas_discover.c +1 −1
  14. include/linux/libata.h +4 −7
Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt+0−21
@@ -1,21 +0,0 @@
1Binding for Freescale QorIQ AHCI SATA Controller
2
3Required properties:
4 - reg: Physical base address and size of the controller's register area.
5 - compatible: Compatibility string. Must be 'fsl,<chip>-ahci', where
6 chip could be ls1021a, ls1043a, ls1046a, ls1088a, ls2080a etc.
7 - clocks: Input clock specifier. Refer to common clock bindings.
8 - interrupts: Interrupt specifier. Refer to interrupt binding.
9
10Optional properties:
11 - dma-coherent: Enable AHCI coherent DMA operation.
12 - reg-names: register area names when there are more than 1 register area.
13
14Examples:
15 sata@3200000 {
16 compatible = "fsl,ls1021a-ahci";
17 reg = <0x0 0x3200000 0x0 0x10000>;
18 interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
19 clocks = <&platform_clk 1>;
20 dma-coherent;
21 };
Documentation/devicetree/bindings/ata/fsl,ahci.yaml+64−0
@@ -0,0 +1,64 @@
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/ata/fsl,ahci.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale QorIQ AHCI SATA Controller
8
9maintainers:
10 - Frank Li <Frank.Li@nxp.com>
11
12properties:
13 compatible:
14 oneOf:
15 - description: SATA controller for ls1012a
16 items:
17 - const: fsl,ls1012a-ahci
18 - const: fsl,ls1043a-ahci
19 - enum:
20 - fsl,ls1021a-ahci
21 - fsl,ls1028a-ahci
22 - fsl,ls1043a-ahci
23 - fsl,ls1046a-ahci
24 - fsl,ls1088a-ahci
25 - fsl,ls2080a-ahci
26 - fsl,lx2160a-ahci
27
28 reg:
29 minItems: 1
30 maxItems: 2
31
32 reg-names:
33 items:
34 - const: ahci
35 - const: sata-ecc
36 minItems: 1
37
38 clocks:
39 maxItems: 1
40
41 interrupts:
42 maxItems: 1
43
44 dma-coherent: true
45
46required:
47 - compatible
48 - reg
49 - clocks
50 - interrupts
51
52additionalProperties: false
53
54examples:
55 - |
56 #include <dt-bindings/interrupt-controller/arm-gic.h>
57
58 sata@3200000 {
59 compatible = "fsl,ls1021a-ahci";
60 reg = <0x3200000 0x10000>;
61 interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
62 clocks = <&platform_clk 1>;
63 dma-coherent;
64 };
drivers/ata/Kconfig+1−1
@@ -118,7 +118,7 @@ config SATA_AHCI · 117 unmodified lines
118config SATA_MOBILE_LPM_POLICY118config SATA_MOBILE_LPM_POLICY
119 int "Default SATA Link Power Management policy"119 int "Default SATA Link Power Management policy"
120 range 0 4120 range 0 4
121 default 0121 default 3
122 depends on SATA_AHCI122 depends on SATA_AHCI
123 help123 help
124 Select the Default SATA Link Power Management (LPM) policy to use124 Select the Default SATA Link Power Management (LPM) policy to use
drivers/ata/ahci.c+3−1
@@ -1732,8 +1732,10 @@ static void ahci_update_initial_lpm_policy(struct ata_port *ap) · 1731 unmodified lines
1732 * Management Interaction in AHCI 1.3.1. Therefore, do not enable1732 * Management Interaction in AHCI 1.3.1. Therefore, do not enable
1733 * LPM if the port advertises itself as an external port.1733 * LPM if the port advertises itself as an external port.
1734 */1734 */
1735 if (ap->pflags & ATA_PFLAG_EXTERNAL)1735 if (ap->pflags & ATA_PFLAG_EXTERNAL) {
1736 ata_port_dbg(ap, "external port, not enabling LPM\n");
1736 return;1737 return;
1738 }
1737 1739
1738 /* If no LPM states are supported by the HBA, do not bother with LPM */1740 /* If no LPM states are supported by the HBA, do not bother with LPM */
1739 if ((ap->host->flags & ATA_HOST_NO_PART) &&1741 if ((ap->host->flags & ATA_HOST_NO_PART) &&
drivers/ata/libahci.c+2−10
@@ -2075,13 +2075,6 @@ static void ahci_qc_fill_rtf(struct ata_queued_cmd *qc) · 2074 unmodified lines
2075 struct ahci_port_priv *pp = qc->ap->private_data;2075 struct ahci_port_priv *pp = qc->ap->private_data;
2076 u8 *rx_fis = pp->rx_fis;2076 u8 *rx_fis = pp->rx_fis;
2077 2077
2078 /*
2079 * rtf may already be filled (e.g. for successful NCQ commands).
2080 * If that is the case, we have nothing to do.
2081 */
2082 if (qc->flags & ATA_QCFLAG_RTF_FILLED)
2083 return;
2084
2085 if (pp->fbs_enabled)2078 if (pp->fbs_enabled)
2086 rx_fis += qc->dev->link->pmp * AHCI_RX_FIS_SZ;2079 rx_fis += qc->dev->link->pmp * AHCI_RX_FIS_SZ;
2087 2080
@@ -2095,7 +2088,6 @@ static void ahci_qc_fill_rtf(struct ata_queued_cmd *qc) · 7 unmodified lines
2095 !(qc->flags & ATA_QCFLAG_EH)) {2088 !(qc->flags & ATA_QCFLAG_EH)) {
2096 ata_tf_from_fis(rx_fis + RX_FIS_PIO_SETUP, &qc->result_tf);2089 ata_tf_from_fis(rx_fis + RX_FIS_PIO_SETUP, &qc->result_tf);
2097 qc->result_tf.status = (rx_fis + RX_FIS_PIO_SETUP)[15];2090 qc->result_tf.status = (rx_fis + RX_FIS_PIO_SETUP)[15];
2098 qc->flags |= ATA_QCFLAG_RTF_FILLED;
2099 return;2091 return;
2100 }2092 }
2101 2093
@@ -2118,12 +2110,10 @@ static void ahci_qc_fill_rtf(struct ata_queued_cmd *qc) · 16 unmodified lines
2118 */2110 */
2119 qc->result_tf.status = fis[2];2111 qc->result_tf.status = fis[2];
2120 qc->result_tf.error = fis[3];2112 qc->result_tf.error = fis[3];
2121 qc->flags |= ATA_QCFLAG_RTF_FILLED;
2122 return;2113 return;
2123 }2114 }
2124 2115
2125 ata_tf_from_fis(rx_fis + RX_FIS_D2H_REG, &qc->result_tf);2116 ata_tf_from_fis(rx_fis + RX_FIS_D2H_REG, &qc->result_tf);
2126 qc->flags |= ATA_QCFLAG_RTF_FILLED;
2127}2117}
2128 2118
2129static void ahci_qc_ncq_fill_rtf(struct ata_port *ap, u64 done_mask)2119static void ahci_qc_ncq_fill_rtf(struct ata_port *ap, u64 done_mask)
@@ -2158,6 +2148,7 @@ static void ahci_qc_ncq_fill_rtf(struct ata_port *ap, u64 done_mask) · 28 unmodified lines
2158 if (qc && ata_is_ncq(qc->tf.protocol)) {2148 if (qc && ata_is_ncq(qc->tf.protocol)) {
2159 qc->result_tf.status = status;2149 qc->result_tf.status = status;
2160 qc->result_tf.error = error;2150 qc->result_tf.error = error;
2151 qc->result_tf.flags = qc->tf.flags;
2161 qc->flags |= ATA_QCFLAG_RTF_FILLED;2152 qc->flags |= ATA_QCFLAG_RTF_FILLED;
2162 }2153 }
2163 done_mask &= ~(1ULL << tag);2154 done_mask &= ~(1ULL << tag);
@@ -2182,6 +2173,7 @@ static void ahci_qc_ncq_fill_rtf(struct ata_port *ap, u64 done_mask) · 18 unmodified lines
2182 fis += RX_FIS_SDB;2173 fis += RX_FIS_SDB;
2183 qc->result_tf.status = fis[2];2174 qc->result_tf.status = fis[2];
2184 qc->result_tf.error = fis[3];2175 qc->result_tf.error = fis[3];
2176 qc->result_tf.flags = qc->tf.flags;
2185 qc->flags |= ATA_QCFLAG_RTF_FILLED;2177 qc->flags |= ATA_QCFLAG_RTF_FILLED;
2186 }2178 }
2187 done_mask &= ~(1ULL << tag);2179 done_mask &= ~(1ULL << tag);
drivers/ata/libata-core.c+23−26
@@ -86,7 +86,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev); · 85 unmodified lines
86static void ata_dev_xfermask(struct ata_device *dev);86static void ata_dev_xfermask(struct ata_device *dev);
87static unsigned long ata_dev_blacklisted(const struct ata_device *dev);87static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
88 88
89atomic_t ata_print_id = ATOMIC_INIT(0);89static DEFINE_IDA(ata_ida);
90 90
91#ifdef CONFIG_ATA_FORCE91#ifdef CONFIG_ATA_FORCE
92struct ata_force_param {92struct ata_force_param {
@@ -4800,8 +4800,16 @@ static void fill_result_tf(struct ata_queued_cmd *qc) · 4707 unmodified lines
4800{4800{
4801 struct ata_port *ap = qc->ap;4801 struct ata_port *ap = qc->ap;
4802 4802
4803 /*
4804 * rtf may already be filled (e.g. for successful NCQ commands).
4805 * If that is the case, we have nothing to do.
4806 */
4807 if (qc->flags & ATA_QCFLAG_RTF_FILLED)
4808 return;
4809
4803 qc->result_tf.flags = qc->tf.flags;4810 qc->result_tf.flags = qc->tf.flags;
4804 ap->ops->qc_fill_rtf(qc);4811 ap->ops->qc_fill_rtf(qc);
4812 qc->flags |= ATA_QCFLAG_RTF_FILLED;
4805}4813}
4806 4814
4807static void ata_verify_xfer(struct ata_queued_cmd *qc)4815static void ata_verify_xfer(struct ata_queued_cmd *qc)
@@ -5455,6 +5463,7 @@ int sata_link_init_spd(struct ata_link *link) · 647 unmodified lines
5455struct ata_port *ata_port_alloc(struct ata_host *host)5463struct ata_port *ata_port_alloc(struct ata_host *host)
5456{5464{
5457 struct ata_port *ap;5465 struct ata_port *ap;
5466 int id;
5458 5467
5459 ap = kzalloc(sizeof(*ap), GFP_KERNEL);5468 ap = kzalloc(sizeof(*ap), GFP_KERNEL);
5460 if (!ap)5469 if (!ap)
@@ -5462,8 +5471,12 @@ struct ata_port *ata_port_alloc(struct ata_host *host) · 1 unmodified line
5462 5471
5463 ap->pflags |= ATA_PFLAG_INITIALIZING | ATA_PFLAG_FROZEN;5472 ap->pflags |= ATA_PFLAG_INITIALIZING | ATA_PFLAG_FROZEN;
5464 ap->lock = &host->lock;5473 ap->lock = &host->lock;
5465 ap->print_id = -1;5474 id = ida_alloc_min(&ata_ida, 1, GFP_KERNEL);
5466 ap->local_port_no = -1;5475 if (id < 0) {
5476 kfree(ap);
5477 return NULL;
5478 }
5479 ap->print_id = id;
5467 ap->host = host;5480 ap->host = host;
5468 ap->dev = host->dev;5481 ap->dev = host->dev;
5469 5482
@@ -5488,6 +5501,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host) · 18 unmodified lines
5488 5501
5489 return ap;5502 return ap;
5490}5503}
5504EXPORT_SYMBOL_GPL(ata_port_alloc);
5491 5505
5492void ata_port_free(struct ata_port *ap)5506void ata_port_free(struct ata_port *ap)
5493{5507{
@@ -5497,6 +5511,7 @@ void ata_port_free(struct ata_port *ap) · 3 unmodified lines
5497 kfree(ap->pmp_link);5511 kfree(ap->pmp_link);
5498 kfree(ap->slave_link);5512 kfree(ap->slave_link);
5499 kfree(ap->ncq_sense_buf);5513 kfree(ap->ncq_sense_buf);
5514 ida_free(&ata_ida, ap->print_id);
5500 kfree(ap);5515 kfree(ap);
5501}5516}
5502EXPORT_SYMBOL_GPL(ata_port_free);5517EXPORT_SYMBOL_GPL(ata_port_free);
@@ -5547,24 +5562,19 @@ EXPORT_SYMBOL_GPL(ata_host_put); · 44 unmodified lines
5547/**5562/**
5548 * ata_host_alloc - allocate and init basic ATA host resources5563 * ata_host_alloc - allocate and init basic ATA host resources
5549 * @dev: generic device this host is associated with5564 * @dev: generic device this host is associated with
5550 * @max_ports: maximum number of ATA ports associated with this host5565 * @n_ports: the number of ATA ports associated with this host
5551 *5566 *
5552 * Allocate and initialize basic ATA host resources. LLD calls5567 * Allocate and initialize basic ATA host resources. LLD calls
5553 * this function to allocate a host, initializes it fully and5568 * this function to allocate a host, initializes it fully and
5554 * attaches it using ata_host_register().5569 * attaches it using ata_host_register().
5555 *5570 *
5556 * @max_ports ports are allocated and host->n_ports is
5557 * initialized to @max_ports. The caller is allowed to decrease
5558 * host->n_ports before calling ata_host_register(). The unused
5559 * ports will be automatically freed on registration.
5560 *
5561 * RETURNS:5571 * RETURNS:
5562 * Allocate ATA host on success, NULL on failure.5572 * Allocate ATA host on success, NULL on failure.
5563 *5573 *
5564 * LOCKING:5574 * LOCKING:
5565 * Inherited from calling layer (may sleep).5575 * Inherited from calling layer (may sleep).
5566 */5576 */
5567struct ata_host *ata_host_alloc(struct device *dev, int max_ports)5577struct ata_host *ata_host_alloc(struct device *dev, int n_ports)
5568{5578{
5569 struct ata_host *host;5579 struct ata_host *host;
5570 size_t sz;5580 size_t sz;
@@ -5572,7 +5582,7 @@ struct ata_host *ata_host_alloc(struct device *dev, int max_ports) · 1 unmodified line
5572 void *dr;5582 void *dr;
5573 5583
5574 /* alloc a container for our list of ATA ports (buses) */5584 /* alloc a container for our list of ATA ports (buses) */
5575 sz = sizeof(struct ata_host) + (max_ports + 1) * sizeof(void *);5585 sz = sizeof(struct ata_host) + n_ports * sizeof(void *);
5576 host = kzalloc(sz, GFP_KERNEL);5586 host = kzalloc(sz, GFP_KERNEL);
5577 if (!host)5587 if (!host)
5578 return NULL;5588 return NULL;
@@ -5592,11 +5602,11 @@ struct ata_host *ata_host_alloc(struct device *dev, int max_ports) · 13 unmodified lines
5592 spin_lock_init(&host->lock);5602 spin_lock_init(&host->lock);
5593 mutex_init(&host->eh_mutex);5603 mutex_init(&host->eh_mutex);
5594 host->dev = dev;5604 host->dev = dev;
5595 host->n_ports = max_ports;5605 host->n_ports = n_ports;
5596 kref_init(&host->kref);5606 kref_init(&host->kref);
5597 5607
5598 /* allocate ports bound to this host */5608 /* allocate ports bound to this host */
5599 for (i = 0; i < max_ports; i++) {5609 for (i = 0; i < n_ports; i++) {
5600 struct ata_port *ap;5610 struct ata_port *ap;
5601 5611
5602 ap = ata_port_alloc(host);5612 ap = ata_port_alloc(host);
@@ -5905,19 +5915,6 @@ int ata_host_register(struct ata_host *host, const struct scsi_host_template *sh · 302 unmodified lines
5905 return -EINVAL;5915 return -EINVAL;
5906 }5916 }
5907 5917
5908 /* Blow away unused ports. This happens when LLD can't
5909 * determine the exact number of ports to allocate at
5910 * allocation time.
5911 */
5912 for (i = host->n_ports; host->ports[i]; i++)
5913 ata_port_free(host->ports[i]);
5914
5915 /* give ports names and add SCSI hosts */
5916 for (i = 0; i < host->n_ports; i++) {
5917 host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
5918 host->ports[i]->local_port_no = i + 1;
5919 }
5920
5921 /* Create associated sysfs transport objects */5918 /* Create associated sysfs transport objects */
5922 for (i = 0; i < host->n_ports; i++) {5919 for (i = 0; i < host->n_ports; i++) {
5923 rc = ata_tport_add(host->dev,host->ports[i]);5920 rc = ata_tport_add(host->dev,host->ports[i]);
drivers/ata/libata-sata.c+0−49
@@ -1204,55 +1204,6 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) · 1203 unmodified lines
1204}1204}
1205EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);1205EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
1206 1206
1207/**
1208 * ata_sas_port_alloc - Allocate port for a SAS attached SATA device
1209 * @host: ATA host container for all SAS ports
1210 * @port_info: Information from low-level host driver
1211 * @shost: SCSI host that the scsi device is attached to
1212 *
1213 * LOCKING:
1214 * PCI/etc. bus probe sem.
1215 *
1216 * RETURNS:
1217 * ata_port pointer on success / NULL on failure.
1218 */
1219
1220struct ata_port *ata_sas_port_alloc(struct ata_host *host,
1221 struct ata_port_info *port_info,
1222 struct Scsi_Host *shost)
1223{
1224 struct ata_port *ap;
1225
1226 ap = ata_port_alloc(host);
1227 if (!ap)
1228 return NULL;
1229
1230 ap->port_no = 0;
1231 ap->lock = &host->lock;
1232 ap->pio_mask = port_info->pio_mask;
1233 ap->mwdma_mask = port_info->mwdma_mask;
1234 ap->udma_mask = port_info->udma_mask;
1235 ap->flags |= port_info->flags;
1236 ap->ops = port_info->port_ops;
1237 ap->cbl = ATA_CBL_SATA;
1238 ap->print_id = atomic_inc_return(&ata_print_id);
1239
1240 return ap;
1241}
1242EXPORT_SYMBOL_GPL(ata_sas_port_alloc);
1243
1244int ata_sas_tport_add(struct device *parent, struct ata_port *ap)
1245{
1246 return ata_tport_add(parent, ap);
1247}
1248EXPORT_SYMBOL_GPL(ata_sas_tport_add);
1249
1250void ata_sas_tport_delete(struct ata_port *ap)
1251{
1252 ata_tport_delete(ap);
1253}
1254EXPORT_SYMBOL_GPL(ata_sas_tport_delete);
1255
1256/**1207/**
1257 * ata_sas_device_configure - Default device_configure routine for libata1208 * ata_sas_device_configure - Default device_configure routine for libata
1258 * devices1209 * devices
drivers/ata/libata-scsi.c+118−91
@@ -230,6 +230,87 @@ void ata_scsi_set_sense_information(struct ata_device *dev, · 229 unmodified lines
230 SCSI_SENSE_BUFFERSIZE, information);230 SCSI_SENSE_BUFFERSIZE, information);
231}231}
232 232
233/**
234 * ata_scsi_set_passthru_sense_fields - Set ATA fields in sense buffer
235 * @qc: ATA PASS-THROUGH command.
236 *
237 * Populates "ATA Status Return sense data descriptor" / "Fixed format
238 * sense data" with ATA taskfile fields.
239 *
240 * LOCKING:
241 * None.
242 */
243static void ata_scsi_set_passthru_sense_fields(struct ata_queued_cmd *qc)
244{
245 struct ata_device *dev = qc->dev;
246 struct scsi_cmnd *cmd = qc->scsicmd;
247 struct ata_taskfile *tf = &qc->result_tf;
248 unsigned char *sb = cmd->sense_buffer;
249
250 if (!(qc->flags & ATA_QCFLAG_RTF_FILLED)) {
251 ata_dev_dbg(dev,
252 "missing result TF: can't set ATA PT sense fields\n");
253 return;
254 }
255
256 if ((sb[0] & 0x7f) >= 0x72) {
257 unsigned char *desc;
258 u8 len;
259
260 /* descriptor format */
261 len = sb[7];
262 desc = (char *)scsi_sense_desc_find(sb, len + 8, 9);
263 if (!desc) {
264 if (SCSI_SENSE_BUFFERSIZE < len + 14)
265 return;
266 sb[7] = len + 14;
267 desc = sb + 8 + len;
268 }
269 desc[0] = 9;
270 desc[1] = 12;
271 /*
272 * Copy registers into sense buffer.
273 */
274 desc[2] = 0x00;
275 desc[3] = tf->error;
276 desc[5] = tf->nsect;
277 desc[7] = tf->lbal;
278 desc[9] = tf->lbam;
279 desc[11] = tf->lbah;
280 desc[12] = tf->device;
281 desc[13] = tf->status;
282
283 /*
284 * Fill in Extend bit, and the high order bytes
285 * if applicable.
286 */
287 if (tf->flags & ATA_TFLAG_LBA48) {
288 desc[2] |= 0x01;
289 desc[4] = tf->hob_nsect;
290 desc[6] = tf->hob_lbal;
291 desc[8] = tf->hob_lbam;
292 desc[10] = tf->hob_lbah;
293 }
294 } else {
295 /* Fixed sense format */
296 sb[0] |= 0x80;
297 sb[3] = tf->error;
298 sb[4] = tf->status;
299 sb[5] = tf->device;
300 sb[6] = tf->nsect;
301 if (tf->flags & ATA_TFLAG_LBA48) {
302 sb[8] |= 0x80;
303 if (tf->hob_nsect)
304 sb[8] |= 0x40;
305 if (tf->hob_lbal || tf->hob_lbam || tf->hob_lbah)
306 sb[8] |= 0x20;
307 }
308 sb[9] = tf->lbal;
309 sb[10] = tf->lbam;
310 sb[11] = tf->lbah;
311 }
312}
313
233static void ata_scsi_set_invalid_field(struct ata_device *dev,314static void ata_scsi_set_invalid_field(struct ata_device *dev,
234 struct scsi_cmnd *cmd, u16 field, u8 bit)315 struct scsi_cmnd *cmd, u16 field, u8 bit)
235{316{
@@ -711,7 +792,6 @@ static void ata_qc_set_pc_nbytes(struct ata_queued_cmd *qc) · 475 unmodified lines
711 792
712/**793/**
713 * ata_to_sense_error - convert ATA error to SCSI error794 * ata_to_sense_error - convert ATA error to SCSI error
714 * @id: ATA device number
715 * @drv_stat: value contained in ATA status register795 * @drv_stat: value contained in ATA status register
716 * @drv_err: value contained in ATA error register796 * @drv_err: value contained in ATA error register
717 * @sk: the sense key we'll fill out797 * @sk: the sense key we'll fill out
@@ -725,8 +805,8 @@ static void ata_qc_set_pc_nbytes(struct ata_queued_cmd *qc) · 7 unmodified lines
725 * LOCKING:805 * LOCKING:
726 * spin_lock_irqsave(host lock)806 * spin_lock_irqsave(host lock)
727 */807 */
728static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk,808static void ata_to_sense_error(u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc,
729 u8 *asc, u8 *ascq)809 u8 *ascq)
730{810{
731 int i;811 int i;
732 812
@@ -837,10 +917,8 @@ static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, · 104 unmodified lines
837 * ata_gen_passthru_sense - Generate check condition sense block.917 * ata_gen_passthru_sense - Generate check condition sense block.
838 * @qc: Command that completed.918 * @qc: Command that completed.
839 *919 *
840 * This function is specific to the ATA descriptor format sense920 * This function is specific to the ATA pass through commands.
841 * block specified for the ATA pass through commands. Regardless921 * Regardless of whether the command errored or not, return a sense
842 * of whether the command errored or not, return a sense
843 * block. Copy all controller registers into the sense
844 * block. If there was no error, we get the request from an ATA922 * block. If there was no error, we get the request from an ATA
845 * passthrough command, so we use the following sense data:923 * passthrough command, so we use the following sense data:
846 * sk = RECOVERED ERROR924 * sk = RECOVERED ERROR
@@ -852,13 +930,16 @@ static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, · 5 unmodified lines
852 */930 */
853static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)931static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
854{932{
933 struct ata_device *dev = qc->dev;
855 struct scsi_cmnd *cmd = qc->scsicmd;934 struct scsi_cmnd *cmd = qc->scsicmd;
856 struct ata_taskfile *tf = &qc->result_tf;935 struct ata_taskfile *tf = &qc->result_tf;
857 unsigned char *sb = cmd->sense_buffer;
858 unsigned char *desc = sb + 8;
859 u8 sense_key, asc, ascq;936 u8 sense_key, asc, ascq;
860 937
861 memset(sb, 0, SCSI_SENSE_BUFFERSIZE);938 if (!(qc->flags & ATA_QCFLAG_RTF_FILLED)) {
939 ata_dev_dbg(dev,
940 "missing result TF: can't generate ATA PT sense data\n");
941 return;
942 }
862 943
863 /*944 /*
864 * Use ata_to_sense_error() to map status register bits945 * Use ata_to_sense_error() to map status register bits
@@ -866,71 +947,12 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc) · 1 unmodified line
866 */947 */
867 if (qc->err_mask ||948 if (qc->err_mask ||
868 tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) {949 tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) {
869 ata_to_sense_error(qc->ap->print_id, tf->status, tf->error,950 ata_to_sense_error(tf->status, tf->error,
870 &sense_key, &asc, &ascq);951 &sense_key, &asc, &ascq);
871 ata_scsi_set_sense(qc->dev, cmd, sense_key, asc, ascq);952 ata_scsi_set_sense(qc->dev, cmd, sense_key, asc, ascq);
872 } else {953 } else {
873 /*954 /* ATA PASS-THROUGH INFORMATION AVAILABLE */
874 * ATA PASS-THROUGH INFORMATION AVAILABLE955 ata_scsi_set_sense(qc->dev, cmd, RECOVERED_ERROR, 0, 0x1D);
875 * Always in descriptor format sense.
876 */
877 scsi_build_sense(cmd, 1, RECOVERED_ERROR, 0, 0x1D);
878 }
879
880 if ((cmd->sense_buffer[0] & 0x7f) >= 0x72) {
881 u8 len;
882
883 /* descriptor format */
884 len = sb[7];
885 desc = (char *)scsi_sense_desc_find(sb, len + 8, 9);
886 if (!desc) {
887 if (SCSI_SENSE_BUFFERSIZE < len + 14)
888 return;
889 sb[7] = len + 14;
890 desc = sb + 8 + len;
891 }
892 desc[0] = 9;
893 desc[1] = 12;
894 /*
895 * Copy registers into sense buffer.
896 */
897 desc[2] = 0x00;
898 desc[3] = tf->error;
899 desc[5] = tf->nsect;
900 desc[7] = tf->lbal;
901 desc[9] = tf->lbam;
902 desc[11] = tf->lbah;
903 desc[12] = tf->device;
904 desc[13] = tf->status;
905
906 /*
907 * Fill in Extend bit, and the high order bytes
908 * if applicable.
909 */
910 if (tf->flags & ATA_TFLAG_LBA48) {
911 desc[2] |= 0x01;
912 desc[4] = tf->hob_nsect;
913 desc[6] = tf->hob_lbal;
914 desc[8] = tf->hob_lbam;
915 desc[10] = tf->hob_lbah;
916 }
917 } else {
918 /* Fixed sense format */
919 desc[0] = tf->error;
920 desc[1] = tf->status;
921 desc[2] = tf->device;
922 desc[3] = tf->nsect;
923 desc[7] = 0;
924 if (tf->flags & ATA_TFLAG_LBA48) {
925 desc[8] |= 0x80;
926 if (tf->hob_nsect)
927 desc[8] |= 0x40;
928 if (tf->hob_lbal || tf->hob_lbam || tf->hob_lbah)
929 desc[8] |= 0x20;
930 }
931 desc[9] = tf->lbal;
932 desc[10] = tf->lbam;
933 desc[11] = tf->lbah;
934 }956 }
935}957}
936 958
@@ -953,20 +975,25 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc) · 16 unmodified lines
953 u64 block;975 u64 block;
954 u8 sense_key, asc, ascq;976 u8 sense_key, asc, ascq;
955 977
956 memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
957
958 if (ata_dev_disabled(dev)) {978 if (ata_dev_disabled(dev)) {
959 /* Device disabled after error recovery */979 /* Device disabled after error recovery */
960 /* LOGICAL UNIT NOT READY, HARD RESET REQUIRED */980 /* LOGICAL UNIT NOT READY, HARD RESET REQUIRED */
961 ata_scsi_set_sense(dev, cmd, NOT_READY, 0x04, 0x21);981 ata_scsi_set_sense(dev, cmd, NOT_READY, 0x04, 0x21);
962 return;982 return;
963 }983 }
984
985 if (!(qc->flags & ATA_QCFLAG_RTF_FILLED)) {
986 ata_dev_dbg(dev,
987 "missing result TF: can't generate sense data\n");
988 return;
989 }
990
964 /* Use ata_to_sense_error() to map status register bits991 /* Use ata_to_sense_error() to map status register bits
965 * onto sense key, asc & ascq.992 * onto sense key, asc & ascq.
966 */993 */
967 if (qc->err_mask ||994 if (qc->err_mask ||
968 tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) {995 tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) {
969 ata_to_sense_error(qc->ap->print_id, tf->status, tf->error,996 ata_to_sense_error(tf->status, tf->error,
970 &sense_key, &asc, &ascq);997 &sense_key, &asc, &ascq);
971 ata_scsi_set_sense(dev, cmd, sense_key, asc, ascq);998 ata_scsi_set_sense(dev, cmd, sense_key, asc, ascq);
972 } else {999 } else {
@@ -1631,26 +1658,32 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) · 658 unmodified lines
1631{1658{
1632 struct scsi_cmnd *cmd = qc->scsicmd;1659 struct scsi_cmnd *cmd = qc->scsicmd;
1633 u8 *cdb = cmd->cmnd;1660 u8 *cdb = cmd->cmnd;
1634 int need_sense = (qc->err_mask != 0) &&1661 bool have_sense = qc->flags & ATA_QCFLAG_SENSE_VALID;
1635 !(qc->flags & ATA_QCFLAG_SENSE_VALID);1662 bool is_ata_passthru = cdb[0] == ATA_16 || cdb[0] == ATA_12;
1663 bool is_ck_cond_request = cdb[2] & 0x20;
1664 bool is_error = qc->err_mask != 0;
1636 1665
1637 /* For ATA pass thru (SAT) commands, generate a sense block if1666 /* For ATA pass thru (SAT) commands, generate a sense block if
1638 * user mandated it or if there's an error. Note that if we1667 * user mandated it or if there's an error. Note that if we
1639 * generate because the user forced us to [CK_COND =1], a check1668 * generate because the user forced us to [CK_COND=1], a check
1640 * condition is generated and the ATA register values are returned1669 * condition is generated and the ATA register values are returned
1641 * whether the command completed successfully or not. If there1670 * whether the command completed successfully or not. If there
1642 * was no error, we use the following sense data:1671 * was no error, and CK_COND=1, we use the following sense data:
1643 * sk = RECOVERED ERROR1672 * sk = RECOVERED ERROR
1644 * asc,ascq = ATA PASS-THROUGH INFORMATION AVAILABLE1673 * asc,ascq = ATA PASS-THROUGH INFORMATION AVAILABLE
1645 */1674 */
1646 if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) &&1675 if (is_ata_passthru && (is_ck_cond_request || is_error || have_sense)) {
1647 ((cdb[2] & 0x20) || need_sense))1676 if (!have_sense)
1648 ata_gen_passthru_sense(qc);1677 ata_gen_passthru_sense(qc);
1649 else if (need_sense)1678 ata_scsi_set_passthru_sense_fields(qc);
1679 if (is_ck_cond_request)
1680 set_status_byte(qc->scsicmd, SAM_STAT_CHECK_CONDITION);
1681 } else if (is_error && !have_sense) {
1650 ata_gen_ata_sense(qc);1682 ata_gen_ata_sense(qc);
1651 else1683 } else {
1652 /* Keep the SCSI ML and status byte, clear host byte. */1684 /* Keep the SCSI ML and status byte, clear host byte. */
1653 cmd->result &= 0x0000ffff;1685 cmd->result &= 0x0000ffff;
1686 }
1654 1687
1655 ata_qc_done(qc);1688 ata_qc_done(qc);
1656}1689}
@@ -2589,14 +2622,8 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc) · 932 unmodified lines
2589 /* handle completion from EH */2622 /* handle completion from EH */
2590 if (unlikely(err_mask || qc->flags & ATA_QCFLAG_SENSE_VALID)) {2623 if (unlikely(err_mask || qc->flags & ATA_QCFLAG_SENSE_VALID)) {
2591 2624
2592 if (!(qc->flags & ATA_QCFLAG_SENSE_VALID)) {2625 if (!(qc->flags & ATA_QCFLAG_SENSE_VALID))
2593 /* FIXME: not quite right; we don't want the
2594 * translation of taskfile registers into a
2595 * sense descriptors, since that's only
2596 * correct for ATA, not ATAPI
2597 */
2598 ata_gen_passthru_sense(qc);2626 ata_gen_passthru_sense(qc);
2599 }
2600 2627
2601 /* SCSI EH automatically locks door if sdev->locked is2628 /* SCSI EH automatically locks door if sdev->locked is
2602 * set. Sometimes door lock request continues to2629 * set. Sometimes door lock request continues to
drivers/ata/libata-transport.c+4−1
@@ -217,7 +217,8 @@ static DEVICE_ATTR(name, S_IRUGO, show_ata_port_##name, NULL) · 216 unmodified lines
217 217
218ata_port_simple_attr(nr_pmp_links, nr_pmp_links, "%d\n", int);218ata_port_simple_attr(nr_pmp_links, nr_pmp_links, "%d\n", int);
219ata_port_simple_attr(stats.idle_irq, idle_irq, "%ld\n", unsigned long);219ata_port_simple_attr(stats.idle_irq, idle_irq, "%ld\n", unsigned long);
220ata_port_simple_attr(local_port_no, port_no, "%u\n", unsigned int);220/* We want the port_no sysfs attibute to start at 1 (ap->port_no starts at 0) */
221ata_port_simple_attr(port_no + 1, port_no, "%u\n", unsigned int);
221 222
222static DECLARE_TRANSPORT_CLASS(ata_port_class,223static DECLARE_TRANSPORT_CLASS(ata_port_class,
223 "ata_port", NULL, NULL, NULL);224 "ata_port", NULL, NULL, NULL);
@@ -265,6 +266,7 @@ void ata_tport_delete(struct ata_port *ap) · 41 unmodified lines
265 transport_destroy_device(dev);266 transport_destroy_device(dev);
266 put_device(dev);267 put_device(dev);
267}268}
269EXPORT_SYMBOL_GPL(ata_tport_delete);
268 270
269static const struct device_type ata_port_sas_type = {271static const struct device_type ata_port_sas_type = {
270 .name = ATA_PORT_TYPE_NAME,272 .name = ATA_PORT_TYPE_NAME,
@@ -329,6 +331,7 @@ int ata_tport_add(struct device *parent, · 58 unmodified lines
329 put_device(dev);331 put_device(dev);
330 return error;332 return error;
331}333}
334EXPORT_SYMBOL_GPL(ata_tport_add);
332 335
333/**336/**
334 * ata_port_classify - determine device type based on ATA-spec signature337 * ata_port_classify - determine device type based on ATA-spec signature
drivers/ata/libata-transport.h+0−3
@@ -8,9 +8,6 @@ extern struct scsi_transport_template *ata_scsi_transport_template; · 7 unmodified lines
8int ata_tlink_add(struct ata_link *link);8int ata_tlink_add(struct ata_link *link);
9void ata_tlink_delete(struct ata_link *link);9void ata_tlink_delete(struct ata_link *link);
10 10
11int ata_tport_add(struct device *parent, struct ata_port *ap);
12void ata_tport_delete(struct ata_port *ap);
13
14struct scsi_transport_template *ata_attach_transport(void);11struct scsi_transport_template *ata_attach_transport(void);
15void ata_release_transport(struct scsi_transport_template *t);12void ata_release_transport(struct scsi_transport_template *t);
16 13
drivers/ata/libata.h+0−2
@@ -32,7 +32,6 @@ enum { · 31 unmodified lines
32 32
33#define ATA_PORT_TYPE_NAME "ata_port"33#define ATA_PORT_TYPE_NAME "ata_port"
34 34
35extern atomic_t ata_print_id;
36extern int atapi_passthru16;35extern int atapi_passthru16;
37extern int libata_fua;36extern int libata_fua;
38extern int libata_noacpi;37extern int libata_noacpi;
@@ -82,7 +81,6 @@ extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp); · 43 unmodified lines
82extern int sata_link_init_spd(struct ata_link *link);81extern int sata_link_init_spd(struct ata_link *link);
83extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);82extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);
84extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);83extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
85extern struct ata_port *ata_port_alloc(struct ata_host *host);
86extern const char *sata_spd_string(unsigned int spd);84extern const char *sata_spd_string(unsigned int spd);
87extern unsigned int ata_read_log_page(struct ata_device *dev, u8 log,85extern unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
88 u8 page, void *buf, unsigned int sectors);86 u8 page, void *buf, unsigned int sectors);
drivers/scsi/libsas/sas_ata.c+10−12
@@ -572,15 +572,6 @@ static struct ata_port_operations sas_sata_ops = { · 571 unmodified lines
572 .end_eh = sas_ata_end_eh,572 .end_eh = sas_ata_end_eh,
573};573};
574 574
575static struct ata_port_info sata_port_info = {
576 .flags = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA | ATA_FLAG_NCQ |
577 ATA_FLAG_SAS_HOST | ATA_FLAG_FPDMA_AUX,
578 .pio_mask = ATA_PIO4,
579 .mwdma_mask = ATA_MWDMA2,
580 .udma_mask = ATA_UDMA6,
581 .port_ops = &sas_sata_ops
582};
583
584int sas_ata_init(struct domain_device *found_dev)575int sas_ata_init(struct domain_device *found_dev)
585{576{
586 struct sas_ha_struct *ha = found_dev->port->ha;577 struct sas_ha_struct *ha = found_dev->port->ha;
@@ -597,18 +588,25 @@ int sas_ata_init(struct domain_device *found_dev) · 10 unmodified lines
597 588
598 ata_host_init(ata_host, ha->dev, &sas_sata_ops);589 ata_host_init(ata_host, ha->dev, &sas_sata_ops);
599 590
600 ap = ata_sas_port_alloc(ata_host, &sata_port_info, shost);591 ap = ata_port_alloc(ata_host);
601 if (!ap) {592 if (!ap) {
602 pr_err("ata_sas_port_alloc failed.\n");593 pr_err("ata_port_alloc failed.\n");
603 rc = -ENODEV;594 rc = -ENODEV;
604 goto free_host;595 goto free_host;
605 }596 }
606 597
598 ap->port_no = 0;
599 ap->pio_mask = ATA_PIO4;
600 ap->mwdma_mask = ATA_MWDMA2;
601 ap->udma_mask = ATA_UDMA6;
602 ap->flags |= ATA_FLAG_SATA | ATA_FLAG_PIO_DMA | ATA_FLAG_NCQ |
603 ATA_FLAG_SAS_HOST | ATA_FLAG_FPDMA_AUX;
604 ap->ops = &sas_sata_ops;
607 ap->private_data = found_dev;605 ap->private_data = found_dev;
608 ap->cbl = ATA_CBL_SATA;606 ap->cbl = ATA_CBL_SATA;
609 ap->scsi_host = shost;607 ap->scsi_host = shost;
610 608
611 rc = ata_sas_tport_add(ata_host->dev, ap);609 rc = ata_tport_add(ata_host->dev, ap);
612 if (rc)610 if (rc)
613 goto free_port;611 goto free_port;
614 612
drivers/scsi/libsas/sas_discover.c+1−1
@@ -300,7 +300,7 @@ void sas_free_device(struct kref *kref) · 299 unmodified lines
300 kfree(dev->ex_dev.ex_phy);300 kfree(dev->ex_dev.ex_phy);
301 301
302 if (dev_is_sata(dev) && dev->sata_dev.ap) {302 if (dev_is_sata(dev) && dev->sata_dev.ap) {
303 ata_sas_tport_delete(dev->sata_dev.ap);303 ata_tport_delete(dev->sata_dev.ap);
304 ata_port_free(dev->sata_dev.ap);304 ata_port_free(dev->sata_dev.ap);
305 ata_host_put(dev->sata_dev.ata_host);305 ata_host_put(dev->sata_dev.ata_host);
306 dev->sata_dev.ata_host = NULL;306 dev->sata_dev.ata_host = NULL;
include/linux/libata.h+4−7
@@ -814,7 +814,6 @@ struct ata_port { · 813 unmodified lines
814 /* Flags that change dynamically, protected by ap->lock */814 /* Flags that change dynamically, protected by ap->lock */
815 unsigned int pflags; /* ATA_PFLAG_xxx */815 unsigned int pflags; /* ATA_PFLAG_xxx */
816 unsigned int print_id; /* user visible unique port ID */816 unsigned int print_id; /* user visible unique port ID */
817 unsigned int local_port_no; /* host local port num */
818 unsigned int port_no; /* 0 based port no. inside the host */817 unsigned int port_no; /* 0 based port no. inside the host */
819 818
820#ifdef CONFIG_ATA_SFF819#ifdef CONFIG_ATA_SFF
@@ -1069,7 +1068,7 @@ extern int sata_std_hardreset(struct ata_link *link, unsigned int *class, · 248 unmodified lines
1069 unsigned long deadline);1068 unsigned long deadline);
1070extern void ata_std_postreset(struct ata_link *link, unsigned int *classes);1069extern void ata_std_postreset(struct ata_link *link, unsigned int *classes);
1071 1070
1072extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports);1071extern struct ata_host *ata_host_alloc(struct device *dev, int n_ports);
1073extern struct ata_host *ata_host_alloc_pinfo(struct device *dev,1072extern struct ata_host *ata_host_alloc_pinfo(struct device *dev,
1074 const struct ata_port_info * const * ppi, int n_ports);1073 const struct ata_port_info * const * ppi, int n_ports);
1075extern void ata_host_get(struct ata_host *host);1074extern void ata_host_get(struct ata_host *host);
@@ -1082,7 +1081,6 @@ extern int ata_host_activate(struct ata_host *host, int irq, · 6 unmodified lines
1082 const struct scsi_host_template *sht);1081 const struct scsi_host_template *sht);
1083extern void ata_host_detach(struct ata_host *host);1082extern void ata_host_detach(struct ata_host *host);
1084extern void ata_host_init(struct ata_host *, struct device *, struct ata_port_operations *);1083extern void ata_host_init(struct ata_host *, struct device *, struct ata_port_operations *);
1085extern int ata_scsi_detect(struct scsi_host_template *sht);
1086extern int ata_scsi_ioctl(struct scsi_device *dev, unsigned int cmd,1084extern int ata_scsi_ioctl(struct scsi_device *dev, unsigned int cmd,
1087 void __user *arg);1085 void __user *arg);
1088#ifdef CONFIG_COMPAT1086#ifdef CONFIG_COMPAT
@@ -1246,12 +1244,11 @@ extern int sata_link_debounce(struct ata_link *link, · 157 unmodified lines
1246extern int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,1244extern int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,
1247 bool spm_wakeup);1245 bool spm_wakeup);
1248extern int ata_slave_link_init(struct ata_port *ap);1246extern int ata_slave_link_init(struct ata_port *ap);
1249extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
1250 struct ata_port_info *, struct Scsi_Host *);
1251extern void ata_port_probe(struct ata_port *ap);1247extern void ata_port_probe(struct ata_port *ap);
1248extern struct ata_port *ata_port_alloc(struct ata_host *host);
1252extern void ata_port_free(struct ata_port *ap);1249extern void ata_port_free(struct ata_port *ap);
1253extern int ata_sas_tport_add(struct device *parent, struct ata_port *ap);1250extern int ata_tport_add(struct device *parent, struct ata_port *ap);
1254extern void ata_sas_tport_delete(struct ata_port *ap);1251extern void ata_tport_delete(struct ata_port *ap);
1255int ata_sas_device_configure(struct scsi_device *sdev, struct queue_limits *lim,1252int ata_sas_device_configure(struct scsi_device *sdev, struct queue_limits *lim,
1256 struct ata_port *ap);1253 struct ata_port *ap);
1257extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);1254extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t