mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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:
+1
-1
@@ -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
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
CONTEXT_ANALYSIS := y
|
||||
|
||||
obj-$(CONFIG_ATA) += libata.o
|
||||
|
||||
# non-SFF interface
|
||||
|
||||
@@ -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 */
|
||||
};
|
||||
|
||||
|
||||
+1299
-349
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
+356
-176
File diff suppressed because it is too large
Load Diff
@@ -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,
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 @@ free_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 @@ free_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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
+14
-7
@@ -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 *),
|
||||
|
||||
@@ -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 */
|
||||
};
|
||||
|
||||
|
||||
+65
-23
@@ -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 = {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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 */
|
||||
};
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user