Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44821
b: refs/heads/master
c: 227b84c
h: refs/heads/master
i:
  44819: 112a434
v: v3
  • Loading branch information
Kenji Kaneshige authored and Greg Kroah-Hartman committed Dec 20, 2006
1 parent 16a8c9f commit f0f397d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 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: 0abe68ce24973a23fcc6cbce80343f68656de7b6
refs/heads/master: 227b84c77f5fb3a3b01e5dee1a2928cafc5fd216
6 changes: 0 additions & 6 deletions trunk/drivers/pci/hotplug/shpchp.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,9 @@ struct controller {
struct list_head slot_list;
struct hpc_ops *hpc_ops;
wait_queue_head_t queue; /* sleep & wake process */
u8 bus;
u8 device;
u8 function;
u8 slot_device_offset;
u8 add_support;
u32 pcix_misc2_reg; /* for amd pogo errata */
enum pci_bus_speed speed;
u32 first_slot; /* First physical slot number */
u8 slot_bus; /* Bus where the slots handled by this controller sit */
u32 cap_offset;
unsigned long mmio_base;
unsigned long mmio_size;
Expand Down
26 changes: 1 addition & 25 deletions trunk/drivers/pci/hotplug/shpchp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static int init_slots(struct controller *ctrl)

slot->hp_slot = i;
slot->ctrl = ctrl;
slot->bus = ctrl->slot_bus;
slot->bus = ctrl->pci_dev->subordinate->number;
slot->device = ctrl->slot_device_offset + i;
slot->hpc_ops = ctrl->hpc_ops;
mutex_init(&slot->lock);
Expand Down Expand Up @@ -355,7 +355,6 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int rc;
struct controller *ctrl;
struct slot *t_slot;

if (!is_shpc_capable(pdev))
return -ENODEV;
Expand All @@ -376,36 +375,13 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

pci_set_drvdata(pdev, ctrl);

ctrl->bus = pdev->bus->number;
ctrl->slot_bus = pdev->subordinate->number;
ctrl->device = PCI_SLOT(pdev->devfn);
ctrl->function = PCI_FUNC(pdev->devfn);

dbg("ctrl bus=0x%x, device=%x, function=%x, irq=%x\n",
ctrl->bus, ctrl->device, ctrl->function, pdev->irq);

ctrl->add_support = 1;

/* Setup the slot information structures */
rc = init_slots(ctrl);
if (rc) {
err(msg_initialization_err, 6);
goto err_out_release_ctlr;
}

/* Now hpc_functions (slot->hpc_ops->functions) are ready */
t_slot = shpchp_find_slot(ctrl, ctrl->slot_device_offset);

/* Check for operation bus speed */
rc = t_slot->hpc_ops->get_cur_bus_speed(t_slot, &ctrl->speed);
dbg("%s: t_slot->hp_slot %x\n", __FUNCTION__,t_slot->hp_slot);

if (rc || ctrl->speed == PCI_SPEED_UNKNOWN) {
err(SHPC_MODULE_NAME ": Can't get current bus speed. "
"Set to 33MHz PCI.\n");
ctrl->speed = PCI_SPEED_33MHz;
}

rc = shpchp_create_ctrl_files(ctrl);
if (rc)
goto err_cleanup_slots;
Expand Down

0 comments on commit f0f397d

Please sign in to comment.