Merge branch 'pci/stephen-const' into next
* pci/stephen-const: make drivers with pci error handlers const scsi: make pci error handlers const netdev: make pci_error_handlers const PCI: Make pci_error_handlers const
This commit is contained in:
Коммит
1959ec5f82
|
@ -1675,7 +1675,7 @@ static void __devexit nvme_remove(struct pci_dev *pdev)
|
|||
#define nvme_suspend NULL
|
||||
#define nvme_resume NULL
|
||||
|
||||
static struct pci_error_handlers nvme_err_handler = {
|
||||
static const struct pci_error_handlers nvme_err_handler = {
|
||||
.error_detected = nvme_error_detected,
|
||||
.mmio_enabled = nvme_dump_registers,
|
||||
.link_reset = nvme_link_reset,
|
||||
|
|
|
@ -87,7 +87,7 @@ struct qlogic_ib_stats {
|
|||
};
|
||||
|
||||
extern struct qlogic_ib_stats qib_stats;
|
||||
extern struct pci_error_handlers qib_pci_err_handler;
|
||||
extern const struct pci_error_handlers qib_pci_err_handler;
|
||||
extern struct pci_driver qib_driver;
|
||||
|
||||
#define QIB_CHIP_SWVERSION QIB_CHIP_VERS_MAJ
|
||||
|
|
|
@ -745,7 +745,7 @@ qib_pci_resume(struct pci_dev *pdev)
|
|||
qib_init(dd, 1); /* same as re-init after reset */
|
||||
}
|
||||
|
||||
struct pci_error_handlers qib_pci_err_handler = {
|
||||
const struct pci_error_handlers qib_pci_err_handler = {
|
||||
.error_detected = qib_pci_error_detected,
|
||||
.mmio_enabled = qib_pci_mmio_enabled,
|
||||
.link_reset = qib_pci_link_reset,
|
||||
|
|
|
@ -524,7 +524,7 @@ static void ngene_resume(struct pci_dev *dev)
|
|||
printk(KERN_INFO DEVICE_NAME ": resume\n");
|
||||
}
|
||||
|
||||
static struct pci_error_handlers ngene_errors = {
|
||||
static const struct pci_error_handlers ngene_errors = {
|
||||
.error_detected = ngene_error_detected,
|
||||
.link_reset = ngene_link_reset,
|
||||
.slot_reset = ngene_slot_reset,
|
||||
|
|
|
@ -2685,7 +2685,7 @@ static void atl1c_io_resume(struct pci_dev *pdev)
|
|||
netif_device_attach(netdev);
|
||||
}
|
||||
|
||||
static struct pci_error_handlers atl1c_err_handler = {
|
||||
static const struct pci_error_handlers atl1c_err_handler = {
|
||||
.error_detected = atl1c_io_error_detected,
|
||||
.slot_reset = atl1c_io_slot_reset,
|
||||
.resume = atl1c_io_resume,
|
||||
|
|
|
@ -2489,7 +2489,7 @@ static void atl1e_io_resume(struct pci_dev *pdev)
|
|||
netif_device_attach(netdev);
|
||||
}
|
||||
|
||||
static struct pci_error_handlers atl1e_err_handler = {
|
||||
static const struct pci_error_handlers atl1e_err_handler = {
|
||||
.error_detected = atl1e_io_error_detected,
|
||||
.slot_reset = atl1e_io_slot_reset,
|
||||
.resume = atl1e_io_resume,
|
||||
|
|
|
@ -8742,7 +8742,7 @@ static void bnx2_io_resume(struct pci_dev *pdev)
|
|||
rtnl_unlock();
|
||||
}
|
||||
|
||||
static struct pci_error_handlers bnx2_err_handler = {
|
||||
static const struct pci_error_handlers bnx2_err_handler = {
|
||||
.error_detected = bnx2_io_error_detected,
|
||||
.slot_reset = bnx2_io_slot_reset,
|
||||
.resume = bnx2_io_resume,
|
||||
|
|
|
@ -12156,7 +12156,7 @@ static void bnx2x_io_resume(struct pci_dev *pdev)
|
|||
rtnl_unlock();
|
||||
}
|
||||
|
||||
static struct pci_error_handlers bnx2x_err_handler = {
|
||||
static const struct pci_error_handlers bnx2x_err_handler = {
|
||||
.error_detected = bnx2x_io_error_detected,
|
||||
.slot_reset = bnx2x_io_slot_reset,
|
||||
.resume = bnx2x_io_resume,
|
||||
|
|
|
@ -16373,7 +16373,7 @@ done:
|
|||
rtnl_unlock();
|
||||
}
|
||||
|
||||
static struct pci_error_handlers tg3_err_handler = {
|
||||
static const struct pci_error_handlers tg3_err_handler = {
|
||||
.error_detected = tg3_io_error_detected,
|
||||
.slot_reset = tg3_io_slot_reset,
|
||||
.resume = tg3_io_resume
|
||||
|
|
|
@ -3036,7 +3036,7 @@ static void t3_io_resume(struct pci_dev *pdev)
|
|||
t3_resume_ports(adapter);
|
||||
}
|
||||
|
||||
static struct pci_error_handlers t3_err_handler = {
|
||||
static const struct pci_error_handlers t3_err_handler = {
|
||||
.error_detected = t3_io_error_detected,
|
||||
.slot_reset = t3_io_slot_reset,
|
||||
.resume = t3_io_resume,
|
||||
|
|
|
@ -3453,7 +3453,7 @@ static void eeh_resume(struct pci_dev *pdev)
|
|||
rtnl_unlock();
|
||||
}
|
||||
|
||||
static struct pci_error_handlers cxgb4_eeh = {
|
||||
static const struct pci_error_handlers cxgb4_eeh = {
|
||||
.error_detected = eeh_err_detected,
|
||||
.slot_reset = eeh_slot_reset,
|
||||
.resume = eeh_resume,
|
||||
|
|
|
@ -4104,7 +4104,7 @@ err:
|
|||
dev_err(&adapter->pdev->dev, "EEH resume failed\n");
|
||||
}
|
||||
|
||||
static struct pci_error_handlers be_eeh_handlers = {
|
||||
static const struct pci_error_handlers be_eeh_handlers = {
|
||||
.error_detected = be_eeh_err_detected,
|
||||
.slot_reset = be_eeh_reset,
|
||||
.resume = be_eeh_resume,
|
||||
|
|
|
@ -3157,7 +3157,7 @@ static void e100_io_resume(struct pci_dev *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
static struct pci_error_handlers e100_err_handler = {
|
||||
static const struct pci_error_handlers e100_err_handler = {
|
||||
.error_detected = e100_io_error_detected,
|
||||
.slot_reset = e100_io_slot_reset,
|
||||
.resume = e100_io_resume,
|
||||
|
|
|
@ -192,7 +192,7 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
|
|||
static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev);
|
||||
static void e1000_io_resume(struct pci_dev *pdev);
|
||||
|
||||
static struct pci_error_handlers e1000_err_handler = {
|
||||
static const struct pci_error_handlers e1000_err_handler = {
|
||||
.error_detected = e1000_io_error_detected,
|
||||
.slot_reset = e1000_io_slot_reset,
|
||||
.resume = e1000_io_resume,
|
||||
|
|
|
@ -6461,7 +6461,7 @@ static void __devexit e1000_remove(struct pci_dev *pdev)
|
|||
}
|
||||
|
||||
/* PCI Error Recovery (ERS) */
|
||||
static struct pci_error_handlers e1000_err_handler = {
|
||||
static const struct pci_error_handlers e1000_err_handler = {
|
||||
.error_detected = e1000_io_error_detected,
|
||||
.slot_reset = e1000_io_slot_reset,
|
||||
.resume = e1000_io_resume,
|
||||
|
|
|
@ -217,7 +217,7 @@ static pci_ers_result_t igb_io_error_detected(struct pci_dev *,
|
|||
static pci_ers_result_t igb_io_slot_reset(struct pci_dev *);
|
||||
static void igb_io_resume(struct pci_dev *);
|
||||
|
||||
static struct pci_error_handlers igb_err_handler = {
|
||||
static const struct pci_error_handlers igb_err_handler = {
|
||||
.error_detected = igb_io_error_detected,
|
||||
.slot_reset = igb_io_slot_reset,
|
||||
.resume = igb_io_resume,
|
||||
|
|
|
@ -2833,7 +2833,7 @@ static void __devexit igbvf_remove(struct pci_dev *pdev)
|
|||
}
|
||||
|
||||
/* PCI Error Recovery (ERS) */
|
||||
static struct pci_error_handlers igbvf_err_handler = {
|
||||
static const struct pci_error_handlers igbvf_err_handler = {
|
||||
.error_detected = igbvf_io_error_detected,
|
||||
.slot_reset = igbvf_io_slot_reset,
|
||||
.resume = igbvf_io_resume,
|
||||
|
|
|
@ -115,7 +115,7 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev,
|
|||
static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev);
|
||||
static void ixgb_io_resume (struct pci_dev *pdev);
|
||||
|
||||
static struct pci_error_handlers ixgb_err_handler = {
|
||||
static const struct pci_error_handlers ixgb_err_handler = {
|
||||
.error_detected = ixgb_io_error_detected,
|
||||
.slot_reset = ixgb_io_slot_reset,
|
||||
.resume = ixgb_io_resume,
|
||||
|
|
|
@ -7677,7 +7677,7 @@ static void ixgbe_io_resume(struct pci_dev *pdev)
|
|||
netif_device_attach(netdev);
|
||||
}
|
||||
|
||||
static struct pci_error_handlers ixgbe_err_handler = {
|
||||
static const struct pci_error_handlers ixgbe_err_handler = {
|
||||
.error_detected = ixgbe_io_error_detected,
|
||||
.slot_reset = ixgbe_io_slot_reset,
|
||||
.resume = ixgbe_io_resume,
|
||||
|
|
|
@ -3256,7 +3256,7 @@ static void ixgbevf_io_resume(struct pci_dev *pdev)
|
|||
}
|
||||
|
||||
/* PCI Error Recovery (ERS) */
|
||||
static struct pci_error_handlers ixgbevf_err_handler = {
|
||||
static const struct pci_error_handlers ixgbevf_err_handler = {
|
||||
.error_detected = ixgbevf_io_error_detected,
|
||||
.slot_reset = ixgbevf_io_slot_reset,
|
||||
.resume = ixgbevf_io_resume,
|
||||
|
|
|
@ -2301,7 +2301,7 @@ static pci_ers_result_t mlx4_pci_slot_reset(struct pci_dev *pdev)
|
|||
return ret ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED;
|
||||
}
|
||||
|
||||
static struct pci_error_handlers mlx4_err_handler = {
|
||||
static const struct pci_error_handlers mlx4_err_handler = {
|
||||
.error_detected = mlx4_pci_err_detected,
|
||||
.slot_reset = mlx4_pci_slot_reset,
|
||||
};
|
||||
|
|
|
@ -484,7 +484,7 @@ static DEFINE_PCI_DEVICE_TABLE(s2io_tbl) = {
|
|||
|
||||
MODULE_DEVICE_TABLE(pci, s2io_tbl);
|
||||
|
||||
static struct pci_error_handlers s2io_err_handler = {
|
||||
static const struct pci_error_handlers s2io_err_handler = {
|
||||
.error_detected = s2io_io_error_detected,
|
||||
.slot_reset = s2io_io_slot_reset,
|
||||
.resume = s2io_io_resume,
|
||||
|
|
|
@ -4799,7 +4799,7 @@ static void __devexit vxge_remove(struct pci_dev *pdev)
|
|||
__LINE__);
|
||||
}
|
||||
|
||||
static struct pci_error_handlers vxge_err_handler = {
|
||||
static const struct pci_error_handlers vxge_err_handler = {
|
||||
.error_detected = vxge_io_error_detected,
|
||||
.slot_reset = vxge_io_slot_reset,
|
||||
.resume = vxge_io_resume,
|
||||
|
|
|
@ -2795,7 +2795,7 @@ static const struct dev_pm_ops pch_gbe_pm_ops = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static struct pci_error_handlers pch_gbe_err_handler = {
|
||||
static const struct pci_error_handlers pch_gbe_err_handler = {
|
||||
.error_detected = pch_gbe_io_error_detected,
|
||||
.slot_reset = pch_gbe_io_slot_reset,
|
||||
.resume = pch_gbe_io_resume
|
||||
|
|
|
@ -3336,7 +3336,7 @@ netxen_free_vlan_ip_list(struct netxen_adapter *adapter)
|
|||
{ }
|
||||
#endif
|
||||
|
||||
static struct pci_error_handlers netxen_err_handler = {
|
||||
static const struct pci_error_handlers netxen_err_handler = {
|
||||
.error_detected = netxen_io_error_detected,
|
||||
.slot_reset = netxen_io_slot_reset,
|
||||
.resume = netxen_io_resume,
|
||||
|
|
|
@ -4522,7 +4522,7 @@ static void
|
|||
qlcnic_restore_indev_addr(struct net_device *dev, unsigned long event)
|
||||
{ }
|
||||
#endif
|
||||
static struct pci_error_handlers qlcnic_err_handler = {
|
||||
static const struct pci_error_handlers qlcnic_err_handler = {
|
||||
.error_detected = qlcnic_io_error_detected,
|
||||
.slot_reset = qlcnic_io_slot_reset,
|
||||
.resume = qlcnic_io_resume,
|
||||
|
|
|
@ -4847,7 +4847,7 @@ static void qlge_io_resume(struct pci_dev *pdev)
|
|||
netif_device_attach(ndev);
|
||||
}
|
||||
|
||||
static struct pci_error_handlers qlge_err_handler = {
|
||||
static const struct pci_error_handlers qlge_err_handler = {
|
||||
.error_detected = qlge_io_error_detected,
|
||||
.slot_reset = qlge_io_slot_reset,
|
||||
.resume = qlge_io_resume,
|
||||
|
|
|
@ -48,7 +48,7 @@ static pci_ers_result_t aer_error_detected(struct pci_dev *dev,
|
|||
static void aer_error_resume(struct pci_dev *dev);
|
||||
static pci_ers_result_t aer_root_reset(struct pci_dev *dev);
|
||||
|
||||
static struct pci_error_handlers aer_error_handlers = {
|
||||
static const struct pci_error_handlers aer_error_handlers = {
|
||||
.error_detected = aer_error_detected,
|
||||
.resume = aer_error_resume,
|
||||
};
|
||||
|
|
|
@ -209,7 +209,7 @@ static bool find_source_device(struct pci_dev *parent,
|
|||
static int report_error_detected(struct pci_dev *dev, void *data)
|
||||
{
|
||||
pci_ers_result_t vote;
|
||||
struct pci_error_handlers *err_handler;
|
||||
const struct pci_error_handlers *err_handler;
|
||||
struct aer_broadcast_data *result_data;
|
||||
result_data = (struct aer_broadcast_data *) data;
|
||||
|
||||
|
@ -243,7 +243,7 @@ static int report_error_detected(struct pci_dev *dev, void *data)
|
|||
static int report_mmio_enabled(struct pci_dev *dev, void *data)
|
||||
{
|
||||
pci_ers_result_t vote;
|
||||
struct pci_error_handlers *err_handler;
|
||||
const struct pci_error_handlers *err_handler;
|
||||
struct aer_broadcast_data *result_data;
|
||||
result_data = (struct aer_broadcast_data *) data;
|
||||
|
||||
|
@ -261,7 +261,7 @@ static int report_mmio_enabled(struct pci_dev *dev, void *data)
|
|||
static int report_slot_reset(struct pci_dev *dev, void *data)
|
||||
{
|
||||
pci_ers_result_t vote;
|
||||
struct pci_error_handlers *err_handler;
|
||||
const struct pci_error_handlers *err_handler;
|
||||
struct aer_broadcast_data *result_data;
|
||||
result_data = (struct aer_broadcast_data *) data;
|
||||
|
||||
|
@ -278,7 +278,7 @@ static int report_slot_reset(struct pci_dev *dev, void *data)
|
|||
|
||||
static int report_resume(struct pci_dev *dev, void *data)
|
||||
{
|
||||
struct pci_error_handlers *err_handler;
|
||||
const struct pci_error_handlers *err_handler;
|
||||
|
||||
dev->error_state = pci_channel_io_normal;
|
||||
|
||||
|
|
|
@ -364,11 +364,11 @@ static const struct pci_device_id port_pci_ids[] = { {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(pci, port_pci_ids);
|
||||
|
||||
static struct pci_error_handlers pcie_portdrv_err_handler = {
|
||||
.error_detected = pcie_portdrv_error_detected,
|
||||
.mmio_enabled = pcie_portdrv_mmio_enabled,
|
||||
.slot_reset = pcie_portdrv_slot_reset,
|
||||
.resume = pcie_portdrv_err_resume,
|
||||
static const struct pci_error_handlers pcie_portdrv_err_handler = {
|
||||
.error_detected = pcie_portdrv_error_detected,
|
||||
.mmio_enabled = pcie_portdrv_mmio_enabled,
|
||||
.slot_reset = pcie_portdrv_slot_reset,
|
||||
.resume = pcie_portdrv_err_resume,
|
||||
};
|
||||
|
||||
static struct pci_driver pcie_portdriver = {
|
||||
|
|
|
@ -9228,7 +9228,7 @@ static struct pci_device_id ipr_pci_table[] __devinitdata = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(pci, ipr_pci_table);
|
||||
|
||||
static struct pci_error_handlers ipr_err_handler = {
|
||||
static const struct pci_error_handlers ipr_err_handler = {
|
||||
.error_detected = ipr_pci_error_detected,
|
||||
.slot_reset = ipr_pci_slot_reset,
|
||||
};
|
||||
|
|
|
@ -10425,7 +10425,7 @@ static struct pci_device_id lpfc_id_table[] = {
|
|||
|
||||
MODULE_DEVICE_TABLE(pci, lpfc_id_table);
|
||||
|
||||
static struct pci_error_handlers lpfc_err_handler = {
|
||||
static const struct pci_error_handlers lpfc_err_handler = {
|
||||
.error_detected = lpfc_io_error_detected,
|
||||
.slot_reset = lpfc_io_slot_reset,
|
||||
.resume = lpfc_io_resume,
|
||||
|
|
|
@ -8306,7 +8306,7 @@ _scsih_pci_mmio_enabled(struct pci_dev *pdev)
|
|||
return PCI_ERS_RESULT_NEED_RESET;
|
||||
}
|
||||
|
||||
static struct pci_error_handlers _scsih_err_handler = {
|
||||
static const struct pci_error_handlers _scsih_err_handler = {
|
||||
.error_detected = _scsih_pci_error_detected,
|
||||
.mmio_enabled = _scsih_pci_mmio_enabled,
|
||||
.slot_reset = _scsih_pci_slot_reset,
|
||||
|
|
|
@ -4471,7 +4471,7 @@ qla2xxx_pci_resume(struct pci_dev *pdev)
|
|||
ha->flags.eeh_busy = 0;
|
||||
}
|
||||
|
||||
static struct pci_error_handlers qla2xxx_err_handler = {
|
||||
static const struct pci_error_handlers qla2xxx_err_handler = {
|
||||
.error_detected = qla2xxx_pci_error_detected,
|
||||
.mmio_enabled = qla2xxx_pci_mmio_enabled,
|
||||
.slot_reset = qla2xxx_pci_slot_reset,
|
||||
|
|
|
@ -6148,7 +6148,7 @@ qla4xxx_pci_resume(struct pci_dev *pdev)
|
|||
clear_bit(AF_EEH_BUSY, &ha->flags);
|
||||
}
|
||||
|
||||
static struct pci_error_handlers qla4xxx_err_handler = {
|
||||
static const struct pci_error_handlers qla4xxx_err_handler = {
|
||||
.error_detected = qla4xxx_pci_error_detected,
|
||||
.mmio_enabled = qla4xxx_pci_mmio_enabled,
|
||||
.slot_reset = qla4xxx_pci_slot_reset,
|
||||
|
|
|
@ -2117,7 +2117,7 @@ static struct pci_device_id sym2_id_table[] __devinitdata = {
|
|||
|
||||
MODULE_DEVICE_TABLE(pci, sym2_id_table);
|
||||
|
||||
static struct pci_error_handlers sym2_err_handler = {
|
||||
static const struct pci_error_handlers sym2_err_handler = {
|
||||
.error_detected = sym2_io_error_detected,
|
||||
.mmio_enabled = sym2_io_slot_dump,
|
||||
.slot_reset = sym2_io_slot_reset,
|
||||
|
|
|
@ -4236,7 +4236,7 @@ static void serial8250_io_resume(struct pci_dev *dev)
|
|||
pciserial_resume_ports(priv);
|
||||
}
|
||||
|
||||
static struct pci_error_handlers serial8250_err_handler = {
|
||||
static const struct pci_error_handlers serial8250_err_handler = {
|
||||
.error_detected = serial8250_io_error_detected,
|
||||
.slot_reset = serial8250_io_slot_reset,
|
||||
.resume = serial8250_io_resume,
|
||||
|
|
|
@ -54,7 +54,7 @@ static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev,
|
|||
static pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev);
|
||||
static void jsm_io_resume(struct pci_dev *pdev);
|
||||
|
||||
static struct pci_error_handlers jsm_err_handler = {
|
||||
static const struct pci_error_handlers jsm_err_handler = {
|
||||
.error_detected = jsm_io_error_detected,
|
||||
.slot_reset = jsm_io_slot_reset,
|
||||
.resume = jsm_io_resume,
|
||||
|
|
|
@ -871,7 +871,7 @@ end:
|
|||
}
|
||||
|
||||
/*add xen_pcibk AER handling*/
|
||||
static struct pci_error_handlers xen_pcibk_error_handler = {
|
||||
static const struct pci_error_handlers xen_pcibk_error_handler = {
|
||||
.error_detected = xen_pcibk_error_detected,
|
||||
.mmio_enabled = xen_pcibk_mmio_enabled,
|
||||
.slot_reset = xen_pcibk_slot_reset,
|
||||
|
|
|
@ -595,7 +595,7 @@ struct pci_driver {
|
|||
int (*resume_early) (struct pci_dev *dev);
|
||||
int (*resume) (struct pci_dev *dev); /* Device woken up */
|
||||
void (*shutdown) (struct pci_dev *dev);
|
||||
struct pci_error_handlers *err_handler;
|
||||
const struct pci_error_handlers *err_handler;
|
||||
struct device_driver driver;
|
||||
struct pci_dynids dynids;
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@ struct pcie_port_service_driver {
|
|||
int (*resume) (struct pcie_device *dev);
|
||||
|
||||
/* Service Error Recovery Handler */
|
||||
struct pci_error_handlers *err_handler;
|
||||
const struct pci_error_handlers *err_handler;
|
||||
|
||||
/* Link Reset Capability - AER service driver specific */
|
||||
pci_ers_result_t (*reset_link) (struct pci_dev *dev);
|
||||
|
|
Загрузка…
Ссылка в новой задаче