ata changes for 7.2-rc1

- Bump required Clang version to 23 (Marco)
    NOTE: This commit was merged from an immutable branch from the tip
    tree, and is carried both in the tip tree and the libata tree (with
    the approval of tip maintainers) to avoid dependency problems.
 
  - Add Clang context analysis annotations (Bart)
 
  - Use the ahci_nr_ports() helper in libahci (me)
 
  - Fail to probe the ahci driver if the BAR size is smaller than the
    required size to support CAP.NP (Number of Ports) (liyouhong)
 
  - Move EXPORT_SYMBOL_GPL(ahci_do_softreset) to be just below the
    function definition (Bart)
 
  - Make ata_scsi_scan_host() schedule hotplug work on the
    system_dfl_long_wq workqueue so that it can benefit from scheduler
    task placement (Marco)
 
  - Make ata_scsi_port_error_handler() schedule hotplug work on the
    system_dfl_long_wq workqueue, such that the work always uses the same
    workqueue (me)
 
  - Use devm_platform_get_and_ioremap_resource() in pata_arasan_cf driver
    (Rosen)
 
  - Fix ata_exec_internal() to only release and acquire the EH mutex if
    the calling function is the one holding the EH mutex (Bart)
 
  - Use hweight_long() to count the port_map bits (TanZheng)
 
  - Add COMPILE_TEST support for pata_ep93xx driver (Rosen)
 
  - Drop unused assignments from pata_isapnp driver (Uwe)
 
  - Extend existing JMicron PMP quirk to include JMicron JMS562 (Xu)
 
  - Drop unused assignments of pci_device_id driver data (Uwe)
 
  - Use named initializers for pci_device_id arrays (Uwe)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRN+ES/c4tHlMch3DzJZDGjmcZNcgUCajFdDAAKCRDJZDGjmcZN
 cg83AP9gjkyIFg4o4ImG1jL46nQ9dHbk+/QQ3ahbn66Wf/UvwgD8CEee7lI3BiXg
 pLzk9Hg982BMA5JAM4SZBJcQXCImmQ4=
 =arvv
 -----END PGP SIGNATURE-----

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

Pull ata updates from Niklas Cassel:

 - Bump required Clang version to 23 (Marco), and add Clang context
   analysis annotations (Bart)

 - Use the ahci_nr_ports() helper in libahci (me)

 - Fail to probe the ahci driver if the BAR size is smaller than the
   required size to support CAP.NP (Number of Ports) (liyouhong)

 - Move EXPORT_SYMBOL_GPL(ahci_do_softreset) to be just below the
   function definition (Bart)

 - Make ata_scsi_scan_host() schedule hotplug work on the
   system_dfl_long_wq workqueue so that it can benefit from scheduler
   task placement (Marco)

 - Make ata_scsi_port_error_handler() schedule hotplug work on the
   system_dfl_long_wq workqueue, such that the work always uses the same
   workqueue (me)

 - Use devm_platform_get_and_ioremap_resource() in pata_arasan_cf driver
   (Rosen)

 - Fix ata_exec_internal() to only release and acquire the EH mutex if
   the calling function is the one holding the EH mutex (Bart)

 - Use hweight_long() to count the port_map bits (TanZheng)

 - Add COMPILE_TEST support for pata_ep93xx driver (Rosen)

 - Drop unused assignments from pata_isapnp driver (Uwe)

 - Extend existing JMicron PMP quirk to include JMicron JMS562 (Xu)

 - Drop unused assignments of pci_device_id driver data (Uwe)

 - Use named initializers for pci_device_id arrays (Uwe)

* tag 'ata-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: Use named initializers for pci_device_id arrays
  ata: Drop unused assignments of pci_device_id driver data
  ata: libata-pmp: add JMicron JMS562 quirk
  ata: pata_isapnp: Drop unused assignments from pnp_device_id array
  ata: pata_ep93xx: add COMPILE_TEST support
  ata: pata_ep93xx: use unsigned long for data
  ata: pata_ep93xx: avoid asm on non ARM
  ata: Annotate functions in the issuing path with __must_hold()
  ata: libata: Pass ap parameter directly to functions in the issuing path
  ata: libata: Document when host->eh_mutex should be held
  ata: libata: Add an argument to ata_eh_reset()
  ata: ahci: use hweight_long() to count port_map bits
  ata: libata: Fix ata_exec_internal()
  ata: pata_arasan_cf: simplify ioremap
  ata: libata-eh: queue hotplug work on the system_dfl_long_wq workqueue
  ata: libata-scsi: Move long delayed work on system_dfl_long_wq
  ata: ahci: Move EXPORT_SYMBOL_GPL(ahci_do_softreset)
  ata: ahci: fail probe if BAR too small for claimed ports
  ata: libahci: use ahci_nr_ports() helper
This commit is contained in:
Linus Torvalds 2026-06-18 08:12:50 -07:00
commit 00d07402df
51 changed files with 2107 additions and 790 deletions

View File

@ -692,7 +692,7 @@ config PATA_EFAR
config PATA_EP93XX
tristate "Cirrus Logic EP93xx PATA support"
depends on ARCH_EP93XX
depends on ARCH_EP93XX || COMPILE_TEST
select PATA_TIMINGS
help
This option enables support for the PATA controller in

View File

@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
CONTEXT_ANALYSIS := y
obj-$(CONFIG_ATA) += libata.o
# non-SFF interface

View File

@ -91,9 +91,11 @@ static const struct ata_port_info acard_ahci_port_info[] = {
};
static const struct pci_device_id acard_ahci_pci_tbl[] = {
/* ACard */
{ PCI_VDEVICE(ARTOP, 0x000d), board_acard_ahci }, /* ATP8620 */
{
/* ACard ATP8620 */
PCI_VDEVICE(ARTOP, 0x000d),
.driver_data = board_acard_ahci,
},
{ } /* terminate list */
};

File diff suppressed because it is too large Load Diff

View File

@ -448,7 +448,8 @@ void ahci_set_em_messages(struct ahci_host_priv *hpriv,
int ahci_reset_em(struct ata_host *host);
void ahci_print_info(struct ata_host *host, const char *scc_s);
int ahci_host_activate(struct ata_host *host, const struct scsi_host_template *sht);
void ahci_error_handler(struct ata_port *ap);
void ahci_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex);
u32 ahci_handle_port_intr(struct ata_host *host, u32 irq_masked);
static inline void __iomem *__ahci_port_base(struct ahci_host_priv *hpriv,

View File

@ -598,6 +598,7 @@ static void imx_sata_disable(struct ahci_host_priv *hpriv)
}
static void ahci_imx_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
u32 reg_val;
struct ata_device *dev;

View File

@ -154,184 +154,364 @@ static unsigned int in_module_init = 1;
static const struct pci_device_id piix_pci_tbl[] = {
/* Intel PIIX3 for the 430HX etc */
{ 0x8086, 0x7010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_mwdma },
/* VMware ICH4 */
{ 0x8086, 0x7111, 0x15ad, 0x1976, 0, 0, piix_pata_vmw },
/* Intel PIIX4 for the 430TX/440BX/MX chipset: UDMA 33 */
/* Also PIIX4E (fn3 rev 2) and PIIX4M (fn3 rev 3) */
{ 0x8086, 0x7111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
/* Intel PIIX4 */
{ 0x8086, 0x7199, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
/* Intel PIIX4 */
{ 0x8086, 0x7601, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
/* Intel PIIX */
{ 0x8086, 0x84CA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
/* Intel ICH (i810, i815, i840) UDMA 66*/
{ 0x8086, 0x2411, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_66 },
/* Intel ICH0 : UDMA 33*/
{ 0x8086, 0x2421, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_33 },
/* Intel ICH2M */
{ 0x8086, 0x244A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* Intel ICH2 (i810E2, i845, 850, 860) UDMA 100 */
{ 0x8086, 0x244B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* Intel ICH3M */
{ 0x8086, 0x248A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* Intel ICH3 (E7500/1) UDMA 100 */
{ 0x8086, 0x248B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* Intel ICH4-L */
{ 0x8086, 0x24C1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* Intel ICH4 (i845GV, i845E, i852, i855) UDMA 100 */
{ 0x8086, 0x24CA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
{ 0x8086, 0x24CB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* Intel ICH5 */
{ 0x8086, 0x24DB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* C-ICH (i810E2) */
{ 0x8086, 0x245B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* ESB (855GME/875P + 6300ESB) UDMA 100 */
{ 0x8086, 0x25A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* ICH6 (and 6) (i915) UDMA 100 */
{ 0x8086, 0x266F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* ICH7/7-R (i945, i975) UDMA 100*/
{ 0x8086, 0x27DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100_nomwdma1 },
{ 0x8086, 0x269E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100_nomwdma1 },
/* ICH8 Mobile PATA Controller */
{ 0x8086, 0x2850, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
{
PCI_DEVICE(0x8086, 0x7010),
.driver_data = piix_pata_mwdma,
}, {
/* VMware ICH4 */
PCI_DEVICE_SUB(0x8086, 0x7111, 0x15ad, 0x1976),
.driver_data = piix_pata_vmw,
}, {
/* Intel PIIX4 for the 430TX/440BX/MX chipset: UDMA 33 */
/* Also PIIX4E (fn3 rev 2) and PIIX4M (fn3 rev 3) */
PCI_DEVICE(0x8086, 0x7111),
.driver_data = piix_pata_33,
}, {
/* Intel PIIX4 */
PCI_DEVICE(0x8086, 0x7199),
.driver_data = piix_pata_33,
}, {
/* Intel PIIX4 */
PCI_DEVICE(0x8086, 0x7601),
.driver_data = piix_pata_33,
}, {
/* Intel PIIX */
PCI_DEVICE(0x8086, 0x84CA),
.driver_data = piix_pata_33,
}, {
/* Intel ICH (i810, i815, i840) UDMA 66*/
PCI_DEVICE(0x8086, 0x2411),
.driver_data = ich_pata_66,
}, {
/* Intel ICH0 : UDMA 33*/
PCI_DEVICE(0x8086, 0x2421),
.driver_data = ich_pata_33,
}, {
/* Intel ICH2M */
PCI_DEVICE(0x8086, 0x244A),
.driver_data = ich_pata_100,
}, {
/* Intel ICH2 (i810E2, i845, 850, 860) UDMA 100 */
PCI_DEVICE(0x8086, 0x244B),
.driver_data = ich_pata_100,
}, {
/* Intel ICH3M */
PCI_DEVICE(0x8086, 0x248A),
.driver_data = ich_pata_100,
}, {
/* Intel ICH3 (E7500/1) UDMA 100 */
PCI_DEVICE(0x8086, 0x248B),
.driver_data = ich_pata_100,
}, {
/* Intel ICH4-L */
PCI_DEVICE(0x8086, 0x24C1),
.driver_data = ich_pata_100,
}, {
/* Intel ICH4 (i845GV, i845E, i852, i855) UDMA 100 */
PCI_DEVICE(0x8086, 0x24CA),
.driver_data = ich_pata_100,
}, {
PCI_DEVICE(0x8086, 0x24CB),
.driver_data = ich_pata_100,
}, {
/* Intel ICH5 */
PCI_DEVICE(0x8086, 0x24DB),
.driver_data = ich_pata_100,
}, {
/* C-ICH (i810E2) */
PCI_DEVICE(0x8086, 0x245B),
.driver_data = ich_pata_100,
}, {
/* ESB (855GME/875P + 6300ESB) UDMA 100 */
PCI_DEVICE(0x8086, 0x25A2),
.driver_data = ich_pata_100,
}, {
/* ICH6 (and 6) (i915) UDMA 100 */
PCI_DEVICE(0x8086, 0x266F),
.driver_data = ich_pata_100,
}, {
/* ICH7/7-R (i945, i975) UDMA 100*/
PCI_DEVICE(0x8086, 0x27DF),
.driver_data = ich_pata_100_nomwdma1,
}, {
PCI_DEVICE(0x8086, 0x269E),
.driver_data = ich_pata_100_nomwdma1,
}, {
/* ICH8 Mobile PATA Controller */
PCI_DEVICE(0x8086, 0x2850),
.driver_data = ich_pata_100,
},
/* SATA ports */
/* 82801EB (ICH5) */
{ 0x8086, 0x24d1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
/* 82801EB (ICH5) */
{ 0x8086, 0x24df, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
/* 6300ESB (ICH5 variant with broken PCS present bits) */
{ 0x8086, 0x25a3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
/* 6300ESB pretending RAID */
{ 0x8086, 0x25b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
/* 82801FB/FW (ICH6/ICH6W) */
{ 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
/* 82801FR/FRW (ICH6R/ICH6RW) */
{ 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
/* 82801FBM ICH6M (ICH6R with only port 0 and 2 implemented).
* Attach iff the controller is in IDE mode. */
{ 0x8086, 0x2653, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_IDE << 8, 0xffff00, ich6m_sata },
/* 82801GB/GR/GH (ICH7, identical to ICH6) */
{ 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
/* 82801GBM/GHM (ICH7M, identical to ICH6M) */
{ 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata },
/* Enterprise Southbridge 2 (631xESB/632xESB) */
{ 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
/* SATA Controller 1 IDE (ICH8) */
{ 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller 2 IDE (ICH8) */
{ 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* Mobile SATA Controller IDE (ICH8M), Apple */
{ 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata },
{ 0x8086, 0x2828, 0x106b, 0x00a1, 0, 0, ich8m_apple_sata },
{ 0x8086, 0x2828, 0x106b, 0x00a3, 0, 0, ich8m_apple_sata },
/* Mobile SATA Controller IDE (ICH8M) */
{ 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (ICH9) */
{ 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (ICH9) */
{ 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (ICH9) */
{ 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (ICH9M) */
{ 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (ICH9M) */
{ 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (ICH9M) */
{ 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (Tolapai) */
{ 0x8086, 0x5028, PCI_ANY_ID, PCI_ANY_ID, 0, 0, tolapai_sata },
/* SATA Controller IDE (ICH10) */
{ 0x8086, 0x3a00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (ICH10) */
{ 0x8086, 0x3a06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (ICH10) */
{ 0x8086, 0x3a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (ICH10) */
{ 0x8086, 0x3a26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b28, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b2d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b2e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (CPT) */
{ 0x8086, 0x1c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (CPT) */
{ 0x8086, 0x1c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (CPT) */
{ 0x8086, 0x1c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (CPT) */
{ 0x8086, 0x1c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (PBG) */
{ 0x8086, 0x1d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (PBG) */
{ 0x8086, 0x1d08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Panther Point) */
{ 0x8086, 0x1e00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Panther Point) */
{ 0x8086, 0x1e01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Panther Point) */
{ 0x8086, 0x1e08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Panther Point) */
{ 0x8086, 0x1e09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_snb },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Lynx Point-LP) */
{ 0x8086, 0x9c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Lynx Point-LP) */
{ 0x8086, 0x9c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Lynx Point-LP) */
{ 0x8086, 0x9c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Lynx Point-LP) */
{ 0x8086, 0x9c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (DH89xxCC) */
{ 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Avoton) */
{ 0x8086, 0x1f20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Avoton) */
{ 0x8086, 0x1f21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Avoton) */
{ 0x8086, 0x1f30, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Avoton) */
{ 0x8086, 0x1f31, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Wellsburg) */
{ 0x8086, 0x8d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Wellsburg) */
{ 0x8086, 0x8d08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_snb },
/* SATA Controller IDE (Wellsburg) */
{ 0x8086, 0x8d60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Wellsburg) */
{ 0x8086, 0x8d68, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (BayTrail) */
{ 0x8086, 0x0F20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt },
{ 0x8086, 0x0F21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt },
/* SATA Controller IDE (Coleto Creek) */
{ 0x8086, 0x23a6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (9 Series) */
{ 0x8086, 0x8c88, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_snb },
/* SATA Controller IDE (9 Series) */
{ 0x8086, 0x8c89, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_snb },
/* SATA Controller IDE (9 Series) */
{ 0x8086, 0x8c80, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (9 Series) */
{ 0x8086, 0x8c81, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
{
/* 82801EB (ICH5) */
PCI_DEVICE(0x8086, 0x24d1),
.driver_data = ich5_sata,
}, {
/* 82801EB (ICH5) */
PCI_DEVICE(0x8086, 0x24df),
.driver_data = ich5_sata,
}, {
/* 6300ESB (ICH5 variant with broken PCS present bits) */
PCI_DEVICE(0x8086, 0x25a3),
.driver_data = ich5_sata,
}, {
/* 6300ESB pretending RAID */
PCI_DEVICE(0x8086, 0x25b0),
.driver_data = ich5_sata,
}, {
/* 82801FB/FW (ICH6/ICH6W) */
PCI_DEVICE(0x8086, 0x2651),
.driver_data = ich6_sata,
}, {
/* 82801FR/FRW (ICH6R/ICH6RW) */
PCI_DEVICE(0x8086, 0x2652),
.driver_data = ich6_sata,
}, {
/* 82801FBM ICH6M (ICH6R with only port 0 and 2 implemented).
* Attach iff the controller is in IDE mode. */
PCI_DEVICE(0x8086, 0x2653),
.class = PCI_CLASS_STORAGE_IDE << 8,
.class_mask = 0xffff00,
.driver_data = ich6m_sata,
}, {
/* 82801GB/GR/GH (ICH7, identical to ICH6) */
PCI_DEVICE(0x8086, 0x27c0),
.driver_data = ich6_sata,
}, {
/* 82801GBM/GHM (ICH7M, identical to ICH6M) */
PCI_DEVICE(0x8086, 0x27c4),
.driver_data = ich6m_sata,
}, {
/* Enterprise Southbridge 2 (631xESB/632xESB) */
PCI_DEVICE(0x8086, 0x2680),
.driver_data = ich6_sata,
}, {
/* SATA Controller 1 IDE (ICH8) */
PCI_DEVICE(0x8086, 0x2820),
.driver_data = ich8_sata,
}, {
/* SATA Controller 2 IDE (ICH8) */
PCI_DEVICE(0x8086, 0x2825),
.driver_data = ich8_2port_sata,
}, {
/* Mobile SATA Controller IDE (ICH8M), Apple */
PCI_DEVICE_SUB(0x8086, 0x2828, 0x106b, 0x00a0),
.driver_data = ich8m_apple_sata,
}, {
PCI_DEVICE_SUB(0x8086, 0x2828, 0x106b, 0x00a1),
.driver_data = ich8m_apple_sata,
}, {
PCI_DEVICE_SUB(0x8086, 0x2828, 0x106b, 0x00a3),
.driver_data = ich8m_apple_sata,
}, {
/* Mobile SATA Controller IDE (ICH8M) */
PCI_DEVICE(0x8086, 0x2828),
.driver_data = ich8_sata,
}, {
/* SATA Controller IDE (ICH9) */
PCI_DEVICE(0x8086, 0x2920),
.driver_data = ich8_sata,
}, {
/* SATA Controller IDE (ICH9) */
PCI_DEVICE(0x8086, 0x2921),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (ICH9) */
PCI_DEVICE(0x8086, 0x2926),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (ICH9M) */
PCI_DEVICE(0x8086, 0x2928),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (ICH9M) */
PCI_DEVICE(0x8086, 0x292d),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (ICH9M) */
PCI_DEVICE(0x8086, 0x292e),
.driver_data = ich8_sata,
}, {
/* SATA Controller IDE (Tolapai) */
PCI_DEVICE(0x8086, 0x5028),
.driver_data = tolapai_sata,
}, {
/* SATA Controller IDE (ICH10) */
PCI_DEVICE(0x8086, 0x3a00),
.driver_data = ich8_sata,
}, {
/* SATA Controller IDE (ICH10) */
PCI_DEVICE(0x8086, 0x3a06),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (ICH10) */
PCI_DEVICE(0x8086, 0x3a20),
.driver_data = ich8_sata,
}, {
/* SATA Controller IDE (ICH10) */
PCI_DEVICE(0x8086, 0x3a26),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (PCH) */
PCI_DEVICE(0x8086, 0x3b20),
.driver_data = ich8_sata,
}, {
/* SATA Controller IDE (PCH) */
PCI_DEVICE(0x8086, 0x3b21),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (PCH) */
PCI_DEVICE(0x8086, 0x3b26),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (PCH) */
PCI_DEVICE(0x8086, 0x3b28),
.driver_data = ich8_sata,
}, {
/* SATA Controller IDE (PCH) */
PCI_DEVICE(0x8086, 0x3b2d),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (PCH) */
PCI_DEVICE(0x8086, 0x3b2e),
.driver_data = ich8_sata,
}, {
/* SATA Controller IDE (CPT) */
PCI_DEVICE(0x8086, 0x1c00),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (CPT) */
PCI_DEVICE(0x8086, 0x1c01),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (CPT) */
PCI_DEVICE(0x8086, 0x1c08),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (CPT) */
PCI_DEVICE(0x8086, 0x1c09),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (PBG) */
PCI_DEVICE(0x8086, 0x1d00),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (PBG) */
PCI_DEVICE(0x8086, 0x1d08),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (Panther Point) */
PCI_DEVICE(0x8086, 0x1e00),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Panther Point) */
PCI_DEVICE(0x8086, 0x1e01),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Panther Point) */
PCI_DEVICE(0x8086, 0x1e08),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (Panther Point) */
PCI_DEVICE(0x8086, 0x1e09),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (Lynx Point) */
PCI_DEVICE(0x8086, 0x8c00),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Lynx Point) */
PCI_DEVICE(0x8086, 0x8c01),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Lynx Point) */
PCI_DEVICE(0x8086, 0x8c08),
.driver_data = ich8_2port_sata_snb,
}, {
/* SATA Controller IDE (Lynx Point) */
PCI_DEVICE(0x8086, 0x8c09),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (Lynx Point-LP) */
PCI_DEVICE(0x8086, 0x9c00),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Lynx Point-LP) */
PCI_DEVICE(0x8086, 0x9c01),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Lynx Point-LP) */
PCI_DEVICE(0x8086, 0x9c08),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (Lynx Point-LP) */
PCI_DEVICE(0x8086, 0x9c09),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (DH89xxCC) */
PCI_DEVICE(0x8086, 0x2326),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (Avoton) */
PCI_DEVICE(0x8086, 0x1f20),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Avoton) */
PCI_DEVICE(0x8086, 0x1f21),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Avoton) */
PCI_DEVICE(0x8086, 0x1f30),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (Avoton) */
PCI_DEVICE(0x8086, 0x1f31),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (Wellsburg) */
PCI_DEVICE(0x8086, 0x8d00),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Wellsburg) */
PCI_DEVICE(0x8086, 0x8d08),
.driver_data = ich8_2port_sata_snb,
}, {
/* SATA Controller IDE (Wellsburg) */
PCI_DEVICE(0x8086, 0x8d60),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (Wellsburg) */
PCI_DEVICE(0x8086, 0x8d68),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (BayTrail) */
PCI_DEVICE(0x8086, 0x0F20),
.driver_data = ich8_2port_sata_byt,
}, {
PCI_DEVICE(0x8086, 0x0F21),
.driver_data = ich8_2port_sata_byt,
}, {
/* SATA Controller IDE (Coleto Creek) */
PCI_DEVICE(0x8086, 0x23a6),
.driver_data = ich8_2port_sata,
}, {
/* SATA Controller IDE (9 Series) */
PCI_DEVICE(0x8086, 0x8c88),
.driver_data = ich8_2port_sata_snb,
}, {
/* SATA Controller IDE (9 Series) */
PCI_DEVICE(0x8086, 0x8c89),
.driver_data = ich8_2port_sata_snb,
}, {
/* SATA Controller IDE (9 Series) */
PCI_DEVICE(0x8086, 0x8c80),
.driver_data = ich8_sata_snb,
}, {
/* SATA Controller IDE (9 Series) */
PCI_DEVICE(0x8086, 0x8c81),
.driver_data = ich8_sata_snb,
},
{ } /* terminate list */
};

View File

@ -552,11 +552,7 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv)
/* cross check port_map and cap.n_ports */
if (port_map) {
int map_ports = 0;
for (i = 0; i < AHCI_MAX_PORTS; i++)
if (port_map & (1 << i))
map_ports++;
int map_ports = hweight_long(port_map);
/* If PI has more ports than n_ports, whine, clear
* port_map and let it be generated from n_ports.
@ -1527,6 +1523,7 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,
ata_link_err(link, "softreset failed (%s)\n", reason);
return rc;
}
EXPORT_SYMBOL_GPL(ahci_do_softreset);
int ahci_check_ready(struct ata_link *link)
{
@ -1544,7 +1541,6 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class,
return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
}
EXPORT_SYMBOL_GPL(ahci_do_softreset);
static int ahci_bad_pmp_check_ready(struct ata_link *link)
{
@ -2212,6 +2208,7 @@ static void ahci_thaw(struct ata_port *ap)
}
void ahci_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct ahci_host_priv *hpriv = ap->host->private_data;
@ -2636,7 +2633,7 @@ void ahci_print_info(struct ata_host *host, const char *scc_s)
,
hweight32(impl),
(cap & 0x1f) + 1,
ahci_nr_ports(cap),
impl);
dev_info(host->dev,

View File

@ -1540,6 +1540,7 @@ unsigned int ata_exec_internal(struct ata_device *dev, struct ata_taskfile *tf,
{
struct ata_link *link = dev->link;
struct ata_port *ap = link->ap;
const bool owns_eh_mutex = ap->host->eh_owner == current;
u8 command = tf->command;
struct ata_queued_cmd *qc;
struct scatterlist sgl;
@ -1604,7 +1605,7 @@ unsigned int ata_exec_internal(struct ata_device *dev, struct ata_taskfile *tf,
qc->private_data = &wait;
qc->complete_fn = ata_qc_complete_internal;
ata_qc_issue(qc);
ata_qc_issue(ap, qc);
spin_unlock_irqrestore(ap->lock, flags);
@ -1617,11 +1618,25 @@ unsigned int ata_exec_internal(struct ata_device *dev, struct ata_taskfile *tf,
}
}
ata_eh_release(ap);
if (owns_eh_mutex) {
/*
* To prevent that the compiler complains about the
* ata_eh_release() call below.
*/
__acquire(&ap->host->eh_mutex);
ata_eh_release(ap);
}
rc = wait_for_completion_timeout(&wait, msecs_to_jiffies(timeout));
ata_eh_acquire(ap);
if (owns_eh_mutex) {
ata_eh_acquire(ap);
/*
* To prevent that the compiler complains about the above
* ata_eh_acquire() call.
*/
__release(&ap->host->eh_mutex);
}
ata_sff_flush_pio_task(ap);
@ -5135,6 +5150,7 @@ EXPORT_SYMBOL_GPL(ata_qc_get_active);
/**
* ata_qc_issue - issue taskfile to device
* @ap: ATA port of interest
* @qc: command to issue to device
*
* Prepare an ATA command to submission to device.
@ -5145,9 +5161,9 @@ EXPORT_SYMBOL_GPL(ata_qc_get_active);
* LOCKING:
* spin_lock_irqsave(host lock)
*/
void ata_qc_issue(struct ata_queued_cmd *qc)
void ata_qc_issue(struct ata_port *ap, struct ata_queued_cmd *qc)
__must_hold(ap->lock)
{
struct ata_port *ap = qc->ap;
struct ata_link *link = qc->dev->link;
u8 prot = qc->tf.protocol;
@ -6820,6 +6836,7 @@ EXPORT_SYMBOL_GPL(ata_ratelimit);
* Might sleep.
*/
void ata_msleep(struct ata_port *ap, unsigned int msecs)
__context_unsafe(conditional locking)
{
bool owns_eh = ap && ap->host->eh_owner == current;
@ -6894,6 +6911,7 @@ static unsigned int ata_dummy_qc_issue(struct ata_queued_cmd *qc)
}
static void ata_dummy_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
/* truly dummy */
}

View File

@ -469,6 +469,7 @@ static void ata_eh_clear_action(struct ata_link *link, struct ata_device *dev,
* EH context.
*/
void ata_eh_acquire(struct ata_port *ap)
__acquires(&ap->host->eh_mutex)
{
mutex_lock(&ap->host->eh_mutex);
WARN_ON_ONCE(ap->host->eh_owner);
@ -486,6 +487,7 @@ void ata_eh_acquire(struct ata_port *ap)
* EH context.
*/
void ata_eh_release(struct ata_port *ap)
__releases(&ap->host->eh_mutex)
{
WARN_ON_ONCE(ap->host->eh_owner != current);
ap->host->eh_owner = NULL;
@ -819,7 +821,7 @@ void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap)
ap->pflags &= ~ATA_PFLAG_LOADING;
else if ((ap->pflags & ATA_PFLAG_SCSI_HOTPLUG) &&
!(ap->flags & ATA_FLAG_SAS_HOST))
schedule_delayed_work(&ap->hotplug_task, 0);
queue_delayed_work(system_dfl_long_wq, &ap->hotplug_task, 0);
if (ap->pflags & ATA_PFLAG_RECOVERED)
ata_port_info(ap, "EH complete\n");
@ -2831,10 +2833,10 @@ static bool ata_eh_followup_srst_needed(struct ata_link *link, int rc)
return false;
}
int ata_eh_reset(struct ata_link *link, int classify,
int ata_eh_reset(struct ata_port *ap, struct ata_link *link, int classify,
struct ata_reset_operations *reset_ops)
__must_hold(&ap->host->eh_mutex)
{
struct ata_port *ap = link->ap;
struct ata_link *slave = ap->slave_link;
struct ata_eh_context *ehc = &link->eh_context;
struct ata_eh_context *sehc = slave ? &slave->eh_context : NULL;
@ -3816,6 +3818,7 @@ static int ata_eh_handle_dev_fail(struct ata_device *dev, int err)
*/
int ata_eh_recover(struct ata_port *ap, struct ata_reset_operations *reset_ops,
struct ata_link **r_failed_link)
__must_hold(&ap->host->eh_mutex)
{
struct ata_link *link;
struct ata_device *dev;
@ -3882,7 +3885,8 @@ int ata_eh_recover(struct ata_port *ap, struct ata_reset_operations *reset_ops,
if (!(ehc->i.action & ATA_EH_RESET))
continue;
rc = ata_eh_reset(link, ata_link_nr_vacant(link), reset_ops);
rc = ata_eh_reset(ap, link, ata_link_nr_vacant(link),
reset_ops);
if (rc) {
ata_link_err(link, "reset failed, giving up\n");
goto out;
@ -4112,6 +4116,7 @@ void ata_eh_finish(struct ata_port *ap)
* Kernel thread context (may sleep).
*/
void ata_std_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct ata_reset_operations *reset_ops = &ap->ops->reset;
struct ata_link *link = &ap->link;

View File

@ -457,8 +457,13 @@ static void sata_pmp_quirks(struct ata_port *ap)
* otherwise. Don't try hard to recover it.
*/
ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY;
} else if (vendor == 0x197b && (devid == 0x2352 || devid == 0x0325)) {
} else if (vendor == 0x197b &&
(devid == 0x0562 || devid == 0x2352 || devid == 0x0325)) {
/*
* 0x0562: JMicron JMS562, as used in QNAP QDA-A2AR RAID1
* adapters. The exported device may stay not ready
* while the array is rebuilding, and SRST/classify can
* time out before the RAID volume is exported.
* 0x2352: found in Thermaltake BlackX Duet, jmicron JMB350?
* 0x0325: jmicron JMB394.
*/
@ -756,6 +761,7 @@ static int sata_pmp_revalidate_quick(struct ata_device *dev)
*/
static int sata_pmp_eh_recover_pmp(struct ata_port *ap,
struct ata_reset_operations *reset_ops)
__must_hold(&ap->host->eh_mutex)
{
struct ata_link *link = &ap->link;
struct ata_eh_context *ehc = &link->eh_context;
@ -777,7 +783,7 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap,
struct ata_link *tlink;
/* reset */
rc = ata_eh_reset(link, 0, reset_ops);
rc = ata_eh_reset(ap, link, 0, reset_ops);
if (rc) {
ata_link_err(link, "failed to reset PMP, giving up\n");
goto fail;
@ -921,6 +927,7 @@ static int sata_pmp_handle_link_fail(struct ata_link *link, int *link_tries)
* 0 on success, -errno on failure.
*/
static int sata_pmp_eh_recover(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct ata_port_operations *ops = ap->ops;
int pmp_tries, link_tries[SATA_PMP_MAX_PORTS];
@ -1098,6 +1105,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap)
* Kernel thread context (may sleep).
*/
void sata_pmp_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
ata_eh_autopsy(ap);
ata_eh_report(ap);

View File

@ -1377,9 +1377,10 @@ EXPORT_SYMBOL_GPL(ata_sas_sdev_configure);
*/
int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap)
__must_hold(ap->lock)
{
if (likely(ata_dev_enabled(ap->link.device)))
return __ata_scsi_queuecmd(cmd, ap->link.device);
return __ata_scsi_queuecmd(cmd, ap->link.device, ap);
cmd->result = (DID_BAD_TARGET << 16);
scsi_done(cmd);

View File

@ -1681,7 +1681,7 @@ void ata_scsi_deferred_qc_work(struct work_struct *work)
if (qc && !ata_port_eh_scheduled(ap)) {
WARN_ON_ONCE(ap->ops->qc_defer(qc));
link->deferred_qc = NULL;
ata_qc_issue(qc);
ata_qc_issue(ap, qc);
}
spin_unlock_irqrestore(ap->lock, flags);
@ -1769,6 +1769,7 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
}
static int ata_scsi_qc_issue(struct ata_port *ap, struct ata_queued_cmd *qc)
__must_hold(ap->lock)
{
struct ata_link *link = qc->dev->link;
int ret;
@ -1812,7 +1813,7 @@ static int ata_scsi_qc_issue(struct ata_port *ap, struct ata_queued_cmd *qc)
}
issue_qc:
ata_qc_issue(qc);
ata_qc_issue(ap, qc);
return 0;
defer_qc:
@ -1840,6 +1841,7 @@ static int ata_scsi_qc_issue(struct ata_port *ap, struct ata_queued_cmd *qc)
* @dev: ATA device to which the command is addressed
* @cmd: SCSI command to execute
* @xlat_func: Actor which translates @cmd to an ATA taskfile
* @ap: ATA port of interest
*
* Our ->queuecommand() function has decided that the SCSI
* command issued can be directly translated into an ATA
@ -1862,9 +1864,9 @@ static int ata_scsi_qc_issue(struct ata_port *ap, struct ata_queued_cmd *qc)
* command needs to be deferred.
*/
static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd,
ata_xlat_func_t xlat_func)
ata_xlat_func_t xlat_func, struct ata_port *ap)
__must_hold(ap->lock)
{
struct ata_port *ap = dev->link->ap;
struct ata_queued_cmd *qc;
lockdep_assert_held(ap->lock);
@ -4521,9 +4523,10 @@ static void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)
}
enum scsi_qc_status __ata_scsi_queuecmd(struct scsi_cmnd *scmd,
struct ata_device *dev)
struct ata_device *dev,
struct ata_port *ap)
__must_hold(ap->lock)
{
struct ata_port *ap = dev->link->ap;
u8 scsi_op = scmd->cmnd[0];
ata_xlat_func_t xlat_func;
@ -4564,7 +4567,7 @@ enum scsi_qc_status __ata_scsi_queuecmd(struct scsi_cmnd *scmd,
}
if (xlat_func)
return ata_scsi_translate(dev, scmd, xlat_func);
return ata_scsi_translate(dev, scmd, xlat_func, ap);
ata_scsi_simulate(dev, scmd);
@ -4610,7 +4613,7 @@ enum scsi_qc_status ata_scsi_queuecmd(struct Scsi_Host *shost,
dev = ata_scsi_find_dev(ap, scsidev);
if (likely(dev))
rc = __ata_scsi_queuecmd(cmd, dev);
rc = __ata_scsi_queuecmd(cmd, dev, ap);
else {
cmd->result = (DID_BAD_TARGET << 16);
scsi_done(cmd);
@ -4768,7 +4771,7 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
"WARNING: synchronous SCSI scan failed without making any progress, switching to async\n");
}
queue_delayed_work(system_long_wq, &ap->hotplug_task,
queue_delayed_work(system_dfl_long_wq, &ap->hotplug_task,
round_jiffies_relative(HZ));
}

View File

@ -2053,6 +2053,7 @@ EXPORT_SYMBOL_GPL(ata_sff_drain_fifo);
* Kernel thread context (may sleep)
*/
void ata_sff_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct ata_queued_cmd *qc;
unsigned long flags;
@ -2769,6 +2770,7 @@ EXPORT_SYMBOL_GPL(ata_bmdma_interrupt);
* Kernel thread context (may sleep)
*/
void ata_bmdma_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct ata_queued_cmd *qc;
unsigned long flags;

View File

@ -88,7 +88,8 @@ extern int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel);
extern unsigned int ata_dev_set_feature(struct ata_device *dev,
u8 subcmd, u8 action);
extern void ata_qc_free(struct ata_queued_cmd *qc);
extern void ata_qc_issue(struct ata_queued_cmd *qc);
extern void ata_qc_issue(struct ata_port *ap, struct ata_queued_cmd *qc)
__must_hold(ap->lock);
extern void __ata_qc_complete(struct ata_queued_cmd *qc);
extern int atapi_check_dma(struct ata_queued_cmd *qc);
extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
@ -166,15 +167,19 @@ void ata_scsi_sdev_config(struct scsi_device *sdev);
int ata_scsi_dev_config(struct scsi_device *sdev, struct queue_limits *lim,
struct ata_device *dev);
enum scsi_qc_status __ata_scsi_queuecmd(struct scsi_cmnd *scmd,
struct ata_device *dev);
struct ata_device *dev,
struct ata_port *ap)
__must_hold(ap->lock);
void ata_scsi_deferred_qc_work(struct work_struct *work);
void ata_scsi_requeue_deferred_qc(struct ata_port *ap);
/* libata-eh.c */
extern unsigned int ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd);
extern void ata_internal_cmd_timed_out(struct ata_device *dev, u8 cmd);
extern void ata_eh_acquire(struct ata_port *ap);
extern void ata_eh_release(struct ata_port *ap);
extern void ata_eh_acquire(struct ata_port *ap)
__acquires(&ap->host->eh_mutex);
extern void ata_eh_release(struct ata_port *ap)
__releases(&ap->host->eh_mutex);
extern void ata_scsi_error(struct Scsi_Host *host);
extern void ata_eh_fastdrain_timerfn(struct timer_list *t);
extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc);
@ -187,11 +192,13 @@ extern void ata_eh_done(struct ata_link *link, struct ata_device *dev,
extern void ata_eh_autopsy(struct ata_port *ap);
const char *ata_get_cmd_name(u8 command);
extern void ata_eh_report(struct ata_port *ap);
extern int ata_eh_reset(struct ata_link *link, int classify,
struct ata_reset_operations *reset_ops);
extern int ata_eh_reset(struct ata_port *ap, struct ata_link *link,
int classify, struct ata_reset_operations *reset_ops)
__must_hold(&ap->host->eh_mutex);
extern int ata_eh_recover(struct ata_port *ap,
struct ata_reset_operations *reset_ops,
struct ata_link **r_failed_disk);
struct ata_link **r_failed_disk)
__must_hold(&ap->host->eh_mutex);
extern void ata_eh_finish(struct ata_port *ap);
extern int ata_ering_map(struct ata_ering *ering,
int (*map_fn)(struct ata_ering_entry *, void *),

View File

@ -257,7 +257,10 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
}
static const struct pci_device_id pacpi_pci_tbl[] = {
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 1},
{
PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL),
.driver_data = 1, /* is this used at all? */
},
{ } /* terminate list */
};

View File

@ -597,29 +597,71 @@ static int amd_reinit_one(struct pci_dev *pdev)
#endif
static const struct pci_device_id amd[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_COBRA_7401), 0 },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_VIPER_7409), 1 },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_VIPER_7411), 3 },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_OPUS_7441), 4 },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_8111_IDE), 5 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE), 7 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE), 8 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE), 8 },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_IDE), 9 },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_DEV_IDE), 9 },
{ },
{
PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_COBRA_7401),
.driver_data = 0,
}, {
PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_VIPER_7409),
.driver_data = 1,
}, {
PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_VIPER_7411),
.driver_data = 3,
}, {
PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_OPUS_7441),
.driver_data = 4,
}, {
PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_8111_IDE),
.driver_data = 5,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE),
.driver_data = 7,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE),
.driver_data = 8,
}, {
PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_IDE),
.driver_data = 9,
}, {
PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_DEV_IDE),
.driver_data = 9
},
{ }
};
static struct pci_driver amd_pci_driver = {

View File

@ -658,6 +658,7 @@ static void arasan_cf_freeze(struct ata_port *ap)
}
static void arasan_cf_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct arasan_cf_dev *acdev = ap->host->private_data;
@ -803,16 +804,6 @@ static int arasan_cf_probe(struct platform_device *pdev)
irq_handler_t irq_handler = NULL;
int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -EINVAL;
if (!devm_request_mem_region(&pdev->dev, res->start, resource_size(res),
DRIVER_NAME)) {
dev_warn(&pdev->dev, "Failed to get memory region resource\n");
return -ENOENT;
}
acdev = devm_kzalloc(&pdev->dev, sizeof(*acdev), GFP_KERNEL);
if (!acdev)
return -ENOMEM;
@ -827,22 +818,20 @@ static int arasan_cf_probe(struct platform_device *pdev)
* support only PIO
*/
ret = platform_get_irq(pdev, 0);
if (ret == -EPROBE_DEFER)
return ret;
if (ret > 0) {
acdev->irq = ret;
irq_handler = arasan_cf_interrupt;
} else if (ret == -EPROBE_DEFER) {
return ret;
} else {
quirk |= CF_BROKEN_MWDMA | CF_BROKEN_UDMA;
}
acdev->vbase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(acdev->vbase))
return PTR_ERR(acdev->vbase);
acdev->pbase = res->start;
acdev->vbase = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (!acdev->vbase) {
dev_warn(&pdev->dev, "ioremap fail\n");
return -ENOMEM;
}
acdev->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(acdev->clk)) {

View File

@ -421,12 +421,11 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
}
static const struct pci_device_id artop_pci_tbl[] = {
{ PCI_VDEVICE(ARTOP, 0x0005), 0 },
{ PCI_VDEVICE(ARTOP, 0x0006), 1 },
{ PCI_VDEVICE(ARTOP, 0x0007), 1 },
{ PCI_VDEVICE(ARTOP, 0x0008), 2 },
{ PCI_VDEVICE(ARTOP, 0x0009), 2 },
{ PCI_VDEVICE(ARTOP, 0x0005), .driver_data = 0 },
{ PCI_VDEVICE(ARTOP, 0x0006), .driver_data = 1 },
{ PCI_VDEVICE(ARTOP, 0x0007), .driver_data = 1 },
{ PCI_VDEVICE(ARTOP, 0x0008), .driver_data = 2 },
{ PCI_VDEVICE(ARTOP, 0x0009), .driver_data = 2 },
{ } /* terminate list */
};

View File

@ -526,9 +526,9 @@ static int atp867x_reinit_one(struct pci_dev *pdev)
#endif
static const struct pci_device_id atp867x_pci_tbl[] = {
{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867A), 0 },
{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867B), 0 },
{ },
{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867A) },
{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867B) },
{ }
};
static struct pci_driver atp867x_driver = {

View File

@ -248,8 +248,8 @@ static int cmd640_reinit_one(struct pci_dev *pdev)
#endif
static const struct pci_device_id cmd640[] = {
{ PCI_VDEVICE(CMD, 0x640), 0 },
{ },
{ PCI_VDEVICE(CMD, 0x0640) },
{ }
};
static struct pci_driver cmd640_pci_driver = {

View File

@ -506,12 +506,11 @@ static int cmd64x_reinit_one(struct pci_dev *pdev)
#endif
static const struct pci_device_id cmd64x[] = {
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), 0 },
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_646), 1 },
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_648), 5 },
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_649), 6 },
{ },
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), .driver_data = 0 },
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_646), .driver_data = 1 },
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_648), .driver_data = 5 },
{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_649), .driver_data = 6 },
{ }
};
static struct pci_driver cmd64x_pci_driver = {

View File

@ -204,6 +204,7 @@ static void ep93xx_pata_enable_pio(void __iomem *base, int pio_mode)
*/
static void ep93xx_pata_delay(unsigned long count)
{
#ifdef CONFIG_ARM
__asm__ volatile (
"0:\n"
"mov r0, r0\n"
@ -212,6 +213,10 @@ static void ep93xx_pata_delay(unsigned long count)
: "=r" (count)
: "0" (count)
);
#else
while (count--)
cpu_relax();
#endif
}
static unsigned long ep93xx_pata_wait_for_iordy(void __iomem *base,
@ -972,7 +977,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
match = soc_device_match(ep93xx_soc_table);
if (match)
ap->udma_mask = (unsigned int) match->data;
ap->udma_mask = (unsigned long) match->data;
else
ap->udma_mask = ATA_UDMA2;
}

View File

@ -119,8 +119,8 @@ static void isapnp_remove_one(struct pnp_dev *idev)
static struct pnp_device_id isapnp_devices[] = {
/* Generic ESDI/IDE/ATA compatible hard disk controller */
{.id = "PNP0600", .driver_data = 0},
{.id = ""}
{ .id = "PNP0600" },
{ }
};
MODULE_DEVICE_TABLE(pnp, isapnp_devices);

View File

@ -148,8 +148,11 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
}
static const struct pci_device_id jmicron_pci_tbl[] = {
{ PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 0 },
{
PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID),
.class = PCI_CLASS_STORAGE_IDE << 8,
.class_mask = 0xffff00
},
{ } /* terminate list */
};

View File

@ -1368,12 +1368,12 @@ static struct macio_driver pata_macio_driver =
};
static const struct pci_device_id pata_macio_pci_match[] = {
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_UNI_N_ATA), 0 },
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_IPID_ATA100), 0 },
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_K2_ATA100), 0 },
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_SH_ATA), 0 },
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA), 0 },
{},
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_UNI_N_ATA) },
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_IPID_ATA100) },
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_K2_ATA100) },
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_SH_ATA) },
{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA) },
{ }
};
static struct pci_driver pata_macio_pci_driver = {

View File

@ -166,13 +166,13 @@ static int ninja32_reinit_one(struct pci_dev *pdev)
#endif
static const struct pci_device_id ninja32[] = {
{ 0x10FC, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0x1145, 0x8008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0x1145, 0xf008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0x1145, 0xf02C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ },
{ PCI_DEVICE(0x10FC, 0x0003) },
{ PCI_DEVICE(0x1145, 0x8008) },
{ PCI_DEVICE(0x1145, 0xf008) },
{ PCI_DEVICE(0x1145, 0xf021) },
{ PCI_DEVICE(0x1145, 0xf024) },
{ PCI_DEVICE(0x1145, 0xf02C) },
{ }
};
static struct pci_driver ninja32_pci_driver = {

View File

@ -174,10 +174,9 @@ static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id)
}
static const struct pci_device_id opti[] = {
{ PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C621), 0 },
{ PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C825), 1 },
{ },
{ PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C621), .driver_data = 0 },
{ PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C825), .driver_data = 1 },
{ }
};
static struct pci_driver opti_pci_driver = {

View File

@ -100,14 +100,28 @@ static const struct pdc2027x_udma_timing {
};
static const struct pci_device_id pdc2027x_pci_tbl[] = {
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20268), PDC_UDMA_100 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20269), PDC_UDMA_133 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20270), PDC_UDMA_100 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20271), PDC_UDMA_133 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20275), PDC_UDMA_133 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20276), PDC_UDMA_133 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20277), PDC_UDMA_133 },
{
PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20268),
.driver_data = PDC_UDMA_100,
}, {
PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20269),
.driver_data = PDC_UDMA_133,
}, {
PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20270),
.driver_data = PDC_UDMA_100,
}, {
PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20271),
.driver_data = PDC_UDMA_133,
}, {
PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20275),
.driver_data = PDC_UDMA_133,
}, {
PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20276),
.driver_data = PDC_UDMA_133,
}, {
PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20277),
.driver_data = PDC_UDMA_133,
},
{ } /* terminate list */
};

View File

@ -362,13 +362,12 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
}
static const struct pci_device_id pdc202xx[] = {
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 1 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20265), 2 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20267), 2 },
{ },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), .driver_data = 0 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), .driver_data = 1 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), .driver_data = 1 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20265), .driver_data = 2 },
{ PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20267), .driver_data = 2 },
{ }
};
static struct pci_driver pdc202xx_pci_driver = {

View File

@ -42,7 +42,7 @@ static void sch_set_dmamode(struct ata_port *ap, struct ata_device *adev);
static const struct pci_device_id sch_pci_tbl[] = {
/* Intel SCH PATA Controller */
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_SCH_IDE), 0 },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_SCH_IDE) },
{ } /* terminate list */
};

View File

@ -467,13 +467,23 @@ static int serverworks_reinit_one(struct pci_dev *pdev)
#endif
static const struct pci_device_id serverworks[] = {
{ PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0},
{ PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 2},
{ PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2},
{ PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 2},
{ PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 2},
{ },
{
PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE),
.driver_data = 0,
}, {
PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE),
.driver_data = 2,
}, {
PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE),
.driver_data = 2,
}, {
PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2),
.driver_data = 2,
}, {
PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE),
.driver_data = 2
},
{ }
};
static struct pci_driver serverworks_pci_driver = {

View File

@ -891,7 +891,6 @@ static const struct pci_device_id sis_pci_tbl[] = {
{ PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */
{ PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */
{ PCI_VDEVICE(SI, 0x1180), }, /* SiS 1180 */
{ }
};

View File

@ -675,16 +675,15 @@ static int via_reinit_one(struct pci_dev *pdev)
#endif
static const struct pci_device_id via[] = {
{ PCI_VDEVICE(VIA, 0x0415), },
{ PCI_VDEVICE(VIA, 0x0571), },
{ PCI_VDEVICE(VIA, 0x0581), },
{ PCI_VDEVICE(VIA, 0x1571), },
{ PCI_VDEVICE(VIA, 0x3164), },
{ PCI_VDEVICE(VIA, 0x5324), },
{ PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE },
{ PCI_VDEVICE(VIA, 0x9001), VIA_IDFLAG_SINGLE },
{ },
{ PCI_VDEVICE(VIA, 0x0415), .driver_data = 0 },
{ PCI_VDEVICE(VIA, 0x0571), .driver_data = 0 },
{ PCI_VDEVICE(VIA, 0x0581), .driver_data = 0 },
{ PCI_VDEVICE(VIA, 0x1571), .driver_data = 0 },
{ PCI_VDEVICE(VIA, 0x3164), .driver_data = 0 },
{ PCI_VDEVICE(VIA, 0x5324), .driver_data = 0 },
{ PCI_VDEVICE(VIA, 0xC409), .driver_data = VIA_IDFLAG_SINGLE },
{ PCI_VDEVICE(VIA, 0x9001), .driver_data = VIA_IDFLAG_SINGLE },
{ }
};
static struct pci_driver via_pci_driver = {

View File

@ -157,8 +157,7 @@ static struct ata_port_info adma_port_info[] = {
};
static const struct pci_device_id adma_ata_pci_tbl[] = {
{ PCI_VDEVICE(PDC, 0x1841), board_1841_idx },
{ PCI_VDEVICE(PDC, 0x1841), .driver_data = board_1841_idx },
{ } /* terminate list */
};

View File

@ -1041,6 +1041,7 @@ static unsigned int sata_dwc_qc_issue(struct ata_queued_cmd *qc)
}
static void sata_dwc_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
ata_sff_error_handler(ap);
}

View File

@ -1035,6 +1035,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
}
static void sata_fsl_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
sata_pmp_error_handler(ap);
}

View File

@ -660,6 +660,7 @@ static int inic_hardreset(struct ata_link *link, unsigned int *class,
}
static void inic_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
void __iomem *port_base = inic_port_base(ap);

View File

@ -2398,6 +2398,7 @@ static struct ata_queued_cmd *mv_get_active_qc(struct ata_port *ap)
}
static void mv_pmp_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
unsigned int pmp, pmp_map;
struct mv_port_priv *pp = ap->private_data;
@ -4273,32 +4274,32 @@ static int mv_pci_device_resume(struct pci_dev *pdev);
#endif
static const struct pci_device_id mv_pci_tbl[] = {
{ PCI_VDEVICE(MARVELL, 0x5040), chip_504x },
{ PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
{ PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
{ PCI_VDEVICE(MARVELL, 0x5040), .driver_data = chip_504x },
{ PCI_VDEVICE(MARVELL, 0x5041), .driver_data = chip_504x },
{ PCI_VDEVICE(MARVELL, 0x5080), .driver_data = chip_5080 },
{ PCI_VDEVICE(MARVELL, 0x5081), .driver_data = chip_508x },
/* RocketRAID 1720/174x have different identifiers */
{ PCI_VDEVICE(TTI, 0x1720), chip_6042 },
{ PCI_VDEVICE(TTI, 0x1740), chip_6042 },
{ PCI_VDEVICE(TTI, 0x1742), chip_6042 },
{ PCI_VDEVICE(TTI, 0x1720), .driver_data = chip_6042 },
{ PCI_VDEVICE(TTI, 0x1740), .driver_data = chip_6042 },
{ PCI_VDEVICE(TTI, 0x1742), .driver_data = chip_6042 },
{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
{ PCI_VDEVICE(MARVELL, 0x6042), chip_6042 },
{ PCI_VDEVICE(MARVELL, 0x6080), chip_608x },
{ PCI_VDEVICE(MARVELL, 0x6081), chip_608x },
{ PCI_VDEVICE(MARVELL, 0x6040), .driver_data = chip_604x },
{ PCI_VDEVICE(MARVELL, 0x6041), .driver_data = chip_604x },
{ PCI_VDEVICE(MARVELL, 0x6042), .driver_data = chip_6042 },
{ PCI_VDEVICE(MARVELL, 0x6080), .driver_data = chip_608x },
{ PCI_VDEVICE(MARVELL, 0x6081), .driver_data = chip_608x },
{ PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
{ PCI_VDEVICE(ADAPTEC2, 0x0241), .driver_data = chip_604x },
/* Adaptec 1430SA */
{ PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
{ PCI_VDEVICE(ADAPTEC2, 0x0243), .driver_data = chip_7042 },
/* Marvell 7042 support */
{ PCI_VDEVICE(MARVELL, 0x7042), chip_7042 },
{ PCI_VDEVICE(MARVELL, 0x7042), .driver_data = chip_7042 },
/* Highpoint RocketRAID PCIe series */
{ PCI_VDEVICE(TTI, 0x2300), chip_7042 },
{ PCI_VDEVICE(TTI, 0x2310), chip_7042 },
{ PCI_VDEVICE(TTI, 0x2300), .driver_data = chip_7042 },
{ PCI_VDEVICE(TTI, 0x2310), .driver_data = chip_7042 },
{ } /* terminate list */
};

View File

@ -344,21 +344,49 @@ enum nv_host_type
};
static const struct pci_device_id nv_pci_tbl[] = {
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA), NFORCE2 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA), NFORCE3 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2), NFORCE3 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), MCP5x },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), MCP5x },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), MCP5x },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), MCP5x },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC },
{
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA),
.driver_data = NFORCE2,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA),
.driver_data = NFORCE3,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2),
.driver_data = NFORCE3,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA),
.driver_data = CK804,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2),
.driver_data = CK804,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA),
.driver_data = CK804,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2),
.driver_data = CK804,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA),
.driver_data = MCP5x,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2),
.driver_data = MCP5x,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA),
.driver_data = MCP5x,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2),
.driver_data = MCP5x,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA),
.driver_data = GENERIC,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2),
.driver_data = GENERIC,
}, {
PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3),
.driver_data = GENERIC,
},
{ } /* terminate list */
};
@ -1626,6 +1654,7 @@ static void nv_mcp55_thaw(struct ata_port *ap)
}
static void nv_adma_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct nv_adma_port_priv *pp = ap->private_data;
if (!(pp->flags & NV_ADMA_PORT_REGISTER_MODE)) {
@ -1795,6 +1824,7 @@ static void nv_swncq_ncq_stop(struct ata_port *ap)
}
static void nv_swncq_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct ata_eh_context *ehc = &ap->link.eh_context;

View File

@ -281,25 +281,25 @@ static const struct ata_port_info pdc_port_info[] = {
};
static const struct pci_device_id pdc_ata_pci_tbl[] = {
{ PCI_VDEVICE(PROMISE, 0x3371), board_2037x },
{ PCI_VDEVICE(PROMISE, 0x3373), board_2037x },
{ PCI_VDEVICE(PROMISE, 0x3375), board_2037x },
{ PCI_VDEVICE(PROMISE, 0x3376), board_2037x },
{ PCI_VDEVICE(PROMISE, 0x3570), board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3571), board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3574), board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3577), board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3d73), board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3d75), board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3371), .driver_data = board_2037x },
{ PCI_VDEVICE(PROMISE, 0x3373), .driver_data = board_2037x },
{ PCI_VDEVICE(PROMISE, 0x3375), .driver_data = board_2037x },
{ PCI_VDEVICE(PROMISE, 0x3376), .driver_data = board_2037x },
{ PCI_VDEVICE(PROMISE, 0x3570), .driver_data = board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3571), .driver_data = board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3574), .driver_data = board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3577), .driver_data = board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3d73), .driver_data = board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3d75), .driver_data = board_2057x },
{ PCI_VDEVICE(PROMISE, 0x3318), board_20319 },
{ PCI_VDEVICE(PROMISE, 0x3319), board_20319 },
{ PCI_VDEVICE(PROMISE, 0x3515), board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3519), board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3d17), board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3d18), board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3318), .driver_data = board_20319 },
{ PCI_VDEVICE(PROMISE, 0x3319), .driver_data = board_20319 },
{ PCI_VDEVICE(PROMISE, 0x3515), .driver_data = board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3519), .driver_data = board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3d17), .driver_data = board_40518 },
{ PCI_VDEVICE(PROMISE, 0x3d18), .driver_data = board_40518 },
{ PCI_VDEVICE(PROMISE, 0x6629), board_20619 },
{ PCI_VDEVICE(PROMISE, 0x6629), .driver_data = board_20619 },
{ } /* terminate list */
};
@ -816,6 +816,7 @@ static int pdc_sata_hardreset(struct ata_link *link, unsigned int *class,
}
static void pdc_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
if (!ata_port_is_frozen(ap))
pdc_reset_port(ap);

View File

@ -146,8 +146,7 @@ static const struct ata_port_info qs_port_info[] = {
};
static const struct pci_device_id qs_ata_pci_tbl[] = {
{ PCI_VDEVICE(PDC, 0x2068), board_2068_idx },
{ PCI_VDEVICE(PDC, 0x2068), .driver_data = board_2068_idx },
{ } /* terminate list */
};
@ -220,6 +219,7 @@ static int qs_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val)
}
static void qs_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
qs_enter_reg_mode(ap);
ata_sff_error_handler(ap);

View File

@ -112,14 +112,13 @@ static void sil_thaw(struct ata_port *ap);
static const struct pci_device_id sil_pci_tbl[] = {
{ PCI_VDEVICE(CMD, 0x3112), sil_3112 },
{ PCI_VDEVICE(CMD, 0x0240), sil_3112 },
{ PCI_VDEVICE(CMD, 0x3512), sil_3512 },
{ PCI_VDEVICE(CMD, 0x3114), sil_3114 },
{ PCI_VDEVICE(ATI, 0x436e), sil_3112 },
{ PCI_VDEVICE(ATI, 0x4379), sil_3112_no_sata_irq },
{ PCI_VDEVICE(ATI, 0x437a), sil_3112_no_sata_irq },
{ PCI_VDEVICE(CMD, 0x3112), .driver_data = sil_3112 },
{ PCI_VDEVICE(CMD, 0x0240), .driver_data = sil_3112 },
{ PCI_VDEVICE(CMD, 0x3512), .driver_data = sil_3512 },
{ PCI_VDEVICE(CMD, 0x3114), .driver_data = sil_3114 },
{ PCI_VDEVICE(ATI, 0x436e), .driver_data = sil_3112 },
{ PCI_VDEVICE(ATI, 0x4379), .driver_data = sil_3112_no_sata_irq },
{ PCI_VDEVICE(ATI, 0x437a), .driver_data = sil_3112_no_sata_irq },
{ } /* terminate list */
};

View File

@ -351,14 +351,13 @@ static int sil24_port_resume(struct ata_port *ap);
#endif
static const struct pci_device_id sil24_pci_tbl[] = {
{ PCI_VDEVICE(CMD, 0x3124), BID_SIL3124 },
{ PCI_VDEVICE(INTEL, 0x3124), BID_SIL3124 },
{ PCI_VDEVICE(CMD, 0x3132), BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x0242), BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x0244), BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x3131), BID_SIL3131 },
{ PCI_VDEVICE(CMD, 0x3531), BID_SIL3131 },
{ PCI_VDEVICE(CMD, 0x3124), .driver_data = BID_SIL3124 },
{ PCI_VDEVICE(INTEL, 0x3124), .driver_data = BID_SIL3124 },
{ PCI_VDEVICE(CMD, 0x3132), .driver_data = BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x0242), .driver_data = BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x0244), .driver_data = BID_SIL3132 },
{ PCI_VDEVICE(CMD, 0x3131), .driver_data = BID_SIL3131 },
{ PCI_VDEVICE(CMD, 0x3531), .driver_data = BID_SIL3131 },
{ } /* terminate list */
};
@ -1171,6 +1170,7 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance)
}
static void sil24_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct sil24_port_priv *pp = ap->private_data;

View File

@ -51,13 +51,31 @@ static int sis_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
static int sis_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
static const struct pci_device_id sis_pci_tbl[] = {
{ PCI_VDEVICE(SI, 0x0180), sis_180 }, /* SiS 964/180 */
{ PCI_VDEVICE(SI, 0x0181), sis_180 }, /* SiS 964/180 */
{ PCI_VDEVICE(SI, 0x0182), sis_180 }, /* SiS 965/965L */
{ PCI_VDEVICE(SI, 0x0183), sis_180 }, /* SiS 965/965L */
{ PCI_VDEVICE(SI, 0x1182), sis_180 }, /* SiS 966/680 */
{ PCI_VDEVICE(SI, 0x1183), sis_180 }, /* SiS 966/966L/968/680 */
{
/* SiS 964/180 */
PCI_VDEVICE(SI, 0x0180),
.driver_data = sis_180,
}, {
/* SiS 964/180 */
PCI_VDEVICE(SI, 0x0181),
.driver_data = sis_180,
}, {
/* SiS 965/965L */
PCI_VDEVICE(SI, 0x0182),
.driver_data = sis_180,
}, {
/* SiS 965/965L */
PCI_VDEVICE(SI, 0x0183),
.driver_data = sis_180,
}, {
/* SiS 966/680 */
PCI_VDEVICE(SI, 0x1182),
.driver_data = sis_180,
}, {
/* SiS 966/966L/968/680 */
PCI_VDEVICE(SI, 0x1183),
.driver_data = sis_180,
},
{ } /* terminate list */
};

View File

@ -500,14 +500,13 @@ static int k2_sata_init_one(struct pci_dev *pdev, const struct pci_device_id *en
* controller
* */
static const struct pci_device_id k2_sata_pci_tbl[] = {
{ PCI_VDEVICE(SERVERWORKS, 0x0240), chip_svw4 },
{ PCI_VDEVICE(SERVERWORKS, 0x0241), chip_svw8 },
{ PCI_VDEVICE(SERVERWORKS, 0x0242), chip_svw4 },
{ PCI_VDEVICE(SERVERWORKS, 0x024a), chip_svw4 },
{ PCI_VDEVICE(SERVERWORKS, 0x024b), chip_svw4 },
{ PCI_VDEVICE(SERVERWORKS, 0x0410), chip_svw42 },
{ PCI_VDEVICE(SERVERWORKS, 0x0411), chip_svw43 },
{ PCI_VDEVICE(SERVERWORKS, 0x0240), .driver_data = chip_svw4 },
{ PCI_VDEVICE(SERVERWORKS, 0x0241), .driver_data = chip_svw8 },
{ PCI_VDEVICE(SERVERWORKS, 0x0242), .driver_data = chip_svw4 },
{ PCI_VDEVICE(SERVERWORKS, 0x024a), .driver_data = chip_svw4 },
{ PCI_VDEVICE(SERVERWORKS, 0x024b), .driver_data = chip_svw4 },
{ PCI_VDEVICE(SERVERWORKS, 0x0410), .driver_data = chip_svw42 },
{ PCI_VDEVICE(SERVERWORKS, 0x0411), .driver_data = chip_svw43 },
{ }
};

View File

@ -267,8 +267,7 @@ static const struct ata_port_info pdc_port_info[] = {
};
static const struct pci_device_id pdc_sata_pci_tbl[] = {
{ PCI_VDEVICE(PROMISE, 0x6622), board_20621 },
{ PCI_VDEVICE(PROMISE, 0x6622), .driver_data = board_20621 },
{ } /* terminate list */
};
@ -853,6 +852,7 @@ static int pdc_softreset(struct ata_link *link, unsigned int *class,
}
static void pdc_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
if (!ata_port_is_frozen(ap))
pdc_reset_port(ap);

View File

@ -45,10 +45,9 @@ static int uli_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
static int uli_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
static const struct pci_device_id uli_pci_tbl[] = {
{ PCI_VDEVICE(AL, 0x5289), uli_5289 },
{ PCI_VDEVICE(AL, 0x5287), uli_5287 },
{ PCI_VDEVICE(AL, 0x5281), uli_5281 },
{ PCI_VDEVICE(AL, 0x5289), .driver_data = uli_5289 },
{ PCI_VDEVICE(AL, 0x5287), .driver_data = uli_5287 },
{ PCI_VDEVICE(AL, 0x5281), .driver_data = uli_5281 },
{ } /* terminate list */
};

View File

@ -85,15 +85,35 @@ static void vt6421_set_dma_mode(struct ata_port *ap, struct ata_device *adev);
static void vt6421_error_handler(struct ata_port *ap);
static const struct pci_device_id svia_pci_tbl[] = {
{ PCI_VDEVICE(VIA, 0x5337), vt6420 },
{ PCI_VDEVICE(VIA, 0x0591), vt6420 }, /* 2 sata chnls (Master) */
{ PCI_VDEVICE(VIA, 0x3149), vt6420 }, /* 2 sata chnls (Master) */
{ PCI_VDEVICE(VIA, 0x3249), vt6421 }, /* 2 sata chnls, 1 pata chnl */
{ PCI_VDEVICE(VIA, 0x5372), vt6420 },
{ PCI_VDEVICE(VIA, 0x7372), vt6420 },
{ PCI_VDEVICE(VIA, 0x5287), vt8251 }, /* 2 sata chnls (Master/Slave) */
{ PCI_VDEVICE(VIA, 0x9000), vt8251 },
{
PCI_VDEVICE(VIA, 0x5337),
.driver_data = vt6420,
}, {
/* 2 sata chnls (Master) */
PCI_VDEVICE(VIA, 0x0591),
.driver_data = vt6420,
}, {
/* 2 sata chnls (Master) */
PCI_VDEVICE(VIA, 0x3149),
.driver_data = vt6420,
}, {
/* 2 sata chnls, 1 pata chnl */
PCI_VDEVICE(VIA, 0x3249),
.driver_data = vt6421,
}, {
PCI_VDEVICE(VIA, 0x5372),
.driver_data = vt6420,
}, {
PCI_VDEVICE(VIA, 0x7372),
.driver_data = vt6420,
}, {
/* 2 sata chnls (Master/Slave) */
PCI_VDEVICE(VIA, 0x5287),
.driver_data = vt8251,
}, {
PCI_VDEVICE(VIA, 0x9000),
.driver_data = vt8251,
},
{ } /* terminate list */
};
@ -573,6 +593,7 @@ static irqreturn_t vt642x_interrupt(int irq, void *dev_instance)
}
static void vt6421_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex)
{
struct svia_priv *hpriv = ap->host->private_data;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);

View File

@ -400,11 +400,15 @@ static int vsc_sata_init_one(struct pci_dev *pdev,
}
static const struct pci_device_id vsc_sata_pci_tbl[] = {
{ PCI_VENDOR_ID_VITESSE, 0x7174,
PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
{ PCI_VENDOR_ID_INTEL, 0x3200,
PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
{
PCI_DEVICE(PCI_VENDOR_ID_VITESSE, 0x7174),
.class = 0x10600,
.class_mask = 0xFFFFFF,
}, {
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x3200),
.class = 0x10600,
.class_mask = 0xFFFFFF,
},
{ } /* terminate list */
};

View File

@ -984,7 +984,8 @@ struct ata_port_operations {
void (*thaw)(struct ata_port *ap);
struct ata_reset_operations reset;
struct ata_reset_operations pmp_reset;
void (*error_handler)(struct ata_port *ap);
void (*error_handler)(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex);
void (*lost_interrupt)(struct ata_port *ap);
void (*post_internal_cmd)(struct ata_queued_cmd *qc);
void (*sched_eh)(struct ata_port *ap);
@ -1314,7 +1315,8 @@ extern int ata_tport_add(struct device *parent, struct ata_port *ap);
extern void ata_tport_delete(struct ata_port *ap);
int ata_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim,
struct ata_port *ap);
extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);
extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap)
__must_hold(ap->lock);
extern void ata_tf_to_fis(const struct ata_taskfile *tf,
u8 pmp, int is_cmd, u8 *fis);
extern void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf);
@ -1419,7 +1421,8 @@ extern void ata_eh_thaw_port(struct ata_port *ap);
extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
extern void ata_std_error_handler(struct ata_port *ap);
extern void ata_std_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex);
extern void ata_std_sched_eh(struct ata_port *ap);
extern void ata_std_end_eh(struct ata_port *ap);
extern int ata_link_nr_enabled(struct ata_link *link);
@ -1999,7 +2002,8 @@ extern void ata_timing_merge(const struct ata_timing *,
extern const struct ata_port_operations sata_pmp_port_ops;
extern int sata_pmp_qc_defer_cmd_switch(struct ata_queued_cmd *qc);
extern void sata_pmp_error_handler(struct ata_port *ap);
extern void sata_pmp_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex);
#else /* CONFIG_SATA_PMP */
@ -2063,7 +2067,8 @@ extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline);
extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes);
extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc);
extern void ata_sff_error_handler(struct ata_port *ap);
extern void ata_sff_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex);
extern void ata_sff_std_ports(struct ata_ioports *ioaddr);
#ifdef CONFIG_PCI
extern int ata_pci_sff_init_host(struct ata_host *host);
@ -2093,7 +2098,8 @@ extern enum ata_completion_errors ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *
extern unsigned int ata_bmdma_port_intr(struct ata_port *ap,
struct ata_queued_cmd *qc);
extern irqreturn_t ata_bmdma_interrupt(int irq, void *dev_instance);
extern void ata_bmdma_error_handler(struct ata_port *ap);
extern void ata_bmdma_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex);
extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc);
extern void ata_bmdma_irq_clear(struct ata_port *ap);
extern void ata_bmdma_setup(struct ata_queued_cmd *qc);