Lines Matching refs:pslot

500 * Input:   pslot   - cannot be NULL for READ_ALLSTAT
505 int ibmphp_hpc_readslot(struct slot *pslot, u8 cmd, u8 *pstatus)
513 debug_polling("%s - Entry pslot[%p] cmd[%x] pstatus[%p]\n", __func__, pslot, cmd, pstatus);
515 if ((pslot == NULL)
523 busindex = ibmphp_get_bus_index(pslot->bus);
531 index = pslot->ctlr_index;
541 ctlr_ptr = pslot->ctrl;
559 pslot->ctrl->status = status;
560 pslot->status = ctrl_read(ctlr_ptr, wpg_bbar, index);
564 pslot->ext_status = ctrl_read(ctlr_ptr, wpg_bbar, index + WPG_1ST_EXTSLOT_INDEX);
584 pslot->busstatus = ctrl_read(ctlr_ptr, wpg_bbar, index);
599 list_for_each_entry(pslot, &ibmphp_slot_head,
601 index = pslot->ctlr_index;
605 pslot->status = ctrl_read(ctlr_ptr, wpg_bbar, index);
609 pslot->ext_status =
643 int ibmphp_hpc_writeslot(struct slot *pslot, u8 cmd)
653 debug_polling("%s - Entry pslot[%p] cmd[%x]\n", __func__, pslot, cmd);
654 if (pslot == NULL) {
663 busindex = ibmphp_get_bus_index(pslot->bus);
671 index = pslot->ctlr_index;
681 ctlr_ptr = pslot->ctrl;
790 struct slot *pslot = NULL;
808 list_for_each_entry(pslot, &ibmphp_slot_head,
812 if (pslot->ctrl->ctlr_relative_id == ctrl_count) {
814 if (READ_SLOT_LATCH(pslot->ctrl)) {
815 rc = ibmphp_hpc_readslot(pslot,
821 pslot->ctrl);
829 list_for_each_entry(pslot, &ibmphp_slot_head,
832 memcpy((void *) &myslot, (void *) pslot,
834 rc = ibmphp_hpc_readslot(pslot, READ_ALLSTAT, NULL);
835 if ((myslot.status != pslot->status)
836 || (myslot.ext_status != pslot->ext_status))
837 process_changeinstatus(pslot, &myslot);
840 list_for_each_entry(pslot, &ibmphp_slot_head,
844 if (pslot->ctrl->ctlr_relative_id == ctrl_count) {
846 if (READ_SLOT_LATCH(pslot->ctrl))
847 rc = ibmphp_hpc_readslot(pslot,
899 static int process_changeinstatus(struct slot *pslot, struct slot *poldslot)
906 debug("process_changeinstatus - Entry pslot[%p], poldslot[%p]\n", pslot, poldslot);
909 if ((pslot->status & 0x01) != (poldslot->status & 0x01))
916 if ((pslot->status & 0x04) != (poldslot->status & 0x04))
921 if (((pslot->status & 0x08) != (poldslot->status & 0x08))
922 || ((pslot->status & 0x10) != (poldslot->status & 0x10)))
926 if ((pslot->status & 0x20) != (poldslot->status & 0x20))
935 if ((pslot->status & 0x80) != (poldslot->status & 0x80)) {
938 if (pslot->status & 0x80) {
939 if (SLOT_PWRGD(pslot->status)) {
943 rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS, &status);
946 else // overwrite power in pslot to OFF
947 pslot->status &= ~HPC_SLOT_POWER;
958 if ((pslot->ext_status & 0x08) != (poldslot->ext_status & 0x08))
963 pslot->flag = 0;
964 rc = ibmphp_do_disable_slot(pslot);
968 ibmphp_update_slot_info(pslot);
987 struct slot myslot, *pslot;
998 pslot = ibmphp_get_slot_from_physical_num(i);
999 if (pslot) {
1000 memcpy((void *) &myslot, (void *) pslot, sizeof(struct slot));
1001 rc = ibmphp_hpc_readslot(pslot, READ_ALLSTAT, NULL);
1003 process_changeinstatus(pslot, &myslot);