Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a2c5dad authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: remove unused resource assignment in pci_read_bridge_bases()
  PCI hotplug: shpchp: message refinement
  PCI hotplug: shpchp: replace printk with dev_printk
  PCI: add routines for debugging and handling lost interrupts
  PCI hotplug: pciehp: message refinement
  PCI: fix ARI code to be compatible with mixed ARI/non-ARI systems
  PCI hotplug: cpqphp: fix kernel NULL pointer dereference
parents 2242d5ef a491913f
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3,7 +3,8 @@
#
#


obj-y		+= access.o bus.o probe.o remove.o pci.o quirks.o slot.o \
obj-y		+= access.o bus.o probe.o remove.o pci.o quirks.o slot.o \
			pci-driver.o search.o pci-sysfs.o rom.o setup-res.o
			pci-driver.o search.o pci-sysfs.o rom.o setup-res.o \
			irq.o
obj-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_PROC_FS) += proc.o


# Build PCI Express stuff if needed
# Build PCI Express stuff if needed
+1 −1
Original line number Original line Diff line number Diff line
@@ -433,7 +433,7 @@ static int ctrl_slot_setup(struct controller *ctrl,
				slot->number, ctrl->slot_device_offset,
				slot->number, ctrl->slot_device_offset,
				slot_number);
				slot_number);
		result = pci_hp_register(hotplug_slot,
		result = pci_hp_register(hotplug_slot,
					 ctrl->pci_dev->subordinate,
					 ctrl->pci_dev->bus,
					 slot->device,
					 slot->device,
					 name);
					 name);
		if (result) {
		if (result) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -188,7 +188,7 @@ static inline struct slot *pciehp_find_slot(struct controller *ctrl, u8 device)
			return slot;
			return slot;
	}
	}


	ctrl_err(ctrl, "%s: slot (device=0x%x) not found\n", __func__, device);
	ctrl_err(ctrl, "Slot (device=0x%02x) not found\n", device);
	return NULL;
	return NULL;
}
}


+20 −18
Original line number Original line Diff line number Diff line
@@ -184,7 +184,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
{
{
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		 __func__, hotplug_slot_name(hotplug_slot));
		 __func__, hotplug_slot_name(hotplug_slot));


	kfree(hotplug_slot->info);
	kfree(hotplug_slot->info);
@@ -216,9 +216,11 @@ static int init_slots(struct controller *ctrl)
		slot->hotplug_slot = hotplug_slot;
		slot->hotplug_slot = hotplug_slot;
		snprintf(name, SLOT_NAME_SIZE, "%u", slot->number);
		snprintf(name, SLOT_NAME_SIZE, "%u", slot->number);


		ctrl_dbg(ctrl, "Registering bus=%x dev=%x hp_slot=%x sun=%x "
 		ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x "
			 "slot_device_offset=%x\n", slot->bus, slot->device,
 			 "hp_slot=%x sun=%x slot_device_offset=%x\n",
			 slot->hp_slot, slot->number, ctrl->slot_device_offset);
 			 pci_domain_nr(ctrl->pci_dev->subordinate),
 			 slot->bus, slot->device, slot->hp_slot, slot->number,
 			 ctrl->slot_device_offset);
		retval = pci_hp_register(hotplug_slot,
		retval = pci_hp_register(hotplug_slot,
					 ctrl->pci_dev->subordinate,
					 ctrl->pci_dev->subordinate,
					 slot->device,
					 slot->device,
@@ -238,7 +240,7 @@ static int init_slots(struct controller *ctrl)
				&hotplug_slot_attr_lock.attr);
				&hotplug_slot_attr_lock.attr);
			if (retval) {
			if (retval) {
				pci_hp_deregister(hotplug_slot);
				pci_hp_deregister(hotplug_slot);
				ctrl_err(ctrl, "cannot create additional sysfs "
				ctrl_err(ctrl, "Cannot create additional sysfs "
					 "entries\n");
					 "entries\n");
				goto error_info;
				goto error_info;
			}
			}
@@ -273,7 +275,7 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
{
{
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		  __func__, slot_name(slot));
		  __func__, slot_name(slot));


	hotplug_slot->info->attention_status = status;
	hotplug_slot->info->attention_status = status;
@@ -289,7 +291,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
{
{
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		 __func__, slot_name(slot));
		 __func__, slot_name(slot));


	return pciehp_sysfs_enable_slot(slot);
	return pciehp_sysfs_enable_slot(slot);
@@ -300,7 +302,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
{
{
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		  __func__, slot_name(slot));
		  __func__, slot_name(slot));


	return pciehp_sysfs_disable_slot(slot);
	return pciehp_sysfs_disable_slot(slot);
@@ -311,7 +313,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;
	int retval;
	int retval;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		  __func__, slot_name(slot));
		  __func__, slot_name(slot));


	retval = slot->hpc_ops->get_power_status(slot, value);
	retval = slot->hpc_ops->get_power_status(slot, value);
@@ -326,7 +328,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;
	int retval;
	int retval;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		  __func__, slot_name(slot));
		  __func__, slot_name(slot));


	retval = slot->hpc_ops->get_attention_status(slot, value);
	retval = slot->hpc_ops->get_attention_status(slot, value);
@@ -341,7 +343,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;
	int retval;
	int retval;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		 __func__, slot_name(slot));
		 __func__, slot_name(slot));


	retval = slot->hpc_ops->get_latch_status(slot, value);
	retval = slot->hpc_ops->get_latch_status(slot, value);
@@ -356,7 +358,7 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;
	int retval;
	int retval;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		 __func__, slot_name(slot));
		 __func__, slot_name(slot));


	retval = slot->hpc_ops->get_adapter_status(slot, value);
	retval = slot->hpc_ops->get_adapter_status(slot, value);
@@ -372,7 +374,7 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot,
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;
	int retval;
	int retval;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		 __func__, slot_name(slot));
		 __func__, slot_name(slot));


	retval = slot->hpc_ops->get_max_bus_speed(slot, value);
	retval = slot->hpc_ops->get_max_bus_speed(slot, value);
@@ -387,7 +389,7 @@ static int get_cur_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe
	struct slot *slot = hotplug_slot->private;
	struct slot *slot = hotplug_slot->private;
	int retval;
	int retval;


	ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n",
	ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
		 __func__, slot_name(slot));
		 __func__, slot_name(slot));


	retval = slot->hpc_ops->get_cur_bus_speed(slot, value);
	retval = slot->hpc_ops->get_cur_bus_speed(slot, value);
@@ -414,7 +416,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_


	ctrl = pcie_init(dev);
	ctrl = pcie_init(dev);
	if (!ctrl) {
	if (!ctrl) {
		dev_err(&dev->device, "controller initialization failed\n");
		dev_err(&dev->device, "Controller initialization failed\n");
		goto err_out_none;
		goto err_out_none;
	}
	}
	set_service_data(dev, ctrl);
	set_service_data(dev, ctrl);
@@ -423,10 +425,10 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
	rc = init_slots(ctrl);
	rc = init_slots(ctrl);
	if (rc) {
	if (rc) {
		if (rc == -EBUSY)
		if (rc == -EBUSY)
			ctrl_warn(ctrl, "slot already registered by another "
			ctrl_warn(ctrl, "Slot already registered by another "
				  "hotplug driver\n");
				  "hotplug driver\n");
		else
		else
			ctrl_err(ctrl, "slot initialization failed\n");
			ctrl_err(ctrl, "Slot initialization failed\n");
		goto err_out_release_ctlr;
		goto err_out_release_ctlr;
	}
	}


@@ -523,7 +525,7 @@ static int __init pcied_init(void)
 	dbg("pcie_port_service_register = %d\n", retval);
 	dbg("pcie_port_service_register = %d\n", retval);
  	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
  	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
 	if (retval)
 	if (retval)
		dbg("%s: Failure to register service\n", __func__);
		dbg("Failure to register service\n");
	return retval;
	return retval;
}
}


+32 −32
Original line number Original line Diff line number Diff line
@@ -61,7 +61,7 @@ u8 pciehp_handle_attention_button(struct slot *p_slot)
	struct controller *ctrl = p_slot->ctrl;
	struct controller *ctrl = p_slot->ctrl;


	/* Attention Button Change */
	/* Attention Button Change */
	ctrl_dbg(ctrl, "Attention button interrupt received.\n");
	ctrl_dbg(ctrl, "Attention button interrupt received\n");


	/*
	/*
	 *  Button pressed - See if need to TAKE ACTION!!!
	 *  Button pressed - See if need to TAKE ACTION!!!
@@ -81,7 +81,7 @@ u8 pciehp_handle_switch_change(struct slot *p_slot)
	struct controller *ctrl = p_slot->ctrl;
	struct controller *ctrl = p_slot->ctrl;


	/* Switch Change */
	/* Switch Change */
	ctrl_dbg(ctrl, "Switch interrupt received.\n");
	ctrl_dbg(ctrl, "Switch interrupt received\n");


	p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
	p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
	if (getstatus) {
	if (getstatus) {
@@ -110,7 +110,7 @@ u8 pciehp_handle_presence_change(struct slot *p_slot)
	struct controller *ctrl = p_slot->ctrl;
	struct controller *ctrl = p_slot->ctrl;


	/* Presence Change */
	/* Presence Change */
	ctrl_dbg(ctrl, "Presence/Notify input change.\n");
	ctrl_dbg(ctrl, "Presence/Notify input change\n");


	/* Switch is open, assume a presence change
	/* Switch is open, assume a presence change
	 * Save the presence state
	 * Save the presence state
@@ -142,7 +142,7 @@ u8 pciehp_handle_power_fault(struct slot *p_slot)
	struct controller *ctrl = p_slot->ctrl;
	struct controller *ctrl = p_slot->ctrl;


	/* power fault */
	/* power fault */
	ctrl_dbg(ctrl, "Power fault interrupt received.\n");
	ctrl_dbg(ctrl, "Power fault interrupt received\n");


	if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) {
	if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) {
		/*
		/*
@@ -157,7 +157,7 @@ u8 pciehp_handle_power_fault(struct slot *p_slot)
		 */
		 */
		ctrl_info(ctrl, "Power fault on Slot(%s)\n", slot_name(p_slot));
		ctrl_info(ctrl, "Power fault on Slot(%s)\n", slot_name(p_slot));
		event_type = INT_POWER_FAULT;
		event_type = INT_POWER_FAULT;
		ctrl_info(ctrl, "power fault bit %x set\n", 0);
		ctrl_info(ctrl, "Power fault bit %x set\n", 0);
	}
	}


	queue_interrupt_event(p_slot, event_type);
	queue_interrupt_event(p_slot, event_type);
@@ -175,8 +175,7 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
	if (POWER_CTRL(ctrl)) {
	if (POWER_CTRL(ctrl)) {
		if (pslot->hpc_ops->power_off_slot(pslot)) {
		if (pslot->hpc_ops->power_off_slot(pslot)) {
			ctrl_err(ctrl,
			ctrl_err(ctrl,
				 "%s: Issue of Slot Power Off command failed\n",
				 "Issue of Slot Power Off command failed\n");
				 __func__);
			return;
			return;
		}
		}
	}
	}
@@ -193,8 +192,8 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)


	if (ATTN_LED(ctrl)) {
	if (ATTN_LED(ctrl)) {
		if (pslot->hpc_ops->set_attention_status(pslot, 1)) {
		if (pslot->hpc_ops->set_attention_status(pslot, 1)) {
			ctrl_err(ctrl, "%s: Issue of Set Attention "
			ctrl_err(ctrl,
				 "Led command failed\n", __func__);
				 "Issue of Set Attention Led command failed\n");
			return;
			return;
		}
		}
	}
	}
@@ -211,6 +210,7 @@ static int board_added(struct slot *p_slot)
{
{
	int retval = 0;
	int retval = 0;
	struct controller *ctrl = p_slot->ctrl;
	struct controller *ctrl = p_slot->ctrl;
	struct pci_bus *parent = ctrl->pci_dev->subordinate;


	ctrl_dbg(ctrl, "%s: slot device, slot offset, hp slot = %d, %d, %d\n",
	ctrl_dbg(ctrl, "%s: slot device, slot offset, hp slot = %d, %d, %d\n",
		 __func__, p_slot->device, ctrl->slot_device_offset,
		 __func__, p_slot->device, ctrl->slot_device_offset,
@@ -229,22 +229,22 @@ static int board_added(struct slot *p_slot)
	/* Check link training status */
	/* Check link training status */
	retval = p_slot->hpc_ops->check_lnk_status(ctrl);
	retval = p_slot->hpc_ops->check_lnk_status(ctrl);
	if (retval) {
	if (retval) {
		ctrl_err(ctrl, "%s: Failed to check link status\n", __func__);
		ctrl_err(ctrl, "Failed to check link status\n");
		set_slot_off(ctrl, p_slot);
		set_slot_off(ctrl, p_slot);
		return retval;
		return retval;
	}
	}


	/* Check for a power fault */
	/* Check for a power fault */
	if (p_slot->hpc_ops->query_power_fault(p_slot)) {
	if (p_slot->hpc_ops->query_power_fault(p_slot)) {
		ctrl_dbg(ctrl, "%s: power fault detected\n", __func__);
		ctrl_dbg(ctrl, "Power fault detected\n");
		retval = POWER_FAILURE;
		retval = POWER_FAILURE;
		goto err_exit;
		goto err_exit;
	}
	}


	retval = pciehp_configure_device(p_slot);
	retval = pciehp_configure_device(p_slot);
	if (retval) {
	if (retval) {
		ctrl_err(ctrl, "Cannot add device 0x%x:%x\n",
		ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n",
			 p_slot->bus, p_slot->device);
			 pci_domain_nr(parent), p_slot->bus, p_slot->device);
		goto err_exit;
		goto err_exit;
	}
	}


@@ -276,14 +276,14 @@ static int remove_board(struct slot *p_slot)
	if (retval)
	if (retval)
		return retval;
		return retval;


	ctrl_dbg(ctrl, "In %s, hp_slot = %d\n", __func__, p_slot->hp_slot);
	ctrl_dbg(ctrl, "%s: hp_slot = %d\n", __func__, p_slot->hp_slot);


	if (POWER_CTRL(ctrl)) {
	if (POWER_CTRL(ctrl)) {
		/* power off slot */
		/* power off slot */
		retval = p_slot->hpc_ops->power_off_slot(p_slot);
		retval = p_slot->hpc_ops->power_off_slot(p_slot);
		if (retval) {
		if (retval) {
			ctrl_err(ctrl, "%s: Issue of Slot Disable command "
			ctrl_err(ctrl,
				 "failed\n", __func__);
				 "Issue of Slot Disable command failed\n");
			return retval;
			return retval;
		}
		}
	}
	}
@@ -324,8 +324,10 @@ static void pciehp_power_thread(struct work_struct *work)
	switch (p_slot->state) {
	switch (p_slot->state) {
	case POWEROFF_STATE:
	case POWEROFF_STATE:
		mutex_unlock(&p_slot->lock);
		mutex_unlock(&p_slot->lock);
		ctrl_dbg(p_slot->ctrl, "%s: disabling bus:device(%x:%x)\n",
		ctrl_dbg(p_slot->ctrl,
			 __func__, p_slot->bus, p_slot->device);
			 "Disabling domain:bus:device=%04x:%02x:%02x\n",
			 pci_domain_nr(p_slot->ctrl->pci_dev->subordinate),
			 p_slot->bus, p_slot->device);
		pciehp_disable_slot(p_slot);
		pciehp_disable_slot(p_slot);
		mutex_lock(&p_slot->lock);
		mutex_lock(&p_slot->lock);
		p_slot->state = STATIC_STATE;
		p_slot->state = STATIC_STATE;
@@ -433,7 +435,6 @@ static void handle_button_press_event(struct slot *p_slot)
		 * expires to cancel hot-add or hot-remove
		 * expires to cancel hot-add or hot-remove
		 */
		 */
		ctrl_info(ctrl, "Button cancel on Slot(%s)\n", slot_name(p_slot));
		ctrl_info(ctrl, "Button cancel on Slot(%s)\n", slot_name(p_slot));
		ctrl_dbg(ctrl, "%s: button cancel\n", __func__);
		cancel_delayed_work(&p_slot->work);
		cancel_delayed_work(&p_slot->work);
		if (p_slot->state == BLINKINGOFF_STATE) {
		if (p_slot->state == BLINKINGOFF_STATE) {
			if (PWR_LED(ctrl))
			if (PWR_LED(ctrl))
@@ -537,16 +538,15 @@ int pciehp_enable_slot(struct slot *p_slot)


	rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
	rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
	if (rc || !getstatus) {
	if (rc || !getstatus) {
		ctrl_info(ctrl, "%s: no adapter on slot(%s)\n",
		ctrl_info(ctrl, "No adapter on slot(%s)\n", slot_name(p_slot));
			  __func__, slot_name(p_slot));
		mutex_unlock(&p_slot->ctrl->crit_sect);
		mutex_unlock(&p_slot->ctrl->crit_sect);
		return -ENODEV;
		return -ENODEV;
	}
	}
	if (MRL_SENS(p_slot->ctrl)) {
	if (MRL_SENS(p_slot->ctrl)) {
		rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
		rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
		if (rc || getstatus) {
		if (rc || getstatus) {
			ctrl_info(ctrl, "%s: latch open on slot(%s)\n",
			ctrl_info(ctrl, "Latch open on slot(%s)\n",
				  __func__, slot_name(p_slot));
				  slot_name(p_slot));
			mutex_unlock(&p_slot->ctrl->crit_sect);
			mutex_unlock(&p_slot->ctrl->crit_sect);
			return -ENODEV;
			return -ENODEV;
		}
		}
@@ -555,8 +555,8 @@ int pciehp_enable_slot(struct slot *p_slot)
	if (POWER_CTRL(p_slot->ctrl)) {
	if (POWER_CTRL(p_slot->ctrl)) {
		rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
		rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
		if (rc || getstatus) {
		if (rc || getstatus) {
			ctrl_info(ctrl, "%s: already enabled on slot(%s)\n",
			ctrl_info(ctrl, "Already enabled on slot(%s)\n",
				  __func__, slot_name(p_slot));
				  slot_name(p_slot));
			mutex_unlock(&p_slot->ctrl->crit_sect);
			mutex_unlock(&p_slot->ctrl->crit_sect);
			return -EINVAL;
			return -EINVAL;
		}
		}
@@ -591,8 +591,8 @@ int pciehp_disable_slot(struct slot *p_slot)
	if (!HP_SUPR_RM(p_slot->ctrl)) {
	if (!HP_SUPR_RM(p_slot->ctrl)) {
		ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
		ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
		if (ret || !getstatus) {
		if (ret || !getstatus) {
			ctrl_info(ctrl, "%s: no adapter on slot(%s)\n",
			ctrl_info(ctrl, "No adapter on slot(%s)\n",
				  __func__, slot_name(p_slot));
				  slot_name(p_slot));
			mutex_unlock(&p_slot->ctrl->crit_sect);
			mutex_unlock(&p_slot->ctrl->crit_sect);
			return -ENODEV;
			return -ENODEV;
		}
		}
@@ -601,8 +601,8 @@ int pciehp_disable_slot(struct slot *p_slot)
	if (MRL_SENS(p_slot->ctrl)) {
	if (MRL_SENS(p_slot->ctrl)) {
		ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
		ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
		if (ret || getstatus) {
		if (ret || getstatus) {
			ctrl_info(ctrl, "%s: latch open on slot(%s)\n",
			ctrl_info(ctrl, "Latch open on slot(%s)\n",
				  __func__, slot_name(p_slot));
				  slot_name(p_slot));
			mutex_unlock(&p_slot->ctrl->crit_sect);
			mutex_unlock(&p_slot->ctrl->crit_sect);
			return -ENODEV;
			return -ENODEV;
		}
		}
@@ -611,8 +611,8 @@ int pciehp_disable_slot(struct slot *p_slot)
	if (POWER_CTRL(p_slot->ctrl)) {
	if (POWER_CTRL(p_slot->ctrl)) {
		ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
		ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
		if (ret || !getstatus) {
		if (ret || !getstatus) {
			ctrl_info(ctrl, "%s: already disabled slot(%s)\n",
			ctrl_info(ctrl, "Already disabled on slot(%s)\n",
				  __func__, slot_name(p_slot));
				  slot_name(p_slot));
			mutex_unlock(&p_slot->ctrl->crit_sect);
			mutex_unlock(&p_slot->ctrl->crit_sect);
			return -EINVAL;
			return -EINVAL;
		}
		}
Loading