Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13810
b: refs/heads/master
c: a8a2be9
h: refs/heads/master
v: v3
  • Loading branch information
rajesh.shah@intel.com authored and Greg Kroah-Hartman committed Nov 11, 2005
1 parent 8165fad commit 3523e04
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 994 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71b720c0f96145f5868c87591c286b290bc1a6af
refs/heads/master: a8a2be949267cb0d1d933a92d9fb43eda4f4fe88
11 changes: 11 additions & 0 deletions trunk/drivers/pci/hotplug/pciehp.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ extern int pciehp_debug;
#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)

struct hotplug_params {
u8 cache_line_size;
u8 latency_timer;
u8 enable_serr;
u8 enable_perr;
};

struct pci_func {
struct pci_func *next;
u8 bus;
Expand Down Expand Up @@ -199,6 +206,10 @@ extern int pciehp_save_config (struct controller *ctrl, int busnumber, int num
extern int pciehp_save_slot_config (struct controller *ctrl, struct pci_func * new_slot);
extern int pciehp_configure_device (struct slot *ctrl);
extern int pciehp_unconfigure_device (struct pci_func* func);
extern int get_hp_hw_control_from_firmware(struct pci_dev *dev);
extern void get_hp_params_from_firmware(struct pci_dev *dev,
struct hotplug_params *hpp);



/* Global variables */
Expand Down
20 changes: 6 additions & 14 deletions trunk/drivers/pci/hotplug/pciehp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <linux/init.h>
#include <asm/uaccess.h>
#include "pciehp.h"
#include "pciehprm.h"
#include <linux/interrupt.h>

/* Global variables */
Expand Down Expand Up @@ -381,6 +380,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
dbg("%s: DRV_thread pid = %d\n", __FUNCTION__, current->pid);

pdev = dev->port;
ctrl->pci_dev = pdev;

rc = pcie_init(ctrl, dev,
(php_intr_callback_t) pciehp_handle_attention_button,
Expand All @@ -392,8 +392,6 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
goto err_out_free_ctrl;
}

ctrl->pci_dev = pdev;

pci_set_drvdata(pdev, ctrl);

ctrl->pci_bus = kmalloc(sizeof(*ctrl->pci_bus), GFP_KERNEL);
Expand Down Expand Up @@ -609,18 +607,14 @@ static int __init pcied_init(void)
if (retval)
goto error_hpc_init;

retval = pciehprm_init(PCI);
if (!retval) {
retval = pcie_port_service_register(&hpdriver_portdrv);
dbg("pcie_port_service_register = %d\n", retval);
info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
if (retval)
dbg("%s: Failure to register service\n", __FUNCTION__);
}
retval = pcie_port_service_register(&hpdriver_portdrv);
dbg("pcie_port_service_register = %d\n", retval);
info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
if (retval)
dbg("%s: Failure to register service\n", __FUNCTION__);

error_hpc_init:
if (retval) {
pciehprm_cleanup();
pciehp_event_stop_thread();
};

Expand All @@ -632,8 +626,6 @@ static void __exit pcied_cleanup(void)
dbg("unload_pciehpd()\n");
unload_pciehpd();

pciehprm_cleanup();

dbg("pcie_port_service_unregister\n");
pcie_port_service_unregister(&hpdriver_portdrv);

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/pci/hotplug/pciehp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <linux/pci.h>
#include "../pci.h"
#include "pciehp.h"
#include "pciehprm.h"

static void interrupt_event_handler(struct controller *ctrl);

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/pci/hotplug/pciehp_hpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,10 @@ int pcie_init(struct controller * ctrl,
}
dbg("%s: SLOT_STATUS offset %x writes slot_status %x\n", __FUNCTION__, SLOT_STATUS(ctrl->cap_base), temp_word);

rc = get_hp_hw_control_from_firmware(ctrl->pci_dev);
if (rc)
goto abort_free_ctlr;

/* Add this HPC instance into the HPC list */
spin_lock(&list_lock);
if (php_ctlr_list_head == 0) {
Expand Down
52 changes: 0 additions & 52 deletions trunk/drivers/pci/hotplug/pciehprm.h

This file was deleted.

Loading

0 comments on commit 3523e04

Please sign in to comment.