* reload config
*/
if (!disable_all_flr) {
- dev_info(&dev->dev, "FLR invoked for device\n");
pciback_flr_device(dev);
}
else
- dev_info(&dev->dev, "FLR disabled for all devices\n");
+ dev_dbg(&dev->dev, "FLR disabled for all devices\n");
out:
return err;
}
/* check special wildcard noflr */
- if (type == PCIBACK_ID_TYPE_NOFLR && !strncmp(buf, "*", 1)) {
+ if (type == PCIBACK_ID_TYPE_NOFLR && !strncmp(buf, "(*)", 3)) {
disable_all_flr = 1;
goto out;
}
if (err)
goto out;
- if (pci_devs_no_flr && *pci_devs_no_flr && !strncmp(pci_devs_no_flr, "*", 1))
+ if (pci_devs_no_flr && *pci_devs_no_flr && !strncmp(pci_devs_no_flr, "(*)", 3))
disable_all_flr = 1; /* check special wildcard noflr */
else
err = pciback_parse_device_params(pci_devs_no_flr, PCIBACK_ID_TYPE_NOFLR, pcistub_device_id_add);
msleep(100);
pci_read_config_word(dev, exp_pos + PCI_EXP_DEVSTA, &status);
if (status & PCI_EXP_DEVSTA_TRPND) {
- dev_info(&dev->dev, "Busy after 100ms while trying to reset; sleeping for 1 second\n");
+ dev_dbg(&dev->dev, "Busy after 100ms while trying to reset; sleeping for 1 second\n");
ssleep(1);
pci_read_config_word(dev, exp_pos + PCI_EXP_DEVSTA, &status);
if (status & PCI_EXP_DEVSTA_TRPND)
- dev_info(&dev->dev, "Still busy after 1s; proceeding with reset anyway\n");
+ dev_warn(&dev->dev, "Still busy after 1s; proceeding with reset anyway\n");
}
pci_write_config_word(dev, exp_pos + PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR);
dev_dbg(&dev->dev, "FLR disabled for device\n");
return;
}
+ dev_dbg(&dev->dev, "FLR invoked for device\n");
do {
/* First, always try to do an FLR */
err = pciback_do_dstate_transition_reset(dev);
if (err)
dev_warn(&dev->dev, "FLR functionality not supported; "
- "attempts to use vendor FLR or D-states failed\n");
+ "attempts to use vendor FLR or D-states unsuccessful\n");
break;
}
err = pciback_do_secondary_bus_reset(dev);
if (err)
dev_warn(&dev->dev, "FLR functionality not supported; "
- "attempts to use secondary bus reset failed;\n");
+ "attempts to use secondary bus reset unsuccessful;\n");
break;
}
/* Next look for the unchained AF capabilities for FLR using specific logic */
/* TODO */
+ /* TODO DEPENDING ON LOGIC - MAYBE MERGE W/ ABOVE */
+
/* Else not found */
return 0;
}
/* Performing the configuration space reads/writes must not be done in atomic
* context because some of the pci_* functions can sleep (mostly due to ACPI
* use of semaphores). This function is intended to be called from a work
- * queue in process context taking a struct pciback_device as a parameter */
+ * queue in process context taking a struct pciback_device as a parameter
+ */
void pciback_do_op(void *data)
{
struct pciback_device *pdev = data;
return IRQ_HANDLED;
}
-int pciback_parse_device_params(const char *device_args, int type, int (*add_func) (int domain, int bus, int slot, int func, int type))
+/* Helper routine used to parse command line parameters passed to the
+ * pciback module from the boot loader. These params all have the form
+ * of a list of one or more devices, e.g.:
+ * (XXXX:XX:XX.X)(XXXX:XX:XX.X)
+ * Which is: (domain/segment:bus:dev.func)
+ */
+int pciback_parse_device_params(const char *device_args, int type,
+ int (*add_func) (int domain, int bus, int slot, int func, int type))
{
int pos = 0;
int err = 0;