Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata

Pull libata updates from Tejun Heo:
"libata saw quite a bit of activities in this cycle:

- SMR drive support still being worked on

- bug fixes and improvements to misc SCSI command emulation

- some low level driver updates"

* 'for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (39 commits)
libata-scsi: better style in ata_msense_*()
AHCI: Clear GHC.IS to prevent unexpectly asserting INTx
ata: sata_dwc_460ex: remove redundant dev_err call
ata: define ATA_PROT_* in terms of ATA_PROT_FLAG_*
libata: remove ATA_PROT_FLAG_DATA
libata: remove ata_is_nodata
ata: make lba_{28,48}_ok() use ATA_MAX_SECTORS{,_LBA48}
libata-scsi: minor cleanup for ata_scsi_zbc_out_xlat
libata-scsi: Fix ZBC management out command translation
libata-scsi: Fix translation of REPORT ZONES command
ata: Handle ATA NCQ NO-DATA commands correctly
libata-eh: decode all taskfile protocols
ata: fixup ATA_PROT_NODATA
libsas: use ata_is_ncq() and ata_has_dma() accessors
libata: use ata_is_ncq() accessors
libata: return boolean values from ata_is_*
libata-scsi: avoid repeated calculation of number of TRIM ranges
libata-scsi: reject WRITE SAME (16) with n_block that exceeds limit
libata-scsi: rename ata_msense_ctl_mode() to ata_msense_control()
libata-scsi: fix D_SENSE bit relection in control mode page
...

+314 -153
+5 -4
Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt Documentation/devicetree/bindings/ata/brcm,sata-brcm.txt
··· 1 - * Broadcom SATA3 AHCI Controller for STB 1 + * Broadcom SATA3 AHCI Controller 2 2 3 3 SATA nodes are defined to describe on-chip Serial ATA controllers. 4 4 Each SATA controller should have its own node. 5 5 6 6 Required properties: 7 7 - compatible : should be one or more of 8 - "brcm,bcm7425-ahci" 9 - "brcm,bcm7445-ahci" 10 - "brcm,sata3-ahci" 8 + "brcm,bcm7425-ahci" 9 + "brcm,bcm7445-ahci" 10 + "brcm,bcm-nsp-ahci" 11 + "brcm,sata3-ahci" 11 12 - reg : register mappings for AHCI and SATA_TOP_CTRL 12 13 - reg-names : "ahci" and "top-ctrl" 13 14 - interrupts : interrupt mapping for SATA IRQ
+3 -1
Documentation/devicetree/bindings/phy/brcm-sata-phy.txt
··· 5 5 "brcm,bcm7425-sata-phy" 6 6 "brcm,bcm7445-sata-phy" 7 7 "brcm,iproc-ns2-sata-phy" 8 + "brcm,iproc-nsp-sata-phy" 8 9 "brcm,phy-sata3" 9 10 - address-cells: should be 1 10 11 - size-cells: should be 0 ··· 23 22 24 23 Sub-nodes optional properties: 25 24 - brcm,enable-ssc: use spread spectrum clocking (SSC) on this port 26 - This property is not applicable for "brcm,iproc-ns2-sata-phy". 25 + This property is not applicable for "brcm,iproc-ns2-sata-phy" and 26 + "brcm,iproc-nsp-sata-phy". 27 27 28 28 Example: 29 29 sata-phy@f0458100 {
+1
MAINTAINERS
··· 6768 6768 F: drivers/ata/ 6769 6769 F: include/linux/ata.h 6770 6770 F: include/linux/libata.h 6771 + F: Documentation/devicetree/bindings/ata/ 6771 6772 6772 6773 LIBATA PATA ARASAN COMPACT FLASH CONTROLLER 6773 6774 M: Viresh Kumar <vireshk@kernel.org>
+42
arch/arm/boot/dts/bcm-nsp.dtsi
··· 271 271 <0x30028 0x04>, 272 272 <0x3f408 0x04>; 273 273 }; 274 + 275 + sata_phy: sata_phy@40100 { 276 + compatible = "brcm,iproc-nsp-sata-phy"; 277 + reg = <0x40100 0x340>; 278 + reg-names = "phy"; 279 + #address-cells = <1>; 280 + #size-cells = <0>; 281 + 282 + sata_phy0: sata-phy@0 { 283 + reg = <0>; 284 + #phy-cells = <0>; 285 + status = "disabled"; 286 + }; 287 + 288 + sata_phy1: sata-phy@1 { 289 + reg = <1>; 290 + #phy-cells = <0>; 291 + status = "disabled"; 292 + }; 293 + }; 294 + 295 + sata: ahci@41000 { 296 + compatible = "brcm,bcm-nsp-ahci"; 297 + reg-names = "ahci", "top-ctrl"; 298 + reg = <0x41000 0x1000>, <0x40020 0x1c>; 299 + interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>; 300 + #address-cells = <1>; 301 + #size-cells = <0>; 302 + status = "disabled"; 303 + 304 + sata0: sata-port@0 { 305 + reg = <0>; 306 + phys = <&sata_phy0>; 307 + phy-names = "sata-phy"; 308 + }; 309 + 310 + sata1: sata-port@1 { 311 + reg = <1>; 312 + phys = <&sata_phy1>; 313 + phy-names = "sata-phy"; 314 + }; 315 + }; 274 316 }; 275 317 276 318 pcie0: pcie@18012000 {
+12
arch/arm/boot/dts/bcm958625k.dts
··· 68 68 status = "okay"; 69 69 }; 70 70 71 + &sata_phy0 { 72 + status = "okay"; 73 + }; 74 + 75 + &sata_phy1 { 76 + status = "okay"; 77 + }; 78 + 79 + &sata { 80 + status = "okay"; 81 + }; 82 + 71 83 &nand { 72 84 nandcs@0 { 73 85 compatible = "brcm,nandcs";
+4 -4
drivers/ata/Kconfig
··· 98 98 99 99 If unsure, say N. 100 100 101 - config AHCI_BRCMSTB 102 - tristate "Broadcom STB AHCI SATA support" 103 - depends on ARCH_BRCMSTB || BMIPS_GENERIC 101 + config AHCI_BRCM 102 + tristate "Broadcom AHCI SATA support" 103 + depends on ARCH_BRCMSTB || BMIPS_GENERIC || ARCH_BCM_NSP 104 104 help 105 105 This option enables support for the AHCI SATA3 controller found on 106 - STB SoC's. 106 + Broadcom SoC's. 107 107 108 108 If unsure, say N. 109 109
+1 -1
drivers/ata/Makefile
··· 11 11 obj-$(CONFIG_SATA_SIL24) += sata_sil24.o 12 12 obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o 13 13 obj-$(CONFIG_SATA_HIGHBANK) += sata_highbank.o libahci.o 14 - obj-$(CONFIG_AHCI_BRCMSTB) += ahci_brcmstb.o libahci.o libahci_platform.o 14 + obj-$(CONFIG_AHCI_BRCM) += ahci_brcm.o libahci.o libahci_platform.o 15 15 obj-$(CONFIG_AHCI_CEVA) += ahci_ceva.o libahci.o libahci_platform.o 16 16 obj-$(CONFIG_AHCI_DA850) += ahci_da850.o libahci.o libahci_platform.o 17 17 obj-$(CONFIG_AHCI_IMX) += ahci_imx.o libahci.o libahci_platform.o
+1 -1
drivers/ata/ahci.c
··· 580 580 }, 581 581 }; 582 582 583 - #if defined(CONFIG_PATA_MARVELL) || defined(CONFIG_PATA_MARVELL_MODULE) 583 + #if IS_ENABLED(CONFIG_PATA_MARVELL) 584 584 static int marvell_enable; 585 585 #else 586 586 static int marvell_enable = 1;
+36 -10
drivers/ata/ahci_brcmstb.c drivers/ata/ahci_brcm.c
··· 71 71 (DATA_ENDIAN << DMADESC_ENDIAN_SHIFT) | \ 72 72 (MMIO_ENDIAN << MMIO_ENDIAN_SHIFT)) 73 73 74 + enum brcm_ahci_version { 75 + BRCM_SATA_BCM7425 = 1, 76 + BRCM_SATA_BCM7445, 77 + BRCM_SATA_NSP, 78 + }; 79 + 74 80 enum brcm_ahci_quirks { 75 81 BRCM_AHCI_QUIRK_NO_NCQ = BIT(0), 76 82 BRCM_AHCI_QUIRK_SKIP_PHY_ENABLE = BIT(1), ··· 87 81 void __iomem *top_ctrl; 88 82 u32 port_mask; 89 83 u32 quirks; 84 + enum brcm_ahci_version version; 90 85 }; 91 86 92 87 static const struct ata_port_info ahci_brcm_port_info = { ··· 254 247 255 248 static void brcm_sata_init(struct brcm_ahci_priv *priv) 256 249 { 250 + void __iomem *ctrl = priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL; 251 + 257 252 /* Configure endianness */ 258 - brcm_sata_writereg(BUS_CTRL_ENDIAN_CONF, 259 - priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL); 253 + if (priv->version == BRCM_SATA_NSP) { 254 + u32 data = brcm_sata_readreg(ctrl); 255 + 256 + data &= ~((0x03 << DMADATA_ENDIAN_SHIFT) | 257 + (0x03 << DMADESC_ENDIAN_SHIFT)); 258 + data |= (0x02 << DMADATA_ENDIAN_SHIFT) | 259 + (0x02 << DMADESC_ENDIAN_SHIFT); 260 + brcm_sata_writereg(data, ctrl); 261 + } else 262 + brcm_sata_writereg(BUS_CTRL_ENDIAN_CONF, ctrl); 260 263 } 261 264 262 265 #ifdef CONFIG_PM_SLEEP ··· 299 282 AHCI_SHT(DRV_NAME), 300 283 }; 301 284 285 + static const struct of_device_id ahci_of_match[] = { 286 + {.compatible = "brcm,bcm7425-ahci", .data = (void *)BRCM_SATA_BCM7425}, 287 + {.compatible = "brcm,bcm7445-ahci", .data = (void *)BRCM_SATA_BCM7445}, 288 + {.compatible = "brcm,bcm-nsp-ahci", .data = (void *)BRCM_SATA_NSP}, 289 + {}, 290 + }; 291 + MODULE_DEVICE_TABLE(of, ahci_of_match); 292 + 302 293 static int brcm_ahci_probe(struct platform_device *pdev) 303 294 { 295 + const struct of_device_id *of_id; 304 296 struct device *dev = &pdev->dev; 305 297 struct brcm_ahci_priv *priv; 306 298 struct ahci_host_priv *hpriv; ··· 319 293 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 320 294 if (!priv) 321 295 return -ENOMEM; 296 + 297 + of_id = of_match_node(ahci_of_match, pdev->dev.of_node); 298 + if (!of_id) 299 + return -ENODEV; 300 + 301 + priv->version = (enum brcm_ahci_version)of_id->data; 322 302 priv->dev = dev; 323 303 324 304 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl"); ··· 332 300 if (IS_ERR(priv->top_ctrl)) 333 301 return PTR_ERR(priv->top_ctrl); 334 302 335 - if (of_device_is_compatible(dev->of_node, "brcm,bcm7425-ahci")) { 303 + if ((priv->version == BRCM_SATA_BCM7425) || 304 + (priv->version == BRCM_SATA_NSP)) { 336 305 priv->quirks |= BRCM_AHCI_QUIRK_NO_NCQ; 337 306 priv->quirks |= BRCM_AHCI_QUIRK_SKIP_PHY_ENABLE; 338 307 } ··· 386 353 387 354 return 0; 388 355 } 389 - 390 - static const struct of_device_id ahci_of_match[] = { 391 - {.compatible = "brcm,bcm7425-ahci"}, 392 - {.compatible = "brcm,bcm7445-ahci"}, 393 - {}, 394 - }; 395 - MODULE_DEVICE_TABLE(of, ahci_of_match); 396 356 397 357 static SIMPLE_DEV_PM_OPS(ahci_brcm_pm_ops, brcm_ahci_suspend, brcm_ahci_resume); 398 358
+9 -1
drivers/ata/libahci.c
··· 1975 1975 */ 1976 1976 pp->active_link = qc->dev->link; 1977 1977 1978 - if (qc->tf.protocol == ATA_PROT_NCQ) 1978 + if (ata_is_ncq(qc->tf.protocol)) 1979 1979 writel(1 << qc->tag, port_mmio + PORT_SCR_ACT); 1980 1980 1981 1981 if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) { ··· 2392 2392 static void ahci_port_stop(struct ata_port *ap) 2393 2393 { 2394 2394 const char *emsg = NULL; 2395 + struct ahci_host_priv *hpriv = ap->host->private_data; 2396 + void __iomem *host_mmio = hpriv->mmio; 2395 2397 int rc; 2396 2398 2397 2399 /* de-initialize port */ 2398 2400 rc = ahci_deinit_port(ap, &emsg); 2399 2401 if (rc) 2400 2402 ata_port_warn(ap, "%s (%d)\n", emsg, rc); 2403 + 2404 + /* 2405 + * Clear GHC.IS to prevent stuck INTx after disabling MSI and 2406 + * re-enabling INTx. 2407 + */ 2408 + writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT); 2401 2409 } 2402 2410 2403 2411 void ahci_print_info(struct ata_host *host, const char *scc_s)
+8 -6
drivers/ata/libata-core.c
··· 1238 1238 } else 1239 1239 tf.command = ATA_CMD_READ_NATIVE_MAX; 1240 1240 1241 - tf.protocol |= ATA_PROT_NODATA; 1241 + tf.protocol = ATA_PROT_NODATA; 1242 1242 tf.device |= ATA_LBA; 1243 1243 1244 1244 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); ··· 1297 1297 tf.device |= (new_sectors >> 24) & 0xf; 1298 1298 } 1299 1299 1300 - tf.protocol |= ATA_PROT_NODATA; 1300 + tf.protocol = ATA_PROT_NODATA; 1301 1301 tf.device |= ATA_LBA; 1302 1302 1303 1303 tf.lbal = (new_sectors >> 0) & 0xff; ··· 4848 4848 { 4849 4849 struct ata_link *link = qc->dev->link; 4850 4850 4851 - if (qc->tf.protocol == ATA_PROT_NCQ) { 4851 + if (ata_is_ncq(qc->tf.protocol)) { 4852 4852 if (!ata_tag_valid(link->active_tag)) 4853 4853 return 0; 4854 4854 } else { ··· 5013 5013 ata_sg_clean(qc); 5014 5014 5015 5015 /* command should be marked inactive atomically with qc completion */ 5016 - if (qc->tf.protocol == ATA_PROT_NCQ) { 5016 + if (ata_is_ncq(qc->tf.protocol)) { 5017 5017 link->sactive &= ~(1 << qc->tag); 5018 5018 if (!link->sactive) 5019 5019 ap->nr_active_links--; ··· 5050 5050 { 5051 5051 struct ata_device *dev = qc->dev; 5052 5052 5053 - if (ata_is_nodata(qc->tf.protocol)) 5053 + if (!ata_is_data(qc->tf.protocol)) 5054 5054 return; 5055 5055 5056 5056 if ((dev->mwdma_mask || dev->udma_mask) && ata_is_pio(qc->tf.protocol)) ··· 5133 5133 switch (qc->tf.command) { 5134 5134 case ATA_CMD_SET_FEATURES: 5135 5135 if (qc->tf.feature != SETFEATURES_WC_ON && 5136 - qc->tf.feature != SETFEATURES_WC_OFF) 5136 + qc->tf.feature != SETFEATURES_WC_OFF && 5137 + qc->tf.feature != SETFEATURES_RA_ON && 5138 + qc->tf.feature != SETFEATURES_RA_OFF) 5137 5139 break; 5138 5140 /* fall through */ 5139 5141 case ATA_CMD_INIT_DEV_PARAMS: /* CHS translation changed */
+6 -2
drivers/ata/libata-eh.c
··· 2607 2607 [DMA_FROM_DEVICE] = "in", 2608 2608 }; 2609 2609 static const char *prot_str[] = { 2610 + [ATA_PROT_UNKNOWN] = "unknown", 2611 + [ATA_PROT_NODATA] = "nodata", 2610 2612 [ATA_PROT_PIO] = "pio", 2611 2613 [ATA_PROT_DMA] = "dma", 2612 - [ATA_PROT_NCQ] = "ncq", 2614 + [ATA_PROT_NCQ] = "ncq dma", 2615 + [ATA_PROT_NCQ_NODATA] = "ncq nodata", 2616 + [ATAPI_PROT_NODATA] = "nodata", 2613 2617 [ATAPI_PROT_PIO] = "pio", 2614 2618 [ATAPI_PROT_DMA] = "dma", 2615 2619 }; ··· 3181 3177 } 3182 3178 3183 3179 tf.flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; 3184 - tf.protocol |= ATA_PROT_NODATA; 3180 + tf.protocol = ATA_PROT_NODATA; 3185 3181 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); 3186 3182 if (park && (err_mask || tf.lbal != 0xc4)) { 3187 3183 ata_dev_err(dev, "head unload failed!\n");
+49 -33
drivers/ata/libata-scsi.c
··· 304 304 struct scsi_cmnd *cmd, u16 field, u8 bit) 305 305 { 306 306 ata_scsi_set_sense(dev, cmd, ILLEGAL_REQUEST, 0x24, 0x0); 307 - /* "Invalid field in cbd" */ 307 + /* "Invalid field in CDB" */ 308 308 scsi_set_sense_field_pointer(cmd->sense_buffer, SCSI_SENSE_BUFFERSIZE, 309 309 field, bit, 1); 310 310 } ··· 2075 2075 0x03, 2076 2076 0x20, /* SBC-2 (no version claimed) */ 2077 2077 2078 - 0x02, 2079 - 0x60 /* SPC-3 (no version claimed) */ 2078 + 0x03, 2079 + 0x00 /* SPC-3 (no version claimed) */ 2080 2080 }; 2081 2081 const u8 versions_zbc[] = { 2082 2082 0x00, ··· 2097 2097 0, 2098 2098 0x5, /* claim SPC-3 version compatibility */ 2099 2099 2, 2100 - 95 - 4 2100 + 95 - 4, 2101 + 0, 2102 + 0, 2103 + 2 2101 2104 }; 2102 2105 2103 2106 VPRINTK("ENTER\n"); ··· 2112 2109 (args->dev->link->ap->pflags & ATA_PFLAG_EXTERNAL)) 2113 2110 hdr[1] |= (1 << 7); 2114 2111 2115 - if (args->dev->class == ATA_DEV_ZAC) 2112 + if (args->dev->class == ATA_DEV_ZAC) { 2116 2113 hdr[0] = TYPE_ZBC; 2114 + hdr[2] = 0x7; /* claim SPC-5 version compatibility */ 2115 + } 2117 2116 2118 2117 memcpy(rbuf, hdr, sizeof(hdr)); 2119 2118 memcpy(&rbuf[8], "ATA ", 8); ··· 2319 2314 * with the unmap bit set. 2320 2315 */ 2321 2316 if (ata_id_has_trim(args->id)) { 2322 - put_unaligned_be64(65535 * 512 / 8, &rbuf[36]); 2317 + put_unaligned_be64(65535 * ATA_MAX_TRIM_RNUM, &rbuf[36]); 2323 2318 put_unaligned_be32(1, &rbuf[28]); 2324 2319 } 2325 2320 ··· 2429 2424 static unsigned int ata_msense_caching(u16 *id, u8 *buf, bool changeable) 2430 2425 { 2431 2426 modecpy(buf, def_cache_mpage, sizeof(def_cache_mpage), changeable); 2432 - if (changeable || ata_id_wcache_enabled(id)) 2433 - buf[2] |= (1 << 2); /* write cache enable */ 2434 - if (!changeable && !ata_id_rahead_enabled(id)) 2435 - buf[12] |= (1 << 5); /* disable read ahead */ 2427 + if (changeable) { 2428 + buf[2] |= (1 << 2); /* ata_mselect_caching() */ 2429 + } else { 2430 + buf[2] |= (ata_id_wcache_enabled(id) << 2); /* write cache enable */ 2431 + buf[12] |= (!ata_id_rahead_enabled(id) << 5); /* disable read ahead */ 2432 + } 2436 2433 return sizeof(def_cache_mpage); 2437 2434 } 2438 2435 2439 2436 /** 2440 - * ata_msense_ctl_mode - Simulate MODE SENSE control mode page 2437 + * ata_msense_control - Simulate MODE SENSE control mode page 2441 2438 * @dev: ATA device of interest 2442 2439 * @buf: output buffer 2443 2440 * @changeable: whether changeable parameters are requested ··· 2449 2442 * LOCKING: 2450 2443 * None. 2451 2444 */ 2452 - static unsigned int ata_msense_ctl_mode(struct ata_device *dev, u8 *buf, 2445 + static unsigned int ata_msense_control(struct ata_device *dev, u8 *buf, 2453 2446 bool changeable) 2454 2447 { 2455 2448 modecpy(buf, def_control_mpage, sizeof(def_control_mpage), changeable); 2456 - if (changeable && (dev->flags & ATA_DFLAG_D_SENSE)) 2457 - buf[2] |= (1 << 2); /* Descriptor sense requested */ 2449 + if (changeable) { 2450 + buf[2] |= (1 << 2); /* ata_mselect_control() */ 2451 + } else { 2452 + bool d_sense = (dev->flags & ATA_DFLAG_D_SENSE); 2453 + 2454 + buf[2] |= (d_sense << 2); /* descriptor format sense data */ 2455 + } 2458 2456 return sizeof(def_control_mpage); 2459 2457 } 2460 2458 ··· 2578 2566 break; 2579 2567 2580 2568 case CONTROL_MPAGE: 2581 - p += ata_msense_ctl_mode(args->dev, p, page_control == 1); 2569 + p += ata_msense_control(args->dev, p, page_control == 1); 2582 2570 break; 2583 2571 2584 2572 case ALL_MPAGES: 2585 2573 p += ata_msense_rw_recovery(p, page_control == 1); 2586 2574 p += ata_msense_caching(args->id, p, page_control == 1); 2587 - p += ata_msense_ctl_mode(args->dev, p, page_control == 1); 2575 + p += ata_msense_control(args->dev, p, page_control == 1); 2588 2576 break; 2589 2577 2590 2578 default: /* invalid page code */ ··· 3089 3077 goto invalid_fld; 3090 3078 } 3091 3079 3080 + if (ata_is_ncq(tf->protocol) && (cdb[2] & 0x3) == 0) 3081 + tf->protocol = ATA_PROT_NCQ_NODATA; 3082 + 3092 3083 /* enable LBA */ 3093 3084 tf->flags |= ATA_TFLAG_LBA; 3094 3085 ··· 3140 3125 tf->command = cdb[9]; 3141 3126 } 3142 3127 3143 - /* For NCQ commands with FPDMA protocol, copy the tag value */ 3144 - if (tf->protocol == ATA_PROT_NCQ) 3128 + /* For NCQ commands copy the tag value */ 3129 + if (ata_is_ncq(tf->protocol)) 3145 3130 tf->nsect = qc->tag << 3; 3146 3131 3147 3132 /* enforce correct master/slave bit */ ··· 3320 3305 goto invalid_param_len; 3321 3306 3322 3307 buf = page_address(sg_page(scsi_sglist(scmd))); 3323 - size = ata_set_lba_range_entries(buf, 512, block, n_block); 3308 + 3309 + if (n_block <= 65535 * ATA_MAX_TRIM_RNUM) { 3310 + size = ata_set_lba_range_entries(buf, ATA_MAX_TRIM_RNUM, block, n_block); 3311 + } else { 3312 + fp = 2; 3313 + goto invalid_fld; 3314 + } 3324 3315 3325 3316 if (ata_ncq_enabled(dev) && ata_fpdma_dsm_supported(dev)) { 3326 3317 /* Newer devices support queued TRIM commands */ ··· 3475 3454 goto invalid_param_len; 3476 3455 } 3477 3456 sect = n_block / 512; 3478 - options = cdb[14]; 3457 + options = cdb[14] & 0xbf; 3479 3458 3480 3459 if (ata_ncq_enabled(qc->dev) && 3481 3460 ata_fpdma_zac_mgmt_in_supported(qc->dev)) { ··· 3485 3464 tf->nsect = qc->tag << 3; 3486 3465 tf->feature = sect & 0xff; 3487 3466 tf->hob_feature = (sect >> 8) & 0xff; 3488 - tf->auxiliary = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES; 3467 + tf->auxiliary = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES | (options << 8); 3489 3468 } else { 3490 3469 tf->command = ATA_CMD_ZAC_MGMT_IN; 3491 3470 tf->feature = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES; ··· 3527 3506 struct scsi_cmnd *scmd = qc->scsicmd; 3528 3507 struct ata_device *dev = qc->dev; 3529 3508 const u8 *cdb = scmd->cmnd; 3530 - u8 reset_all, sa; 3509 + u8 all, sa; 3531 3510 u64 block; 3532 3511 u32 n_block; 3533 3512 u16 fp = (u16)-1; ··· 3554 3533 if (block > dev->n_sectors) 3555 3534 goto out_of_range; 3556 3535 3557 - reset_all = cdb[14] & 0x1; 3536 + all = cdb[14] & 0x1; 3558 3537 3559 3538 if (ata_ncq_enabled(qc->dev) && 3560 3539 ata_fpdma_zac_mgmt_out_supported(qc->dev)) { 3561 - tf->protocol = ATA_PROT_NCQ; 3540 + tf->protocol = ATA_PROT_NCQ_NODATA; 3562 3541 tf->command = ATA_CMD_NCQ_NON_DATA; 3563 - tf->hob_nsect = ATA_SUBCMD_NCQ_NON_DATA_ZAC_MGMT_OUT; 3542 + tf->feature = ATA_SUBCMD_NCQ_NON_DATA_ZAC_MGMT_OUT; 3564 3543 tf->nsect = qc->tag << 3; 3565 - tf->auxiliary = sa | (reset_all & 0x1) << 8; 3544 + tf->auxiliary = sa | ((u16)all << 8); 3566 3545 } else { 3567 3546 tf->protocol = ATA_PROT_NODATA; 3568 3547 tf->command = ATA_CMD_ZAC_MGMT_OUT; 3569 3548 tf->feature = sa; 3570 - tf->hob_feature = reset_all & 0x1; 3549 + tf->hob_feature = all; 3571 3550 } 3572 3551 tf->lbah = (block >> 16) & 0xff; 3573 3552 tf->lbam = (block >> 8) & 0xff; ··· 3688 3667 /* 3689 3668 * Check that read-only bits are not modified. 3690 3669 */ 3691 - ata_msense_ctl_mode(dev, mpage, false); 3670 + ata_msense_control(dev, mpage, false); 3692 3671 for (i = 0; i < CONTROL_MPAGE_LEN - 2; i++) { 3693 3672 if (i == 0) 3694 3673 continue; ··· 4060 4039 args.done = cmd->scsi_done; 4061 4040 4062 4041 switch(scsicmd[0]) { 4063 - /* TODO: worth improving? */ 4064 - case FORMAT_UNIT: 4065 - ata_scsi_invalid_field(dev, cmd, 0); 4066 - break; 4067 - 4068 4042 case INQUIRY: 4069 4043 if (scsicmd[1] & 2) /* is CmdDt set? */ 4070 4044 ata_scsi_invalid_field(dev, cmd, 1);
+5 -4
drivers/ata/libata-transport.c
··· 495 495 static int ata_show_ering(struct ata_ering_entry *ent, void *void_arg) 496 496 { 497 497 struct ata_show_ering_arg* arg = void_arg; 498 - struct timespec time; 498 + u64 seconds; 499 + u32 rem; 499 500 500 - jiffies_to_timespec(ent->timestamp,&time); 501 + seconds = div_u64_rem(ent->timestamp, HZ, &rem); 501 502 arg->written += sprintf(arg->buf + arg->written, 502 - "[%5lu.%06lu]", 503 - time.tv_sec, time.tv_nsec); 503 + "[%5llu.%09lu]", seconds, 504 + rem * NSEC_PER_SEC / HZ); 504 505 arg->written += get_ata_err_names(ent->err_mask, 505 506 arg->buf + arg->written); 506 507 return 0;
+1 -1
drivers/ata/pata_arasan_cf.c
··· 565 565 qc->ap->hsm_task_state = HSM_ST_ERR; 566 566 567 567 cf_ctrl_reset(acdev); 568 - spin_unlock_irqrestore(qc->ap->lock, flags); 568 + spin_unlock_irqrestore(&acdev->host->lock, flags); 569 569 sff_intr: 570 570 dma_complete(acdev); 571 571 }
+2 -2
drivers/ata/pata_atiixp.c
··· 183 183 * We must now look at the PIO mode situation. We may need to 184 184 * adjust the PIO mode to keep the timings acceptable 185 185 */ 186 - if (adev->dma_mode >= XFER_MW_DMA_2) 187 - wanted_pio = 4; 186 + if (adev->dma_mode >= XFER_MW_DMA_2) 187 + wanted_pio = 4; 188 188 else if (adev->dma_mode == XFER_MW_DMA_1) 189 189 wanted_pio = 3; 190 190 else if (adev->dma_mode == XFER_MW_DMA_0)
+1 -1
drivers/ata/pata_hpt366.c
··· 368 368 369 369 /* PCI clocking determines the ATA timing values to use */ 370 370 /* info_hpt366 is safe against re-entry so we can scribble on it */ 371 - switch ((reg1 & 0x700) >> 8) { 371 + switch ((reg1 & 0xf00) >> 8) { 372 372 case 9: 373 373 hpriv = &hpt366_40; 374 374 break;
+1 -1
drivers/ata/pata_marvell.c
··· 146 146 if (pdev->device == 0x6101) 147 147 ppi[1] = &ata_dummy_port_info; 148 148 149 - #if defined(CONFIG_SATA_AHCI) || defined(CONFIG_SATA_AHCI_MODULE) 149 + #if IS_ENABLED(CONFIG_SATA_AHCI) 150 150 if (!marvell_pata_active(pdev)) { 151 151 printk(KERN_INFO DRV_NAME ": PATA port not active, deferring to AHCI driver.\n"); 152 152 return -ENODEV;
+5 -9
drivers/ata/sata_dwc_460ex.c
··· 259 259 /* Get physical SATA DMA register base address */ 260 260 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 261 261 hsdev->dma->regs = devm_ioremap_resource(&pdev->dev, res); 262 - if (IS_ERR(hsdev->dma->regs)) { 263 - dev_err(&pdev->dev, 264 - "ioremap failed for AHBDMA register address\n"); 262 + if (IS_ERR(hsdev->dma->regs)) 265 263 return PTR_ERR(hsdev->dma->regs); 266 - } 267 264 268 265 /* Initialize AHB DMAC */ 269 266 return dw_dma_probe(hsdev->dma); ··· 278 281 279 282 static const char *get_prot_descript(u8 protocol) 280 283 { 281 - switch ((enum ata_tf_protocols)protocol) { 284 + switch (protocol) { 282 285 case ATA_PROT_NODATA: 283 286 return "ATA no data"; 284 287 case ATA_PROT_PIO: ··· 287 290 return "ATA DMA"; 288 291 case ATA_PROT_NCQ: 289 292 return "ATA NCQ"; 293 + case ATA_PROT_NCQ_NODATA: 294 + return "ATA NCQ no data"; 290 295 case ATAPI_PROT_NODATA: 291 296 return "ATAPI no data"; 292 297 case ATAPI_PROT_PIO: ··· 1224 1225 /* Ioremap SATA registers */ 1225 1226 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); 1226 1227 base = devm_ioremap_resource(&ofdev->dev, res); 1227 - if (IS_ERR(base)) { 1228 - dev_err(&ofdev->dev, 1229 - "ioremap failed for SATA register address\n"); 1228 + if (IS_ERR(base)) 1230 1229 return PTR_ERR(base); 1231 - } 1232 1230 dev_dbg(&ofdev->dev, "ioremap done for SATA register address\n"); 1233 1231 1234 1232 /* Synopsys DWC SATA specific Registers */
+81
drivers/phy/phy-brcm-sata.c
··· 45 45 BRCM_SATA_PHY_STB_28NM, 46 46 BRCM_SATA_PHY_STB_40NM, 47 47 BRCM_SATA_PHY_IPROC_NS2, 48 + BRCM_SATA_PHY_IPROC_NSP, 48 49 }; 49 50 50 51 struct brcm_sata_port { ··· 74 73 75 74 PLL_REG_BANK_0 = 0x050, 76 75 PLL_REG_BANK_0_PLLCONTROL_0 = 0x81, 76 + PLLCONTROL_0_FREQ_DET_RESTART = BIT(13), 77 + PLLCONTROL_0_FREQ_MONITOR = BIT(12), 78 + PLLCONTROL_0_SEQ_START = BIT(15), 79 + PLL_CAP_CONTROL = 0x85, 80 + PLL_ACTRL2 = 0x8b, 81 + PLL_ACTRL2_SELDIV_MASK = 0x1f, 82 + PLL_ACTRL2_SELDIV_SHIFT = 9, 77 83 78 84 PLL1_REG_BANK = 0x060, 79 85 PLL1_ACTRL2 = 0x82, ··· 88 80 PLL1_ACTRL4 = 0x84, 89 81 90 82 OOB_REG_BANK = 0x150, 83 + OOB1_REG_BANK = 0x160, 91 84 OOB_CTRL1 = 0x80, 92 85 OOB_CTRL1_BURST_MAX_MASK = 0xf, 93 86 OOB_CTRL1_BURST_MAX_SHIFT = 12, ··· 280 271 return 0; 281 272 } 282 273 274 + static int brcm_nsp_sata_init(struct brcm_sata_port *port) 275 + { 276 + struct brcm_sata_phy *priv = port->phy_priv; 277 + struct device *dev = port->phy_priv->dev; 278 + void __iomem *base = priv->phy_base; 279 + unsigned int oob_bank; 280 + unsigned int val, try; 281 + 282 + /* Configure OOB control */ 283 + if (port->portnum == 0) 284 + oob_bank = OOB_REG_BANK; 285 + else if (port->portnum == 1) 286 + oob_bank = OOB1_REG_BANK; 287 + else 288 + return -EINVAL; 289 + 290 + val = 0x0; 291 + val |= (0x0f << OOB_CTRL1_BURST_MAX_SHIFT); 292 + val |= (0x06 << OOB_CTRL1_BURST_MIN_SHIFT); 293 + val |= (0x0f << OOB_CTRL1_WAKE_IDLE_MAX_SHIFT); 294 + val |= (0x06 << OOB_CTRL1_WAKE_IDLE_MIN_SHIFT); 295 + brcm_sata_phy_wr(base, oob_bank, OOB_CTRL1, 0x0, val); 296 + 297 + val = 0x0; 298 + val |= (0x2e << OOB_CTRL2_RESET_IDLE_MAX_SHIFT); 299 + val |= (0x02 << OOB_CTRL2_BURST_CNT_SHIFT); 300 + val |= (0x16 << OOB_CTRL2_RESET_IDLE_MIN_SHIFT); 301 + brcm_sata_phy_wr(base, oob_bank, OOB_CTRL2, 0x0, val); 302 + 303 + 304 + brcm_sata_phy_wr(base, PLL_REG_BANK_0, PLL_ACTRL2, 305 + ~(PLL_ACTRL2_SELDIV_MASK << PLL_ACTRL2_SELDIV_SHIFT), 306 + 0x0c << PLL_ACTRL2_SELDIV_SHIFT); 307 + 308 + brcm_sata_phy_wr(base, PLL_REG_BANK_0, PLL_CAP_CONTROL, 309 + 0xff0, 0x4f0); 310 + 311 + val = PLLCONTROL_0_FREQ_DET_RESTART | PLLCONTROL_0_FREQ_MONITOR; 312 + brcm_sata_phy_wr(base, PLL_REG_BANK_0, PLL_REG_BANK_0_PLLCONTROL_0, 313 + ~val, val); 314 + val = PLLCONTROL_0_SEQ_START; 315 + brcm_sata_phy_wr(base, PLL_REG_BANK_0, PLL_REG_BANK_0_PLLCONTROL_0, 316 + ~val, 0); 317 + mdelay(10); 318 + brcm_sata_phy_wr(base, PLL_REG_BANK_0, PLL_REG_BANK_0_PLLCONTROL_0, 319 + ~val, val); 320 + 321 + /* Wait for pll_seq_done bit */ 322 + try = 50; 323 + while (try--) { 324 + val = brcm_sata_phy_rd(base, BLOCK0_REG_BANK, 325 + BLOCK0_XGXSSTATUS); 326 + if (val & BLOCK0_XGXSSTATUS_PLL_LOCK) 327 + break; 328 + msleep(20); 329 + } 330 + if (!try) { 331 + /* PLL did not lock; give up */ 332 + dev_err(dev, "port%d PLL did not lock\n", port->portnum); 333 + return -ETIMEDOUT; 334 + } 335 + 336 + dev_dbg(dev, "port%d initialized\n", port->portnum); 337 + 338 + return 0; 339 + } 340 + 283 341 static int brcm_sata_phy_init(struct phy *phy) 284 342 { 285 343 int rc; ··· 359 283 break; 360 284 case BRCM_SATA_PHY_IPROC_NS2: 361 285 rc = brcm_ns2_sata_init(port); 286 + break; 287 + case BRCM_SATA_PHY_IPROC_NSP: 288 + rc = brcm_nsp_sata_init(port); 362 289 break; 363 290 default: 364 291 rc = -ENODEV; ··· 382 303 .data = (void *)BRCM_SATA_PHY_STB_40NM }, 383 304 { .compatible = "brcm,iproc-ns2-sata-phy", 384 305 .data = (void *)BRCM_SATA_PHY_IPROC_NS2 }, 306 + { .compatible = "brcm,iproc-nsp-sata-phy", 307 + .data = (void *)BRCM_SATA_PHY_IPROC_NSP }, 385 308 {}, 386 309 }; 387 310 MODULE_DEVICE_TABLE(of, brcm_sata_phy_of_match);
+2 -9
drivers/scsi/libsas/sas_ata.c
··· 233 233 task->task_state_flags = SAS_TASK_STATE_PENDING; 234 234 qc->lldd_task = task; 235 235 236 - switch (qc->tf.protocol) { 237 - case ATA_PROT_NCQ: 238 - task->ata_task.use_ncq = 1; 239 - /* fall through */ 240 - case ATAPI_PROT_DMA: 241 - case ATA_PROT_DMA: 242 - task->ata_task.dma_xfer = 1; 243 - break; 244 - } 236 + task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol); 237 + task->ata_task.dma_xfer = ata_is_dma(qc->tf.protocol); 245 238 246 239 if (qc->scsicmd) 247 240 ASSIGN_SAS_TASK(qc->scsicmd, task);
+26 -15
include/linux/ata.h
··· 46 46 ATA_MAX_SECTORS_128 = 128, 47 47 ATA_MAX_SECTORS = 256, 48 48 ATA_MAX_SECTORS_1024 = 1024, 49 - ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ 49 + ATA_MAX_SECTORS_LBA48 = 65535,/* avoid count to be 0000h */ 50 50 ATA_MAX_SECTORS_TAPE = 65535, 51 + ATA_MAX_TRIM_RNUM = 64, /* 512-byte payload / (6-byte LBA + 2-byte range per entry) */ 51 52 52 53 ATA_ID_WORDS = 256, 53 54 ATA_ID_CONFIG = 0, ··· 410 409 SETFEATURES_WC_ON = 0x02, /* Enable write cache */ 411 410 SETFEATURES_WC_OFF = 0x82, /* Disable write cache */ 412 411 412 + SETFEATURES_RA_ON = 0xaa, /* Enable read look-ahead */ 413 + SETFEATURES_RA_OFF = 0x55, /* Disable read look-ahead */ 414 + 413 415 /* Enable/Disable Automatic Acoustic Management */ 414 416 SETFEATURES_AAM_ON = 0x42, 415 417 SETFEATURES_AAM_OFF = 0xC2, ··· 523 519 SERR_DEV_XCHG = (1 << 26), /* device exchanged */ 524 520 }; 525 521 526 - enum ata_tf_protocols { 527 - /* ATA taskfile protocols */ 528 - ATA_PROT_UNKNOWN, /* unknown/invalid */ 529 - ATA_PROT_NODATA, /* no data */ 530 - ATA_PROT_PIO, /* PIO data xfer */ 531 - ATA_PROT_DMA, /* DMA */ 532 - ATA_PROT_NCQ, /* NCQ */ 533 - ATAPI_PROT_NODATA, /* packet command, no data */ 534 - ATAPI_PROT_PIO, /* packet command, PIO data xfer*/ 535 - ATAPI_PROT_DMA, /* packet command with special DMA sauce */ 522 + enum ata_prot_flags { 523 + /* protocol flags */ 524 + ATA_PROT_FLAG_PIO = (1 << 0), /* is PIO */ 525 + ATA_PROT_FLAG_DMA = (1 << 1), /* is DMA */ 526 + ATA_PROT_FLAG_NCQ = (1 << 2), /* is NCQ */ 527 + ATA_PROT_FLAG_ATAPI = (1 << 3), /* is ATAPI */ 528 + 529 + /* taskfile protocols */ 530 + ATA_PROT_UNKNOWN = (u8)-1, 531 + ATA_PROT_NODATA = 0, 532 + ATA_PROT_PIO = ATA_PROT_FLAG_PIO, 533 + ATA_PROT_DMA = ATA_PROT_FLAG_DMA, 534 + ATA_PROT_NCQ_NODATA = ATA_PROT_FLAG_NCQ, 535 + ATA_PROT_NCQ = ATA_PROT_FLAG_DMA | ATA_PROT_FLAG_NCQ, 536 + ATAPI_PROT_NODATA = ATA_PROT_FLAG_ATAPI, 537 + ATAPI_PROT_PIO = ATA_PROT_FLAG_ATAPI | ATA_PROT_FLAG_PIO, 538 + ATAPI_PROT_DMA = ATA_PROT_FLAG_ATAPI | ATA_PROT_FLAG_DMA, 536 539 }; 537 540 538 541 enum ata_ioctls { ··· 1077 1066 * TO NV CACHE PINNED SET. 1078 1067 */ 1079 1068 static inline unsigned ata_set_lba_range_entries(void *_buffer, 1080 - unsigned buf_size, u64 sector, unsigned long count) 1069 + unsigned num, u64 sector, unsigned long count) 1081 1070 { 1082 1071 __le64 *buffer = _buffer; 1083 1072 unsigned i = 0, used_bytes; 1084 1073 1085 - while (i < buf_size / 8 ) { /* 6-byte LBA + 2-byte range per entry */ 1074 + while (i < num) { 1086 1075 u64 entry = sector | 1087 1076 ((u64)(count > 0xffff ? 0xffff : count) << 48); 1088 1077 buffer[i++] = __cpu_to_le64(entry); ··· 1106 1095 static inline bool lba_28_ok(u64 block, u32 n_block) 1107 1096 { 1108 1097 /* check the ending block number: must be LESS THAN 0x0fffffff */ 1109 - return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); 1098 + return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= ATA_MAX_SECTORS); 1110 1099 } 1111 1100 1112 1101 static inline bool lba_48_ok(u64 block, u32 n_block) 1113 1102 { 1114 1103 /* check the ending block number */ 1115 - return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); 1104 + return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= ATA_MAX_SECTORS_LBA48); 1116 1105 } 1117 1106 1118 1107 #define sata_pmp_gscr_vendor(gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] & 0xffff)
+12 -48
include/linux/libata.h
··· 146 146 ATA_TFLAG_FUA = (1 << 5), /* enable FUA */ 147 147 ATA_TFLAG_POLLING = (1 << 6), /* set nIEN to 1 and use polling */ 148 148 149 - /* protocol flags */ 150 - ATA_PROT_FLAG_PIO = (1 << 0), /* is PIO */ 151 - ATA_PROT_FLAG_DMA = (1 << 1), /* is DMA */ 152 - ATA_PROT_FLAG_DATA = ATA_PROT_FLAG_PIO | ATA_PROT_FLAG_DMA, 153 - ATA_PROT_FLAG_NCQ = (1 << 2), /* is NCQ */ 154 - ATA_PROT_FLAG_ATAPI = (1 << 3), /* is ATAPI */ 155 - 156 149 /* struct ata_device stuff */ 157 150 ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */ 158 151 ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */ ··· 1032 1039 extern struct ata_port_operations ata_dummy_port_ops; 1033 1040 extern const struct ata_port_info ata_dummy_port_info; 1034 1041 1035 - /* 1036 - * protocol tests 1037 - */ 1038 - static inline unsigned int ata_prot_flags(u8 prot) 1042 + static inline bool ata_is_atapi(u8 prot) 1039 1043 { 1040 - switch (prot) { 1041 - case ATA_PROT_NODATA: 1042 - return 0; 1043 - case ATA_PROT_PIO: 1044 - return ATA_PROT_FLAG_PIO; 1045 - case ATA_PROT_DMA: 1046 - return ATA_PROT_FLAG_DMA; 1047 - case ATA_PROT_NCQ: 1048 - return ATA_PROT_FLAG_DMA | ATA_PROT_FLAG_NCQ; 1049 - case ATAPI_PROT_NODATA: 1050 - return ATA_PROT_FLAG_ATAPI; 1051 - case ATAPI_PROT_PIO: 1052 - return ATA_PROT_FLAG_ATAPI | ATA_PROT_FLAG_PIO; 1053 - case ATAPI_PROT_DMA: 1054 - return ATA_PROT_FLAG_ATAPI | ATA_PROT_FLAG_DMA; 1055 - } 1056 - return 0; 1044 + return prot & ATA_PROT_FLAG_ATAPI; 1057 1045 } 1058 1046 1059 - static inline int ata_is_atapi(u8 prot) 1047 + static inline bool ata_is_pio(u8 prot) 1060 1048 { 1061 - return ata_prot_flags(prot) & ATA_PROT_FLAG_ATAPI; 1049 + return prot & ATA_PROT_FLAG_PIO; 1062 1050 } 1063 1051 1064 - static inline int ata_is_nodata(u8 prot) 1052 + static inline bool ata_is_dma(u8 prot) 1065 1053 { 1066 - return !(ata_prot_flags(prot) & ATA_PROT_FLAG_DATA); 1054 + return prot & ATA_PROT_FLAG_DMA; 1067 1055 } 1068 1056 1069 - static inline int ata_is_pio(u8 prot) 1057 + static inline bool ata_is_ncq(u8 prot) 1070 1058 { 1071 - return ata_prot_flags(prot) & ATA_PROT_FLAG_PIO; 1059 + return prot & ATA_PROT_FLAG_NCQ; 1072 1060 } 1073 1061 1074 - static inline int ata_is_dma(u8 prot) 1062 + static inline bool ata_is_data(u8 prot) 1075 1063 { 1076 - return ata_prot_flags(prot) & ATA_PROT_FLAG_DMA; 1077 - } 1078 - 1079 - static inline int ata_is_ncq(u8 prot) 1080 - { 1081 - return ata_prot_flags(prot) & ATA_PROT_FLAG_NCQ; 1082 - } 1083 - 1084 - static inline int ata_is_data(u8 prot) 1085 - { 1086 - return ata_prot_flags(prot) & ATA_PROT_FLAG_DATA; 1064 + return prot & (ATA_PROT_FLAG_PIO | ATA_PROT_FLAG_DMA); 1087 1065 } 1088 1066 1089 1067 static inline int is_multi_taskfile(struct ata_taskfile *tf) ··· 1371 1407 return ap->nr_pmp_links != 0; 1372 1408 } 1373 1409 1374 - static inline int ata_is_host_link(const struct ata_link *link) 1410 + static inline bool ata_is_host_link(const struct ata_link *link) 1375 1411 { 1376 1412 return link == &link->ap->link || link == link->ap->slave_link; 1377 1413 } ··· 1386 1422 return false; 1387 1423 } 1388 1424 1389 - static inline int ata_is_host_link(const struct ata_link *link) 1425 + static inline bool ata_is_host_link(const struct ata_link *link) 1390 1426 { 1391 1427 return 1; 1392 1428 }
+1
include/trace/events/libata.h
··· 126 126 ata_protocol_name(ATA_PROT_PIO), \ 127 127 ata_protocol_name(ATA_PROT_DMA), \ 128 128 ata_protocol_name(ATA_PROT_NCQ), \ 129 + ata_protocol_name(ATA_PROT_NCQ_NODATA), \ 129 130 ata_protocol_name(ATAPI_PROT_NODATA), \ 130 131 ata_protocol_name(ATAPI_PROT_PIO), \ 131 132 ata_protocol_name(ATAPI_PROT_DMA))