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

Configure Feed

Select the types of activity you want to include in your feed.

libata: Add a per-host flag to opt-in into parallel port probes

This patch adds a per host flag that allows drivers to opt in into
having its busses scanned in parallel.

Drivers that do not set this flag get their ports scanned in
the "original" sequence.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Arjan van de Ven and committed by
Linus Torvalds
886ad09f 3d14bdad

+13
+3
drivers/ata/ahci.c
··· 2660 2660 host->iomap = pcim_iomap_table(pdev); 2661 2661 host->private_data = hpriv; 2662 2662 2663 + if (!(hpriv->cap & HOST_CAP_SSS)) 2664 + host->flags |= ATA_HOST_PARALLEL_SCAN; 2665 + 2663 2666 if (pi.flags & ATA_FLAG_EM) 2664 2667 ahci_reset_em(host); 2665 2668
+9
drivers/ata/libata-core.c
··· 5920 5920 { 5921 5921 int rc; 5922 5922 struct ata_port *ap = data; 5923 + 5924 + /* 5925 + * If we're not allowed to scan this host in parallel, 5926 + * we need to wait until all previous scans have completed 5927 + * before going further. 5928 + */ 5929 + if (!(ap->host->flags & ATA_HOST_PARALLEL_SCAN)) 5930 + async_synchronize_cookie(cookie); 5931 + 5923 5932 /* probe */ 5924 5933 if (ap->ops->error_handler) { 5925 5934 struct ata_eh_info *ehi = &ap->link.eh_info;
+1
include/linux/libata.h
··· 239 239 /* host set flags */ 240 240 ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ 241 241 ATA_HOST_STARTED = (1 << 1), /* Host started */ 242 + ATA_HOST_PARALLEL_SCAN = (1 << 2), /* Ports on this host can be scanned in parallel */ 242 243 243 244 /* bits 24:31 of host->flags are reserved for LLD specific flags */ 244 245