@@ -61,7 +61,7 @@ u8 pciehp_handle_attention_button(struct slot *p_slot)
6161 struct controller * ctrl = p_slot -> ctrl ;
6262
6363 /* Attention Button Change */
64- ctrl_dbg (ctrl , "Attention button interrupt received. \n" );
64+ ctrl_dbg (ctrl , "Attention button interrupt received\n" );
6565
6666 /*
6767 * Button pressed - See if need to TAKE ACTION!!!
@@ -81,7 +81,7 @@ u8 pciehp_handle_switch_change(struct slot *p_slot)
8181 struct controller * ctrl = p_slot -> ctrl ;
8282
8383 /* Switch Change */
84- ctrl_dbg (ctrl , "Switch interrupt received. \n" );
84+ ctrl_dbg (ctrl , "Switch interrupt received\n" );
8585
8686 p_slot -> hpc_ops -> get_latch_status (p_slot , & getstatus );
8787 if (getstatus ) {
@@ -110,7 +110,7 @@ u8 pciehp_handle_presence_change(struct slot *p_slot)
110110 struct controller * ctrl = p_slot -> ctrl ;
111111
112112 /* Presence Change */
113- ctrl_dbg (ctrl , "Presence/Notify input change. \n" );
113+ ctrl_dbg (ctrl , "Presence/Notify input change\n" );
114114
115115 /* Switch is open, assume a presence change
116116 * Save the presence state
@@ -142,7 +142,7 @@ u8 pciehp_handle_power_fault(struct slot *p_slot)
142142 struct controller * ctrl = p_slot -> ctrl ;
143143
144144 /* power fault */
145- ctrl_dbg (ctrl , "Power fault interrupt received. \n" );
145+ ctrl_dbg (ctrl , "Power fault interrupt received\n" );
146146
147147 if ( !(p_slot -> hpc_ops -> query_power_fault (p_slot ))) {
148148 /*
@@ -157,7 +157,7 @@ u8 pciehp_handle_power_fault(struct slot *p_slot)
157157 */
158158 ctrl_info (ctrl , "Power fault on Slot(%s)\n" , slot_name (p_slot ));
159159 event_type = INT_POWER_FAULT ;
160- ctrl_info (ctrl , "power fault bit %x set\n" , 0 );
160+ ctrl_info (ctrl , "Power fault bit %x set\n" , 0 );
161161 }
162162
163163 queue_interrupt_event (p_slot , event_type );
@@ -175,8 +175,7 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
175175 if (POWER_CTRL (ctrl )) {
176176 if (pslot -> hpc_ops -> power_off_slot (pslot )) {
177177 ctrl_err (ctrl ,
178- "%s: Issue of Slot Power Off command failed\n" ,
179- __func__ );
178+ "Issue of Slot Power Off command failed\n" );
180179 return ;
181180 }
182181 }
@@ -193,8 +192,8 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
193192
194193 if (ATTN_LED (ctrl )) {
195194 if (pslot -> hpc_ops -> set_attention_status (pslot , 1 )) {
196- ctrl_err (ctrl , "%s: Issue of Set Attention "
197- "Led command failed\n" , __func__ );
195+ ctrl_err (ctrl ,
196+ "Issue of Set Attention Led command failed\n" );
198197 return ;
199198 }
200199 }
@@ -211,8 +210,9 @@ static int board_added(struct slot *p_slot)
211210{
212211 int retval = 0 ;
213212 struct controller * ctrl = p_slot -> ctrl ;
213+ struct pci_bus * parent = ctrl -> pci_dev -> subordinate ;
214214
215- ctrl_dbg (ctrl , "%s: slot device, slot offset, hp slot = %d, %d , %d\n" ,
215+ ctrl_dbg (ctrl , "%s: slot device, slot offset, hp slot = %d, %d, %d\n" ,
216216 __func__ , p_slot -> device , ctrl -> slot_device_offset ,
217217 p_slot -> hp_slot );
218218
@@ -229,22 +229,22 @@ static int board_added(struct slot *p_slot)
229229 /* Check link training status */
230230 retval = p_slot -> hpc_ops -> check_lnk_status (ctrl );
231231 if (retval ) {
232- ctrl_err (ctrl , "%s: Failed to check link status\n" , __func__ );
232+ ctrl_err (ctrl , "Failed to check link status\n" );
233233 set_slot_off (ctrl , p_slot );
234234 return retval ;
235235 }
236236
237237 /* Check for a power fault */
238238 if (p_slot -> hpc_ops -> query_power_fault (p_slot )) {
239- ctrl_dbg (ctrl , "%s: power fault detected\n" , __func__ );
239+ ctrl_dbg (ctrl , "Power fault detected\n" );
240240 retval = POWER_FAILURE ;
241241 goto err_exit ;
242242 }
243243
244244 retval = pciehp_configure_device (p_slot );
245245 if (retval ) {
246- ctrl_err (ctrl , "Cannot add device 0x%x:%x \n" ,
247- p_slot -> bus , p_slot -> device );
246+ ctrl_err (ctrl , "Cannot add device at %04x:%02x:%02x \n" ,
247+ pci_domain_nr ( parent ), p_slot -> bus , p_slot -> device );
248248 goto err_exit ;
249249 }
250250
@@ -276,14 +276,14 @@ static int remove_board(struct slot *p_slot)
276276 if (retval )
277277 return retval ;
278278
279- ctrl_dbg (ctrl , "In %s, hp_slot = %d\n" , __func__ , p_slot -> hp_slot );
279+ ctrl_dbg (ctrl , "%s: hp_slot = %d\n" , __func__ , p_slot -> hp_slot );
280280
281281 if (POWER_CTRL (ctrl )) {
282282 /* power off slot */
283283 retval = p_slot -> hpc_ops -> power_off_slot (p_slot );
284284 if (retval ) {
285- ctrl_err (ctrl , "%s: Issue of Slot Disable command "
286- "failed\n" , __func__ );
285+ ctrl_err (ctrl ,
286+ "Issue of Slot Disable command failed\n" );
287287 return retval ;
288288 }
289289 }
@@ -324,8 +324,10 @@ static void pciehp_power_thread(struct work_struct *work)
324324 switch (p_slot -> state ) {
325325 case POWEROFF_STATE :
326326 mutex_unlock (& p_slot -> lock );
327- ctrl_dbg (p_slot -> ctrl , "%s: disabling bus:device(%x:%x)\n" ,
328- __func__ , p_slot -> bus , p_slot -> device );
327+ ctrl_dbg (p_slot -> ctrl ,
328+ "Disabling domain:bus:device=%04x:%02x:%02x\n" ,
329+ pci_domain_nr (p_slot -> ctrl -> pci_dev -> subordinate ),
330+ p_slot -> bus , p_slot -> device );
329331 pciehp_disable_slot (p_slot );
330332 mutex_lock (& p_slot -> lock );
331333 p_slot -> state = STATIC_STATE ;
@@ -433,7 +435,6 @@ static void handle_button_press_event(struct slot *p_slot)
433435 * expires to cancel hot-add or hot-remove
434436 */
435437 ctrl_info (ctrl , "Button cancel on Slot(%s)\n" , slot_name (p_slot ));
436- ctrl_dbg (ctrl , "%s: button cancel\n" , __func__ );
437438 cancel_delayed_work (& p_slot -> work );
438439 if (p_slot -> state == BLINKINGOFF_STATE ) {
439440 if (PWR_LED (ctrl ))
@@ -537,16 +538,15 @@ int pciehp_enable_slot(struct slot *p_slot)
537538
538539 rc = p_slot -> hpc_ops -> get_adapter_status (p_slot , & getstatus );
539540 if (rc || !getstatus ) {
540- ctrl_info (ctrl , "%s: no adapter on slot(%s)\n" ,
541- __func__ , slot_name (p_slot ));
541+ ctrl_info (ctrl , "No adapter on slot(%s)\n" , slot_name (p_slot ));
542542 mutex_unlock (& p_slot -> ctrl -> crit_sect );
543543 return - ENODEV ;
544544 }
545545 if (MRL_SENS (p_slot -> ctrl )) {
546546 rc = p_slot -> hpc_ops -> get_latch_status (p_slot , & getstatus );
547547 if (rc || getstatus ) {
548- ctrl_info (ctrl , "%s: latch open on slot(%s)\n" ,
549- __func__ , slot_name (p_slot ));
548+ ctrl_info (ctrl , "Latch open on slot(%s)\n" ,
549+ slot_name (p_slot ));
550550 mutex_unlock (& p_slot -> ctrl -> crit_sect );
551551 return - ENODEV ;
552552 }
@@ -555,8 +555,8 @@ int pciehp_enable_slot(struct slot *p_slot)
555555 if (POWER_CTRL (p_slot -> ctrl )) {
556556 rc = p_slot -> hpc_ops -> get_power_status (p_slot , & getstatus );
557557 if (rc || getstatus ) {
558- ctrl_info (ctrl , "%s: already enabled on slot(%s)\n" ,
559- __func__ , slot_name (p_slot ));
558+ ctrl_info (ctrl , "Already enabled on slot(%s)\n" ,
559+ slot_name (p_slot ));
560560 mutex_unlock (& p_slot -> ctrl -> crit_sect );
561561 return - EINVAL ;
562562 }
@@ -591,8 +591,8 @@ int pciehp_disable_slot(struct slot *p_slot)
591591 if (!HP_SUPR_RM (p_slot -> ctrl )) {
592592 ret = p_slot -> hpc_ops -> get_adapter_status (p_slot , & getstatus );
593593 if (ret || !getstatus ) {
594- ctrl_info (ctrl , "%s: no adapter on slot(%s)\n" ,
595- __func__ , slot_name (p_slot ));
594+ ctrl_info (ctrl , "No adapter on slot(%s)\n" ,
595+ slot_name (p_slot ));
596596 mutex_unlock (& p_slot -> ctrl -> crit_sect );
597597 return - ENODEV ;
598598 }
@@ -601,8 +601,8 @@ int pciehp_disable_slot(struct slot *p_slot)
601601 if (MRL_SENS (p_slot -> ctrl )) {
602602 ret = p_slot -> hpc_ops -> get_latch_status (p_slot , & getstatus );
603603 if (ret || getstatus ) {
604- ctrl_info (ctrl , "%s: latch open on slot(%s)\n" ,
605- __func__ , slot_name (p_slot ));
604+ ctrl_info (ctrl , "Latch open on slot(%s)\n" ,
605+ slot_name (p_slot ));
606606 mutex_unlock (& p_slot -> ctrl -> crit_sect );
607607 return - ENODEV ;
608608 }
@@ -611,8 +611,8 @@ int pciehp_disable_slot(struct slot *p_slot)
611611 if (POWER_CTRL (p_slot -> ctrl )) {
612612 ret = p_slot -> hpc_ops -> get_power_status (p_slot , & getstatus );
613613 if (ret || !getstatus ) {
614- ctrl_info (ctrl , "%s: already disabled slot(%s)\n" ,
615- __func__ , slot_name (p_slot ));
614+ ctrl_info (ctrl , "Already disabled on slot(%s)\n" ,
615+ slot_name (p_slot ));
616616 mutex_unlock (& p_slot -> ctrl -> crit_sect );
617617 return - EINVAL ;
618618 }
0 commit comments