Lines Matching refs:pslot

498 * Input:   pslot   - cannot be NULL for READ_ALLSTAT
503 int ibmphp_hpc_readslot(struct slot *pslot, u8 cmd, u8 *pstatus)
511 debug_polling("%s - Entry pslot[%p] cmd[%x] pstatus[%p]\n", __func__, pslot, cmd, pstatus);
513 if ((pslot == NULL)
521 busindex = ibmphp_get_bus_index(pslot->bus);
529 index = pslot->ctlr_index;
539 ctlr_ptr = pslot->ctrl;
557 pslot->ctrl->status = status;
558 pslot->status = ctrl_read(ctlr_ptr, wpg_bbar, index);
562 pslot->ext_status = ctrl_read(ctlr_ptr, wpg_bbar, index + WPG_1ST_EXTSLOT_INDEX);
582 pslot->busstatus = ctrl_read(ctlr_ptr, wpg_bbar, index);
597 list_for_each_entry(pslot, &ibmphp_slot_head,
599 index = pslot->ctlr_index;
603 pslot->status = ctrl_read(ctlr_ptr, wpg_bbar, index);
607 pslot->ext_status =
641 int ibmphp_hpc_writeslot(struct slot *pslot, u8 cmd)
651 debug_polling("%s - Entry pslot[%p] cmd[%x]\n", __func__, pslot, cmd);
652 if (pslot == NULL) {
661 busindex = ibmphp_get_bus_index(pslot->bus);
669 index = pslot->ctlr_index;
679 ctlr_ptr = pslot->ctrl;
788 struct slot *pslot = NULL;
806 list_for_each_entry(pslot, &ibmphp_slot_head,
810 if (pslot->ctrl->ctlr_relative_id == ctrl_count) {
812 if (READ_SLOT_LATCH(pslot->ctrl)) {
813 rc = ibmphp_hpc_readslot(pslot,
819 pslot->ctrl);
827 list_for_each_entry(pslot, &ibmphp_slot_head,
830 memcpy((void *) &myslot, (void *) pslot,
832 rc = ibmphp_hpc_readslot(pslot, READ_ALLSTAT, NULL);
833 if ((myslot.status != pslot->status)
834 || (myslot.ext_status != pslot->ext_status))
835 process_changeinstatus(pslot, &myslot);
838 list_for_each_entry(pslot, &ibmphp_slot_head,
842 if (pslot->ctrl->ctlr_relative_id == ctrl_count) {
844 if (READ_SLOT_LATCH(pslot->ctrl))
845 rc = ibmphp_hpc_readslot(pslot,
897 static int process_changeinstatus(struct slot *pslot, struct slot *poldslot)
904 debug("process_changeinstatus - Entry pslot[%p], poldslot[%p]\n", pslot, poldslot);
907 if ((pslot->status & 0x01) != (poldslot->status & 0x01))
914 if ((pslot->status & 0x04) != (poldslot->status & 0x04))
919 if (((pslot->status & 0x08) != (poldslot->status & 0x08))
920 || ((pslot->status & 0x10) != (poldslot->status & 0x10)))
924 if ((pslot->status & 0x20) != (poldslot->status & 0x20))
933 if ((pslot->status & 0x80) != (poldslot->status & 0x80)) {
936 if (pslot->status & 0x80) {
937 if (SLOT_PWRGD(pslot->status)) {
941 rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS, &status);
944 else // overwrite power in pslot to OFF
945 pslot->status &= ~HPC_SLOT_POWER;
956 if ((pslot->ext_status & 0x08) != (poldslot->ext_status & 0x08))
961 pslot->flag = 0;
962 rc = ibmphp_do_disable_slot(pslot);
966 ibmphp_update_slot_info(pslot);
985 struct slot myslot, *pslot;
996 pslot = ibmphp_get_slot_from_physical_num(i);
997 if (pslot) {
998 memcpy((void *) &myslot, (void *) pslot, sizeof(struct slot));
999 rc = ibmphp_hpc_readslot(pslot, READ_ALLSTAT, NULL);
1001 process_changeinstatus(pslot, &myslot);