PCI_SPEED_100MHz_PCIX_266 = 0x0a,
PCI_SPEED_133MHz_PCIX_266 = 0x0b,
PCI_SPEED_66MHz_PCIX_533 = 0x11,
- PCI_SPEED_100MHz_PCIX_533 = 0X12,
+ PCI_SPEED_100MHz_PCIX_533 = 0x12,
PCI_SPEED_133MHz_PCIX_533 = 0x13,
PCI_SPEED_UNKNOWN = 0xff,
};
p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save));
p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
- if (!getstatus) {
+ if (getstatus) {
/*
* Switch opened
*/
}
rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
- if (rc || !getstatus) {
+ if (rc || getstatus) {
info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
up(&p_slot->ctrl->crit_sect);
return (0);
}
ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
- if (ret || !getstatus) {
+ if (ret || getstatus) {
info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
up(&p_slot->ctrl->crit_sect);
return (0);
p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save));
p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
- if (!getstatus) {
+ if (getstatus) {
/*
* Switch opened
*/
up(&ctrl->crit_sect);
}
} else {
- if ((bus_speed > 0x4) || (max_bus_speed > 0x4)) {
+ if (bus_speed > 0x4) {
err("%s: speed of bus %x and adapter %x mismatch\n", __FUNCTION__, bus_speed, adapter_speed);
return WRONG_BUS_FREQUENCY;
}
up(&ctrl->crit_sect);
}
} else {
- if ((bus_speed > 0x2) || (max_bus_speed > 0x2)) {
+ if (bus_speed > 0x2) {
err("%s: speed of bus %x and adapter %x mismatch\n", __FUNCTION__, bus_speed, adapter_speed);
return WRONG_BUS_FREQUENCY;
}
return (0);
}
rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
- if (rc || !getstatus) {
+ if (rc || getstatus) {
info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
up(&p_slot->ctrl->crit_sect);
return (0);
return (0);
}
ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
- if (ret || !getstatus) {
+ if (ret || getstatus) {
info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
up(&p_slot->ctrl->crit_sect);
return (0);
#define PCIX_66MHZ_ECC 0x5
#define PCIX_100MHZ_ECC 0x6
#define PCIX_133MHZ_ECC 0x7
-#define PCIX_66MHZ_266 0x8
-#define PCIX_100MHZ_266 0x9
-#define PCIX_133MHZ_266 0x0a
-#define PCIX_66MHZ_533 0x0b
-#define PCIX_100MHZ_533 0x0c
-#define PCIX_133MHZ_533 0x0d
+#define PCIX_66MHZ_266 0x9
+#define PCIX_100MHZ_266 0xa
+#define PCIX_133MHZ_266 0xb
+#define PCIX_66MHZ_533 0x11
+#define PCIX_100MHZ_533 0x12
+#define PCIX_133MHZ_533 0x13
/* Slot Configuration */
#define SLOT_NUM 0x0000001F
slot_reg = readl(php_ctlr->creg + SLOT1 + 4*(slot->hp_slot));
slot_status = (u16)slot_reg;
- *status = ((slot_status & 0x0100) == 0) ? 1 : 0;
+ *status = ((slot_status & 0x0100) == 0) ? 0 : 1; /* 0 -> close; 1 -> open */
+
DBG_LEAVE_ROUTINE
return 0;