(void *)(p2) = SWAPPOINTERS_TEMP; \
} while (0)
-#define PRINTKDRV(fmt, args...) LOGINF(fmt, ## args)
#define TBDDRV(fmt, args...) LOGERR(fmt, ## args)
#define HUHDRV(fmt, args...) LOGERR(fmt, ## args)
#define ERRDRV(fmt, args...) LOGERR(fmt, ## args)
#define WARNDRV(fmt, args...) LOGWRN(fmt, ## args)
#define SECUREDRV(fmt, args...) LOGWRN(fmt, ## args)
-#define INFODRV(fmt, args...) LOGINF(fmt, ## args)
#define PRINTKDEV(devname, fmt, args...) LOGINFDEV(devname, fmt, ## args)
#define TBDDEV(devname, fmt, args...) LOGERRDEV(devname, fmt, ## args)
#include <linux/printk.h>
-/*
- * # LOGINF
- *
- * \brief Log informational message - logs a message at the LOG_INFO level
- *
- * \param devname the device name of the device reporting this message, or
- * NULL if this message is NOT device-related.
- * \param fmt printf()-style format string containing the message to log.
- * \param args Optional arguments to be formatted and inserted into the
- * format string.
- * \return nothing
- *
- * Logs the specified message at the LOG_INFO level.
- */
-
-#define LOGINF(fmt, args...) pr_info(fmt, ## args)
-#define LOGINFDEV(devname, fmt, args...) \
- pr_info("%s " fmt, devname, ## args)
-#define LOGINFDEVX(devno, fmt, args...) \
- pr_info("dev%d " fmt, devno, ## args)
-#define LOGINFNAME(vnic, fmt, args...) \
- do { \
- if (vnic != NULL) { \
- pr_info("%s " fmt, vnic->name, ## args); \
- } else { \
- pr_info(fmt, ## args); \
- } \
- } while (0)
-
/*
* # LOGVER
*
dev_no = msg->cmd.destroy_device.bus_no;
read_lock(&bus_list_lock);
- LOGINF("destroy_device called for bus_no=%u, dev_no=%u", bus_no,
- dev_no);
for (bus = bus_list; bus; bus = bus->next) {
if (bus->bus_no == bus_no) {
/* make sure the device number is valid */
* kernel paging request"
*/
if (dev->polling) {
- LOGINF("calling uislib_disable_channel_interrupts");
uislib_disable_channel_interrupts(bus_no, dev_no);
}
/* unmap the channel memory for the device. */
if (!msg->hdr.flags.test_message) {
- LOGINF("destroy_device, doing iounmap");
uislib_iounmap(dev->chanptr);
}
kfree(dev);
{
struct controlvm_message msg;
- LOGINF("enter busNo=0x%x\n", bus_no);
/* step 0: init the chipset */
POSTCODE_LINUX_3(CHIPSET_INIT_ENTRY_PC, bus_no, POSTCODE_SEVERITY_INFO);
LOGERR("init_chipset failed.\n");
return 0;
}
- LOGINF("chipset initialized\n");
POSTCODE_LINUX_3(CHIPSET_INIT_EXIT_PC, bus_no,
POSTCODE_SEVERITY_INFO);
}
{
struct controlvm_message msg;
- LOGINF(" enter busNo=0x%x devNo=0x%x\n", bus_no, dev_no);
/* chipset init'ed with bus bus has been previously created -
* Verify it still exists step 2: create the VHBA device on the
* bus
{
struct controlvm_message msg;
- LOGINF(" enter busNo=0x%x devNo=0x%x\n", bus_no, dev_no);
/* chipset init'ed with bus bus has been previously created -
* Verify it still exists step 2: create the VNIC device on the
* bus
wait_cycles = (cur_cycles - old_cycles);
}
}
- LOGINF("wait_cycles=%llu", wait_cycles);
cycles_before_wait = wait_cycles;
idle_cycles = 0;
poll_dev_start = 0;
if (kthread_should_stop())
break;
if (en_smart_wakeup == 0xFF) {
- LOGINF("en_smart_wakeup set to 0xff, to force exiting process_incoming");
break;
}
/* wait for POLLJIFFIES_NORMAL jiffies, or until
if (!unisys_spar_platform)
return -ENODEV;
- LOGINF("MONITORAPIS");
-
- LOGINF("sizeof(struct uiscmdrsp):%lu bytes\n",
- (ulong)sizeof(struct uiscmdrsp));
- LOGINF("sizeof(struct phys_info):%lu\n",
- (ulong)sizeof(struct phys_info));
- LOGINF("sizeof(uiscmdrsp_scsi):%lu\n",
- (ulong)sizeof(struct uiscmdrsp_scsi));
- LOGINF("sizeof(uiscmdrsp_net):%lu\n",
- (ulong)sizeof(struct uiscmdrsp_net));
- LOGINF("sizeof(CONTROLVM_MESSAGE):%lu bytes\n",
- (ulong)sizeof(struct controlvm_message));
- LOGINF("sizeof(struct spar_controlvm_channel_protocol):%lu bytes\n",
- (ulong)sizeof(struct spar_controlvm_channel_protocol));
- LOGINF("sizeof(CHANNEL_HEADER):%lu bytes\n",
- (ulong)sizeof(struct channel_header));
- LOGINF("sizeof(struct spar_io_channel_protocol):%lu bytes\n",
- (ulong)sizeof(struct spar_io_channel_protocol));
- LOGINF("SIZEOF_CMDRSP:%lu bytes\n", SIZEOF_CMDRSP);
- LOGINF("SIZEOF_PROTOCOL:%lu bytes\n", SIZEOF_PROTOCOL);
-
/* initialize global pointers to NULL */
bus_list = NULL;
bus_list_count = 0;
return 0; /* failure */
}
thrinfo->id = thrinfo->task->pid;
- LOGINF("started thread pid:%d\n", thrinfo->id);
return 1;
}
EXPORT_SYMBOL_GPL(uisthread_start);
if (thrinfo->id == 0)
return; /* thread not running */
- LOGINF("uisthread_stop stopping id:%d\n", thrinfo->id);
kthread_stop(thrinfo->task);
/* give up if the thread has NOT died in 1 minute */
if (wait_for_completion_timeout(&thrinfo->has_stopped, 60 * HZ))
stopped = 1;
- else
- LOGERR("timed out trying to signal thread\n");
if (stopped) {
- LOGINF("uisthread_stop stopped id:%d\n", thrinfo->id);
thrinfo->id = 0;
}
}
uisctrl_register_req_handler(int type, void *fptr,
struct ultra_vbus_deviceinfo *chipset_driver_info)
{
- LOGINF("type = %d, fptr = 0x%p.\n", type, fptr);
-
switch (type) {
case 2:
if (fptr) {
LOGVER("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
virtpcidev->device_no);
- LOGINF("entering virthba_probe...\n");
- LOGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
- virtpcidev->device_no);
POSTCODE_LINUX_2(VHBA_PROBE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
/* call scsi_host_alloc to register a scsi host adapter
* instance - this virthba that has just been created is an
* scan is 0 to max (inclusive); so we will subtract one from
* the max-channel value.
*/
- LOGINF("virtpcidev->scsi.max.max_channel=%u, max_id=%u, max_lun=%u, cmd_per_lun=%u, max_io_size=%u\n",
- (unsigned)virtpcidev->scsi.max.max_channel - 1,
- (unsigned)virtpcidev->scsi.max.max_id,
- (unsigned)virtpcidev->scsi.max.max_lun,
- (unsigned)virtpcidev->scsi.max.cmd_per_lun,
- (unsigned)virtpcidev->scsi.max.max_io_size);
scsihost->max_channel = (unsigned)virtpcidev->scsi.max.max_channel;
scsihost->max_id = (unsigned)virtpcidev->scsi.max.max_id;
scsihost->max_lun = (unsigned)virtpcidev->scsi.max.max_lun;
(unsigned short)(virtpcidev->scsi.max.max_io_size / PAGE_SIZE);
if (scsihost->sg_tablesize > MAX_PHYS_INFO)
scsihost->sg_tablesize = MAX_PHYS_INFO;
- LOGINF("scsihost->max_channel=%u, max_id=%u, max_lun=%llu, cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
- scsihost->max_channel, scsihost->max_id, scsihost->max_lun,
- scsihost->cmd_per_lun, scsihost->max_sectors,
- scsihost->sg_tablesize);
- LOGINF("scsihost->can_queue=%u, scsihost->cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
- scsihost->can_queue, scsihost->cmd_per_lun, scsihost->max_sectors,
- scsihost->sg_tablesize);
/* this creates "host%d" in sysfs. If 2nd argument is NULL,
* then this generic /sys/devices/platform/host? device is
scsi_host_put(scsihost);
return -ENODEV;
}
- LOGINF("sendInterruptHandle=0x%16llX",
- virthbainfo->intr.send_irq_handle);
- LOGINF("recvInterruptHandle=0x%16llX",
- virthbainfo->intr.recv_irq_handle);
- LOGINF("recvInterruptVector=0x%8X",
- virthbainfo->intr.recv_irq_vector);
- LOGINF("recvInterruptShared=0x%2X",
- virthbainfo->intr.recv_irq_shared);
- LOGINF("scsihost.hostt->name=%s", scsihost->hostt->name);
virthbainfo->interrupt_vector =
virthbainfo->intr.recv_irq_handle & INTERRUPT_VECTOR_MASK;
rsp = request_irq(virthbainfo->interrupt_vector, handler, IRQF_SHARED,
scsi_scan_host(scsihost);
- LOGINF("virthba added scsihost:0x%p\n", scsihost);
POSTCODE_LINUX_2(VHBA_PROBE_EXIT_PC, POSTCODE_SEVERITY_INFO);
return 0;
}
struct Scsi_Host *scsihost =
(struct Scsi_Host *)virtpcidev->scsi.scsihost;
- LOGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
- virtpcidev->device_no);
virthbainfo = (struct virthba_info *)scsihost->hostdata;
if (virthbainfo->interrupt_vector != -1)
free_irq(virthbainfo->interrupt_vector, virthbainfo);
- LOGINF("Removing virtpcidev: 0x%p, virthbainfo: 0x%p\n", virtpcidev,
- virthbainfo);
scsi_remove_host(scsihost);
* scsi_add_host so the scsi_host gets deleted
*/
scsi_host_put(scsihost);
- LOGINF("virthba removed scsi_host.\n");
}
static int
int notifyresult = 0xffff;
wait_queue_head_t notifyevent;
- LOGINF("vDiskMgmt:%d %d:%d:%d\n", vdiskcmdtype,
- vdest->channel, vdest->id, vdest->lun);
-
if (virthbainfo->serverdown || virthbainfo->serverchangingstate)
return FAILED;
&virthbainfo->chinfo.insertlock,
DONT_ISSUE_INTERRUPT, (u64)NULL,
OK_TO_WAIT, "vhba");
- LOGINF("VdiskMgmt waiting on event notifyevent=0x%p\n",
- cmdrsp->scsitaskmgmt.notify);
wait_event(notifyevent, notifyresult != 0xffff);
- LOGINF("VdiskMgmt complete; result:%d\n", cmdrsp->vdiskmgmt.result);
kfree(cmdrsp);
return SUCCESS;
}
int notifyresult = 0xffff;
wait_queue_head_t notifyevent;
- LOGINF("TaskMgmt:%d %d:%d:%llu\n", tasktype,
- scsidev->channel, scsidev->id, scsidev->lun);
-
if (virthbainfo->serverdown || virthbainfo->serverchangingstate)
return FAILED;
&virthbainfo->chinfo.insertlock,
DONT_ISSUE_INTERRUPT, (u64)NULL,
OK_TO_WAIT, "vhba");
- LOGINF("TaskMgmt waiting on event notifyevent=0x%p\n",
- cmdrsp->scsitaskmgmt.notify);
wait_event(notifyevent, notifyresult != 0xffff);
- LOGINF("TaskMgmt complete; result:%d\n", cmdrsp->scsitaskmgmt.result);
kfree(cmdrsp);
return SUCCESS;
}
for_each_sg(sgl, sg, scsi_sg_count(scsicmd), i) {
cmdrsp->scsi.gpi_list[i].address = sg_phys(sg);
cmdrsp->scsi.gpi_list[i].length = sg->length;
- if ((i != 0) && (sg->offset != 0))
- LOGINF("Offset on a sg_entry other than zero =<<%d>>.\n",
- sg->offset);
}
if (sg_failed) {
/* wake up the error handler that is waiting for this */
*(int *)cmdrsp->vdiskmgmt.notifyresult = cmdrsp->vdiskmgmt.result;
wake_up_all((wait_queue_head_t *)cmdrsp->vdiskmgmt.notify);
- LOGINF("set notify result to %d\n", cmdrsp->vdiskmgmt.result);
}
static inline void
*(int *)cmdrsp->scsitaskmgmt.notifyresult =
cmdrsp->scsitaskmgmt.result;
wake_up_all((wait_queue_head_t *)cmdrsp->scsitaskmgmt.notify);
- LOGINF("set notify result to %d\n", cmdrsp->scsitaskmgmt.result);
}
static void
if (!unisys_spar_platform)
return -ENODEV;
- LOGINF("Entering virthba_mod_init...\n");
-
POSTCODE_LINUX_2(VHBA_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
virthba_parse_options(virthba_options);
}
POSTCODE_LINUX_2(VHBA_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
- LOGINF("Leaving virthba_mod_init\n");
return error;
}
static void __exit
virthba_mod_exit(void)
{
- LOGINF("entering virthba_mod_exit...\n");
-
virtpci_unregister_driver(&virthba_driver);
/* unregister is going to call virthba_remove */
/* destroy serverdown completion workqueue */
}
debugfs_remove_recursive(virthba_debugfs_dir);
- LOGINF("Leaving virthba_mod_exit\n");
}
/* specify function to be run at module insertion time */
&chipset_driver_info);
write_vbus_bus_info(vbus->platform_data /* chanptr */,
&bus_driver_info);
- LOGINF("Added vbus %d; device %s created successfully\n",
- addparams->bus_no, BUS_ID(vbus));
POSTCODE_LINUX_2(VPCI_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
return 1;
}
return 0;
}
- LOGINF("Adding vhba wwnn:%x:%x config:%d-%d-%d-%d chanptr:%p\n",
- scsi.wwnn.wwnn1, scsi.wwnn.wwnn2,
- scsi.max.max_channel, scsi.max.max_id, scsi.max.max_lun,
- scsi.max.cmd_per_lun, addparams->chanptr);
i = virtpci_device_add(vbus, VIRTHBA_TYPE, addparams, &scsi, NULL);
if (i) {
- LOGINF("Added vhba wwnn:%x:%x chanptr:%p\n", scsi.wwnn.wwnn1,
- scsi.wwnn.wwnn2, addparams->chanptr);
POSTCODE_LINUX_3(VPCI_CREATE_EXIT_PC, i,
POSTCODE_SEVERITY_INFO);
}
return 0;
}
- LOGINF("Adding vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x rcvbufs:%d mtu:%d chanptr:%p%pUL\n",
- net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
- net.mac_addr[3], net.mac_addr[4], net.mac_addr[5],
- net.num_rcv_bufs, net.mtu, addparams->chanptr, &net.zone_uuid);
i = virtpci_device_add(vbus, VIRTNIC_TYPE, addparams, NULL, &net);
if (i) {
- LOGINF("Added vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
- net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
- net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
POSTCODE_LINUX_3(VPCI_CREATE_EXIT_PC, i,
POSTCODE_SEVERITY_INFO);
return 1;
}
/* ensure that bus has no devices? -- TBD */
- LOGINF("Deleting %s\n", BUS_ID(vbus));
- if (delete_vbus_device(vbus, NULL))
- return 0; /* failure */
- LOGINF("Deleted vbus %d\n", delparams->bus_no);
return 1;
}
if ((checkforroot) && match_busid(vbus, (void *)BUS_ID(dev))) {
/* skip it - don't delete root bus */
- LOGINF("skipping root bus\n");
return 0; /* pretend no error */
}
- LOGINF("Calling unregister for %s\n", BUS_ID(vbus));
device_unregister(vbus);
kfree(vbus);
- LOGINF("VBus unregister and freed\n");
return 0; /* no error */
}
GET_SCSIADAPINFO_FROM_CHANPTR(pauseparams->chanptr);
- LOGINF("Pausing vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
i = virtpci_device_serverdown(NULL /*no parent bus */, VIRTHBA_TYPE,
&scsi.wwnn, NULL);
- if (i)
- LOGINF("Paused vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
- scsi.wwnn.wwnn2);
return i;
}
GET_NETADAPINFO_FROM_CHANPTR(pauseparams->chanptr);
- LOGINF("Pausing vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
- net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
- net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
i = virtpci_device_serverdown(NULL /*no parent bus */, VIRTNIC_TYPE,
NULL, net.mac_addr);
- if (i) {
- LOGINF(" Paused vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
- net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
- net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
- }
return i;
}
GET_SCSIADAPINFO_FROM_CHANPTR(resumeparams->chanptr);
- LOGINF("Resuming vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
i = virtpci_device_serverup(NULL /*no parent bus */, VIRTHBA_TYPE,
&scsi.wwnn, NULL);
- if (i)
- LOGINF("Resumed vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
- scsi.wwnn.wwnn2);
return i;
}
GET_NETADAPINFO_FROM_CHANPTR(resumeparams->chanptr);
- LOGINF("Resuming vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
- net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
- net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
i = virtpci_device_serverup(NULL /*no parent bus */, VIRTNIC_TYPE,
NULL, net.mac_addr);
- if (i) {
- LOGINF(" Resumed vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
- net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
- net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
- }
return i;
}
GET_SCSIADAPINFO_FROM_CHANPTR(delparams->chanptr);
- LOGINF("Deleting vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
i = virtpci_device_del(NULL /*no parent bus */, VIRTHBA_TYPE,
&scsi.wwnn, NULL);
if (i) {
- LOGINF("Deleted vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
- scsi.wwnn.wwnn2);
return 1;
}
return 0;
GET_NETADAPINFO_FROM_CHANPTR(delparams->chanptr);
- LOGINF("Deleting vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
- net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
- net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
i = virtpci_device_del(NULL /*no parent bus */, VIRTNIC_TYPE, NULL,
net.mac_addr);
- if (i) {
- LOGINF("Deleted vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
- net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
- net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
- }
return i;
}
#define DELETE_ONE_VPCIDEV(vpcidev) { \
- LOGINF("calling device_unregister:%p\n", &vpcidev->generic_dev); \
device_unregister(&vpcidev->generic_dev); \
- LOGINF("Deleted %p\n", vpcidev); \
kfree(vpcidev); \
}
tmpvpcidev = nextvpcidev;
count++;
}
- LOGINF("Deleted %d vhbas/vnics.\n", count);
/* now delete each vbus */
- if (bus_for_each_dev
- (&virtpci_bus_type, NULL, (void *)1, delete_vbus_device))
- LOGERR("delete of all vbus failed\n");
+ bus_for_each_dev(&virtpci_bus_type, NULL, (void *)1,
+ delete_vbus_device);
}
/* deletes all vnics or vhbas
return 0;
}
- LOGINF("Deleting all %s in vbus %s\n",
- devtype == VIRTHBA_TYPE ? "vhbas" : "vnics", busid);
/* delete all vhbas/vnics */
i = virtpci_device_del(vbus, devtype, NULL, NULL);
- if (i > 0)
- LOGINF("Deleted %d %s\n", i,
- devtype == VIRTHBA_TYPE ? "vhbas" : "vnics");
return 1;
}
const struct pci_device_id *id;
int error = 0;
- LOGINF("In virtpci_device_probe dev:%p virtpcidev:%p virtpcidrv:%p\n",
- dev, virtpcidev, virtpcidrv); /* VERBOSE/DEBUG ? */
POSTCODE_LINUX_2(VPCI_PROBE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
/* static match and static probe vs dynamic match & dynamic
* probe - do we care?.
struct virtpci_dev *virtpcidev = device_to_virtpci_dev(dev_);
struct virtpci_driver *virtpcidrv = virtpcidev->mydriver;
- LOGINF("In virtpci_device_remove bus_id:%s dev_:%p virtpcidev:%p dev->driver:%p drivername:%s\n",
- BUS_ID(dev_), dev_, virtpcidev, dev_->driver,
- dev_->driver->name); /* VERBOSE/DEBUG */
if (virtpcidrv) {
/* TEMP: assuming we have only one such driver for now */
if (virtpcidrv->remove)
struct spar_io_channel_protocol __iomem *io_chan = NULL;
struct device *dev;
- LOGINF("virtpci_device_add parentbus:%p chanptr:%p\n", parentbus,
- addparams->chanptr);
-
POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
if ((devtype != VIRTHBA_TYPE) && (devtype != VIRTNIC_TYPE)) {
return 0;
}
- LOGINF("Added %s:%d:%d &virtpcidev->generic_dev:%p\n",
- (devtype == VIRTHBA_TYPE) ? "virthba" : "virtnic",
- addparams->bus_no, addparams->device_no,
- &virtpcidev->generic_dev);
POSTCODE_LINUX_2(VPCI_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
return 1;
}
/* this function is called when the last reference to the
* device is removed
*/
- LOGINF("In virtpci_device_release:%p - NOT YET IMPLEMENTED\n", dev_);
}
/*****************************************************/
return -1;
}
- LOGINF("successfully registered virtpci_ctrlchan_func (0x%p) as callback.\n",
- (void *)&virtpci_ctrlchan_func);
/* create debugfs directory and info file inside. */
virtpci_debugfs_dir = debugfs_create_dir("virtpci", NULL);
debugfs_create_file("info", S_IRUSR, virtpci_debugfs_dir,
NULL, &debugfs_info_fops);
- LOGINF("Leaving\n");
POSTCODE_LINUX_2(VPCI_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
return 0;
}
static void __exit virtpci_mod_exit(void)
{
- LOGINF("virtpci_mod_exit...\n");
-
/* unregister the callback function */
if (!uisctrl_register_req_handler(2, NULL, NULL))
LOGERR("uisctrl_register_req_handler ****FAILED.\n");
device_unregister(&virtpci_rootbus_device);
bus_unregister(&virtpci_bus_type);
debugfs_remove_recursive(virtpci_debugfs_dir);
- LOGINF("Leaving\n");
}
module_init(virtpci_mod_init);
if (!unisys_spar_platform)
return -ENODEV;
- INFODRV("driver version %s loaded", VERSION);
return 0;
}
static void
visorchannel_exit(void)
{
- INFODRV("driver unloaded");
}
module_init(visorchannel_init);
return -1;
}
registered = TRUE;
- INFODRV("New major number %d registered\n", MAJOR(majordev));
} else {
/* static major device number registration required */
if (register_chrdev_region(majordev, 1, MYDRVNAME) < 0) {
return -1;
}
registered = TRUE;
- INFODRV("Static major number %d registered\n", MAJOR(majordev));
}
rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1);
if (rc < 0) {
ERRDRV("failed to create char device: (status=%d)\n", rc);
return -1;
}
- INFODRV("Registered char device for %s (major=%d)",
- MYDRVNAME, MAJOR(majordev));
return 0;
}
&& g_DeviceChangeStatePacket.device_change_state.dev_no ==
g_diagpoolDevNo)
outmsg.cmd = g_DeviceChangeStatePacket;
- if (outmsg.hdr.flags.test_message == 1) {
- LOGINF("%s controlvm_msg=0x%x response=%d for test message",
- __func__, outmsg.hdr.id, response);
+ if (outmsg.hdr.flags.test_message == 1)
return;
- }
+
if (!visorchannel_signalinsert(ControlVm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) {
LOGERR("signalinsert failed!");
*/
if (busNo == g_diagpoolBusNo
&& devNo == g_diagpoolDevNo) {
- LOGINF("DEVICE_CHANGESTATE(DiagpoolChannel busNo=%d devNo=%d is pausing...)",
- busNo, devNo);
/* this will trigger the
* diag_shutdown.sh script in
* the visorchipset hotplug */
is_diagpool_channel(pDevInfo->chan_info.channel_type_uuid)) {
g_diagpoolBusNo = busNo;
g_diagpoolDevNo = devNo;
- LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu",
- g_diagpoolBusNo, g_diagpoolDevNo);
}
device_epilog(busNo, devNo, segment_state_running,
CONTROLVM_DEVICE_CREATE, &inmsg->hdr, rc,
info->offset = offset;
info->bytes = bytes;
info->ptr = payload;
- LOGINF("offset=%llu, bytes=%lu, ptr=%p",
- (u64) (info->offset), (ulong) (info->bytes), info->ptr);
Away:
if (rc < 0) {
* and disks mounted for the partition
*/
g_ChipSetMsgHdr = *msgHdr;
- LOGINF("Holding CHIPSET_READY response");
}
}
sprintf(env_func, "SPAR_PARAHOTPLUG_FUNCTION=%d",
cmd->device_change_state.dev_no & 0x7);
- LOGINF("parahotplug_request_kickoff: state=%d, bdf=%d/%d/%d, id=%u\n",
- cmd->device_change_state.state.active,
- cmd->device_change_state.bus_no,
- cmd->device_change_state.dev_no >> 3,
- cmd->device_change_state.dev_no & 7, req->id);
-
kobject_uevent_env(&Visorchipset_platform_device.dev.kobj, KOBJ_CHANGE,
envp);
}
}
switch (inmsg.hdr.id) {
case CONTROLVM_CHIPSET_INIT:
- LOGINF("CHIPSET_INIT(#busses=%lu,#switches=%lu)",
- (ulong) inmsg.cmd.init_chipset.bus_count,
- (ulong) inmsg.cmd.init_chipset.switch_count);
chipset_init(&inmsg);
break;
case CONTROLVM_BUS_CREATE:
- LOGINF("BUS_CREATE(%lu,#devs=%lu)",
- (ulong) cmd->create_bus.bus_no,
- (ulong) cmd->create_bus.dev_count);
bus_create(&inmsg);
break;
case CONTROLVM_BUS_DESTROY:
- LOGINF("BUS_DESTROY(%lu)", (ulong) cmd->destroy_bus.bus_no);
bus_destroy(&inmsg);
break;
case CONTROLVM_BUS_CONFIGURE:
- LOGINF("BUS_CONFIGURE(%lu)", (ulong) cmd->configure_bus.bus_no);
bus_configure(&inmsg, parser_ctx);
break;
case CONTROLVM_DEVICE_CREATE:
- LOGINF("DEVICE_CREATE(%lu,%lu)",
- (ulong) cmd->create_device.bus_no,
- (ulong) cmd->create_device.dev_no);
my_device_create(&inmsg);
break;
case CONTROLVM_DEVICE_CHANGESTATE:
if (cmd->device_change_state.flags.phys_device) {
- LOGINF("DEVICE_CHANGESTATE for physical device (%lu,%lu, active=%lu)",
- (ulong) cmd->device_change_state.bus_no,
- (ulong) cmd->device_change_state.dev_no,
- (ulong) cmd->device_change_state.state.active);
parahotplug_process_message(&inmsg);
} else {
- LOGINF("DEVICE_CHANGESTATE for virtual device (%lu,%lu, state.Alive=0x%lx)",
- (ulong) cmd->device_change_state.bus_no,
- (ulong) cmd->device_change_state.dev_no,
- (ulong) cmd->device_change_state.state.alive);
/* save the hdr and cmd structures for later use */
/* when sending back the response to Command */
my_device_changestate(&inmsg);
}
break;
case CONTROLVM_DEVICE_DESTROY:
- LOGINF("DEVICE_DESTROY(%lu,%lu)",
- (ulong) cmd->destroy_device.bus_no,
- (ulong) cmd->destroy_device.dev_no);
my_device_destroy(&inmsg);
break;
case CONTROLVM_DEVICE_CONFIGURE:
- LOGINF("DEVICE_CONFIGURE(%lu,%lu)",
- (ulong) cmd->configure_device.bus_no,
- (ulong) cmd->configure_device.dev_no);
/* no op for now, just send a respond that we passed */
if (inmsg.hdr.flags.response_expected)
controlvm_respond(&inmsg.hdr, CONTROLVM_RESP_SUCCESS);
break;
case CONTROLVM_CHIPSET_READY:
- LOGINF("CHIPSET_READY");
chipset_ready(&inmsg.hdr);
break;
case CONTROLVM_CHIPSET_SELFTEST:
- LOGINF("CHIPSET_SELFTEST");
chipset_selftest(&inmsg.hdr);
break;
case CONTROLVM_CHIPSET_STOP:
- LOGINF("CHIPSET_STOP");
chipset_notready(&inmsg.hdr);
break;
default:
__func__);
return 0;
}
- INFODRV("controlvm addr=%Lx", addr);
return addr;
}
if (visorchipset_holdchipsetready
&& (g_ChipSetMsgHdr.id != CONTROLVM_INVALID)) {
if (check_chipset_events() == 1) {
- LOGINF("Sending CHIPSET_READY response");
controlvm_respond(&g_ChipSetMsgHdr, 0);
clear_chipset_events();
memset(&g_ChipSetMsgHdr, 0,
* polling
*/
if (Poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_SLOW) {
- LOGINF("switched to slow controlvm polling");
Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
}
} else {
if (Poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_FAST) {
Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
- LOGINF("switched to fast controlvm polling");
}
}
POSTCODE_SEVERITY_ERR);
return;
}
- LOGINF("Bus and device ready for dumping");
POSTCODE_LINUX_2(CRASH_DEV_EXIT_PC, POSTCODE_SEVERITY_INFO);
return;
visorchipset_init(void)
{
int rc = 0, x = 0;
- char s[64];
HOSTADDRESS addr;
if (!unisys_spar_platform)
return -ENODEV;
- LOGINF("chipset driver version %s loaded", VERSION);
- /* process module options */
- POSTCODE_LINUX_2(DRIVER_ENTRY_PC, POSTCODE_SEVERITY_INFO);
-
- LOGINF("option - testvnic=%d", visorchipset_testvnic);
- LOGINF("option - testvnicclient=%d", visorchipset_testvnicclient);
- LOGINF("option - testmsg=%d", visorchipset_testmsg);
- LOGINF("option - testteardown=%d", visorchipset_testteardown);
- LOGINF("option - major=%d", visorchipset_major);
- LOGINF("option - serverregwait=%d", visorchipset_serverregwait);
- LOGINF("option - clientregwait=%d", visorchipset_clientregwait);
- LOGINF("option - holdchipsetready=%d", visorchipset_holdchipsetready);
-
memset(&BusDev_Server_Notifiers, 0, sizeof(BusDev_Server_Notifiers));
memset(&BusDev_Client_Notifiers, 0, sizeof(BusDev_Client_Notifiers));
memset(&ControlVm_payload_info, 0, sizeof(ControlVm_payload_info));
spar_controlvm_channel_protocol_uuid);
if (SPAR_CONTROLVM_CHANNEL_OK_CLIENT(
visorchannel_get_header(ControlVm_channel))) {
- LOGINF("Channel %s (ControlVm) discovered",
- visorchannel_id(ControlVm_channel, s));
initialize_controlvm_payload();
} else {
LOGERR("controlvm channel is invalid");
rc = -1;
goto Away;
}
- if (visorchipset_disable_controlvm) {
- LOGINF("visorchipset_init:controlvm disabled");
- } else {
+ if (!visorchipset_disable_controlvm) {
/* if booting in a crash kernel */
if (visorchipset_crash_kernel)
INIT_DELAYED_WORK(&Periodic_controlvm_work,
rc = -1;
goto Away;
}
- LOGINF("visorchipset device created");
POSTCODE_LINUX_2(CHIPSET_INIT_SUCCESS_PC, POSTCODE_SEVERITY_INFO);
rc = 0;
Away:
static void
visorchipset_exit(void)
{
- char s[99];
-
POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);
if (visorchipset_disable_controlvm) {
memset(&g_DelDumpMsgHdr, 0, sizeof(struct controlvm_message_header));
- LOGINF("Channel %s (ControlVm) disconnected",
- visorchannel_id(ControlVm_channel, s));
visorchannel_destroy(ControlVm_channel);
visorchipset_file_cleanup();
POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);
- LOGINF("chipset driver unloaded");
}
module_param_named(testvnic, visorchipset_testvnic, int, S_IRUGO);